aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-09-29 08:38:15 +0000
committerKaroly Lorentey2004-09-29 08:38:15 +0000
commit181bb49001b52ee593c852377951f8f7b3cf4f38 (patch)
treef4413632929b45d3936621a7c65d7fc6eee16fd6
parentd73d547a20c1a36612dc637d860113551d4ddc6a (diff)
parentc1d7d28589c020b2b72d795638e100eda852d6aa (diff)
downloademacs-181bb49001b52ee593c852377951f8f7b3cf4f38.tar.gz
emacs-181bb49001b52ee593c852377951f8f7b3cf4f38.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-567 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-568 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-569 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-570 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-571 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-572 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-573 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-574 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-575 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-576 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-577 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-578 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-579 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-580 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-31 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-32 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-33 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-34 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-35 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-36 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-37 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-251
-rw-r--r--ChangeLog10
-rwxr-xr-xconfigure92
-rw-r--r--configure.in22
-rw-r--r--etc/ChangeLog15
-rw-r--r--etc/NEWS2
-rw-r--r--etc/PROBLEMS22
-rw-r--r--etc/e/etermbin1095 -> 1086 bytes
-rw-r--r--etc/e/eterm.ti78
-rw-r--r--etc/enriched.doc10
-rw-r--r--leim/ChangeLog5
-rw-r--r--leim/quail/uni-input.el5
-rw-r--r--lisp/ChangeLog114
-rw-r--r--lisp/calendar/diary-lib.el227
-rw-r--r--lisp/dired.el134
-rw-r--r--lisp/files.el3
-rw-r--r--lisp/fringe.el46
-rw-r--r--lisp/gnus/ChangeLog74
-rw-r--r--lisp/gnus/flow-fill.el2
-rw-r--r--lisp/gnus/gnus-art.el2
-rw-r--r--lisp/gnus/gnus-cache.el5
-rw-r--r--lisp/gnus/gnus-diary.el2
-rw-r--r--lisp/gnus/gnus-fun.el7
-rw-r--r--lisp/gnus/gnus-msg.el20
-rw-r--r--lisp/gnus/gnus-picon.el3
-rw-r--r--lisp/gnus/gnus.el39
-rw-r--r--lisp/gnus/html2text.el5
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/gnus/mm-bodies.el11
-rw-r--r--lisp/gnus/mm-decode.el8
-rw-r--r--lisp/gnus/mm-util.el17
-rw-r--r--lisp/gnus/mml-sec.el2
-rw-r--r--lisp/gnus/mml-smime.el3
-rw-r--r--lisp/gnus/mml.el3
-rw-r--r--lisp/gnus/nnfolder.el2
-rw-r--r--lisp/gnus/nnheader.el4
-rw-r--r--lisp/gnus/nnml.el2
-rw-r--r--lisp/gnus/rfc2047.el35
-rw-r--r--lisp/gnus/spam.el6
-rw-r--r--lisp/ido.el118
-rw-r--r--lisp/ls-lisp.el2
-rw-r--r--lisp/printing.el26
-rw-r--r--lisp/progmodes/gdb-ui.el16
-rw-r--r--lisp/subr.el2
-rw-r--r--lisp/term.el167
-rw-r--r--lisp/textmodes/enriched.el22
-rw-r--r--lispref/ChangeLog40
-rw-r--r--lispref/display.texi410
-rw-r--r--lispref/hooks.texi1
-rw-r--r--lispref/modes.texi89
-rw-r--r--lispref/searching.texi26
-rw-r--r--lispref/text.texi89
-rw-r--r--man/ChangeLog60
-rw-r--r--man/display.texi28
-rw-r--r--man/emacs-mime.texi2
-rw-r--r--man/gnus-faq.texi54
-rw-r--r--man/gnus.texi106
-rw-r--r--man/message.texi4
-rw-r--r--man/pgg.texi11
-rw-r--r--man/sieve.texi5
-rw-r--r--src/ChangeLog44
-rw-r--r--src/Makefile.in15
-rw-r--r--src/buffer.c22
-rw-r--r--src/config.in3
-rw-r--r--src/dispextern.h2
-rw-r--r--src/fringe.c286
-rw-r--r--src/xdisp.c6
66 files changed, 1863 insertions, 832 deletions
diff --git a/ChangeLog b/ChangeLog
index d7d85c039cc..3b77d509727 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
12004-09-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * configure.in (HAVE_EXECSHIELD): Only define on x86.
4 * configure: Rebuild.
5
62004-09-24 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
7
8 * configure.in: Check for exec-shield.
9 * configure: Rebuild.
10
12004-08-06 Andreas Schwab <schwab@suse.de> 112004-08-06 Andreas Schwab <schwab@suse.de>
2 12
3 * Makefile.in (install-arch-indep, uninstall): Add flymake. 13 * Makefile.in (install-arch-indep, uninstall): Add flymake.
diff --git a/configure b/configure
index 0e74a04e700..6cbdf0b2e99 100755
--- a/configure
+++ b/configure
@@ -310,7 +310,7 @@ ac_includes_default="\
310# include <unistd.h> 310# include <unistd.h>
311#endif" 311#endif"
312 312
313ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS' 313ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA RANLIB ac_ct_RANLIB INSTALL_INFO EGREP SETARCH LIBSOUND SET_MAKE PKG_CONFIG GTK_CFLAGS GTK_LIBS ALLOCA liblockfile LIBOBJS NEED_SETGID KMEM_GROUP GETLOADAVG_LIBS version configuration canonical srcdir lispdir locallisppath lisppath x_default_search_path etcdir archlibdir docdir bitmapdir gamedir gameuser c_switch_system c_switch_machine LD_SWITCH_X_SITE LD_SWITCH_X_SITE_AUX C_SWITCH_X_SITE X_TOOLKIT_TYPE machfile opsysfile carbon_appdir LTLIBOBJS'
314ac_subst_files='' 314ac_subst_files=''
315 315
316# Initialize some variables set by options. 316# Initialize some variables set by options.
@@ -4278,6 +4278,92 @@ rm -f conftest*
4278 4278
4279 4279
4280 4280
4281echo "$as_me:$LINENO: checking for /proc/sys/kernel/exec-shield" >&5
4282echo $ECHO_N "checking for /proc/sys/kernel/exec-shield... $ECHO_C" >&6
4283if test "${ac_cv_file__proc_sys_kernel_exec_shield+set}" = set; then
4284 echo $ECHO_N "(cached) $ECHO_C" >&6
4285else
4286 test "$cross_compiling" = yes &&
4287 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
4288echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
4289 { (exit 1); exit 1; }; }
4290if test -r "/proc/sys/kernel/exec-shield"; then
4291 ac_cv_file__proc_sys_kernel_exec_shield=yes
4292else
4293 ac_cv_file__proc_sys_kernel_exec_shield=no
4294fi
4295fi
4296echo "$as_me:$LINENO: result: $ac_cv_file__proc_sys_kernel_exec_shield" >&5
4297echo "${ECHO_T}$ac_cv_file__proc_sys_kernel_exec_shield" >&6
4298if test $ac_cv_file__proc_sys_kernel_exec_shield = yes; then
4299 emacs_cv_execshield=1
4300else
4301 emacs_cv_execshield=0
4302fi
4303
4304if test "$emacs_cv_execshield" = 1; then
4305 # Extract the first word of "setarch", so it can be a program name with args.
4306set dummy setarch; ac_word=$2
4307echo "$as_me:$LINENO: checking for $ac_word" >&5
4308echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4309if test "${ac_cv_path_SETARCH+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
4311else
4312 case $SETARCH in
4313 [\\/]* | ?:[\\/]*)
4314 ac_cv_path_SETARCH="$SETARCH" # Let the user override the test with a path.
4315 ;;
4316 *)
4317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4318for as_dir in $PATH
4319do
4320 IFS=$as_save_IFS
4321 test -z "$as_dir" && as_dir=.
4322 for ac_exec_ext in '' $ac_executable_extensions; do
4323 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4324 ac_cv_path_SETARCH="$as_dir/$ac_word$ac_exec_ext"
4325 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4326 break 2
4327 fi
4328done
4329done
4330
4331 test -z "$ac_cv_path_SETARCH" && ac_cv_path_SETARCH="no"
4332 ;;
4333esac
4334fi
4335SETARCH=$ac_cv_path_SETARCH
4336
4337if test -n "$SETARCH"; then
4338 echo "$as_me:$LINENO: result: $SETARCH" >&5
4339echo "${ECHO_T}$SETARCH" >&6
4340else
4341 echo "$as_me:$LINENO: result: no" >&5
4342echo "${ECHO_T}no" >&6
4343fi
4344
4345
4346 if test "$setarch" != no && test "$machine" = "intel386"; then
4347
4348cat >>confdefs.h <<\_ACEOF
4349#define HAVE_EXECSHIELD 1
4350_ACEOF
4351
4352 else
4353 case "`cat /proc/sys/kernel/exec-shield`" in
4354 0) ;;
4355 *)
4356 { { echo "$as_me:$LINENO: error: Exec-shield is turned on.
4357Emacs can not dump itself if exec-shield is turned on.
4358See \`etc/PROBLEMS' for further information." >&5
4359echo "$as_me: error: Exec-shield is turned on.
4360Emacs can not dump itself if exec-shield is turned on.
4361See \`etc/PROBLEMS' for further information." >&2;}
4362 { (exit 1); exit 1; }; }
4363 esac
4364 fi
4365fi
4366
4281#### Extract some information from the operating system and machine files. 4367#### Extract some information from the operating system and machine files.
4282 4368
4283{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out 4369{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
@@ -13277,7 +13363,6 @@ done
13277 13363
13278 13364
13279 13365
13280
13281for ac_func in gethostname getdomainname dup2 \ 13366for ac_func in gethostname getdomainname dup2 \
13282rename closedir mkdir rmdir sysinfo \ 13367rename closedir mkdir rmdir sysinfo \
13283random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ 13368random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
@@ -13286,7 +13371,7 @@ utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
13286__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ 13371__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
13287sendto recvfrom getsockopt setsockopt getsockname getpeername \ 13372sendto recvfrom getsockopt setsockopt getsockname getpeername \
13288gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \ 13373gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
13289memset memcmp memmove difftime memcpy mempcpy mblen mbrlen posix_memalign 13374memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
13290do 13375do
13291as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 13376as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13292echo "$as_me:$LINENO: checking for $ac_func" >&5 13377echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -22002,6 +22087,7 @@ s,@RANLIB@,$RANLIB,;t t
22002s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t 22087s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22003s,@INSTALL_INFO@,$INSTALL_INFO,;t t 22088s,@INSTALL_INFO@,$INSTALL_INFO,;t t
22004s,@EGREP@,$EGREP,;t t 22089s,@EGREP@,$EGREP,;t t
22090s,@SETARCH@,$SETARCH,;t t
22005s,@LIBSOUND@,$LIBSOUND,;t t 22091s,@LIBSOUND@,$LIBSOUND,;t t
22006s,@SET_MAKE@,$SET_MAKE,;t t 22092s,@SET_MAKE@,$SET_MAKE,;t t
22007s,@PKG_CONFIG@,$PKG_CONFIG,;t t 22093s,@PKG_CONFIG@,$PKG_CONFIG,;t t
diff --git a/configure.in b/configure.in
index b7318b8f805..95ff1f855f7 100644
--- a/configure.in
+++ b/configure.in
@@ -1286,6 +1286,26 @@ AC_LINK_IFELSE([main(){return 0;}],
1286dnl checks for Unix variants 1286dnl checks for Unix variants
1287AC_AIX 1287AC_AIX
1288 1288
1289dnl check if exec-shield is present.
1290AC_CHECK_FILE(/proc/sys/kernel/exec-shield, emacs_cv_execshield=1,
1291 emacs_cv_execshield=0)
1292if test "$emacs_cv_execshield" = 1; then
1293 AC_PATH_PROG(SETARCH, setarch, no)
1294 AC_SUBST(SETARCH)
1295 if test "$setarch" != no && test "$machine" = "intel386"; then
1296 AC_DEFINE(HAVE_EXECSHIELD, 1,
1297 [Define to 1 if this OS has exec shield and we can handle it.])
1298 else
1299 case "`cat /proc/sys/kernel/exec-shield`" in
1300 0) ;;
1301 *)
1302 AC_MSG_ERROR([Exec-shield is turned on.
1303Emacs can not dump itself if exec-shield is turned on.
1304See `etc/PROBLEMS' for further information.])
1305 esac
1306 fi
1307fi
1308
1289#### Extract some information from the operating system and machine files. 1309#### Extract some information from the operating system and machine files.
1290 1310
1291AC_CHECKING([the machine- and system-dependent files to find out 1311AC_CHECKING([the machine- and system-dependent files to find out
@@ -2342,7 +2362,7 @@ utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
2342__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ 2362__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
2343sendto recvfrom getsockopt setsockopt getsockname getpeername \ 2363sendto recvfrom getsockopt setsockopt getsockname getpeername \
2344gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \ 2364gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \
2345memset memcmp memmove difftime memcpy mempcpy mblen mbrlen posix_memalign) 2365memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign)
2346 2366
2347AC_CHECK_HEADERS(sys/un.h) 2367AC_CHECK_HEADERS(sys/un.h)
2348 2368
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 16e02786542..981fd88ba3a 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,18 @@
12004-09-26 Luc Teirlinck <teirllm@auburn.edu>
2
3 * enriched.doc: `enriched-annotation-alist' is now called
4 `enriched-translations'.
5
62004-09-26 Dan Nicolaescu <dann@ics.uci.edu>
7
8 * e/eterm.ti: Comment out smcup, rmcup. Add kbs, kdch1, rc, sc.
9 Reformat.
10 * e/eterm: Regenerate.
11
122004-09-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
13
14 * PROBLEMS: Updated exec-shield description.
15
12004-09-16 Dan Nicolaescu <dann@ics.uci.edu> 162004-09-16 Dan Nicolaescu <dann@ics.uci.edu>
2 17
3 * e/eterm.ti: Change the strings for smso and rmso. 18 * e/eterm.ti: Change the strings for smso and rmso.
diff --git a/etc/NEWS b/etc/NEWS
index 18fb4f5ebd4..84c90016f6f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1409,6 +1409,7 @@ appointments, paydays or anything else using a sexp.
1409year and day number, and moves to that date. Negative day numbers 1409year and day number, and moves to that date. Negative day numbers
1410count backward from the end of the year. 1410count backward from the end of the year.
1411 1411
1412---
1412** The functions `holiday-easter-etc' and `holiday-advent' now take 1413** The functions `holiday-easter-etc' and `holiday-advent' now take
1413arguments, and only report on the specified holiday rather than all. 1414arguments, and only report on the specified holiday rather than all.
1414This makes customization of the variable `christian-holidays' simpler, 1415This makes customization of the variable `christian-holidays' simpler,
@@ -2254,6 +2255,7 @@ configuration files.
2254 2255
2255* Lisp Changes in Emacs 21.4 2256* Lisp Changes in Emacs 21.4
2256 2257
2258+++
2257** Major mode functions now run the new normal hook 2259** Major mode functions now run the new normal hook
2258`after-change-major-mode-hook', at their very end, after the mode hooks. 2260`after-change-major-mode-hook', at their very end, after the mode hooks.
2259 2261
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 4a99e351e23..516947245a7 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -2329,28 +2329,34 @@ The fix is to install a newer version of ncurses, such as version 4.2.
2329*** Linux: Segfault during `make bootstrap' under certain recent versions of the Linux kernel. 2329*** Linux: Segfault during `make bootstrap' under certain recent versions of the Linux kernel.
2330 2330
2331With certain recent Linux kernels (like the one of Redhat Fedora Core 2331With certain recent Linux kernels (like the one of Redhat Fedora Core
23321), the new "Exec-shield" functionality is enabled by default, which 23321 and 2), the new "Exec-shield" functionality is enabled by default, which
2333creates a different memory layout that breaks the emacs dumper. 2333creates a different memory layout that breaks the emacs dumper.
2334 2334
2335Configure can overcome the problem of exec-shield if the architecture is
2336x86 and the program setarch is present. On other architectures no
2337workaround is known.
2338
2335You can check the Exec-shield state like this: 2339You can check the Exec-shield state like this:
2336 2340
2337 cat /proc/sys/kernel/exec-shield 2341 cat /proc/sys/kernel/exec-shield
2338 2342
2339It returns 1 or 2 when Exec-shield is enabled, 0 otherwise. Please 2343It returns non-zero when Exec-shield is enabled, 0 otherwise. Please
2340read your system documentation for more details on Exec-shield and 2344read your system documentation for more details on Exec-shield and
2341associated commands. 2345associated commands. Exec-shield can be turned off with this command:
2346
2347 echo "0" > /proc/sys/kernel/exec-shield
2342 2348
2343When Exec-shield is enabled, building Emacs will segfault during the 2349When Exec-shield is enabled, building Emacs will segfault during the
2344execution of this command: 2350execution of this command:
2345 2351
2346temacs --batch --load loadup [dump|bootstrap] 2352 ./temacs --batch --load loadup [dump|bootstrap]
2347 2353
2348To work around this problem, it is necessary to temporarily disable 2354To work around this problem, it is necessary to temporarily disable
2349Exec-shield while building Emacs, using the `setarch' command like 2355Exec-shield while building Emacs, or, on x86, by using the `setarch'
2350this: 2356command when running temacs like this:
2357
2358 setarch i386 ./temacs --batch --load loadup [dump|bootstrap]
2351 2359
2352 setarch i386 ./configure <configure parameters>
2353 setarch i386 make <make parameters>
2354 2360
2355*** Fatal signal in the command temacs -l loadup inc dump. 2361*** Fatal signal in the command temacs -l loadup inc dump.
2356 2362
diff --git a/etc/e/eterm b/etc/e/eterm
index 3c2a82fa956..2658701660b 100644
--- a/etc/e/eterm
+++ b/etc/e/eterm
Binary files differ
diff --git a/etc/e/eterm.ti b/etc/e/eterm.ti
index 648ff728518..36576b4db6a 100644
--- a/etc/e/eterm.ti
+++ b/etc/e/eterm.ti
@@ -1,21 +1,61 @@
1eterm, 1eterm,
2 lines#24,cols#80, 2 colors#8,
3 colors#8,pairs#64, 3 cols#80,
4 cuu1=\E[A,cud1=\n,cub1=\b,cuf1=\E[C,home=\E[H,cr=\r, 4 lines#24,
5 cuu=\E[%p1%dA,cud=\E[%p1%dB,cub=\E[%p1%dD,cuf=\E[%p1%dC, 5 pairs#64,
6 am,
7 mir,
8 xenl,
9 bel=^G,
10 bold=\E[1m,
11 clear=\E[H\E[J,
12 cr=\r,
13 csr=\E[%i%p1%d;%p2%dr,
14 cub1=\b,
15 cub=\E[%p1%dD,
16 cud1=\n,
17 cud=\E[%p1%dB,
18 cuf1=\E[C,
19 cuf=\E[%p1%dC,
6 cup=\E[%i%p1%d;%p2%dH, 20 cup=\E[%i%p1%d;%p2%dH,
7 ind=\n,csr=\E[%i%p1%d;%p2%dr, 21 cuu1=\E[A,
8 il1=\E[L,il=\E[%p1%dL, 22 cuu=\E[%p1%dA,
9 clear=\E[H\E[J,ed=\E[J,el=\E[K,el1=\E[1K, 23 dch1=\E[P,
10 dl1=\E[M,dl=\E[%p1%dM,dch1=\E[P,dch=\E[%p1%dP, 24 dch=\E[%p1%dP,
11 smir=\E[4h,rmir=\E[4l,ich=\E[%p1%d@,mir, 25 dl1=\E[M,
12 smcup=\E7\E[?47h,rmcup=\E[2J\E[?47l\E8, 26 dl=\E[%p1%dM,
13 ht=\t,khome=\E[1~,kend=\E[4~,knp=\E[6~,kpp=\E[5~, 27 ed=\E[J,
14 kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, 28 el1=\E[1K,
15 smso=\E[7m,rmso=\E[27m, 29 el=\E[K,
16 smul=\E[4m,rmul=\E[24m, 30 home=\E[H,
17 rev=\E[7m,bold=\E[1m,sgr0=\E[m, 31 ht=\t,
18 invis=\E[8m,op=\E[39;49m, 32 ich=\E[%p1%d@,
19 setab=\E[%p1%{40}%+%dm, setaf=\E[%p1%{30}%+%dm, 33 il1=\E[L,
20 bel=^G,xenl,am, 34 il=\E[%p1%dL,
21 35 ind=\n,
36 invis=\E[8m,
37 kbs=^?,
38 kcub1=\EOD,
39 kcud1=\EOB,
40 kcuf1=\EOC,
41 kcuu1=\EOA,
42 kdch1=\E[3~,
43 kend=\E[4~,
44 khome=\E[1~,
45 knp=\E[6~,
46 kpp=\E[5~,
47 op=\E[39;49m,
48 rc=\E8,
49 rev=\E[7m,
50 rmir=\E[4l,
51 rmso=\E[27m,
52 rmul=\E[24m,
53 sc=\E7,
54 setab=\E[%p1%{40}%+%dm,
55 setaf=\E[%p1%{30}%+%dm,
56 sgr0=\E[m,
57 smir=\E[4h,
58 smul=\E[4m,
59 smso=\E[7m,
60# smcup=\E[?47h,
61# rmcup=\E[?47l,
diff --git a/etc/enriched.doc b/etc/enriched.doc
index ff57087c989..55e11004f05 100644
--- a/etc/enriched.doc
+++ b/etc/enriched.doc
@@ -196,11 +196,11 @@ FTP or email may be obtained by sending an email message to
196enriched-verbose. 196enriched-verbose.
197 197
198</fixed></indent>-<indent> You can add annotations for your own text properties by making 198</fixed></indent>-<indent> You can add annotations for your own text properties by making
199additions to <fixed>enriched-annotation-alist</fixed>. Note that the 199additions to <fixed>enriched-translations</fixed>. Note that the standard
200standard requires you to name your annotation starting<italic> "x-" 200requires you to name your annotation starting<italic> "x-" </italic>(as in
201</italic>(as in <italic>"x-read-only"</italic>). Please send me any such additions that 201<italic>"x-read-only"</italic>). Please send me any such additions that you
202you think might be of general interest so that I can include 202think might be of general interest so that I can include them
203them in the distribution.</indent> 203in the distribution.</indent>
204 204
205</indent> 205</indent>
206 206
diff --git a/leim/ChangeLog b/leim/ChangeLog
index 2466de68ca6..7bff23067d6 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,8 @@
12004-09-25 Kenichi Handa <handa@m17n.org>
2
3 * quail/uni-input.el (ucs-input-method): Add error clause to
4 condition-case.
5
12004-09-21 Kenichi Handa <handa@m17n.org> 62004-09-21 Kenichi Handa <handa@m17n.org>
2 7
3 * quail/uni-input.el: Move the call of register-input-method to 8 * quail/uni-input.el: Move the call of register-input-method to
diff --git a/leim/quail/uni-input.el b/leim/quail/uni-input.el
index 12b93dc19a6..6408eb13cc4 100644
--- a/leim/quail/uni-input.el
+++ b/leim/quail/uni-input.el
@@ -99,8 +99,9 @@
99 (ucs-input-insert-char key)) 99 (ucs-input-insert-char key))
100 (let ((last-command-char key) 100 (let ((last-command-char key)
101 (current-prefix-arg)) 101 (current-prefix-arg))
102 (condition-case nil 102 (condition-case err
103 (call-interactively (key-binding seq)))) 103 (call-interactively (key-binding seq))
104 (quail-error (message "%s" (cdr err)) (beep))))
104 (quail-delete-region) 105 (quail-delete-region)
105 (throw 'non-digit (append (reverse events) 106 (throw 'non-digit (append (reverse events)
106 (listify-key-sequence seq)))))) 107 (listify-key-sequence seq))))))
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0842def464e..187fc607c27 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,4 +1,116 @@
12004-09-23 H,Ae(Bkon Malmedal <hmalmedal@yahoo.no> 12004-09-28 Stefan <monnier@iro.umontreal.ca>
2
3 * dired.el (dired-view-command-alist): Use more efficient regexps.
4 Remove dubious arguments.
5 (dired-align-file): New function.
6 (dired-insert-directory): Use it.
7 (dired-move-to-end-of-filename): Make the " -> " search more specific.
8 (dired-buffers-for-dir): Remove unused var `pattern'.
9
102004-09-29 Kim F. Storm <storm@cua.dk>
11
12 * progmodes/gdb-ui.el (breakpoint): Define as fringe bitmap.
13 (gdb-mouse-toggle-breakpoint): Fix fringe-bitmaps-at-pos usage.
14 (gdb-put-breakpoint-icon): Use breakpoint bitmap.
15
16 * fringe.el (fringe-bitmap-p): New macro.
17 (fringe-bitmaps): Add standard fringe bitmaps on load.
18
192004-09-28 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change)
20
21 * calendar/diary-lib.el (list-diary-entries): Save diary buffer
22 from diary display excursion. Store diary buffer's point for
23 `simple-diary-display'.
24 (simple-diary-display): Set window point and start when
25 displaying buffer, to preserve point.
26
272004-09-27 Luc Teirlinck <teirllm@auburn.edu>
28
29 * textmodes/enriched.el (enriched-translations): Replace defconst
30 with defvar.
31
322004-09-26 Vinicius Jose Latorre <viniciusjl@ig.com.br>
33
34 * printing.el: Doc fix.
35 (pr-version): New version number (6.8.1).
36 (pr-ps-file-using-ghostscript): Use make-temp-file instead of
37 make-temp-name.
38 (pr-delete-file): Check if file exists before deleting it. Reported by
39 Lennart Borgman <lennart.borgman.073@student.lu.se>.
40
412004-09-26 Stefan <monnier@iro.umontreal.ca>
42
43 * term.el (term-display-table): New variable.
44 (term-mode): Use it.
45 (term-exec-1): Set the coding system to binary.
46 (term-emulate-terminal): Decode the string before inserting it.
47
482004-09-26 Dan Nicolaescu <dann@ics.uci.edu>
49
50 * term.el (term-ansi-at-eval-string, term-ansi-default-fg)
51 (term-ansi-default-bg, term-ansi-current-temp): Delete unused
52 vars.
53 (map): Bind S-prior, S-next and S-insert.
54 (term-mode): Set `indent-tabs-mode' to nil.
55 (term-paste): New function to be bound to S-insert.
56 (term-send-del, term-send-backspace): Change the strings sent.
57 (term-termcap-format): Synchronyze with etc/e/eterm.ti.
58 (term-handle-colors-array): Fix handling of underline and reverse.
59 (term-handle-ansi-escape): Do not handle smcup/rmcup. Add
60 comments.
61 (term-erase-in-line): Fix comparison.
62 (term-emulate-terminal): Fix line wrap handling.
63 (term-start-output-log): Renamed from `term-set-output-log'.
64 (term-stop-output-log): Renamed from `term-stop-photo'.
65 (term-switch-to-alternate-sub-buffer): Comment out, unused.
66
672004-09-25 Stefan <monnier@iro.umontreal.ca>
68
69 * dired.el (dired-move-to-filename): Don't output a message if
70 raise-error is non-nil. Fix return position and value.
71
72 * files.el (insert-directory): Obey --dired even with symlinks.
73
742004-09-25 Lars Hansen <larsh@math.ku.dk>
75
76 * ls-lisp.el (ls-lisp-format): Mark file names with property
77 dired-filename.
78
792004-09-25 Kim F. Storm <storm@cua.dk>
80
81 * ido.el (ido-max-directory-size): New defcustom.
82 (ido-decorations): Add "too big" element.
83 (ido-directory-too-big): New dynamic var.
84 (ido-may-cache-directory): Don't cache big directories.
85 (ido-directory-too-big-p): New defun.
86 (ido-set-current-directory): Update ido-directory-too-big.
87 (ido-read-internal): Make empty ido-cur-item if too-big.
88 (ido-buffer-internal): Use ido-read-internal directly instead of
89 ido-read-buffer.
90 (ido-file-internal): Init ido-directory-too-big.
91 (ido-complete): <TAB> If ido-directory-too-big is set, clear it,
92 and redo completion with full list.
93 (ido-toggle-ignore): <C-a> If ido-directory-too-big is set, clear
94 it, and show completions.
95 (ido-all-completions): Let bind ido-directory-too-big to nil.
96 (ido-exhibit): Handle ido-directory-too-big.
97 (ido-read-buffer): Handle fallback to read-buffer.
98 Init ido-directory-too-big.
99 (ido-read-file-name, ido-read-directory-name, ido-completing-read):
100 Init ido-directory-too-big.
101
1022004-09-24 Luc Teirlinck <teirllm@auburn.edu>
103
104 * subr.el (delay-mode-hooks): Doc fix.
105
1062004-09-23 Luc Teirlinck <teirllm@auburn.edu>
107
108 * textmodes/enriched.el
109 (enriched-default-text-properties-local-flag): New variable.
110 (enriched-mode): Make sure that enabling and disabling the mode is
111 a no-op. Doc fix.
112
1132004-09-23 H,Ae(Bkon Malmedal <hmalmedal@yahoo.no> (tiny change)
2 114
3 * calendar/holidays.el (holiday-advent): Report on a specified day 115 * calendar/holidays.el (holiday-advent): Report on a specified day
4 offset from advent, not just advent. 116 offset from advent, not just advent.
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 45bb3c0e4c0..945119f06df 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -4,6 +4,7 @@
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> 6;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
7;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
7;; Keywords: calendar 8;; Keywords: calendar
8 9
9;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -296,6 +297,8 @@ Only used if `diary-header-line-flag' is non-nil."
296 :type 'sexp 297 :type 'sexp
297 :version "21.4") 298 :version "21.4")
298 299
300(defvar diary-saved-point) ; internal
301
299(defun list-diary-entries (date number) 302(defun list-diary-entries (date number)
300 "Create and display a buffer containing the relevant lines in diary-file. 303 "Create and display a buffer containing the relevant lines in diary-file.
301The arguments are DATE and NUMBER; the entries selected are those 304The arguments are DATE and NUMBER; the entries selected are those
@@ -345,112 +348,116 @@ These hooks have the following distinct roles:
345 (set-buffer diary-buffer) 348 (set-buffer diary-buffer)
346 (or (verify-visited-file-modtime diary-buffer) 349 (or (verify-visited-file-modtime diary-buffer)
347 (revert-buffer t t)))) 350 (revert-buffer t t))))
348 (setq file-glob-attrs (nth 1 (diary-pull-attrs nil ""))) 351 ;; d-s-p is passed to the diary display function.
349 (setq selective-display t) 352 (let ((diary-saved-point (point)))
350 (setq selective-display-ellipses nil) 353 (save-excursion
351 (if diary-header-line-flag 354 (setq file-glob-attrs (nth 1 (diary-pull-attrs nil "")))
352 (setq header-line-format diary-header-line-format)) 355 (setq selective-display t)
353 (setq old-diary-syntax-table (syntax-table)) 356 (setq selective-display-ellipses nil)
354 (set-syntax-table diary-syntax-table) 357 (if diary-header-line-flag
355 (unwind-protect 358 (setq header-line-format diary-header-line-format))
356 (let ((buffer-read-only nil) 359 (setq old-diary-syntax-table (syntax-table))
357 (diary-modified (buffer-modified-p)) 360 (set-syntax-table diary-syntax-table)
358 (mark (regexp-quote diary-nonmarking-symbol))) 361 (unwind-protect
359 ;; First and last characters must be ^M or \n for 362 (let ((buffer-read-only nil)
360 ;; selective display to work properly 363 (diary-modified (buffer-modified-p))
361 (goto-char (1- (point-max))) 364 (mark (regexp-quote diary-nonmarking-symbol)))
362 (if (not (looking-at "\^M\\|\n")) 365 ;; First and last characters must be ^M or \n for
363 (progn 366 ;; selective display to work properly
364 (goto-char (point-max)) 367 (goto-char (1- (point-max)))
365 (insert "\^M"))) 368 (if (not (looking-at "\^M\\|\n"))
366 (goto-char (point-min)) 369 (progn
367 (if (not (looking-at "\^M\\|\n")) 370 (goto-char (point-max))
368 (insert "\^M")) 371 (insert "\^M")))
369 (subst-char-in-region (point-min) (point-max) ?\n ?\^M t) 372 (goto-char (point-min))
370 (calendar-for-loop i from 1 to number do 373 (if (not (looking-at "\^M\\|\n"))
371 (let ((d diary-date-forms) 374 (insert "\^M"))
372 (month (extract-calendar-month date)) 375 (subst-char-in-region (point-min) (point-max) ?\n ?\^M t)
373 (day (extract-calendar-day date)) 376 (calendar-for-loop
374 (year (extract-calendar-year date)) 377 i from 1 to number do
375 (entry-found (list-sexp-diary-entries date))) 378 (let ((d diary-date-forms)
376 (while d 379 (month (extract-calendar-month date))
377 (let* 380 (day (extract-calendar-day date))
378 ((date-form (if (equal (car (car d)) 'backup) 381 (year (extract-calendar-year date))
379 (cdr (car d)) 382 (entry-found (list-sexp-diary-entries date)))
380 (car d))) 383 (while d
381 (backup (equal (car (car d)) 'backup)) 384 (let*
382 (dayname 385 ((date-form (if (equal (car (car d)) 'backup)
383 (format "%s\\|%s\\.?" 386 (cdr (car d))
384 (calendar-day-name date) 387 (car d)))
385 (calendar-day-name date 'abbrev))) 388 (backup (equal (car (car d)) 'backup))
386 (monthname 389 (dayname
387 (format "\\*\\|%s\\|%s\\.?" 390 (format "%s\\|%s\\.?"
388 (calendar-month-name month) 391 (calendar-day-name date)
389 (calendar-month-name month 'abbrev))) 392 (calendar-day-name date 'abbrev)))
390 (month (concat "\\*\\|0*" (int-to-string month))) 393 (monthname
391 (day (concat "\\*\\|0*" (int-to-string day))) 394 (format "\\*\\|%s\\|%s\\.?"
392 (year 395 (calendar-month-name month)
393 (concat 396 (calendar-month-name month 'abbrev)))
394 "\\*\\|0*" (int-to-string year) 397 (month (concat "\\*\\|0*" (int-to-string month)))
395 (if abbreviated-calendar-year 398 (day (concat "\\*\\|0*" (int-to-string day)))
396 (concat "\\|" (format "%02d" (% year 100))) 399 (year
397 ""))) 400 (concat
398 (regexp 401 "\\*\\|0*" (int-to-string year)
399 (concat 402 (if abbreviated-calendar-year
400 "\\(\\`\\|\^M\\|\n\\)" mark "?\\(" 403 (concat "\\|" (format "%02d" (% year 100)))
401 (mapconcat 'eval date-form "\\)\\(") 404 "")))
402 "\\)")) 405 (regexp
403 (case-fold-search t)) 406 (concat
404 (goto-char (point-min)) 407 "\\(\\`\\|\^M\\|\n\\)" mark "?\\("
405 (while (re-search-forward regexp nil t) 408 (mapconcat 'eval date-form "\\)\\(")
406 (if backup (re-search-backward "\\<" nil t)) 409 "\\)"))
407 (if (and (or (char-equal (preceding-char) ?\^M) 410 (case-fold-search t))
408 (char-equal (preceding-char) ?\n)) 411 (goto-char (point-min))
409 (not (looking-at " \\|\^I"))) 412 (while (re-search-forward regexp nil t)
410 ;; Diary entry that consists only of date. 413 (if backup (re-search-backward "\\<" nil t))
411 (backward-char 1) 414 (if (and (or (char-equal (preceding-char) ?\^M)
412 ;; Found a nonempty diary entry--make it visible and 415 (char-equal (preceding-char) ?\n))
413 ;; add it to the list. 416 (not (looking-at " \\|\^I")))
414 (setq entry-found t) 417 ;; Diary entry that consists only of date.
415 (let ((entry-start (point)) 418 (backward-char 1)
416 date-start temp) 419 ;; Found a nonempty diary entry--make it
417 (re-search-backward "\^M\\|\n\\|\\`") 420 ;; visible and add it to the list.
418 (setq date-start (point)) 421 (setq entry-found t)
419 (re-search-forward "\^M\\|\n" nil t 2) 422 (let ((entry-start (point))
420 (while (looking-at " \\|\^I") 423 date-start temp)
421 (re-search-forward "\^M\\|\n" nil t)) 424 (re-search-backward "\^M\\|\n\\|\\`")
422 (backward-char 1) 425 (setq date-start (point))
423 (subst-char-in-region date-start 426 (re-search-forward "\^M\\|\n" nil t 2)
424 (point) ?\^M ?\n t) 427 (while (looking-at " \\|\^I")
425 (setq entry (buffer-substring entry-start (point)) 428 (re-search-forward "\^M\\|\n" nil t))
426 temp (diary-pull-attrs entry file-glob-attrs) 429 (backward-char 1)
427 entry (nth 0 temp)) 430 (subst-char-in-region date-start
428 (add-to-diary-list 431 (point) ?\^M ?\n t)
429 date 432 (setq entry (buffer-substring entry-start (point))
430 entry 433 temp (diary-pull-attrs entry file-glob-attrs)
431 (buffer-substring 434 entry (nth 0 temp))
432 (1+ date-start) (1- entry-start)) 435 (add-to-diary-list
433 (copy-marker entry-start) (nth 1 temp)))))) 436 date
434 (setq d (cdr d))) 437 entry
435 (or entry-found 438 (buffer-substring
436 (not diary-list-include-blanks) 439 (1+ date-start) (1- entry-start))
437 (setq diary-entries-list 440 (copy-marker entry-start) (nth 1 temp))))))
438 (append diary-entries-list 441 (setq d (cdr d)))
439 (list (list date "" "" "" ""))))) 442 (or entry-found
440 (setq date 443 (not diary-list-include-blanks)
441 (calendar-gregorian-from-absolute 444 (setq diary-entries-list
442 (1+ (calendar-absolute-from-gregorian date)))) 445 (append diary-entries-list
443 (setq entry-found nil))) 446 (list (list date "" "" "" "")))))
444 (set-buffer-modified-p diary-modified)) 447 (setq date
445 (set-syntax-table old-diary-syntax-table)) 448 (calendar-gregorian-from-absolute
446 (goto-char (point-min)) 449 (1+ (calendar-absolute-from-gregorian date))))
447 (run-hooks 'nongregorian-diary-listing-hook 450 (setq entry-found nil)))
448 'list-diary-entries-hook) 451 (set-buffer-modified-p diary-modified))
449 (if diary-display-hook 452 (set-syntax-table old-diary-syntax-table))
450 (run-hooks 'diary-display-hook) 453 (goto-char (point-min))
451 (simple-diary-display)) 454 (run-hooks 'nongregorian-diary-listing-hook
452 (run-hooks 'diary-hook) 455 'list-diary-entries-hook)
453 diary-entries-list)))) 456 (if diary-display-hook
457 (run-hooks 'diary-display-hook)
458 (simple-diary-display))
459 (run-hooks 'diary-hook)
460 diary-entries-list))))))
454 461
455(defun include-other-diary-files () 462(defun include-other-diary-files ()
456 "Include the diary entries from other diary files with those of diary-file. 463 "Include the diary entries from other diary files with those of diary-file.
@@ -528,8 +535,12 @@ changing the variable `diary-include-string'."
528 (setq buffer-read-only t) 535 (setq buffer-read-only t)
529 (display-buffer holiday-buffer) 536 (display-buffer holiday-buffer)
530 (message "No diary entries for %s" date-string)) 537 (message "No diary entries for %s" date-string))
531 (display-buffer (find-buffer-visiting 538 (with-current-buffer
532 (substitute-in-file-name diary-file))) 539 (find-buffer-visiting (substitute-in-file-name diary-file))
540 (let ((window (display-buffer (current-buffer))))
541 ;; d-s-p is passed from list-diary-entries.
542 (set-window-point window diary-saved-point)
543 (set-window-start window (point-min))))
533 (message "Preparing diary...done")))) 544 (message "Preparing diary...done"))))
534 545
535(defface diary-button-face '((((type pc) (class color)) 546(defface diary-button-face '((((type pc) (class color))
diff --git a/lisp/dired.el b/lisp/dired.el
index 43eec9408d4..96b2905337e 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -202,10 +202,11 @@ with the buffer narrowed to the listing."
202 202
203;; Fixme: This should use mailcap. 203;; Fixme: This should use mailcap.
204(defcustom dired-view-command-alist 204(defcustom dired-view-command-alist
205 '(("[.]\\(ps\\|ps_pages\\|eps\\)\\'" . "gv -spartan -color -watch %s") 205 '(("\\.\\(ps\\|ps_pages\\|eps\\)\\'" . "gv %s")
206 ("[.]pdf\\'" . "xpdf %s") 206 ("\\.pdf\\'" . "xpdf %s")
207 ("[.]\\(jpe?g\\|gif\\|png\\)\\'" . "eog %s") 207 ;; ("\\.pod\\'" . "perldoc %s")
208 ("[.]dvi\\'" . "xdvi -sidemargin 0.5 -topmargin 1 %s")) 208 ("\\.\\(jpe?g\\|gif\\|png\\)\\'" . "eog %s")
209 ("\\.dvi\\'" . "xdvi %s"))
209 "Alist specifying how to view special types of files. 210 "Alist specifying how to view special types of files.
210Each element has the form (REGEXP . SHELL-COMMAND). 211Each element has the form (REGEXP . SHELL-COMMAND).
211When the file name matches REGEXP, `dired-view-file' 212When the file name matches REGEXP, `dired-view-file'
@@ -797,6 +798,112 @@ wildcards, erases the buffer, and builds the subdir-alist anew
797 (dired-insert-directory dir dired-actual-switches 798 (dired-insert-directory dir dired-actual-switches
798 file-list (not file-list) t))))) 799 file-list (not file-list) t)))))
799 800
801(defun dired-align-file (beg end)
802 "Align the fields of a file to the ones of surrounding lines.
803BEG..END is the line where the file info is located."
804 ;; Some versions of ls try to adjust the size of each field so as to just
805 ;; hold the largest element ("largest" in the current invocation, of
806 ;; course). So when a single line is output, the size of each field is
807 ;; just big enough for that one output. Thus when dired refreshes one
808 ;; line, the alignment if this line w.r.t the rest is messed up because
809 ;; the fields of that one line will generally be smaller.
810 ;;
811 ;; To work around this problem, we here add spaces to try and re-align the
812 ;; fields as needed. Since this is purely aesthetic, it is of utmost
813 ;; importance that it doesn't mess up anything like
814 ;; `dired-move-to-filename'. To this end, we limit ourselves to adding
815 ;; spaces only, and to only add them at places where there was already at
816 ;; least one space. This way, as long as `dired-move-to-filename-regexp'
817 ;; always matches spaces with "*" or "+", we know we haven't made anything
818 ;; worse. There is one spot where the exact number of spaces is
819 ;; important, which is just before the actual filename, so we refrain from
820 ;; adding spaces there (and within the filename as well, of course).
821 (save-excursion
822 (let (file file-col other other-col)
823 ;; Check the there is indeed a file, and that there is anoter adjacent
824 ;; file with which to align, and that additional spaces are needed to
825 ;; align the filenames.
826 (when (and (setq file (progn (goto-char beg)
827 (dired-move-to-filename nil end)))
828 (setq file-col (current-column))
829 (setq other
830 (or (and (goto-char beg)
831 (zerop (forward-line -1))
832 (dired-move-to-filename))
833 (and (goto-char beg)
834 (zerop (forward-line 1))
835 (dired-move-to-filename))))
836 (setq other-col (current-column))
837 (/= file other)
838 ;; Make sure there is some work left to do.
839 (> other-col file-col))
840 ;; If we've only looked at the line above, check to see if the line
841 ;; below exists as well and if so, align with the shorter one.
842 (when (and (< other file)
843 (goto-char beg)
844 (zerop (forward-line 1))
845 (dired-move-to-filename))
846 (let ((alt-col (current-column)))
847 (when (< alt-col other-col)
848 (setq other-col alt-col)
849 (setq other (point)))))
850 ;; Keep positions uptodate when we insert stuff.
851 (if (> other file) (setq other (copy-marker other)))
852 (setq file (copy-marker file))
853 ;; Main loop.
854 (goto-char beg)
855 (while (and (> other-col file-col)
856 (skip-chars-forward "^ ")
857 ;; Skip the spaces, and make sure there's at least one.
858 (> (skip-chars-forward " ") 0)
859 ;; Don't touch anything just before (and after) the
860 ;; beginning of the filename.
861 (> file (point)))
862 ;; We're now just in front of a field, with a space behind us.
863 (let* ((curcol (current-column))
864 ;; Nums are right-aligned.
865 (num-align (looking-at "[0-9]"))
866 ;; Let's look at the other line, in the same column: we
867 ;; should be either near the end of the previous field, or
868 ;; in the space between that field and the next.
869 ;; [ Of course, it's also possible that we're already within
870 ;; the next field or even past it, but that's unlikely since
871 ;; other-col > file-col. ]
872 ;; Let's find the distance to the alignment-point (either
873 ;; the beginning or the end of the next field, depending on
874 ;; whether this field is left or right aligned).
875 (align-pt-offset
876 (save-excursion
877 (goto-char other)
878 (move-to-column curcol)
879 (when (looking-at
880 (concat
881 (if (eq (char-before) ?\ ) " *" "[^ ]* *")
882 (if num-align "[0-9][^ ]*")))
883 (- (match-end 0) (match-beginning 0)))))
884 ;; Now, the number of spaces to insert is align-pt-offset
885 ;; minus the distance to the equivalent point on the
886 ;; current line.
887 (spaces
888 (if (not num-align)
889 align-pt-offset
890 (and align-pt-offset
891 (save-excursion
892 (skip-chars-forward "^ ")
893 (- align-pt-offset (- (current-column) curcol)))))))
894 (when (and spaces (> spaces 0))
895 (setq file-col (+ spaces file-col))
896 (if (> file-col other-col)
897 (setq spaces (- spaces (- file-col other-col))))
898 (insert-char ?\s spaces)
899 ;; Let's just make really sure we did not mess up.
900 (unless (save-excursion
901 (equal (dired-move-to-filename) (marker-position file)))
902 ;; Damn! We messed up: let's revert the change.
903 (delete-char (- spaces))))))
904 (set-marker file nil)))))
905
906
800(defun dired-insert-directory (dir switches &optional file-list wildcard hdr) 907(defun dired-insert-directory (dir switches &optional file-list wildcard hdr)
801 "Insert a directory listing of DIR, Dired style. 908 "Insert a directory listing of DIR, Dired style.
802Use SWITCHES to make the listings. 909Use SWITCHES to make the listings.
@@ -815,7 +922,10 @@ If HDR is non-nil, insert a header line with the directory name."
815 ;; with the new value of dired-move-to-filename-regexp. 922 ;; with the new value of dired-move-to-filename-regexp.
816 (if file-list 923 (if file-list
817 (dolist (f file-list) 924 (dolist (f file-list)
818 (insert-directory f switches nil nil)) 925 (let ((beg (point)))
926 (insert-directory f switches nil nil)
927 ;; Re-align fields, if necessary.
928 (dired-align-file beg (point))))
819 (insert-directory dir switches wildcard (not wildcard))) 929 (insert-directory dir switches wildcard (not wildcard)))
820 ;; Quote certain characters, unless ls quoted them for us. 930 ;; Quote certain characters, unless ls quoted them for us.
821 (if (not (string-match "b" dired-actual-switches)) 931 (if (not (string-match "b" dired-actual-switches))
@@ -1762,6 +1872,8 @@ regardless of the language.")
1762;; Move to first char of filename on this line. 1872;; Move to first char of filename on this line.
1763;; Returns position (point) or nil if no filename on this line." 1873;; Returns position (point) or nil if no filename on this line."
1764(defun dired-move-to-filename (&optional raise-error eol) 1874(defun dired-move-to-filename (&optional raise-error eol)
1875 "Move to the beginning of the filename on the current line.
1876Return the position of the beginning of the filename, or nil if none found."
1765 ;; This is the UNIX version. 1877 ;; This is the UNIX version.
1766 (or eol (setq eol (line-end-position))) 1878 (or eol (setq eol (line-end-position)))
1767 (beginning-of-line) 1879 (beginning-of-line)
@@ -1774,8 +1886,10 @@ regardless of the language.")
1774 (goto-char (match-end 0))) 1886 (goto-char (match-end 0)))
1775 ((re-search-forward dired-permission-flags-regexp eol t) 1887 ((re-search-forward dired-permission-flags-regexp eol t)
1776 ;; Ha! There *is* a file. Our regexp-from-hell just failed to find it. 1888 ;; Ha! There *is* a file. Our regexp-from-hell just failed to find it.
1777 (funcall (if raise-error 'error 'message) 1889 (if raise-error
1778 "Unrecognized line! Check dired-move-to-filename-regexp")) 1890 (error "Unrecognized line! Check dired-move-to-filename-regexp"))
1891 (beginning-of-line)
1892 nil)
1779 (raise-error 1893 (raise-error
1780 (error "No file on this line"))))) 1894 (error "No file on this line")))))
1781 1895
@@ -1818,9 +1932,9 @@ regardless of the language.")
1818 (or no-error (error "No file on this line")))) 1932 (or no-error (error "No file on this line"))))
1819 ;; Move point to end of name: 1933 ;; Move point to end of name:
1820 (if symlink 1934 (if symlink
1821 (if (search-forward " ->" eol t) 1935 (if (search-forward " -> " eol t)
1822 (progn 1936 (progn
1823 (forward-char -3) 1937 (forward-char -4)
1824 (and used-F 1938 (and used-F
1825 dired-ls-F-marks-symlinks 1939 dired-ls-F-marks-symlinks
1826 (eq (preceding-char) ?@) ;; did ls really mark the link? 1940 (eq (preceding-char) ?@) ;; did ls really mark the link?
@@ -1885,7 +1999,7 @@ You can then feed the file name(s) to other commands with \\[yank]."
1885;; As a side effect, killed dired buffers for DIR are removed from 1999;; As a side effect, killed dired buffers for DIR are removed from
1886;; dired-buffers. 2000;; dired-buffers.
1887 (setq dir (file-name-as-directory dir)) 2001 (setq dir (file-name-as-directory dir))
1888 (let ((alist dired-buffers) result elt buf pattern) 2002 (let ((alist dired-buffers) result elt buf)
1889 (while alist 2003 (while alist
1890 (setq elt (car alist) 2004 (setq elt (car alist)
1891 buf (cdr elt)) 2005 buf (cdr elt))
diff --git a/lisp/files.el b/lisp/files.el
index 40d434b2ecc..7c06316a487 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4376,7 +4376,8 @@ normally equivalent short `-D' option is just passed on to
4376 (while (< (point) end) 4376 (while (< (point) end)
4377 (let ((start (+ beg (read (current-buffer)))) 4377 (let ((start (+ beg (read (current-buffer))))
4378 (end (+ beg (read (current-buffer))))) 4378 (end (+ beg (read (current-buffer)))))
4379 (if (= (char-after end) ?\n) 4379 (if (memq (char-after end) '(?\n ?\ ))
4380 ;; End is followed by \n or by " -> ".
4380 (put-text-property start end 'dired-filename t) 4381 (put-text-property start end 'dired-filename t)
4381 ;; It seems that we can't trust ls's output as to 4382 ;; It seems that we can't trust ls's output as to
4382 ;; byte positions of filenames. 4383 ;; byte positions of filenames.
diff --git a/lisp/fringe.el b/lisp/fringe.el
index f52ecdf64d2..07c93d39f40 100644
--- a/lisp/fringe.el
+++ b/lisp/fringe.el
@@ -37,27 +37,29 @@
37 37
38;; Standard fringe bitmaps 38;; Standard fringe bitmaps
39 39
40(defconst no-fringe-bitmap 0) 40(defmacro fringe-bitmap-p (symbol)
41(defconst undef-fringe-bitmap 1) 41 "Return non-nil if SYMBOL is a fringe bitmap."
42(defconst left-truncation-fringe-bitmap 2) 42 `(get ,symbol 'fringe))
43(defconst right-truncation-fringe-bitmap 3) 43
44(defconst up-arrow-fringe-bitmap 4) 44(defvar fringe-bitmaps)
45(defconst down-arrow-fringe-bitmap 5) 45
46(defconst continued-line-fringe-bitmap 6) 46(unless (get 'left-truncation 'fringe)
47(defconst continuation-line-fringe-bitmap 7) 47 (let ((bitmaps '(left-truncation right-truncation
48(defconst overlay-arrow-fringe-bitmap 8) 48 up-arrow down-arrow
49(defconst top-left-angle-fringe-bitmap 9) 49 continued-line continuation-line
50(defconst top-right-angle-fringe-bitmap 10) 50 overlay-arrow
51(defconst bottom-left-angle-fringe-bitmap 11) 51 top-left-angle top-right-angle
52(defconst bottom-right-angle-fringe-bitmap 12) 52 bottom-left-angle bottom-right-angle
53(defconst left-bracket-fringe-bitmap 13) 53 left-bracket right-bracket
54(defconst right-bracket-fringe-bitmap 14) 54 filled-box-cursor hollow-box-cursor hollow-square
55(defconst filled-box-cursor-fringe-bitmap 15) 55 bar-cursor hbar-cursor
56(defconst hollow-box-cursor-fringe-bitmap 16) 56 empty-line))
57(defconst hollow-square-fringe-bitmap 17) 57 (bn 2))
58(defconst bar-cursor-fringe-bitmap 18) 58 (while bitmaps
59(defconst hbar-cursor-fringe-bitmap 19) 59 (push (car bitmaps) fringe-bitmaps)
60(defconst empty-line-fringe-bitmap 20) 60 (put (car bitmaps) 'fringe bn)
61 (setq bitmaps (cdr bitmaps)
62 bn (1+ bn)))))
61 63
62 64
63;; Control presence of fringes 65;; Control presence of fringes
@@ -228,7 +230,7 @@ SIDE must be the symbol `left' or `right'."
228 (window-fringes)) 230 (window-fringes))
229 0) 231 0)
230 (float (frame-char-width)))) 232 (float (frame-char-width))))
231 233
232(provide 'fringe) 234(provide 'fringe)
233 235
234;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d 236;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 60ad776347c..3cdda661e86 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,77 @@
12004-09-28 Jesper Harder <harder@ifa.au.dk>
2
3 * gnus-picon.el: Require cl.
4
5 * mml-sec.el (mml-signencrypt-style): Don't depend on Gnus.
6
7 * mml-smime.el: Require cl. Autoload message-fetch-field.
8
9 * gnus-fun.el: Require gnus-ems and gnus-util.
10
11 * gnus-diary.el (gnus-diary-header-schedule): caddr -> car (cddr
12
13 * gnus-art.el (gnus-article-edit-mode): Define before first
14 reference.
15
16 * gnus.el (gnus-method-to-server): Move defsubst before first use.
17
18 * spam.el (spam-check-spamoracle, spam-spamoracle-learn): Fix
19 format string mismatch.
20 * nnml.el (nnml-request-set-mark, nnml-save-marks): do.
21 * nnfolder.el (nnfolder-request-set-mark, nnfolder-save-marks): do.
22
232004-09-27 Reiner Steib <Reiner.Steib@gmx.de>
24
25 * gnus.el (gnus-version-number): Set to 5.11.
26
272004-09-27 Katsumi Yamaoka <yamaoka@jpl.org>
28
29 * mm-decode.el (mm-copy-to-buffer): Don't use set-buffer-multibyte.
30
312004-09-26 Jesper Harder <harder@ifa.au.dk>
32
33 * gnus-msg.el (gnus-post-news): Use blank Newsgroups line if
34 GROUP is a virtual group.
35
36 * mm-util.el (mm-charset-synonym-alist): Remove obsolete entries
37 for big5 and gb2312.
38
39 * rfc2047.el (rfc2047-pad-base64): Deal with more cases of invalid
40 padding.
41
42 * mm-bodies.el (mm-7bit-chars): Don't include \r.
43
44 * mml.el (mml-compute-boundary-1): Don't uncompress files.
45
46 * rfc2047.el (rfc2047-qp-or-base64): New function to reduce
47 dependencies.
48 (rfc2047-encode): Use it.
49
50 * flow-fill.el: Typo.
51
52 * mml.el (mml-generate-mime-1): Don't use format=flowed with
53 inline PGP.
54
55 * gnus.el (gnus-getenv-nntpserver): Strip whitespace.
56
57 * gnus-cache.el (gnus-cache-save-buffers): Check if buffer is
58 alive. Reported by Laurent Martelli <laurent@aopsys.com>.
59
60 * mm-util.el (mm-image-load-path): Handle nil in load-path.
61 From Christian Neukirchen <chneukirchen@yahoo.de>.
62
63 * html2text.el (html2text-replace-list): Add &amp; and &apos;.
64
65 * nnheader.el (nnheader-max-head-length): Increase to 8192.
66
67 * message.el (message-clone-locals): Clone sendmail and smtp
68 variables.
69
702004-09-23 Reiner Steib <Reiner.Steib@gmx.de>
71
72 * gnus-msg.el (gnus-configure-posting-styles): Narrow to headers
73 in `header' match. Reported by Svend Tollak Munkejord.
74
12004-09-20 Stefan Monnier <monnier@iro.umontreal.ca> 752004-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
2 76
3 * mm-decode.el (mm-copy-to-buffer): Preserve the data's unibyteness. 77 * mm-decode.el (mm-copy-to-buffer): Preserve the data's unibyteness.
diff --git a/lisp/gnus/flow-fill.el b/lisp/gnus/flow-fill.el
index a22f2a5af07..8a8098727fe 100644
--- a/lisp/gnus/flow-fill.el
+++ b/lisp/gnus/flow-fill.el
@@ -1,4 +1,4 @@
1;;; flow-fill.el --- interprete RFC2646 "flowed" text 1;;; flow-fill.el --- interpret RFC2646 "flowed" text
2 2
3;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4 4
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 5544c28f967..d4dbe1319e0 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -1464,6 +1464,8 @@ Initialized from `text-mode-syntax-table.")
1464 1464
1465(defvar gnus-inhibit-hiding nil) 1465(defvar gnus-inhibit-hiding nil)
1466 1466
1467(defvar gnus-article-edit-mode nil)
1468
1467;;; Macros for dealing with the article buffer. 1469;;; Macros for dealing with the article buffer.
1468 1470
1469(defmacro gnus-with-article-headers (&rest forms) 1471(defmacro gnus-with-article-headers (&rest forms)
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el
index bc09b3a2368..99e77b18f68 100644
--- a/lisp/gnus/gnus-cache.el
+++ b/lisp/gnus/gnus-cache.el
@@ -125,9 +125,8 @@ it's not cached."
125 (overview-file (gnus-cache-file-name 125 (overview-file (gnus-cache-file-name
126 (car gnus-cache-buffer) ".overview"))) 126 (car gnus-cache-buffer) ".overview")))
127 ;; write the overview only if it was modified 127 ;; write the overview only if it was modified
128 (when (buffer-modified-p buffer) 128 (when (and (buffer-live-p buffer) (buffer-modified-p buffer))
129 (save-excursion 129 (with-current-buffer buffer
130 (set-buffer buffer)
131 (if (> (buffer-size) 0) 130 (if (> (buffer-size) 0)
132 ;; Non-empty overview, write it to a file. 131 ;; Non-empty overview, write it to a file.
133 (let ((coding-system-for-write 132 (let ((coding-system-for-write
diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el
index 120b812c209..e82d77fa58b 100644
--- a/lisp/gnus/gnus-diary.el
+++ b/lisp/gnus/gnus-diary.el
@@ -204,7 +204,7 @@ There are currently two built-in format functions:
204 (let ((head (cdr (assoc (intern (format "X-Diary-%s" (car elt))) 204 (let ((head (cdr (assoc (intern (format "X-Diary-%s" (car elt)))
205 headers)))) 205 headers))))
206 (when head 206 (when head
207 (nndiary-parse-schedule-value head (cadr elt) (caddr elt))))) 207 (nndiary-parse-schedule-value head (cadr elt) (car (cddr elt))))))
208 nndiary-headers)) 208 nndiary-headers))
209 209
210;; #### NOTE: Gnus sometimes gives me a HEADER not corresponding to any 210;; #### NOTE: Gnus sometimes gives me a HEADER not corresponding to any
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index 087c30da5df..82282e084f7 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -26,8 +26,11 @@
26;;; Code: 26;;; Code:
27 27
28(eval-when-compile 28(eval-when-compile
29 (require 'cl) 29 (require 'cl))
30 (require 'mm-util)) 30
31(require 'mm-util)
32(require 'gnus-ems)
33(require 'gnus-util)
31 34
32(defcustom gnus-x-face-directory (expand-file-name "x-faces" gnus-directory) 35(defcustom gnus-x-face-directory (expand-file-name "x-faces" gnus-directory)
33 "*Directory where X-Face PBM files are stored." 36 "*Directory where X-Face PBM files are stored."
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index f986e451c02..33531e7f8a4 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -915,7 +915,9 @@ header line with the old Message-ID."
915 (not to-address))) 915 (not to-address)))
916 ;; This is news. 916 ;; This is news.
917 (if post 917 (if post
918 (message-news (or to-group group)) 918 (message-news
919 (or to-group
920 (and (not (gnus-virtual-group-p pgroup)) group)))
919 (set-buffer gnus-article-copy) 921 (set-buffer gnus-article-copy)
920 (gnus-msg-treat-broken-reply-to) 922 (gnus-msg-treat-broken-reply-to)
921 (message-followup (if (or newsgroup-p force-news) 923 (message-followup (if (or newsgroup-p force-news)
@@ -1801,9 +1803,11 @@ this is a reply."
1801 ;; Obsolete format of header match. 1803 ;; Obsolete format of header match.
1802 (and (gnus-buffer-live-p gnus-article-copy) 1804 (and (gnus-buffer-live-p gnus-article-copy)
1803 (with-current-buffer gnus-article-copy 1805 (with-current-buffer gnus-article-copy
1804 (let ((header (message-fetch-field (pop style)))) 1806 (save-restriction
1805 (and header 1807 (nnheader-narrow-to-headers)
1806 (string-match (pop style) header)))))) 1808 (let ((header (message-fetch-field (pop style))))
1809 (and header
1810 (string-match (pop style) header)))))))
1807 ((or (symbolp match) 1811 ((or (symbolp match)
1808 (functionp match)) 1812 (functionp match))
1809 (cond 1813 (cond
@@ -1819,9 +1823,11 @@ this is a reply."
1819 ;; New format of header match. 1823 ;; New format of header match.
1820 (and (gnus-buffer-live-p gnus-article-copy) 1824 (and (gnus-buffer-live-p gnus-article-copy)
1821 (with-current-buffer gnus-article-copy 1825 (with-current-buffer gnus-article-copy
1822 (let ((header (message-fetch-field (nth 1 match)))) 1826 (save-restriction
1823 (and header 1827 (nnheader-narrow-to-headers)
1824 (string-match (nth 2 match) header)))))) 1828 (let ((header (message-fetch-field (nth 1 match))))
1829 (and header
1830 (string-match (nth 2 match) header)))))))
1825 (t 1831 (t
1826 ;; This is a form to be evaled. 1832 ;; This is a form to be evaled.
1827 (eval match))))) 1833 (eval match)))))
diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el
index dbb96333d75..817696ed974 100644
--- a/lisp/gnus/gnus-picon.el
+++ b/lisp/gnus/gnus-picon.el
@@ -40,8 +40,9 @@
40;; 40;;
41;;; Code: 41;;; Code:
42 42
43(eval-when-compile (require 'cl))
44
43(require 'gnus) 45(require 'gnus)
44(require 'custom)
45(require 'gnus-art) 46(require 'gnus-art)
46 47
47;;; User variables: 48;;; User variables:
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 3b7c8c916d8..28ef2c22a15 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -282,7 +282,7 @@ is restarted, and sometimes reloaded."
282 :link '(custom-manual "(gnus)Exiting Gnus") 282 :link '(custom-manual "(gnus)Exiting Gnus")
283 :group 'gnus) 283 :group 'gnus)
284 284
285(defconst gnus-version-number "5.10.6" 285(defconst gnus-version-number "5.11"
286 "Version number for this version of Gnus.") 286 "Version number for this version of Gnus.")
287 287
288(defconst gnus-version (format "Gnus v%s" gnus-version-number) 288(defconst gnus-version (format "Gnus v%s" gnus-version-number)
@@ -1104,9 +1104,8 @@ Check the NNTPSERVER environment variable and the
1104 (and (file-readable-p gnus-nntpserver-file) 1104 (and (file-readable-p gnus-nntpserver-file)
1105 (with-temp-buffer 1105 (with-temp-buffer
1106 (insert-file-contents gnus-nntpserver-file) 1106 (insert-file-contents gnus-nntpserver-file)
1107 (let ((name (buffer-string))) 1107 (when (re-search-forward "[^ \t\n\r]+" nil t)
1108 (unless (string-match "\\`[ \t\n]*$" name) 1108 (match-string 0))))))
1109 name))))))
1110 1109
1111(defcustom gnus-select-method 1110(defcustom gnus-select-method
1112 (condition-case nil 1111 (condition-case nil
@@ -3309,38 +3308,6 @@ that that variable is buffer-local to the summary buffers."
3309 (push (cons server result) gnus-server-method-cache)) 3308 (push (cons server result) gnus-server-method-cache))
3310 result))) 3309 result)))
3311 3310
3312(defsubst gnus-method-to-server (method)
3313 (catch 'server-name
3314 (setq method (or method gnus-select-method))
3315
3316 ;; Perhaps it is already in the cache.
3317 (mapc (lambda (name-method)
3318 (if (equal (cdr name-method) method)
3319 (throw 'server-name (car name-method))))
3320 gnus-server-method-cache)
3321
3322 (mapc
3323 (lambda (server-alist)
3324 (mapc (lambda (name-method)
3325 (when (gnus-methods-equal-p (cdr name-method) method)
3326 (unless (member name-method gnus-server-method-cache)
3327 (push name-method gnus-server-method-cache))
3328 (throw 'server-name (car name-method))))
3329 server-alist))
3330 (let ((alists (list gnus-server-alist
3331 gnus-predefined-server-alist)))
3332 (if gnus-select-method
3333 (push (list (cons "native" gnus-select-method)) alists))
3334 alists))
3335
3336 (let* ((name (if (member (cadr method) '(nil ""))
3337 (format "%s" (car method))
3338 (format "%s:%s" (car method) (cadr method))))
3339 (name-method (cons name method)))
3340 (unless (member name-method gnus-server-method-cache)
3341 (push name-method gnus-server-method-cache))
3342 name)))
3343
3344(defsubst gnus-server-get-method (group method) 3311(defsubst gnus-server-get-method (group method)
3345 ;; Input either a server name, and extended server name, or a 3312 ;; Input either a server name, and extended server name, or a
3346 ;; select method, and return a select method. 3313 ;; select method, and return a select method.
diff --git a/lisp/gnus/html2text.el b/lisp/gnus/html2text.el
index f2aefbef993..6f1ef3b0289 100644
--- a/lisp/gnus/html2text.el
+++ b/lisp/gnus/html2text.el
@@ -1,5 +1,5 @@
1;;; html2text.el --- a simple html to plain text converter 1;;; html2text.el --- a simple html to plain text converter
2;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. 2;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
3 3
4;; Author: Joakim Hove <hove@phys.ntnu.no> 4;; Author: Joakim Hove <hove@phys.ntnu.no>
5 5
@@ -42,7 +42,8 @@
42(defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr))) 42(defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr)))
43 43
44(defvar html2text-replace-list 44(defvar html2text-replace-list
45 '(("&nbsp;" . " ") ("&gt;" . ">") ("&lt;" . "<") ("&quot;" . "\"")) 45 '(("&nbsp;" . " ") ("&gt;" . ">") ("&lt;" . "<") ("&quot;" . "\"")
46 ("&amp;" . "&") ("&apos;" . "'"))
46 "The map of entity to text. 47 "The map of entity to text.
47 48
48This is an alist were each element is a dotted pair consisting of an 49This is an alist were each element is a dotted pair consisting of an
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 21c386b86ce..8e5edbc048a 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -6685,7 +6685,7 @@ regexp VARSTR."
6685 (let ((locals (save-excursion 6685 (let ((locals (save-excursion
6686 (set-buffer buffer) 6686 (set-buffer buffer)
6687 (buffer-local-variables))) 6687 (buffer-local-variables)))
6688 (regexp "^gnus\\|^nn\\|^message\\|^user-mail-address")) 6688 (regexp "^gnus\\|^nn\\|^message\\|^sendmail\\|^smtp\\|^user-mail-address"))
6689 (mapcar 6689 (mapcar
6690 (lambda (local) 6690 (lambda (local)
6691 (when (and (consp local) 6691 (when (and (consp local)
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index 7e95ef3986b..b3148fe04ac 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -38,9 +38,16 @@
38(require 'rfc2047) 38(require 'rfc2047)
39(require 'mm-encode) 39(require 'mm-encode)
40 40
41;; 8bit treatment gets any char except: 0x32 - 0x7f, CR, LF, TAB, BEL, 41;; 8bit treatment gets any char except: 0x32 - 0x7f, LF, TAB, BEL,
42;; BS, vertical TAB, form feed, and ^_ 42;; BS, vertical TAB, form feed, and ^_
43(defvar mm-7bit-chars "\x20-\x7f\r\n\t\x7\x8\xb\xc\x1f") 43;;
44;; Note that CR is *not* included, as that would allow a non-paired CR
45;; in the body contrary to RFC 2822:
46;;
47;; - CR and LF MUST only occur together as CRLF; they MUST NOT
48;; appear independently in the body.
49
50(defvar mm-7bit-chars "\x20-\x7f\n\t\x7\x8\xb\xc\x1f")
44 51
45(defcustom mm-body-charset-encoding-alist 52(defcustom mm-body-charset-encoding-alist
46 '((iso-2022-jp . 7bit) 53 '((iso-2022-jp . 7bit)
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index ff05393415d..51ec38dc387 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -623,14 +623,14 @@ Postpone undisplaying of viewers for types in
623 "Copy the contents of the current buffer to a fresh buffer." 623 "Copy the contents of the current buffer to a fresh buffer."
624 (save-excursion 624 (save-excursion
625 (let ((obuf (current-buffer)) 625 (let ((obuf (current-buffer))
626 (multibyte enable-multibyte-characters)
627 beg) 626 beg)
628 (goto-char (point-min)) 627 (goto-char (point-min))
629 (search-forward-regexp "^\n" nil t) 628 (search-forward-regexp "^\n" nil t)
630 (setq beg (point)) 629 (setq beg (point))
631 (set-buffer (generate-new-buffer " *mm*")) 630 (set-buffer
632 ;; Preserve the data's unibyteness (for url-insert-file-contents). 631 ;; Preserve the data's unibyteness (for url-insert-file-contents).
633 (set-buffer-multibyte multibyte) 632 (let ((default-enable-multibyte-characters (mm-multibyte-p)))
633 (generate-new-buffer " *mm*")))
634 (insert-buffer-substring obuf beg) 634 (insert-buffer-substring obuf beg)
635 (current-buffer)))) 635 (current-buffer))))
636 636
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index 5a4650db1b5..c608820c8ed 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -133,15 +133,9 @@ In XEmacs, also return non-nil if CS is a coding system object."
133 133
134(defvar mm-charset-synonym-alist 134(defvar mm-charset-synonym-alist
135 `( 135 `(
136 ;; Perfectly fine? A valid MIME name, anyhow.
137 ,@(unless (mm-coding-system-p 'big5)
138 '((big5 . cn-big5)))
139 ;; Not in XEmacs, but it's not a proper MIME charset anyhow. 136 ;; Not in XEmacs, but it's not a proper MIME charset anyhow.
140 ,@(unless (mm-coding-system-p 'x-ctext) 137 ,@(unless (mm-coding-system-p 'x-ctext)
141 '((x-ctext . ctext))) 138 '((x-ctext . ctext)))
142 ;; Apparently not defined in Emacs 20, but is a valid MIME name.
143 ,@(unless (mm-coding-system-p 'gb2312)
144 '((gb2312 . cn-gb-2312)))
145 ;; ISO-8859-15 is very similar to ISO-8859-1. But it's _different_! 139 ;; ISO-8859-15 is very similar to ISO-8859-1. But it's _different_!
146 ,@(unless (mm-coding-system-p 'iso-8859-15) 140 ,@(unless (mm-coding-system-p 'iso-8859-15)
147 '((iso-8859-15 . iso-8859-1))) 141 '((iso-8859-15 . iso-8859-1)))
@@ -785,11 +779,12 @@ If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'."
785(defun mm-image-load-path (&optional package) 779(defun mm-image-load-path (&optional package)
786 (let (dir result) 780 (let (dir result)
787 (dolist (path load-path (nreverse result)) 781 (dolist (path load-path (nreverse result))
788 (if (file-directory-p 782 (when (and path
789 (setq dir (concat (file-name-directory 783 (file-directory-p
790 (directory-file-name path)) 784 (setq dir (concat (file-name-directory
791 "etc/" (or package "gnus/")))) 785 (directory-file-name path))
792 (push dir result)) 786 "etc/" (or package "gnus/")))))
787 (push dir result))
793 (push path result)))) 788 (push path result))))
794 789
795;; Fixme: This doesn't look useful where it's used. 790;; Fixme: This doesn't look useful where it's used.
diff --git a/lisp/gnus/mml-sec.el b/lisp/gnus/mml-sec.el
index c9f5cb80190..b8107364411 100644
--- a/lisp/gnus/mml-sec.el
+++ b/lisp/gnus/mml-sec.el
@@ -113,7 +113,7 @@ You can also customize or set `mml-signencrypt-style-alist' instead."
113 (setf (second style-item) style) 113 (setf (second style-item) style)
114 ;; otherwise, just return the current value 114 ;; otherwise, just return the current value
115 (second style-item)) 115 (second style-item))
116 (gnus-message 3 "Warning, attempt to set invalid signencrypt-style")))) 116 (message "Warning, attempt to set invalid signencrypt style"))))
117 117
118;;; Security functions 118;;; Security functions
119 119
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index 596585afc72..3313d6a4118 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -25,9 +25,12 @@
25 25
26;;; Code: 26;;; Code:
27 27
28(eval-when-compile (require 'cl))
29
28(require 'smime) 30(require 'smime)
29(require 'mm-decode) 31(require 'mm-decode)
30(autoload 'message-narrow-to-headers "message") 32(autoload 'message-narrow-to-headers "message")
33(autoload 'message-fetch-field "message")
31 34
32(defun mml-smime-sign (cont) 35(defun mml-smime-sign (cont)
33 (when (null smime-keys) 36 (when (null smime-keys)
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index 21633fb4152..c2c5bbf91e3 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -450,6 +450,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
450 ;; actually are hard newlines in the text. 450 ;; actually are hard newlines in the text.
451 (let (use-hard-newlines) 451 (let (use-hard-newlines)
452 (when (and (string= type "text/plain") 452 (when (and (string= type "text/plain")
453 (not (string= (cdr (assq 'sign cont)) "pgp"))
453 (or (null (assq 'format cont)) 454 (or (null (assq 'format cont))
454 (string= (cdr (assq 'format cont)) 455 (string= (cdr (assq 'format cont))
455 "flowed")) 456 "flowed"))
@@ -591,7 +592,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
591 (insert-buffer-substring (cdr (assq 'buffer cont)))) 592 (insert-buffer-substring (cdr (assq 'buffer cont))))
592 ((and (setq filename (cdr (assq 'filename cont))) 593 ((and (setq filename (cdr (assq 'filename cont)))
593 (not (equal (cdr (assq 'nofile cont)) "yes"))) 594 (not (equal (cdr (assq 'nofile cont)) "yes")))
594 (mm-insert-file-contents filename)) 595 (mm-insert-file-contents filename nil nil nil nil t))
595 (t 596 (t
596 (insert (cdr (assq 'contents cont))))) 597 (insert (cdr (assq 'contents cont)))))
597 (goto-char (point-min)) 598 (goto-char (point-min))
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el
index 142202cb4d2..369631ce653 100644
--- a/lisp/gnus/nnfolder.el
+++ b/lisp/gnus/nnfolder.el
@@ -1174,7 +1174,7 @@ This command does not work if you use short group names."
1174 (let ((range (nth 0 action)) 1174 (let ((range (nth 0 action))
1175 (what (nth 1 action)) 1175 (what (nth 1 action))
1176 (marks (nth 2 action))) 1176 (marks (nth 2 action)))
1177 (assert (or (eq what 'add) (eq what 'del)) t 1177 (assert (or (eq what 'add) (eq what 'del)) nil
1178 "Unknown request-set-mark action: %s" what) 1178 "Unknown request-set-mark action: %s" what)
1179 (dolist (mark marks) 1179 (dolist (mark marks)
1180 (setq nnfolder-marks (gnus-update-alist-soft 1180 (setq nnfolder-marks (gnus-update-alist-soft
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 0ff82c69523..1b6ec636734 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -1,7 +1,7 @@
1;;; nnheader.el --- header access macros for Gnus and its backends 1;;; nnheader.el --- header access macros for Gnus and its backends
2 2
3;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, 3;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996,
4;; 1997, 1998, 2000, 2001, 2002, 2003 4;; 1997, 1998, 2000, 2001, 2002, 2003, 2004
5;; Free Software Foundation, Inc. 5;; Free Software Foundation, Inc.
6 6
7;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> 7;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
@@ -58,7 +58,7 @@ they will keep on jabbering all the time."
58 :group 'gnus-server 58 :group 'gnus-server
59 :type 'boolean) 59 :type 'boolean)
60 60
61(defvar nnheader-max-head-length 4096 61(defvar nnheader-max-head-length 8192
62 "*Max length of the head of articles. 62 "*Max length of the head of articles.
63 63
64Value is an integer, nil, or t. nil means read in chunks of a file 64Value is an integer, nil, or t. nil means read in chunks of a file
diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el
index cb820b094c1..4a9cfd32943 100644
--- a/lisp/gnus/nnml.el
+++ b/lisp/gnus/nnml.el
@@ -923,7 +923,7 @@ Use the nov database for the current group if available."
923 (let ((range (nth 0 action)) 923 (let ((range (nth 0 action))
924 (what (nth 1 action)) 924 (what (nth 1 action))
925 (marks (nth 2 action))) 925 (marks (nth 2 action)))
926 (assert (or (eq what 'add) (eq what 'del)) t 926 (assert (or (eq what 'add) (eq what 'del)) nil
927 "Unknown request-set-mark action: %s" what) 927 "Unknown request-set-mark action: %s" what)
928 (dolist (mark marks) 928 (dolist (mark marks)
929 (setq nnml-marks (gnus-update-alist-soft 929 (setq nnml-marks (gnus-update-alist-soft
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el
index 978bec3c361..cbb5a1fc5b0 100644
--- a/lisp/gnus/rfc2047.el
+++ b/lisp/gnus/rfc2047.el
@@ -126,6 +126,25 @@ quoted-printable and base64 respectively.")
126;;; Functions for encoding RFC2047 messages 126;;; Functions for encoding RFC2047 messages
127;;; 127;;;
128 128
129(defun rfc2047-qp-or-base64 ()
130 "Return the type with which to encode the buffer.
131This is either `base64' or `quoted-printable'."
132 (save-excursion
133 (let ((limit (min (point-max) (+ 2000 (point-min))))
134 (n8bit 0))
135 (goto-char (point-min))
136 (skip-chars-forward "\x20-\x7f\r\n\t" limit)
137 (while (< (point) limit)
138 (incf n8bit)
139 (forward-char 1)
140 (skip-chars-forward "\x20-\x7f\r\n\t" limit))
141 (if (or (< (* 6 n8bit) (- limit (point-min)))
142 ;; Don't base64, say, a short line with a single
143 ;; non-ASCII char when splitting parts by charset.
144 (= n8bit 1))
145 'quoted-printable
146 'base64))))
147
129(defun rfc2047-narrow-to-field () 148(defun rfc2047-narrow-to-field ()
130 "Narrow the buffer to the header on the current line." 149 "Narrow the buffer to the header on the current line."
131 (beginning-of-line) 150 (beginning-of-line)
@@ -411,7 +430,7 @@ By default, the region is treated as containing addresses (see
411 ;; encoding, choose the one that's shorter. 430 ;; encoding, choose the one that's shorter.
412 (save-restriction 431 (save-restriction
413 (narrow-to-region b e) 432 (narrow-to-region b e)
414 (if (eq (mm-qp-or-base64) 'base64) 433 (if (eq (rfc2047-qp-or-base64) 'base64)
415 'B 434 'B
416 'Q)))) 435 'Q))))
417 (start (concat 436 (start (concat
@@ -720,11 +739,15 @@ decodable."
720 ;; Be more liberal to accept buggy base64 strings. If 739 ;; Be more liberal to accept buggy base64 strings. If
721 ;; base64-decode-string accepts buggy strings, this function could 740 ;; base64-decode-string accepts buggy strings, this function could
722 ;; be aliased to identity. 741 ;; be aliased to identity.
723 (case (mod (length string) 4) 742 (if (= 0 (mod (length string) 4))
724 (0 string) 743 string
725 (1 string) ;; Error, don't pad it. 744 (when (string-match "=+$" string)
726 (2 (concat string "==")) 745 (setq string (substring string 0 (match-beginning 0))))
727 (3 (concat string "=")))) 746 (case (mod (length string) 4)
747 (0 string)
748 (1 string) ;; Error, don't pad it.
749 (2 (concat string "=="))
750 (3 (concat string "=")))))
728 751
729(defun rfc2047-decode (charset encoding string) 752(defun rfc2047-decode (charset encoding string)
730 "Decode STRING from the given MIME CHARSET in the given ENCODING. 753 "Decode STRING from the given MIME CHARSET in the given ENCODING.
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index 6fb99db157a..85534f3828c 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -1746,7 +1746,7 @@ REMOVE not nil, remove the ADDRESSES."
1746 (goto-char (point-min)) 1746 (goto-char (point-min))
1747 (when (re-search-forward "^X-Spam: yes;" nil t) 1747 (when (re-search-forward "^X-Spam: yes;" nil t)
1748 spam-split-group)) 1748 spam-split-group))
1749 (error "Error running spamoracle" status)))))))) 1749 (error "Error running spamoracle: %s" status))))))))
1750 1750
1751(defun spam-spamoracle-learn (articles article-is-spam-p &optional unregister) 1751(defun spam-spamoracle-learn (articles article-is-spam-p &optional unregister)
1752 "Run spamoracle in training mode." 1752 "Run spamoracle in training mode."
@@ -1768,8 +1768,8 @@ REMOVE not nil, remove the ADDRESSES."
1768 `("-f" ,spam-spamoracle-database 1768 `("-f" ,spam-spamoracle-database
1769 "add" ,arg) 1769 "add" ,arg)
1770 `("add" ,arg))))) 1770 `("add" ,arg)))))
1771 (when (not (eq 0 status)) 1771 (unless (eq 0 status)
1772 (error "Error running spamoracle" status))))))) 1772 (error "Error running spamoracle: %s" status)))))))
1773 1773
1774(defun spam-spamoracle-learn-ham (articles &optional unregister) 1774(defun spam-spamoracle-learn-ham (articles &optional unregister)
1775 (spam-spamoracle-learn articles nil unregister)) 1775 (spam-spamoracle-learn articles nil unregister))
diff --git a/lisp/ido.el b/lisp/ido.el
index 7f149af1e87..f9066544e1f 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -666,6 +666,14 @@ See also `ido-dir-file-cache' and `ido-save-directory-list-file'."
666 :type 'integer 666 :type 'integer
667 :group 'ido) 667 :group 'ido)
668 668
669(defcustom ido-max-directory-size 30000
670 "*Maximum size (in bytes) for directories to use ido completion.
671If you enter a directory with a size larger than this size, ido will
672not provide the normal completion. To show the completions, use C-a."
673 :type '(choice (const :tag "No limit" nil)
674 (integer :tag "Size in bytes" 30000))
675 :group 'ido)
676
669(defcustom ido-rotate-file-list-default nil 677(defcustom ido-rotate-file-list-default nil
670 "*Non-nil means that `ido' will always rotate file list to get default in front." 678 "*Non-nil means that `ido' will always rotate file list to get default in front."
671 :type 'boolean 679 :type 'boolean
@@ -699,9 +707,9 @@ Obsolete. Set 3rd element of `ido-decorations' instead."
699 :type '(choice string (const nil)) 707 :type '(choice string (const nil))
700 :group 'ido) 708 :group 'ido)
701 709
702(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]") 710(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]")
703 "*List of strings used by ido to display the alternatives in the minibuffer. 711 "*List of strings used by ido to display the alternatives in the minibuffer.
704There are 9 elements in this list: 712There are 10 elements in this list:
7051st and 2nd elements are used as brackets around the prospect list, 7131st and 2nd elements are used as brackets around the prospect list,
7063rd element is the separator between prospects (ignored if ido-separator is set), 7143rd element is the separator between prospects (ignored if ido-separator is set),
7074th element is the string inserted at the end of a truncated list of prospects, 7154th element is the string inserted at the end of a truncated list of prospects,
@@ -709,7 +717,8 @@ There are 9 elements in this list:
709can be completed using TAB, 717can be completed using TAB,
7107th element is the string displayed when there are a no matches, and 7187th element is the string displayed when there are a no matches, and
7118th element is displayed if there is a single match (and faces are not used). 7198th element is displayed if there is a single match (and faces are not used).
7129th element is displayed when the current directory is non-readable." 7209th element is displayed when the current directory is non-readable.
72110th element is displayed when directory exceeds `ido-max-directory-size'."
713 :type '(repeat string) 722 :type '(repeat string)
714 :group 'ido) 723 :group 'ido)
715 724
@@ -952,6 +961,9 @@ it doesn't interfere with other minibuffer usage.")
952;; Remember if current directory is non-readable (so we cannot do completion). 961;; Remember if current directory is non-readable (so we cannot do completion).
953(defvar ido-directory-nonreadable) 962(defvar ido-directory-nonreadable)
954 963
964;; Remember if current directory is 'huge' (so we don't want to do completion).
965(defvar ido-directory-too-big)
966
955;; Keep current item list if non-nil. 967;; Keep current item list if non-nil.
956(defvar ido-keep-item-list) 968(defvar ido-keep-item-list)
957 969
@@ -1082,6 +1094,8 @@ it doesn't interfere with other minibuffer usage.")
1082(defun ido-may-cache-directory (&optional dir) 1094(defun ido-may-cache-directory (&optional dir)
1083 (setq dir (or dir ido-current-directory)) 1095 (setq dir (or dir ido-current-directory))
1084 (cond 1096 (cond
1097 ((ido-directory-too-big-p dir)
1098 nil)
1085 ((and (ido-is-root-directory dir) 1099 ((and (ido-is-root-directory dir)
1086 (or ido-enable-tramp-completion 1100 (or ido-enable-tramp-completion
1087 (memq system-type '(windows-nt ms-dos)))) 1101 (memq system-type '(windows-nt ms-dos))))
@@ -1425,6 +1439,16 @@ This function also adds a hook to the minibuffer."
1425 (file-directory-p dir) 1439 (file-directory-p dir)
1426 (not (file-readable-p dir))))) 1440 (not (file-readable-p dir)))))
1427 1441
1442(defun ido-directory-too-big-p (dir)
1443 ;; Return t if dir is a directory, but too big to show
1444 ;; Do not check for non-readable directories via tramp, as this causes a premature
1445 ;; connect on incomplete tramp paths (after entring just method:).
1446 (let ((ido-enable-tramp-completion nil))
1447 (and (numberp ido-max-directory-size)
1448 (ido-final-slash dir)
1449 (file-directory-p dir)
1450 (> (nth 7 (file-attributes dir)) ido-max-directory-size))))
1451
1428(defun ido-set-current-directory (dir &optional subdir no-merge) 1452(defun ido-set-current-directory (dir &optional subdir no-merge)
1429 ;; Set ido's current directory to DIR or DIR/SUBDIR 1453 ;; Set ido's current directory to DIR or DIR/SUBDIR
1430 (setq dir (ido-final-slash dir t)) 1454 (setq dir (ido-final-slash dir t))
@@ -1439,6 +1463,8 @@ This function also adds a hook to the minibuffer."
1439 (if (get-buffer ido-completion-buffer) 1463 (if (get-buffer ido-completion-buffer)
1440 (kill-buffer ido-completion-buffer)) 1464 (kill-buffer ido-completion-buffer))
1441 (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir)) 1465 (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir))
1466 (setq ido-directory-too-big (and (not ido-directory-nonreadable)
1467 (ido-directory-too-big-p dir)))
1442 t)) 1468 t))
1443 1469
1444(defun ido-set-current-home (&optional dir) 1470(defun ido-set-current-home (&optional dir)
@@ -1623,10 +1649,14 @@ If INITIAL is non-nil, it specifies the initial input string."
1623 ido-rescan nil)) 1649 ido-rescan nil))
1624 ((eq ido-cur-item 'file) 1650 ((eq ido-cur-item 'file)
1625 (setq ido-ignored-list nil 1651 (setq ido-ignored-list nil
1626 ido-cur-list (ido-make-file-list ido-default-item))) 1652 ido-cur-list (and (not ido-directory-nonreadable)
1653 (not ido-directory-too-big)
1654 (ido-make-file-list ido-default-item))))
1627 ((eq ido-cur-item 'dir) 1655 ((eq ido-cur-item 'dir)
1628 (setq ido-ignored-list nil 1656 (setq ido-ignored-list nil
1629 ido-cur-list (ido-make-dir-list ido-default-item))) 1657 ido-cur-list (and (not ido-directory-nonreadable)
1658 (not ido-directory-too-big)
1659 (ido-make-dir-list ido-default-item))))
1630 ((eq ido-cur-item 'buffer) 1660 ((eq ido-cur-item 'buffer)
1631 (setq ido-ignored-list nil 1661 (setq ido-ignored-list nil
1632 ido-cur-list (ido-make-buffer-list ido-default-item))) 1662 ido-cur-list (ido-make-buffer-list ido-default-item)))
@@ -1802,7 +1832,10 @@ If INITIAL is non-nil, it specifies the initial input string."
1802 (if (not ido-mode) 1832 (if (not ido-mode)
1803 (call-interactively (or fallback 'switch-to-buffer)) 1833 (call-interactively (or fallback 'switch-to-buffer))
1804 (let* ((ido-context-switch-command switch-cmd) 1834 (let* ((ido-context-switch-command switch-cmd)
1805 (buf (ido-read-buffer (or prompt "Buffer: ") default nil initial))) 1835 (ido-current-directory nil)
1836 (ido-directory-nonreadable nil)
1837 (ido-directory-too-big nil)
1838 (buf (ido-read-internal 'buffer (or prompt "Buffer: ") 'ido-buffer-history default nil initial)))
1806 1839
1807 ;; Choose the buffer name: either the text typed in, or the head 1840 ;; Choose the buffer name: either the text typed in, or the head
1808 ;; of the list of matches 1841 ;; of the list of matches
@@ -1845,19 +1878,6 @@ If INITIAL is non-nil, it specifies the initial input string."
1845 (set-buffer-major-mode buf)) 1878 (set-buffer-major-mode buf))
1846 (ido-visit-buffer buf method t)))))) 1879 (ido-visit-buffer buf method t))))))
1847 1880
1848;;;###autoload
1849(defun ido-read-buffer (prompt &optional default require-match initial)
1850 "Replacement for the built-in `read-buffer'.
1851Return the name of a buffer selected.
1852PROMPT is the prompt to give to the user. DEFAULT if given is the default
1853buffer to be selected, which will go to the front of the list.
1854If REQUIRE-MATCH is non-nil, an existing-buffer must be selected.
1855If INITIAL is non-nil, it specifies the initial input string."
1856 (let ((ido-current-directory nil)
1857 (ido-directory-nonreadable nil)
1858 (ido-context-switch-command (if (boundp 'ido-context-switch-command) ido-context-switch-command 'ignore)))
1859 (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match initial)))
1860
1861(defun ido-record-work-directory (&optional dir) 1881(defun ido-record-work-directory (&optional dir)
1862 (when (and (numberp ido-max-work-directory-list) (> ido-max-work-directory-list 0)) 1882 (when (and (numberp ido-max-work-directory-list) (> ido-max-work-directory-list 0))
1863 (if (and (setq dir (or dir ido-current-directory)) (> (length dir) 0)) 1883 (if (and (setq dir (or dir ido-current-directory)) (> (length dir) 0))
@@ -1905,6 +1925,8 @@ If INITIAL is non-nil, it specifies the initial input string."
1905 (setq item 'file)) 1925 (setq item 'file))
1906 (let* ((ido-current-directory (ido-expand-directory default)) 1926 (let* ((ido-current-directory (ido-expand-directory default))
1907 (ido-directory-nonreadable (ido-nonreadable-directory-p ido-current-directory)) 1927 (ido-directory-nonreadable (ido-nonreadable-directory-p ido-current-directory))
1928 (ido-directory-too-big (and (not ido-directory-nonreadable)
1929 (ido-directory-too-big-p ido-current-directory)))
1908 (ido-context-switch-command switch-cmd) 1930 (ido-context-switch-command switch-cmd)
1909 filename) 1931 filename)
1910 1932
@@ -2079,6 +2101,12 @@ If INITIAL is non-nil, it specifies the initial input string."
2079 (setq ido-exit 'refresh) 2101 (setq ido-exit 'refresh)
2080 (exit-minibuffer)))) 2102 (exit-minibuffer))))
2081 2103
2104 (ido-directory-too-big
2105 (setq ido-directory-too-big nil)
2106 (setq ido-text-init ido-text)
2107 (setq ido-exit 'refresh)
2108 (exit-minibuffer))
2109
2082 ((not ido-matches) 2110 ((not ido-matches)
2083 (when ido-completion-buffer 2111 (when ido-completion-buffer
2084 (call-interactively (setq this-command ido-cannot-complete-command)))) 2112 (call-interactively (setq this-command ido-cannot-complete-command))))
@@ -2182,7 +2210,9 @@ If no merge has yet taken place, toggle automatic merging option."
2182(defun ido-toggle-ignore () 2210(defun ido-toggle-ignore ()
2183 "Toggle ignoring files specified with `ido-ignore-files'." 2211 "Toggle ignoring files specified with `ido-ignore-files'."
2184 (interactive) 2212 (interactive)
2185 (setq ido-process-ignore-lists (not ido-process-ignore-lists)) 2213 (if ido-directory-too-big
2214 (setq ido-directory-too-big nil)
2215 (setq ido-process-ignore-lists (not ido-process-ignore-lists)))
2186 (setq ido-text-init ido-text) 2216 (setq ido-text-init ido-text)
2187 (setq ido-exit 'refresh) 2217 (setq ido-exit 'refresh)
2188 (exit-minibuffer)) 2218 (exit-minibuffer))
@@ -2324,6 +2354,7 @@ If no buffer or file exactly matching the prompt exists, maybe create a new one.
2324 (not (equal dir ido-current-directory)) 2354 (not (equal dir ido-current-directory))
2325 (file-directory-p dir) 2355 (file-directory-p dir)
2326 (or (not must-match) 2356 (or (not must-match)
2357 ;; TODO. check for nonreadable and too-big.
2327 (ido-set-matches1 2358 (ido-set-matches1
2328 (if (eq ido-cur-item 'file) 2359 (if (eq ido-cur-item 'file)
2329 (ido-make-file-list1 dir) 2360 (ido-make-file-list1 dir)
@@ -2581,7 +2612,8 @@ for first matching file."
2581 2612
2582(defun ido-all-completions () 2613(defun ido-all-completions ()
2583 ;; Return unsorted list of all competions. 2614 ;; Return unsorted list of all competions.
2584 (let ((ido-process-ignore-lists nil)) 2615 (let ((ido-process-ignore-lists nil)
2616 (ido-directory-too-big nil))
2585 (cond 2617 (cond
2586 ((eq ido-cur-item 'file) 2618 ((eq ido-cur-item 'file)
2587 (ido-make-file-list1 ido-current-directory)) 2619 (ido-make-file-list1 ido-current-directory))
@@ -2700,6 +2732,7 @@ for first matching file."
2700 (or ido-merge-ftp-work-directories 2732 (or ido-merge-ftp-work-directories
2701 (not (ido-is-ftp-directory dir))) 2733 (not (ido-is-ftp-directory dir)))
2702 (file-directory-p dir) 2734 (file-directory-p dir)
2735 ;; TODO. check for nonreadable and too-big.
2703 (setq fl (if (eq ido-cur-item 'file) 2736 (setq fl (if (eq ido-cur-item 'file)
2704 (ido-make-file-list1 dir t) 2737 (ido-make-file-list1 dir t)
2705 (ido-make-dir-list1 dir t)))) 2738 (ido-make-dir-list1 dir t))))
@@ -2780,6 +2813,8 @@ for first matching file."
2780(defun ido-file-name-all-completions1 (dir) 2813(defun ido-file-name-all-completions1 (dir)
2781 (cond 2814 (cond
2782 ((ido-nonreadable-directory-p dir) '()) 2815 ((ido-nonreadable-directory-p dir) '())
2816 ;; do not check (ido-directory-too-big-p dir) here.
2817 ;; Caller must have done that if necessary.
2783 ((and ido-enable-tramp-completion 2818 ((and ido-enable-tramp-completion
2784 (string-match "\\`/\\([^/:]+:\\([^/:@]+@\\)?\\)\\'" dir)) 2819 (string-match "\\`/\\([^/:]+:\\([^/:@]+@\\)?\\)\\'" dir))
2785 2820
@@ -3616,7 +3651,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3616 (expand-file-name "/" ido-current-directory) 3651 (expand-file-name "/" ido-current-directory)
3617 "/")) 3652 "/"))
3618 (setq refresh t)) 3653 (setq refresh t))
3619 ((and ido-directory-nonreadable 3654 ((and (or ido-directory-nonreadable ido-directory-too-big)
3620 (file-directory-p (concat ido-current-directory (file-name-directory contents)))) 3655 (file-directory-p (concat ido-current-directory (file-name-directory contents))))
3621 (ido-set-current-directory 3656 (ido-set-current-directory
3622 (concat ido-current-directory (file-name-directory contents))) 3657 (concat ido-current-directory (file-name-directory contents)))
@@ -3678,6 +3713,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3678 3713
3679 (when (and (not ido-matches) 3714 (when (and (not ido-matches)
3680 (not ido-directory-nonreadable) 3715 (not ido-directory-nonreadable)
3716 (not ido-directory-too-big)
3681 ;; ido-rescan ? 3717 ;; ido-rescan ?
3682 ido-process-ignore-lists 3718 ido-process-ignore-lists
3683 ido-ignored-list) 3719 ido-ignored-list)
@@ -3701,7 +3737,8 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3701 (not (ido-is-root-directory)) 3737 (not (ido-is-root-directory))
3702 (> (length contents) 1) 3738 (> (length contents) 1)
3703 (not (string-match "[$]" contents)) 3739 (not (string-match "[$]" contents))
3704 (not ido-directory-nonreadable)) 3740 (not ido-directory-nonreadable)
3741 (not ido-directory-too-big))
3705 (ido-trace "merge?") 3742 (ido-trace "merge?")
3706 (if ido-use-merged-list 3743 (if ido-use-merged-list
3707 (ido-undo-merge-work-directory contents nil) 3744 (ido-undo-merge-work-directory contents nil)
@@ -3766,6 +3803,8 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3766 (cond 3803 (cond
3767 (ido-directory-nonreadable 3804 (ido-directory-nonreadable
3768 (or (nth 8 ido-decorations) " [Not readable]")) 3805 (or (nth 8 ido-decorations) " [Not readable]"))
3806 (ido-directory-too-big
3807 (or (nth 9 ido-decorations) " [Too big]"))
3769 (ido-report-no-match 3808 (ido-report-no-match
3770 (nth 6 ido-decorations)) ;; [No match] 3809 (nth 6 ido-decorations)) ;; [No match]
3771 (t ""))) 3810 (t "")))
@@ -3872,8 +3911,26 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3872(put 'dired-do-rename 'ido 'ignore) 3911(put 'dired-do-rename 'ido 'ignore)
3873 3912
3874;;;###autoload 3913;;;###autoload
3914(defun ido-read-buffer (prompt &optional default require-match)
3915 "Ido replacement for the built-in `read-buffer'.
3916Return the name of a buffer selected.
3917PROMPT is the prompt to give to the user. DEFAULT if given is the default
3918buffer to be selected, which will go to the front of the list.
3919If REQUIRE-MATCH is non-nil, an existing-buffer must be selected."
3920 (let* ((ido-current-directory nil)
3921 (ido-directory-nonreadable nil)
3922 (ido-directory-too-big nil)
3923 (ido-context-switch-command 'ignore)
3924 (buf (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match)))
3925 (if (eq ido-exit 'fallback)
3926 (let ((read-buffer-function nil))
3927 (read-buffer prompt default require-match))
3928 buf)))
3929
3930;;;###autoload
3875(defun ido-read-file-name (prompt &optional dir default-filename mustmatch initial predicate) 3931(defun ido-read-file-name (prompt &optional dir default-filename mustmatch initial predicate)
3876 "Read file name, prompting with PROMPT and completing in directory DIR. 3932 "Ido replacement for the built-in `read-file-name'.
3933Read file name, prompting with PROMPT and completing in directory DIR.
3877See `read-file-name' for additional parameters." 3934See `read-file-name' for additional parameters."
3878 (let (filename) 3935 (let (filename)
3879 (cond 3936 (cond
@@ -3890,6 +3947,8 @@ See `read-file-name' for additional parameters."
3890 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) 3947 (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends))
3891 (ido-current-directory (ido-expand-directory dir)) 3948 (ido-current-directory (ido-expand-directory dir))
3892 (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) 3949 (ido-directory-nonreadable (not (file-readable-p ido-current-directory)))
3950 (ido-directory-too-big (and (not ido-directory-nonreadable)
3951 (ido-directory-too-big-p ido-current-directory)))
3893 (ido-work-directory-index -1) 3952 (ido-work-directory-index -1)
3894 (ido-work-file-index -1) 3953 (ido-work-file-index -1)
3895 (ido-find-literal nil)) 3954 (ido-find-literal nil))
@@ -3911,13 +3970,16 @@ See `read-file-name' for additional parameters."
3911 3970
3912;;;###autoload 3971;;;###autoload
3913(defun ido-read-directory-name (prompt &optional dir default-dirname mustmatch initial) 3972(defun ido-read-directory-name (prompt &optional dir default-dirname mustmatch initial)
3914 "Read directory name, prompting with PROMPT and completing in directory DIR. 3973 "Ido replacement for the built-in `read-directory-name'.
3915See `read-file-name' for additional parameters." 3974Read directory name, prompting with PROMPT and completing in directory DIR.
3975See `read-directory-name' for additional parameters."
3916 (let* (filename 3976 (let* (filename
3917 (ido-context-switch-command 'ignore) 3977 (ido-context-switch-command 'ignore)
3918 ido-saved-vc-hb 3978 ido-saved-vc-hb
3919 (ido-current-directory (ido-expand-directory dir)) 3979 (ido-current-directory (ido-expand-directory dir))
3920 (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) 3980 (ido-directory-nonreadable (not (file-readable-p ido-current-directory)))
3981 (ido-directory-too-big (and (not ido-directory-nonreadable)
3982 (ido-directory-too-big-p ido-current-directory)))
3921 (ido-work-directory-index -1) 3983 (ido-work-directory-index -1)
3922 (ido-work-file-index -1)) 3984 (ido-work-file-index -1))
3923 (setq filename 3985 (setq filename
@@ -3929,7 +3991,8 @@ See `read-file-name' for additional parameters."
3929 3991
3930;;;###autoload 3992;;;###autoload
3931(defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def) 3993(defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def)
3932 "Read a string in the minibuffer with ido-style completion. 3994 "Ido replacement for the built-in `completing-read'.
3995Read a string in the minibuffer with ido-style completion.
3933PROMPT is a string to prompt with; normally it ends in a colon and a space. 3996PROMPT is a string to prompt with; normally it ends in a colon and a space.
3934CHOICES is a list of strings which are the possible completions. 3997CHOICES is a list of strings which are the possible completions.
3935PREDICATE is currently ignored; it is included to be compatible 3998PREDICATE is currently ignored; it is included to be compatible
@@ -3944,6 +4007,7 @@ HIST, if non-nil, specifies a history list.
3944DEF, if non-nil, is the default value." 4007DEF, if non-nil, is the default value."
3945 (let ((ido-current-directory nil) 4008 (let ((ido-current-directory nil)
3946 (ido-directory-nonreadable nil) 4009 (ido-directory-nonreadable nil)
4010 (ido-directory-too-big nil)
3947 (ido-context-switch-command 'ignore) 4011 (ido-context-switch-command 'ignore)
3948 (ido-choice-list choices)) 4012 (ido-choice-list choices))
3949 (ido-read-internal 'list prompt hist def require-match initial-input))) 4013 (ido-read-internal 'list prompt hist def require-match initial-input)))
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index 521729b764f..8944d4c20c0 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -534,7 +534,7 @@ SWITCHES, TIME-INDEX and NOW give the full switch list and time data."
534 " " 534 " "
535 (ls-lisp-format-time file-attr time-index now) 535 (ls-lisp-format-time file-attr time-index now)
536 " " 536 " "
537 file-name 537 (propertize file-name 'dired-filename t)
538 (if (stringp file-type) ; is a symbolic link 538 (if (stringp file-type) ; is a symbolic link
539 (concat " -> " file-type)) 539 (concat " -> " file-type))
540 "\n" 540 "\n"
diff --git a/lisp/printing.el b/lisp/printing.el
index a406e09b8c0..3efb53111fd 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -5,13 +5,13 @@
5 5
6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> 6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> 7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
8;; Time-stamp: <2004/09/21 22:51:58 vinicius> 8;; Time-stamp: <2004/09/26 22:11:24 vinicius>
9;; Keywords: wp, print, PostScript 9;; Keywords: wp, print, PostScript
10;; Version: 6.8 10;; Version: 6.8.1
11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ 11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
12 12
13(defconst pr-version "6.8" 13(defconst pr-version "6.8.1"
14 "printing.el, v 6.8 <2004/09/21 vinicius> 14 "printing.el, v 6.8.1 <2004/09/26 vinicius>
15 15
16Please send all bug fixes and enhancements to 16Please send all bug fixes and enhancements to
17 Vinicius Jose Latorre <viniciusjl@ig.com.br> 17 Vinicius Jose Latorre <viniciusjl@ig.com.br>
@@ -125,16 +125,16 @@ Please send all bug fixes and enhancements to
125;; Novices (First Users) 125;; Novices (First Users)
126;; --------------------- 126;; ---------------------
127;; 127;;
128;; First of all, take a glance of printing documentation only to have an idea 128;; First of all, see printing documentation only to get an idea of what
129;; of what `printing' is capable. 129;; `printing' is capable.
130;; 130;;
131;; Then try to set the variables: `pr-ps-name', `pr-ps-printer-alist', 131;; Then try to set the variables: `pr-ps-name', `pr-ps-printer-alist',
132;; `pr-txt-name', `pr-txt-printer-alist' and `pr-path-alist'. These variables 132;; `pr-txt-name', `pr-txt-printer-alist' and `pr-path-alist'. These variables
133;; are the main variables for printing processing. 133;; are the main variables for printing processing.
134;; 134;;
135;; Now, please, see these variables documentation more in deep. You can do 135;; Now, please, see these variables documentation deeper. You can do this by
136;; this by typing C-h v pr-ps-name RET (for example) if you already loaded 136;; typing C-h v pr-ps-name RET (for example) if you already loaded printing
137;; printing package, or by browsing printing.el source file. 137;; package, or by browsing printing.el source file.
138;; 138;;
139;; If the documentation isn't clear or if you find a way to improve the 139;; If the documentation isn't clear or if you find a way to improve the
140;; documentation, please, send an email to maintainer. All printing users 140;; documentation, please, send an email to maintainer. All printing users
@@ -263,7 +263,8 @@ Please send all bug fixes and enhancements to
263;; in Windows. The gsprint utility is faster than ghostscript to print 263;; in Windows. The gsprint utility is faster than ghostscript to print
264;; monochrome PostScript. 264;; monochrome PostScript.
265;; 265;;
266;; The efficiency is similar to print non-monochrome PostScript file. 266;; To print non-monochrome PostScript file, the efficiency of ghostscript
267;; is similar to gsprint.
267;; 268;;
268;; Also the gsprint utility comes together with gsview distribution. 269;; Also the gsprint utility comes together with gsview distribution.
269;; 270;;
@@ -3887,7 +3888,7 @@ image in a file with that name."
3887 (interactive (list (pr-ps-infile-preprint "Print preview "))) 3888 (interactive (list (pr-ps-infile-preprint "Print preview ")))
3888 (and (stringp filename) (file-exists-p filename) 3889 (and (stringp filename) (file-exists-p filename)
3889 (let* ((file (pr-expand-file-name filename)) 3890 (let* ((file (pr-expand-file-name filename))
3890 (tempfile (pr-dosify-file-name (make-temp-name file)))) 3891 (tempfile (pr-dosify-file-name (make-temp-file file))))
3891 ;; gs use 3892 ;; gs use
3892 (pr-call-process pr-gs-command 3893 (pr-call-process pr-gs-command
3893 (format "-sDEVICE=%s" pr-gs-device) 3894 (format "-sDEVICE=%s" pr-gs-device)
@@ -5221,7 +5222,8 @@ non-nil."
5221 5222
5222 5223
5223(defun pr-delete-file (file) 5224(defun pr-delete-file (file)
5224 (and pr-delete-temp-file (delete-file file))) 5225 (and pr-delete-temp-file (file-exists-p file)
5226 (delete-file file)))
5225 5227
5226 5228
5227(defun pr-expand-file-name (filename) 5229(defun pr-expand-file-name (filename)
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 1972074fdb1..612a2034e00 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -1069,8 +1069,9 @@ static char *magick[] = {
1069(defvar breakpoint-disabled-icon nil 1069(defvar breakpoint-disabled-icon nil
1070 "Icon for disabled breakpoint in display margin") 1070 "Icon for disabled breakpoint in display margin")
1071 1071
1072(defvar breakpoint-bitmap nil 1072;; Bitmap for breakpoint in fringe
1073 "Bitmap for breakpoint in fringe") 1073(define-fringe-bitmap 'breakpoint
1074 "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")
1074 1075
1075(defface breakpoint-enabled-bitmap-face 1076(defface breakpoint-enabled-bitmap-face
1076 '((t 1077 '((t
@@ -1140,9 +1141,8 @@ static char *magick[] = {
1140 (save-excursion 1141 (save-excursion
1141 (goto-char (posn-point posn)) 1142 (goto-char (posn-point posn))
1142 (if (or (posn-object posn) 1143 (if (or (posn-object posn)
1143 (and breakpoint-bitmap 1144 (eq (car (fringe-bitmaps-at-pos (posn-point posn)))
1144 (eq (car (fringe-bitmaps-at-pos (posn-point posn))) 1145 'breakpoint))
1145 breakpoint-bitmap)))
1146 (gud-remove nil) 1146 (gud-remove nil)
1147 (gud-break nil))))))) 1147 (gud-break nil)))))))
1148 1148
@@ -1831,11 +1831,7 @@ BUFFER nil or omitted means use the current buffer."
1831 (if (>= (car (window-fringes)) 8) 1831 (if (>= (car (window-fringes)) 8)
1832 (gdb-put-string 1832 (gdb-put-string
1833 nil (1+ start) 1833 nil (1+ start)
1834 `(left-fringe 1834 `(left-fringe breakpoint
1835 ,(or breakpoint-bitmap
1836 (setq breakpoint-bitmap
1837 (define-fringe-bitmap
1838 "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")))
1839 ,(if enabled 1835 ,(if enabled
1840 'breakpoint-enabled-bitmap-face 1836 'breakpoint-enabled-bitmap-face
1841 'breakpoint-disabled-bitmap-face))) 1837 'breakpoint-disabled-bitmap-face)))
diff --git a/lisp/subr.el b/lisp/subr.el
index 5a7d9249e83..d9262da2963 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1970,6 +1970,8 @@ Major mode functions should use this."
1970 1970
1971(defmacro delay-mode-hooks (&rest body) 1971(defmacro delay-mode-hooks (&rest body)
1972 "Execute BODY, but delay any `run-mode-hooks'. 1972 "Execute BODY, but delay any `run-mode-hooks'.
1973These hooks will be executed by the first following call to
1974`run-mode-hooks' that occurs outside any `delayed-mode-hooks' form.
1973Only affects hooks run in the current buffer." 1975Only affects hooks run in the current buffer."
1974 (declare (debug t)) 1976 (declare (debug t))
1975 `(progn 1977 `(progn
diff --git a/lisp/term.el b/lisp/term.el
index 0fbe5b2f154..e71163a822c 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1,6 +1,6 @@
1;;; term.el --- general command interpreter in a window stuff 1;;; term.el --- general command interpreter in a window stuff
2 2
3;;; Copyright (C) 1988, 1990, 1992, 1994, 1995 Free Software Foundation, Inc. 3;;; Copyright (C) 1988, 1990, 1992, 1994, 1995, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Per Bothner <bothner@cygnus.com> 5;; Author: Per Bothner <bothner@cygnus.com>
6;; Based on comint mode written by: Olin Shivers <shivers@cs.cmu.edu> 6;; Based on comint mode written by: Olin Shivers <shivers@cs.cmu.edu>
@@ -676,7 +676,6 @@ Buffer local variable.")
676(defvar term-terminal-menu) 676(defvar term-terminal-menu)
677 677
678;;; Let's silence the byte-compiler -mm 678;;; Let's silence the byte-compiler -mm
679(defvar term-ansi-at-eval-string nil)
680(defvar term-ansi-at-host nil) 679(defvar term-ansi-at-host nil)
681(defvar term-ansi-at-dir nil) 680(defvar term-ansi-at-dir nil)
682(defvar term-ansi-at-user nil) 681(defvar term-ansi-at-user nil)
@@ -692,9 +691,6 @@ Buffer local variable.")
692(defvar term-ansi-current-highlight 0) 691(defvar term-ansi-current-highlight 0)
693(defvar term-ansi-current-reverse 0) 692(defvar term-ansi-current-reverse 0)
694(defvar term-ansi-current-invisible 0) 693(defvar term-ansi-current-invisible 0)
695(defvar term-ansi-default-fg 0)
696(defvar term-ansi-default-bg 0)
697(defvar term-ansi-current-temp 0)
698 694
699;;; Four should be enough, if you want more, just add. -mm 695;;; Four should be enough, if you want more, just add. -mm
700(defvar term-terminal-more-parameters 0) 696(defvar term-terminal-more-parameters 0)
@@ -917,6 +913,9 @@ is buffer-local.")
917 (define-key term-raw-map [backspace] 'term-send-backspace) 913 (define-key term-raw-map [backspace] 'term-send-backspace)
918 (define-key term-raw-map [home] 'term-send-home) 914 (define-key term-raw-map [home] 'term-send-home)
919 (define-key term-raw-map [end] 'term-send-end) 915 (define-key term-raw-map [end] 'term-send-end)
916 (define-key term-raw-map [S-prior] 'scroll-down)
917 (define-key term-raw-map [S-next] 'scroll-up)
918 (define-key term-raw-map [S-insert] 'term-paste)
920 (define-key term-raw-map [prior] 'term-send-prior) 919 (define-key term-raw-map [prior] 'term-send-prior)
921 (define-key term-raw-map [next] 'term-send-next))) 920 (define-key term-raw-map [next] 'term-send-next)))
922 921
@@ -932,6 +931,27 @@ is buffer-local.")
932 931
933(put 'term-mode 'mode-class 'special) 932(put 'term-mode 'mode-class 'special)
934 933
934
935;;; Use this variable as a display table for `term-mode'.
936(defvar term-display-table
937 (let ((dt (or (copy-sequence standard-display-table)
938 (make-display-table)))
939 i)
940 ;; avoid changing the display table for ^J
941 (setq i 0)
942 (while (< i 10)
943 (aset dt i (vector i))
944 (setq i (1+ i)))
945 (setq i 11)
946 (while (< i 32)
947 (aset dt i (vector i))
948 (setq i (1+ i)))
949 (setq i 128)
950 (while (< i 256)
951 (aset dt i (vector i))
952 (setq i (1+ i)))
953 dt))
954
935(defun term-mode () 955(defun term-mode ()
936 "Major mode for interacting with an inferior interpreter. 956 "Major mode for interacting with an inferior interpreter.
937The interpreter name is same as buffer name, sans the asterisks. 957The interpreter name is same as buffer name, sans the asterisks.
@@ -981,6 +1001,9 @@ Entry to this mode runs the hooks on `term-mode-hook'."
981 (setq major-mode 'term-mode) 1001 (setq major-mode 'term-mode)
982 (setq mode-name "Term") 1002 (setq mode-name "Term")
983 (use-local-map term-mode-map) 1003 (use-local-map term-mode-map)
1004 ;; we do not want indent to sneak in any tabs
1005 (setq indent-tabs-mode nil)
1006 (setq buffer-display-table term-display-table)
984 (make-local-variable 'term-home-marker) 1007 (make-local-variable 'term-home-marker)
985 (setq term-home-marker (copy-marker 0)) 1008 (setq term-home-marker (copy-marker 0))
986 (make-local-variable 'term-saved-home-marker) 1009 (make-local-variable 'term-saved-home-marker)
@@ -1184,6 +1207,11 @@ without any interpretation."
1184 ((eq arg '-) -1) 1207 ((eq arg '-) -1)
1185 (t (1- arg))))))) 1208 (t (1- arg)))))))
1186 1209
1210(defun term-paste ()
1211 "Insert the last stretch of killed text at point."
1212 (interactive)
1213 (term-send-raw-string (current-kill 0)))
1214
1187;; Which would be better: "\e[A" or "\eOA"? readline accepts either. 1215;; Which would be better: "\e[A" or "\eOA"? readline accepts either.
1188;; For my configuration it's definitely better \eOA but YMMV. -mm 1216;; For my configuration it's definitely better \eOA but YMMV. -mm
1189;; For example: vi works with \eOA while elm wants \e[A ... 1217;; For example: vi works with \eOA while elm wants \e[A ...
@@ -1195,8 +1223,8 @@ without any interpretation."
1195(defun term-send-end () (interactive) (term-send-raw-string "\e[4~")) 1223(defun term-send-end () (interactive) (term-send-raw-string "\e[4~"))
1196(defun term-send-prior () (interactive) (term-send-raw-string "\e[5~")) 1224(defun term-send-prior () (interactive) (term-send-raw-string "\e[5~"))
1197(defun term-send-next () (interactive) (term-send-raw-string "\e[6~")) 1225(defun term-send-next () (interactive) (term-send-raw-string "\e[6~"))
1198(defun term-send-del () (interactive) (term-send-raw-string "\C-?")) 1226(defun term-send-del () (interactive) (term-send-raw-string "\e[3~"))
1199(defun term-send-backspace () (interactive) (term-send-raw-string "\C-H")) 1227(defun term-send-backspace () (interactive) (term-send-raw-string "\C-?"))
1200 1228
1201(defun term-char-mode () 1229(defun term-char-mode ()
1202 "Switch to char (\"raw\") sub-mode of term mode. 1230 "Switch to char (\"raw\") sub-mode of term mode.
@@ -1366,14 +1394,15 @@ The main purpose is to get rid of the local keymap."
1366 "%s%s:li#%d:co#%d:cl=\\E[H\\E[J:cd=\\E[J:bs:am:xn:cm=\\E[%%i%%d;%%dH\ 1394 "%s%s:li#%d:co#%d:cl=\\E[H\\E[J:cd=\\E[J:bs:am:xn:cm=\\E[%%i%%d;%%dH\
1367:nd=\\E[C:up=\\E[A:ce=\\E[K:ho=\\E[H:pt\ 1395:nd=\\E[C:up=\\E[A:ce=\\E[K:ho=\\E[H:pt\
1368:al=\\E[L:dl=\\E[M:DL=\\E[%%dM:AL=\\E[%%dL:cs=\\E[%%i%%d;%%dr:sf=^J\ 1396:al=\\E[L:dl=\\E[M:DL=\\E[%%dM:AL=\\E[%%dL:cs=\\E[%%i%%d;%%dr:sf=^J\
1369:te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\
1370:dc=\\E[P:DC=\\E[%%dP:IC=\\E[%%d@:im=\\E[4h:ei=\\E[4l:mi:\ 1397:dc=\\E[P:DC=\\E[%%dP:IC=\\E[%%d@:im=\\E[4h:ei=\\E[4l:mi:\
1371:so=\\E[7m:se=\\E[m:us=\\E[4m:ue=\\E[m:md=\\E[1m:mr=\\E[7m:me=\\E[m\ 1398:so=\\E[7m:se=\\E[m:us=\\E[4m:ue=\\E[m:md=\\E[1m:mr=\\E[7m:me=\\E[m\
1372:UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC\ 1399:UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC\
1373:kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\ 1400:kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\
1374:mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\ 1401:mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\
1375:bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m:" 1402:bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\
1403:kb=^?:kD=^[[3~:sc=\E7:rc=\E8:"
1376;;; : -undefine ic 1404;;; : -undefine ic
1405;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\
1377 "termcap capabilities supported") 1406 "termcap capabilities supported")
1378 1407
1379;;; This auxiliary function cranks up the process for term-exec in 1408;;; This auxiliary function cranks up the process for term-exec in
@@ -1400,9 +1429,10 @@ The main purpose is to get rid of the local keymap."
1400 (process-connection-type t) 1429 (process-connection-type t)
1401 ;; We should suppress conversion of end-of-line format. 1430 ;; We should suppress conversion of end-of-line format.
1402 (inhibit-eol-conversion t) 1431 (inhibit-eol-conversion t)
1403 ;; inhibit-eol-conversion doesn't seem to do the job, but this does. 1432 ;; The process's output contains not just chars but also binary
1404 (coding-system-for-read 'unknown-unix) 1433 ;; escape codes, so we need to see the raw output. We will have to
1405 ) 1434 ;; do the decoding by hand on the parts that are made of chars.
1435 (coding-system-for-read 'binary))
1406 (apply 'start-process name buffer 1436 (apply 'start-process name buffer
1407 "/bin/sh" "-c" 1437 "/bin/sh" "-c"
1408 (format "stty -nl echo rows %d columns %d sane 2>/dev/null;\ 1438 (format "stty -nl echo rows %d columns %d sane 2>/dev/null;\
@@ -2693,7 +2723,12 @@ See `term-prompt-regexp'."
2693 (if (not funny) (setq funny str-length)) 2723 (if (not funny) (setq funny str-length))
2694 (cond ((> funny i) 2724 (cond ((> funny i)
2695 (cond ((eq term-terminal-state 1) 2725 (cond ((eq term-terminal-state 1)
2696 (term-move-columns 1) 2726 ;; We are in state 1, we need to wrap
2727 ;; around. Go to the beginning of
2728 ;; the next line and switch to state
2729 ;; 0.
2730 (term-down 1)
2731 (term-move-columns (- (term-current-column)))
2697 (setq term-terminal-state 0))) 2732 (setq term-terminal-state 0)))
2698 (setq count (- funny i)) 2733 (setq count (- funny i))
2699 (setq temp (- (+ (term-horizontal-column) count) 2734 (setq temp (- (+ (term-horizontal-column) count)
@@ -2702,6 +2737,7 @@ See `term-prompt-regexp'."
2702 ((> count temp) ;; Some chars fit. 2737 ((> count temp) ;; Some chars fit.
2703 ;; This iteration, handle only what fits. 2738 ;; This iteration, handle only what fits.
2704 (setq count (- count temp)) 2739 (setq count (- count temp))
2740 (setq temp 0)
2705 (setq funny (+ count i))) 2741 (setq funny (+ count i)))
2706 ((or (not (or term-pager-count 2742 ((or (not (or term-pager-count
2707 term-scroll-with-delete)) 2743 term-scroll-with-delete))
@@ -2722,7 +2758,7 @@ See `term-prompt-regexp'."
2722 ;; following point if not eob nor insert-mode. 2758 ;; following point if not eob nor insert-mode.
2723 (let ((old-column (current-column)) 2759 (let ((old-column (current-column))
2724 columns pos) 2760 columns pos)
2725 (insert (substring str i funny)) 2761 (insert (decode-coding-string (substring str i funny) locale-coding-system))
2726 (setq term-current-column (current-column) 2762 (setq term-current-column (current-column)
2727 columns (- term-current-column old-column)) 2763 columns (- term-current-column old-column))
2728 (when (not (or (eobp) term-insert-mode)) 2764 (when (not (or (eobp) term-insert-mode))
@@ -2741,7 +2777,7 @@ See `term-prompt-regexp'."
2741 (setq term-terminal-state 1))) 2777 (setq term-terminal-state 1)))
2742 (setq i (1- funny))) 2778 (setq i (1- funny)))
2743 ((and (setq term-terminal-state 0) 2779 ((and (setq term-terminal-state 0)
2744 (eq char ?\^I)) ; TAB 2780 (eq char ?\^I)) ; TAB (terminfo: ht)
2745 ;; FIXME: Does not handle line wrap! 2781 ;; FIXME: Does not handle line wrap!
2746 (setq count (term-current-column)) 2782 (setq count (term-current-column))
2747 (setq count (+ count 8 (- (mod count 8)))) 2783 (setq count (+ count 8 (- (mod count 8))))
@@ -2768,7 +2804,7 @@ See `term-prompt-regexp'."
2768 (if (not (and term-kill-echo-list 2804 (if (not (and term-kill-echo-list
2769 (term-check-kill-echo-list))) 2805 (term-check-kill-echo-list)))
2770 (term-down 1 t))) 2806 (term-down 1 t)))
2771 ((eq char ?\b) 2807 ((eq char ?\b) ;; (terminfo: cub1)
2772 (term-move-columns -1)) 2808 (term-move-columns -1))
2773 ((eq char ?\033) ; Escape 2809 ((eq char ?\033) ; Escape
2774 (setq term-terminal-state 2)) 2810 (setq term-terminal-state 2))
@@ -2818,13 +2854,13 @@ See `term-prompt-regexp'."
2818 ((eq char ?M) ;; scroll reversed 2854 ((eq char ?M) ;; scroll reversed
2819 (term-insert-lines 1) 2855 (term-insert-lines 1)
2820 (setq term-terminal-state 0)) 2856 (setq term-terminal-state 0))
2821 ((eq char ?7) ;; Save cursor 2857 ((eq char ?7) ;; Save cursor (terminfo: sc)
2822 (term-handle-deferred-scroll) 2858 (term-handle-deferred-scroll)
2823 (setq term-saved-cursor 2859 (setq term-saved-cursor
2824 (cons (term-current-row) 2860 (cons (term-current-row)
2825 (term-horizontal-column))) 2861 (term-horizontal-column)))
2826 (setq term-terminal-state 0)) 2862 (setq term-terminal-state 0))
2827 ((eq char ?8) ;; Restore cursor 2863 ((eq char ?8) ;; Restore cursor (terminfo: rc)
2828 (if term-saved-cursor 2864 (if term-saved-cursor
2829 (term-goto (car term-saved-cursor) 2865 (term-goto (car term-saved-cursor)
2830 (cdr term-saved-cursor))) 2866 (cdr term-saved-cursor)))
@@ -2976,13 +3012,13 @@ See `term-prompt-regexp'."
2976 ((eq parameter 8) 3012 ((eq parameter 8)
2977 (setq term-ansi-current-invisible 1)) 3013 (setq term-ansi-current-invisible 1))
2978 3014
2979;;; Reset reverse (i.e. terminfo rmso) 3015;;; Reset underline (i.e. terminfo rmul)
2980 ((eq parameter 24) 3016 ((eq parameter 24)
2981 (setq term-ansi-current-reverse 0)) 3017 (setq term-ansi-current-underline 0))
2982 3018
2983;;; Reset underline (i.e. terminfo rmul) 3019;;; Reset reverse (i.e. terminfo rmso)
2984 ((eq parameter 27) 3020 ((eq parameter 27)
2985 (setq term-ansi-current-underline 0)) 3021 (setq term-ansi-current-reverse 0))
2986 3022
2987;;; Foreground 3023;;; Foreground
2988 ((and (>= parameter 30) (<= parameter 37)) 3024 ((and (>= parameter 30) (<= parameter 37))
@@ -3097,7 +3133,7 @@ See `term-prompt-regexp'."
3097 (term-goto 3133 (term-goto
3098 (1- term-terminal-previous-parameter) 3134 (1- term-terminal-previous-parameter)
3099 (1- term-terminal-parameter))) 3135 (1- term-terminal-parameter)))
3100 ;; \E[A - cursor up 3136 ;; \E[A - cursor up (terminfo: cuu1)
3101 ((eq char ?A) 3137 ((eq char ?A)
3102 (term-handle-deferred-scroll) 3138 (term-handle-deferred-scroll)
3103 (term-down (- (max 1 term-terminal-parameter)) t)) 3139 (term-down (- (max 1 term-terminal-parameter)) t))
@@ -3110,13 +3146,13 @@ See `term-prompt-regexp'."
3110 ;; \E[D - cursor left 3146 ;; \E[D - cursor left
3111 ((eq char ?D) 3147 ((eq char ?D)
3112 (term-move-columns (- (max 1 term-terminal-parameter)))) 3148 (term-move-columns (- (max 1 term-terminal-parameter))))
3113 ;; \E[J - clear to end of screen 3149 ;; \E[J - clear to end of screen (terminfo: ed, clear)
3114 ((eq char ?J) 3150 ((eq char ?J)
3115 (term-erase-in-display term-terminal-parameter)) 3151 (term-erase-in-display term-terminal-parameter))
3116 ;; \E[K - clear to end of line 3152 ;; \E[K - clear to end of line (terminfo: el, el1)
3117 ((eq char ?K) 3153 ((eq char ?K)
3118 (term-erase-in-line term-terminal-parameter)) 3154 (term-erase-in-line term-terminal-parameter))
3119 ;; \E[L - insert lines 3155 ;; \E[L - insert lines (terminfo: il, il1)
3120 ((eq char ?L) 3156 ((eq char ?L)
3121 (term-insert-lines (max 1 term-terminal-parameter))) 3157 (term-insert-lines (max 1 term-terminal-parameter)))
3122 ;; \E[M - delete lines 3158 ;; \E[M - delete lines
@@ -3130,19 +3166,22 @@ See `term-prompt-regexp'."
3130 (term-insert-spaces (max 1 term-terminal-parameter))) 3166 (term-insert-spaces (max 1 term-terminal-parameter)))
3131 ;; \E[?h - DEC Private Mode Set 3167 ;; \E[?h - DEC Private Mode Set
3132 ((eq char ?h) 3168 ((eq char ?h)
3133 (cond ((eq term-terminal-parameter 4) 3169 (cond ((eq term-terminal-parameter 4) ;; (terminfo: smir)
3134 (setq term-insert-mode t)) 3170 (setq term-insert-mode t))
3135 ((eq term-terminal-parameter 47) 3171 ;; ((eq term-terminal-parameter 47) ;; (terminfo: smcup)
3136 (term-switch-to-alternate-sub-buffer t)))) 3172 ;; (term-switch-to-alternate-sub-buffer t))
3173 ))
3137 ;; \E[?l - DEC Private Mode Reset 3174 ;; \E[?l - DEC Private Mode Reset
3138 ((eq char ?l) 3175 ((eq char ?l)
3139 (cond ((eq term-terminal-parameter 4) 3176 (cond ((eq term-terminal-parameter 4) ;; (terminfo: rmir)
3140 (setq term-insert-mode nil)) 3177 (setq term-insert-mode nil))
3141 ((eq term-terminal-parameter 47) 3178 ;; ((eq term-terminal-parameter 47) ;; (terminfo: rmcup)
3142 (term-switch-to-alternate-sub-buffer nil)))) 3179 ;; (term-switch-to-alternate-sub-buffer nil))
3180 ))
3143 3181
3144;;; Modified to allow ansi coloring -mm 3182;;; Modified to allow ansi coloring -mm
3145 ;; \E[m - Set/reset standard mode 3183 ;; \E[m - Set/reset modes, set bg/fg
3184 ;;(terminfo: smso,rmso,smul,rmul,rev,bold,sgr0,invis,op,setab,setaf)
3146 ((eq char ?m) 3185 ((eq char ?m)
3147 (when (= term-terminal-more-parameters 1) 3186 (when (= term-terminal-more-parameters 1)
3148 (if (>= term-terminal-previous-parameter-4 0) 3187 (if (>= term-terminal-previous-parameter-4 0)
@@ -3186,32 +3225,32 @@ The top-most line is line 0."
3186 (not (and (= term-scroll-start 0) 3225 (not (and (= term-scroll-start 0)
3187 (= term-scroll-end term-height)))))) 3226 (= term-scroll-end term-height))))))
3188 3227
3189(defun term-switch-to-alternate-sub-buffer (set) 3228;; (defun term-switch-to-alternate-sub-buffer (set)
3190 ;; If asked to switch to (from) the alternate sub-buffer, and already (not) 3229;; ;; If asked to switch to (from) the alternate sub-buffer, and already (not)
3191 ;; using it, do nothing. This test is needed for some programs (including 3230;; ;; using it, do nothing. This test is needed for some programs (including
3192 ;; Emacs) that emit the ti termcap string twice, for unknown reason. 3231;; ;; Emacs) that emit the ti termcap string twice, for unknown reason.
3193 (term-handle-deferred-scroll) 3232;; (term-handle-deferred-scroll)
3194 (if (eq set (not (term-using-alternate-sub-buffer))) 3233;; (if (eq set (not (term-using-alternate-sub-buffer)))
3195 (let ((row (term-current-row)) 3234;; (let ((row (term-current-row))
3196 (col (term-horizontal-column))) 3235;; (col (term-horizontal-column)))
3197 (cond (set 3236;; (cond (set
3198 (goto-char (point-max)) 3237;; (goto-char (point-max))
3199 (if (not (eq (preceding-char) ?\n)) 3238;; (if (not (eq (preceding-char) ?\n))
3200 (term-insert-char ?\n 1)) 3239;; (term-insert-char ?\n 1))
3201 (setq term-scroll-with-delete t) 3240;; (setq term-scroll-with-delete t)
3202 (setq term-saved-home-marker (copy-marker term-home-marker)) 3241;; (setq term-saved-home-marker (copy-marker term-home-marker))
3203 (set-marker term-home-marker (point))) 3242;; (set-marker term-home-marker (point)))
3204 (t 3243;; (t
3205 (setq term-scroll-with-delete 3244;; (setq term-scroll-with-delete
3206 (not (and (= term-scroll-start 0) 3245;; (not (and (= term-scroll-start 0)
3207 (= term-scroll-end term-height)))) 3246;; (= term-scroll-end term-height))))
3208 (set-marker term-home-marker term-saved-home-marker) 3247;; (set-marker term-home-marker term-saved-home-marker)
3209 (set-marker term-saved-home-marker nil) 3248;; (set-marker term-saved-home-marker nil)
3210 (setq term-saved-home-marker nil) 3249;; (setq term-saved-home-marker nil)
3211 (goto-char term-home-marker))) 3250;; (goto-char term-home-marker)))
3212 (setq term-current-column nil) 3251;; (setq term-current-column nil)
3213 (setq term-current-row 0) 3252;; (setq term-current-row 0)
3214 (term-goto row col)))) 3253;; (term-goto row col))))
3215 3254
3216;; Default value for the symbol term-command-hook. 3255;; Default value for the symbol term-command-hook.
3217 3256
@@ -3521,11 +3560,11 @@ all pending output has been dealt with."))
3521 (if (not (bolp)) (insert-before-markers ?\n))) 3560 (if (not (bolp)) (insert-before-markers ?\n)))
3522 3561
3523(defun term-erase-in-line (kind) 3562(defun term-erase-in-line (kind)
3524 (if (> kind 1) ;; erase left of point 3563 (if (= kind 1) ;; erase left of point
3525 (let ((cols (term-horizontal-column)) (saved-point (point))) 3564 (let ((cols (term-horizontal-column)) (saved-point (point)))
3526 (term-vertical-motion 0) 3565 (term-vertical-motion 0)
3527 (delete-region (point) saved-point) 3566 (delete-region (point) saved-point)
3528 (term-insert-char ?\n cols))) 3567 (term-insert-char ? cols)))
3529 (if (not (eq kind 1)) ;; erase right of point 3568 (if (not (eq kind 1)) ;; erase right of point
3530 (let ((saved-point (point)) 3569 (let ((saved-point (point))
3531 (wrapped (and (zerop (term-horizontal-column)) 3570 (wrapped (and (zerop (term-horizontal-column))
@@ -3624,7 +3663,7 @@ Should only be called when point is at the start of a screen line."
3624 (term-insert-char ?\n lines) 3663 (term-insert-char ?\n lines)
3625 (goto-char start))) 3664 (goto-char start)))
3626 3665
3627(defun term-set-output-log (name) 3666(defun term-start-output-log (name)
3628 "Record raw inferior process output in a buffer." 3667 "Record raw inferior process output in a buffer."
3629 (interactive (list (if term-log-buffer 3668 (interactive (list (if term-log-buffer
3630 nil 3669 nil
@@ -3646,10 +3685,10 @@ Should only be called when point is at the start of a screen line."
3646 (message "Recording terminal emulator output into buffer \"%s\"" 3685 (message "Recording terminal emulator output into buffer \"%s\""
3647 (buffer-name term-log-buffer)))) 3686 (buffer-name term-log-buffer))))
3648 3687
3649(defun term-stop-photo () 3688(defun term-stop-output-log ()
3650 "Discontinue raw inferior process logging." 3689 "Discontinue raw inferior process logging."
3651 (interactive) 3690 (interactive)
3652 (term-set-output-log nil)) 3691 (term-start-output-log nil))
3653 3692
3654(defun term-show-maximum-output () 3693(defun term-show-maximum-output ()
3655 "Put the end of the buffer at the bottom of the window." 3694 "Put the end of the buffer at the bottom of the window."
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
index f25bec2d841..c2ed47cb48d 100644
--- a/lisp/textmodes/enriched.el
+++ b/lisp/textmodes/enriched.el
@@ -102,7 +102,7 @@ expression, which is evaluated to get the string to insert.")
102(defconst enriched-annotation-regexp "<\\(/\\)?\\([-A-Za-z0-9]+\\)>" 102(defconst enriched-annotation-regexp "<\\(/\\)?\\([-A-Za-z0-9]+\\)>"
103 "Regular expression matching enriched-text annotations.") 103 "Regular expression matching enriched-text annotations.")
104 104
105(defconst enriched-translations 105(defvar enriched-translations
106 '((face (bold-italic "bold" "italic") 106 '((face (bold-italic "bold" "italic")
107 (bold "bold") 107 (bold "bold")
108 (italic "italic") 108 (italic "italic")
@@ -154,6 +154,12 @@ them and their old values to `enriched-old-bindings'."
154The value is a list of \(VAR VALUE VAR VALUE...).") 154The value is a list of \(VAR VALUE VAR VALUE...).")
155(make-variable-buffer-local 'enriched-old-bindings) 155(make-variable-buffer-local 'enriched-old-bindings)
156 156
157;; The next variable is buffer local if and only if Enriched mode is
158;; enabled. The buffer local value records whether
159;; `default-text-properties' should remain buffer local when disabling
160;; Enriched mode. For technical reasons, the default value should be t.
161(defvar enriched-default-text-properties-local-flag t)
162
157;; Technical internal variable. Bound to t if `enriched-mode' is 163;; Technical internal variable. Bound to t if `enriched-mode' is
158;; being rerun by a major mode to allow it to restore buffer-local 164;; being rerun by a major mode to allow it to restore buffer-local
159;; variables and to correctly update `enriched-old-bindings'. 165;; variables and to correctly update `enriched-old-bindings'.
@@ -169,7 +175,7 @@ The value is a list of \(VAR VALUE VAR VALUE...).")
169 "Minor mode for editing text/enriched files. 175 "Minor mode for editing text/enriched files.
170These are files with embedded formatting information in the MIME standard 176These are files with embedded formatting information in the MIME standard
171text/enriched format. 177text/enriched format.
172Turning the mode on runs `enriched-mode-hook'. 178Turning the mode on or off runs `enriched-mode-hook'.
173 179
174More information about Enriched mode is available in the file 180More information about Enriched mode is available in the file
175etc/enriched.doc in the Emacs distribution directory. 181etc/enriched.doc in the Emacs distribution directory.
@@ -183,7 +189,11 @@ Commands:
183 (setq buffer-file-format (delq 'text/enriched buffer-file-format)) 189 (setq buffer-file-format (delq 'text/enriched buffer-file-format))
184 ;; restore old variable values 190 ;; restore old variable values
185 (while enriched-old-bindings 191 (while enriched-old-bindings
186 (set (pop enriched-old-bindings) (pop enriched-old-bindings)))) 192 (set (pop enriched-old-bindings) (pop enriched-old-bindings)))
193 (unless enriched-default-text-properties-local-flag
194 (kill-local-variable 'default-text-properties))
195 (kill-local-variable 'enriched-default-text-properties-local-flag)
196 (unless use-hard-newlines (use-hard-newlines 0)))
187 197
188 ((and (memq 'text/enriched buffer-file-format) 198 ((and (memq 'text/enriched buffer-file-format)
189 (not enriched-rerun-flag)) 199 (not enriched-rerun-flag))
@@ -196,7 +206,11 @@ Commands:
196 ;; These will be restored if we exit Enriched mode. 206 ;; These will be restored if we exit Enriched mode.
197 (setq enriched-old-bindings 207 (setq enriched-old-bindings
198 (list 'buffer-display-table buffer-display-table 208 (list 'buffer-display-table buffer-display-table
199 'default-text-properties default-text-properties)) 209 'default-text-properties default-text-properties
210 'use-hard-newlines use-hard-newlines))
211 (make-local-variable 'enriched-default-text-properties-local-flag)
212 (setq enriched-default-text-properties-local-flag
213 (local-variable-p 'default-text-properties))
200 (make-local-variable 'default-text-properties) 214 (make-local-variable 'default-text-properties)
201 (setq buffer-display-table enriched-display-table) 215 (setq buffer-display-table enriched-display-table)
202 (use-hard-newlines 1 (if enriched-rerun-flag 'never nil)) 216 (use-hard-newlines 1 (if enriched-rerun-flag 'never nil))
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 2dd35cd1844..8c25fe6c531 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,43 @@
12004-09-28 Richard M. Stallman <rms@gnu.org>
2
3 * text.texi (Special Properties): Clarify line-spacing and line-height.
4
5 * searching.texi (Regexp Search): Add looking-back.
6
72004-09-25 Luc Teirlinck <teirllm@auburn.edu>
8
9 * display.texi: Correct typos.
10 (Image Descriptors): Correct xref's.
11
122004-09-25 Richard M. Stallman <rms@gnu.org>
13
14 * text.texi (Special Properties): Cleanups in `cursor'.
15 Rewrites in `line-height' and `line-spacing'; exchange them.
16
17 * display.texi (Fringes): Rewrite previous change.
18 (Fringe Bitmaps): Merge text from Display Fringe Bitmaps. Rewrite.
19 (Display Fringe Bitmaps): Node deleted, text moved.
20 (Customizing Bitmaps): Split off from Fringe Bitmaps. Rewrite.
21 (Scroll Bars): Clarify set-window-scroll-bars.
22 (Pointer Shape): Rewrite.
23 (Specified Space): Clarify :align-to, etc.
24 (Pixel Specification): Use @var. Clarify new text.
25 (Other Display Specs): Clarify `slice'.
26 (Image Descriptors): Cleanups.
27 (Showing Images): Cleanups.
28
292004-09-24 Luc Teirlinck <teirllm@auburn.edu>
30
31 * hooks.texi (Standard Hooks): Add `after-change-major-mode-hook'.
32
33 * modes.texi: Various minor changes in addition to:
34 (Major Mode Conventions): Final call to `run-mode-hooks' should
35 not be inside the `delay-mode-hooks' form.
36 (Mode Hooks): New node.
37 (Hooks): Delete obsolete example.
38 Move definitions of `run-mode-hooks' and `delay-mode-hooks' to new
39 node "Mode Hooks".
40
12004-09-22 Luc Teirlinck <teirllm@auburn.edu> 412004-09-22 Luc Teirlinck <teirllm@auburn.edu>
2 42
3 * display.texi: Correct various typos. 43 * display.texi: Correct various typos.
diff --git a/lispref/display.texi b/lispref/display.texi
index 3f75c386765..2163ae725af 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -25,7 +25,8 @@ that Emacs presents to the user.
25* Faces:: A face defines a graphics style for text characters: 25* Faces:: A face defines a graphics style for text characters:
26 font, colors, etc. 26 font, colors, etc.
27* Fringes:: Controlling window fringes. 27* Fringes:: Controlling window fringes.
28* Fringe Bitmaps:: Customizing fringe bitmaps. 28* Fringe Bitmaps:: Displaying bitmaps in the window fringes.
29* Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes.
29* Scroll Bars:: Controlling vertical scroll bars. 30* Scroll Bars:: Controlling vertical scroll bars.
30* Pointer Shape:: Controlling the mouse pointer shape. 31* Pointer Shape:: Controlling the mouse pointer shape.
31* Display Property:: Enabling special display features. 32* Display Property:: Enabling special display features.
@@ -2599,66 +2600,46 @@ window is used. The value has the form @code{(@var{left-width}
2599@end defun 2600@end defun
2600 2601
2601@defvar overflow-newline-into-fringe 2602@defvar overflow-newline-into-fringe
2602This variable, if non-@code{nil}, specifies that lines which are 2603If this is non-@code{nil}, lines exactly as wide as the window (not
2603exactly as wide as the window (not counting the final newline 2604counting the final newline character) are not continued. Instead,
2604character) shall not be broken into two lines on the display (with 2605when point is at the end of the line, the cursor appears in the right
2605just the newline on the second line). Instead, the newline now 2606fringe.
2606overflows into the right fringe, and the cursor will be displayed in
2607the fringe when positioned on that newline.
2608@end defvar
2609
2610@defvar indicate-buffer-boundaries
2611This buffer-local variable controls how the buffer boundaries and
2612window scrolling is indicated in the fringes.
2613
2614 The buffer boundaries, i.e. first and last line in the buffer, can be
2615marked with angle bitmaps in the left or right fringe. This can be
2616combined with up and down arrow bitmaps shown at the top and bottom of
2617the left or right fringe if the window can be scrolled in either
2618direction.
2619
2620 If the value is @code{left} or @code{right}, both angle and arrow
2621bitmaps are displayed in the left or right fringe, respectively.
2622Any other non-@code{nil} value causes the bitmap on the top line to be
2623displayed in the left fringe, and the bitmap on the bottom line in the
2624right fringe.
2625
2626 If value is a cons @code{(angles . arrows)}, the car specifies the
2627position of the angle bitmaps, and the cdr specifies the position of
2628the arrow bitmaps. For example, @code{(t . right)} places the top
2629angle bitmap in left fringe, the bottom angle bitmap in right fringe,
2630and both arrow bitmaps in right fringe. To show just the angle
2631bitmaps in the left fringe, but no arrow bitmaps, use @code{(left . nil)}.
2632@end defvar
2633
2634@defvar default-indicate-buffer-boundaries
2635The value of this variable is the default value for
2636@code{indicate-buffer-boundaries} in buffers that do not override it.
2637@end defvar 2607@end defvar
2638 2608
2639@node Fringe Bitmaps 2609@node Fringe Bitmaps
2640@section Fringe Bitmaps 2610@section Fringe Bitmaps
2641@cindex Fringe Bitmaps 2611@cindex fringe bitmaps
2642 2612@cindex bitmaps, fringe
2643 The @dfn{fringe bitmaps} are tiny icons Emacs displays in the fringe 2613
2644on a window system to indicate truncated or continued lines, buffer 2614 The @dfn{fringe bitmaps} are tiny icons Emacs displays in the window
2645boundaries, overlay arrow, etc. The fringe bitmaps are shared by all 2615fringe (on a graphic display) to indicate truncated or continued
2646frames and windows. 2616lines, buffer boundaries, overlay arrow, etc. The fringe bitmaps are
2647 2617shared by all frames and windows. You can redefine the built-in
2648 You can redefine the built-in fringe bitmaps, and you can define new 2618fringe bitmaps, and you can define new fringe bitmaps. However, Emacs
2649fringe bitmaps. Emacs can handle a maximum of 255 different fringe 2619can handle only 255 different fringe bitmaps.
2650bitmaps. 2620
2621 The way to display a bitmap in the left or right fringes for a given
2622line in a window is by specifying the @code{display} property for one
2623of the characters that appears in it. Use a display specification of
2624the form @code{(left-fringe @var{bitmap} [@var{face}])} or
2625@code{(right-fringe @var{bitmap} [@var{face}])} (@pxref{Display
2626Property}). Here, @var{bitmap} is an integer identifying the bitmap
2627you want, and @var{face} (which is optional) is the name of the face
2628whose colors should be used for displaying the bitmap.
2629@c ??? Shouldn't the symbol name be used?
2630
2631 These are the symbols identify the standard fringe bitmaps.
2632Evaluate @code{(require 'fringe)} to define them. Each symbol's
2633value is an integer that identifies the corresponding bitmap.
2651 2634
2652A fringe bitmap is identified by an opaque integer, but Lisp code 2635@table @asis
2653should use the following names defined by @code{(require 'fringe)}: 2636@item Truncation and continuation line bitmaps:
2654
2655Truncation and continuation line bitmaps:
2656@code{left-truncation-fringe-bitmap}, 2637@code{left-truncation-fringe-bitmap},
2657@code{right-truncation-fringe-bitmap}, 2638@code{right-truncation-fringe-bitmap},
2658@code{continued-line-fringe-bitmap}, 2639@code{continued-line-fringe-bitmap},
2659@code{continuation-line-fringe-bitmap}. 2640@code{continuation-line-fringe-bitmap}.
2660 2641
2661Buffer indication bitmaps: 2642@item Buffer indication bitmaps:
2662@code{up-arrow-fringe-bitmap}, 2643@code{up-arrow-fringe-bitmap},
2663@code{down-arrow-fringe-bitmap}, 2644@code{down-arrow-fringe-bitmap},
2664@code{top-left-angle-fringe-bitmap}, 2645@code{top-left-angle-fringe-bitmap},
@@ -2668,76 +2649,141 @@ Buffer indication bitmaps:
2668@code{left-bracket-fringe-bitmap}, 2649@code{left-bracket-fringe-bitmap},
2669@code{right-bracket-fringe-bitmap}. 2650@code{right-bracket-fringe-bitmap}.
2670 2651
2671Empty line indication bitmap: 2652@item Empty line indication bitmap:
2672@code{empty-line-fringe-bitmap}. 2653@code{empty-line-fringe-bitmap}.
2673 2654
2674Overlay arrow bitmap: 2655@item Overlay arrow bitmap:
2675@code{overlay-arrow-fringe-bitmap}. 2656@code{overlay-arrow-fringe-bitmap}.
2676 2657
2677Bitmaps for displaying the cursor in right fringe: 2658@item Bitmaps for displaying the cursor in right fringe:
2678@code{filled-box-cursor-fringe-bitmap}, 2659@code{filled-box-cursor-fringe-bitmap},
2679@code{hollow-box-cursor-fringe-bitmap}, 2660@code{hollow-box-cursor-fringe-bitmap},
2680@code{hollow-square-fringe-bitmap}, @code{bar-cursor-fringe-bitmap}, 2661@code{hollow-square-fringe-bitmap}, @code{bar-cursor-fringe-bitmap},
2681@code{hbar-cursor-fringe-bitmap}. 2662@code{hbar-cursor-fringe-bitmap}.
2682 2663
2683Fringe bitmap opaque value indicating that no fringe bitmap is present: 2664@item Value indicating that no fringe bitmap is present:
2684@code{no-fringe-bitmap}. 2665@code{no-fringe-bitmap}.
2666@c ??? I don't understand what that means.
2667@c ??? Where would you find that value?
2685 2668
2686Fringe bitmap opaque value indicating a reference to an undefined bitmap: 2669@item Value indicating a reference to an undefined bitmap:
2687@code{undef-fringe-bitmap}. 2670@code{undef-fringe-bitmap}.
2671@c ??? I don't understand what that means.
2672@c ??? Where would you find that value?
2673@end table
2688 2674
2689 To display an specific fringe bitmap on a line in an Emacs window, 2675@defun fringe-bitmaps-at-pos &optional pos window
2690use it as a @code{left-fringe} or @code{right-fringe} specifier in the 2676This function returns the fringe bitmaps of the display line
2691@code{display} property of some text that is displayed on that line 2677containing position @var{pos} in window @var{window}. The return
2692(@pxref{Display Property}). 2678value has the form @code{(@var{left} . @var{right})}, where @var{left}
2693 2679is a list of fringe bitmap numbers for left fringe, and @var{right} is
2694@defun define-fringe-bitmap bits &optional height width align bitmap 2680similar for the right fringe. These bitmap numbers are usually values
2695Define a new fringe bitmap, or change an existing bitmap. 2681of symbols such as the ones listed above.
2696 2682
2697The argument @code{bits} is either a string or a vector of integers, 2683@c ??? Why not return a list of symbols that identify the bitmaps?
2698where each element (typically) corresponds to one row of the bitmap, 2684@c ??? This is Lisp, not C.
2699and each bit of an integer corresponds to one pixel of the bitmap. 2685
2700 2686The value is @code{nil} if @var{pos} is not visible in @var{window}.
2701The optional argument @code{height} specifies the height of the bitmap. 2687If @var{window} is @code{nil}, that stands for the selected window.
2702If @code{height} is @code{nil}, the length of @code{bits} is used. 2688If @var{pos} is @code{nil}, that stands for the value of point in
2703 2689@var{window}.
2704The optional argument @code{width} specifies the width of the bitmap; 2690@end defun
2705it must be an integer between 1 and 16, or @code{nil} which defaults
2706to a width of 8 pixels.
2707
2708The optional argument @code{align} may be one of @code{top},
2709@code{center}, or @code{bottom}, indicating the positioning of the
2710bitmap relative to the rows where it is used; the default is to center
2711the bitmap.
2712 2691
2713The @code{align} argument may also be a list @code{(ALIGN PERIODIC)} 2692@node Customizing Bitmaps
2714where @code{ALIGN} is intepreted as described above, and if 2693@section Customizing Fringe Bitmaps
2715@code{PERIODIC} is non-@code{nil} it specifies that the @code{bits} should
2716be repeated until a bitmap of the specified @code{height} is created.
2717 2694
2718The optional argument @code{bitmap} specifies the opaque integer that 2695@c ??? Why not pass a symbol as the first argument
2719identifies an existing bitmap to redefine. 2696@c ??? and define that symbol. It would be cleaner.
2720 2697
2721The return value is a new opaque integer identifying the new bitmap number, 2698@defun define-fringe-bitmap bits &optional height width align bitmap
2722or @code{nil} of there are no more free bitmap slots. 2699This function defines a new fringe bitmap, or replaces an existing
2700bitmap.
2701
2702The argument @var{bits} specifies the image to use. It should be
2703either a string or a vector of integers, where each element (an
2704integer) corresponds to one row of the bitmap. Each bit of an integer
2705corresponds to one pixel of the bitmap.
2706@c ??? Is the low bit the leftmost or the rightmost bit?
2707
2708The height is normally the length of @var{bits}. However, you
2709can specify a different height with non-@code{nil} @var{height}. The width
2710is normally 8, but you can specify a different width with non-@code{nil}
2711@var{width}. The width must be an integer between 1 and 16.
2712
2713The argument @var{align} specifies the positioning of the bitmap
2714relative to the range of rows where it is used; the default is to
2715center the bitmap. The allowed values are @code{top}, @code{center},
2716or @code{bottom}.
2717
2718The @var{align} argument may also be a list @code{(@var{align}
2719@var{periodic})} where @var{align} is interpreted as described above.
2720If @var{periodic} is non-@code{nil}, it specifies that the rows in
2721@code{bits} should be repeated enough times to reach the specified
2722height.
2723
2724The argument @var{bitmap} specifies an existing bitmap to redefine.
2725You should pass the value of the symbol that identifies the bitmap.
2726
2727The return value on success is an integer identifying the new bitmap.
2728You should save that integer in a variable so it can be used to select
2729this bitmap. The value can also be @code{nil} of there are no more
2730free bitmap slots.
2731@c ??? Why not signal an error? That would be cleaner.
2723@end defun 2732@end defun
2724 2733
2725@defun destroy-fringe-bitmap bitmap 2734@defun destroy-fringe-bitmap bitmap
2726Destroy the fringe bitmap identified by the opaque integer 2735This function destroy the fringe bitmap identified by @var{bitmap}.
2727@code{bitmap}. If @code{bitmap} identifies a standard fringe bitmap, 2736If @var{bitmap} identifies a standard fringe bitmap, it actually
2728the original built-in bitmap is restored. 2737restores the standard definition of that bitmap, instead of
2738eliminating it entirely.
2729@end defun 2739@end defun
2730 2740
2731@defun set-fringe-bitmap-face bitmap &optional face 2741@defun set-fringe-bitmap-face bitmap &optional face
2732Set face for a specific fringe bitmap @code{bitmap} to the face 2742This sets the face for the fringe bitmap @var{bitmap} to @var{face}.
2733specified by the argument @code{face}. 2743If @var{face} is @code{nil}, it selects the @code{fringe} face. The
2734If @code{face} is @code{nil}, reset face to default @code{fringe} face. 2744bitmap's face controls the color to draw it in.
2735 2745
2736Normally, the specified face should be a face derived from the 2746The face you use here should be derived from @code{fringe}, and should
2737@code{fringe} face, only specifying the foreground color as the 2747specify only the foreground color.
2738desired color of the fringe bitmap.
2739@end defun 2748@end defun
2740 2749
2750@defvar indicate-buffer-boundaries
2751This buffer-local variable controls how the buffer boundaries and
2752window scrolling are indicated in the window fringes.
2753
2754Emacs can indicate the buffer boundaries---that is, the first and last
2755line in the buffer---with angle icons when they appear on the screen.
2756In addition, Emacs can display an up-arrow in the fringe to show
2757that there is text above the screen, and a down-arrow to show
2758there is text below the screen.
2759
2760There are four kinds of basic values:
2761
2762@table @asis
2763@item @code{nil}
2764Don't display the icons.
2765@item @code{left}
2766Display them in the left fringe.
2767@item @code{right}
2768Display them in the right fringe.
2769@item @var{anything-else}
2770Display the icon at the top of the window top in the left fringe, and other
2771in the right fringe.
2772@end table
2773
2774If value is a cons @code{(@var{angles} . @var{arrows})}, @var{angles}
2775controls the angle icons, and @var{arrows} controls the arrows. Both
2776@var{angles} and @var{arrows} work according to the table above.
2777Thus, @code{(t . right)} places the top angle icon in the left
2778fringe, the bottom angle icon in the right fringe, and both arrows in
2779the right fringe.
2780@end defvar
2781
2782@defvar default-indicate-buffer-boundaries
2783The value of this variable is the default value for
2784@code{indicate-buffer-boundaries} in buffers that do not override it.
2785@end defvar
2786
2741@node Scroll Bars 2787@node Scroll Bars
2742@section Scroll Bars 2788@section Scroll Bars
2743 2789
@@ -2751,18 +2797,19 @@ You can also control this for individual windows. Call the function
2751@code{set-window-scroll-bars} to specify what to do for a specific window: 2797@code{set-window-scroll-bars} to specify what to do for a specific window:
2752 2798
2753@defun set-window-scroll-bars window width &optional vertical-type horizontal-type 2799@defun set-window-scroll-bars window width &optional vertical-type horizontal-type
2754Set width and type of scroll bars of window @var{window}. 2800This function sets the width and type of scroll bars for window
2755If @var{window} is @code{nil}, the selected window is used. 2801@var{window}.
2802
2756@var{width} specifies the scroll bar width in pixels (@code{nil} means 2803@var{width} specifies the scroll bar width in pixels (@code{nil} means
2757use whatever is specified for width for the frame). 2804use the width specified for the frame). @var{vertical-type} specifies
2758@var{vertical-type} specifies whether to have a vertical scroll bar 2805whether to have a vertical scroll bar and, if so, where. The possible
2759and, if so, where. The possible values are @code{left}, @code{right} 2806values are @code{left}, @code{right} and @code{nil}, just like the
2760and @code{nil}, just like the values of the 2807values of the @code{vertical-scroll-bars} frame parameter.
2761@code{vertical-scroll-bars} frame parameter.
2762 2808
2763The argument @var{horizontal-type} is meant to specify whether and 2809The argument @var{horizontal-type} is meant to specify whether and
2764where to have horizontal scroll bars, but since they are not 2810where to have horizontal scroll bars, but since they are not
2765implemented, it has no effect. 2811implemented, it has no effect. If @var{window} is @code{nil}, the
2812selected window is used.
2766@end defun 2813@end defun
2767 2814
2768@defun window-scroll-bars &optional window 2815@defun window-scroll-bars &optional window
@@ -2789,18 +2836,16 @@ specifying the same buffer that is already displayed.
2789@node Pointer Shape 2836@node Pointer Shape
2790@section Pointer Shape 2837@section Pointer Shape
2791 2838
2792Normally, the mouse pointer has the @code{text} shape over text and 2839 Normally, the mouse pointer has the @code{text} shape over text and
2793the @code{arrow} shape over window areas which do not correspond to 2840the @code{arrow} shape over window areas which do not correspond to
2794any buffer text. 2841any buffer text. You can specify the mouse pointer shape over text or
2842images via the @code{pointer} text property, and for images with the
2843@code{:pointer} and @code{:map} image properties.
2795 2844
2796The available pointer shapes are: @code{text} (or @code{nil}), 2845 The available pointer shapes are: @code{text} (or @code{nil}),
2797@code{arrow}, @code{hand}, @code{vdrag}, @code{hdrag}, 2846@code{arrow}, @code{hand}, @code{vdrag}, @code{hdrag},
2798@code{modeline}, and @code{hourglass}. 2847@code{modeline}, and @code{hourglass}.
2799 2848
2800The mouse pointer shape over text or images can be changed via the
2801@code{pointer} text property, and for image with the @code{:pointer}
2802and @code{:map} image properties.
2803
2804@defvar void-text-area-pointer 2849@defvar void-text-area-pointer
2805@tindex void-text-area-pointer 2850@tindex void-text-area-pointer
2806This variable specifies the mouse pointer shape in void text areas, 2851This variable specifies the mouse pointer shape in void text areas,
@@ -2828,7 +2873,6 @@ they mean.
2828 up or down on the page; adjusting the width 2873 up or down on the page; adjusting the width
2829 of spaces within text. 2874 of spaces within text.
2830* Display Margins:: Displaying text or images to the side of the main text. 2875* Display Margins:: Displaying text or images to the side of the main text.
2831* Display Fringe Bitmaps:: Displaying a fringe bitmap in a specific line.
2832* Conditional Display:: Making any of the above features conditional 2876* Conditional Display:: Making any of the above features conditional
2833 depending on some Lisp expression. 2877 depending on some Lisp expression.
2834@end menu 2878@end menu
@@ -2851,7 +2895,7 @@ can use in @var{props} to specify the weight of the space:
2851@item :width @var{width} 2895@item :width @var{width}
2852If @var{width} is an integer or floating point number, it specifies 2896If @var{width} is an integer or floating point number, it specifies
2853that the space width should be @var{width} times the normal character 2897that the space width should be @var{width} times the normal character
2854width. The @var{width} may also be a @dfn{pixel width} specification 2898width. @var{width} can also be a @dfn{pixel width} specification
2855(@pxref{Pixel Specification}). 2899(@pxref{Pixel Specification}).
2856 2900
2857@item :relative-width @var{factor} 2901@item :relative-width @var{factor}
@@ -2862,16 +2906,13 @@ character, multiplied by @var{factor}.
2862 2906
2863@item :align-to @var{hpos} 2907@item :align-to @var{hpos}
2864Specifies that the space should be wide enough to reach @var{hpos}. 2908Specifies that the space should be wide enough to reach @var{hpos}.
2865If the value @var{hpos} is an integer or a floating point number, it 2909If @var{hpos} is a number, it is measured in units of the normal
2866is measured in units of the normal character width. The @var{hpos} 2910character width. @var{hpos} can also be a @dfn{pixel width}
2867may also be a @dfn{pixel width} specification (@pxref{Pixel Specification}). 2911specification (@pxref{Pixel Specification}).
2868@end table 2912@end table
2869 2913
2870 The @code{:height} and @code{:align-to} properties are also supported
2871on non-window systems.
2872
2873 You should use one and only one of the above properties. You can 2914 You should use one and only one of the above properties. You can
2874also specify the height of the space, with other properties: 2915also specify the height of the space, with these properties:
2875 2916
2876@table @code 2917@table @code
2877@item :height @var{height} 2918@item :height @var{height}
@@ -2896,39 +2937,43 @@ with a @dfn{pixel ascent} specification (@pxref{Pixel Specification}).
2896 2937
2897 Don't use both @code{:height} and @code{:relative-height} together. 2938 Don't use both @code{:height} and @code{:relative-height} together.
2898 2939
2940 The @code{:height} and @code{:align-to} properties are supported on
2941non-graphic terminals, but the other space properties in this section
2942are not.
2943
2899@node Pixel Specification 2944@node Pixel Specification
2900@subsection Pixel Specification for Spaces 2945@subsection Pixel Specification for Spaces
2901@cindex spaces, pixel specification 2946@cindex spaces, pixel specification
2902 2947
2903 The value of the @code{:width}, @code{:align-to}, @code{:height}, 2948 The value of the @code{:width}, @code{:align-to}, @code{:height},
2904and @code{:ascent} properties can be a (trivial) expression 2949and @code{:ascent} properties can be a special kind of expression that
2905which is evaluated during redisplay. The result of the evaluation is 2950is evaluated during redisplay. The result of the evaluation is used
2906used as an absolute number of pixels. 2951as an absolute number of pixels.
2907 2952
2908 The following expressions are supported: 2953 The following expressions are supported:
2909 2954
2910@example 2955@example
2911@group 2956@group
2912 EXPR ::= NUM | (NUM) | UNIT | ELEM | POS | IMAGE | FORM 2957 @var{expr} ::= @var{num} | (@var{num}) | @var{unit} | @var{elem} | @var{pos} | IMAGE | @var{form}
2913 NUM ::= INTEGER | FLOAT | SYMBOL 2958 @var{num} ::= @var{integer} | @var{float} | @var{symbol}
2914 UNIT ::= in | mm | cm | width | height 2959 @var{unit} ::= in | mm | cm | width | height
2915 ELEM ::= left-fringe | right-fringe | left-margin | right-margin 2960 @var{elem} ::= left-fringe | right-fringe | left-margin | right-margin
2916 | scroll-bar | text 2961 | scroll-bar | text
2917 POS ::= left | center | right 2962 @var{pos} ::= left | center | right
2918 FORM ::= (NUM . EXPR) | (OP EXPR ...) 2963 @var{form} ::= (@var{num} . @var{expr}) | (@var{op} @var{expr} ...)
2919 OP ::= + | - 2964 @var{op} ::= + | -
2920@end group 2965@end group
2921@end example 2966@end example
2922 2967
2923 The form @var{NUM} specifies a fractional width or height of the 2968 The form @var{num} specifies a fraction of the default frame font
2924default frame font size. The form @code{(@var{NUM})} specifies an 2969height or width. The form @code{(@var{num})} specifies an absolute
2925absolute number of pixels. If a symbol @var{SYMBOL} is specified, its 2970number of pixels. If @var{num} is a symbol, @var{symbol}, its
2926buffer-local variable binding is used. 2971buffer-local variable binding is used.
2927 2972
2928 The @code{in}, @code{mm}, and @code{cm} units specifies the number 2973 The @code{in}, @code{mm}, and @code{cm} units specify the number of
2929of pixels per inch, milli-meter, and centi-meter, resp. The 2974pixels per inch, millimeter, and centimeter, respectively. The
2930@code{width} and @code{height} units correspond to the width and 2975@code{width} and @code{height} units correspond to the default width
2931height of the current face font. An image specification @var{IMAGE} 2976and height of the current face. An image specification @code{IMAGE}
2932corresponds to the width or height of the image. 2977corresponds to the width or height of the image.
2933 2978
2934 The @code{left-fringe}, @code{right-fringe}, @code{left-margin}, 2979 The @code{left-fringe}, @code{right-fringe}, @code{left-margin},
@@ -2939,11 +2984,11 @@ specify to the width of the corresponding area of the window.
2939used with @code{:align-to} to specify a position relative to the left 2984used with @code{:align-to} to specify a position relative to the left
2940edge, center, or right edge of the text area. 2985edge, center, or right edge of the text area.
2941 2986
2942 One of the above window elements (except @code{text}) can also be 2987 Any of the above window elements (except @code{text}) can also be
2943used with @code{:align-to} to specify that the position is relative to 2988used with @code{:align-to} to specify that the position is relative to
2944the left edge of the given area. Once the base offset for a relative 2989the left edge of the given area. Once the base offset for a relative
2945position has been set (by the first occurrence of one of these 2990position has been set (by the first occurrence of one of these
2946symbols), further occurences of these symbols are interpreted as the 2991symbols), further occurrences of these symbols are interpreted as the
2947width of the specified area. For example, to align to the center of 2992width of the specified area. For example, to align to the center of
2948the left-margin, use 2993the left-margin, use
2949 2994
@@ -2955,20 +3000,21 @@ the left-margin, use
2955to the left edge of the text area. For example, @samp{:align-to 0} in a 3000to the left edge of the text area. For example, @samp{:align-to 0} in a
2956header-line aligns with the first text column in the text area. 3001header-line aligns with the first text column in the text area.
2957 3002
2958 The value of the form @code{(@var{NUM} . @var{EXPR})} is the value of 3003 A value of the form @code{(@var{num} . @var{expr})} stands
2959@var{NUM} multiplied by the value of the expression @var{EXPR}. For 3004multiplying the values of @var{num} and @var{expr}. For example,
2960example, @samp{(2 . in)} specifies a width of 2 inches, while 3005@code{(2 . in)} specifies a width of 2 inches, while @code{(0.5 .
2961@samp{(0.5 . IMAGE)} specifies half the width (or height) of the 3006IMAGE)} specifies half the width (or height) of the specified image.
2962specified image.
2963 3007
2964 The form @code{(+ @var{EXPR} ...)} adds up the value of the 3008 The form @code{(+ @var{expr} ...)} adds up the value of the
2965expressions. The form @code{(- @var{EXPR} ...)} negates or subtracts 3009expressions. The form @code{(- @var{expr} ...)} negates or subtracts
2966the value of the expressions. 3010the value of the expressions.
2967 3011
2968
2969@node Other Display Specs 3012@node Other Display Specs
2970@subsection Other Display Specifications 3013@subsection Other Display Specifications
2971 3014
3015 Here are the other sorts of display specifications that you can use
3016in the @code{display} text property.
3017
2972@table @code 3018@table @code
2973@item (image . @var{image-props}) 3019@item (image . @var{image-props})
2974This is in fact an image descriptor (@pxref{Images}). When used as a 3020This is in fact an image descriptor (@pxref{Images}). When used as a
@@ -2976,13 +3022,13 @@ display specification, it means to display the image instead of the text
2976that has the display specification. 3022that has the display specification.
2977 3023
2978@item (slice @var{x} @var{y} @var{width} @var{height}) 3024@item (slice @var{x} @var{y} @var{width} @var{height})
2979This property is used with an @code{image} property to specify a 3025This specification together with @code{image} specifies a @dfn{slice}
2980@dfn{slice} (a partial area) of the image to display. The top left 3026(a partial area) of the image to display. The elements @var{y} and
2981corner of the slice is specified by @var{y} and @var{x} and the width 3027@var{x} specify the top left corner of the slice, within the image;
2982and height of the slice is specified by @var{width} and @var{height}. 3028@var{width} and @var{height} specify the width and height of the
2983Integer values are taken as pixel values. A floating point number in 3029slice. Integer values are numbers of pixels. A floating point number
2984the range 0.0 - 1.0 is relative to the width or height of the whole 3030in the range 0.0--1.0 stands for that fraction of the width or height
2985image. 3031of the entire image.
2986 3032
2987@item ((margin nil) @var{string}) 3033@item ((margin nil) @var{string})
2988@itemx @var{string} 3034@itemx @var{string}
@@ -3106,35 +3152,6 @@ as a cons cell of the form @code{(@var{left} . @var{right})}.
3106If @var{window} is @code{nil}, the selected window is used. 3152If @var{window} is @code{nil}, the selected window is used.
3107@end defun 3153@end defun
3108 3154
3109@node Display Fringe Bitmaps
3110@subsection Displaying Bitmaps in the Fringes
3111@cindex display fringes
3112@cindex margins, fringes
3113
3114 You can display a bitmap in the left or right fringes for a given
3115line in a window using the @code{display} property.
3116
3117 To put text in the left or right fringe of the window, use a
3118display specification of the form @code{(left-fringe @var{bitmap} [@var{face}])}
3119or @code{(right-fringe @var{bitmap} [@var{face}])} on one of the
3120characters on the corresponding text line.
3121
3122 The @var{bitmap} is an opaque integer identifying the bitmap, and the
3123optional @var{face} is the name of the face whose foreground and
3124background color is to be used for displaying the bitmap.
3125
3126@defun fringe-bitmaps-at-pos &optional pos window
3127This function returns the fringe bitmaps of the display row containing
3128position @var{pos} in window @var{window}. The return value is a cons
3129@code{(@var{left} . @var{right})} where @var{left} and @var{right}
3130are the fringe bitmap numbers for the bitmaps in the left and right
3131fringe, resp.
3132
3133 Returns @code{nil} if @var{pos} is not visible in window
3134@var{window}. If @var{window} is @code{nil}, use the selected window.
3135If @var{pos} is @code{nil}, use value of point in that window.
3136@end defun
3137
3138@node Conditional Display 3155@node Conditional Display
3139@subsection Conditional Display Specifications 3156@subsection Conditional Display Specifications
3140@cindex conditional display specifications 3157@cindex conditional display specifications
@@ -3164,7 +3181,7 @@ are supported only if particular support libraries are installed on
3164your machine. In some environments, Emacs allows loading image 3181your machine. In some environments, Emacs allows loading image
3165libraries on demand; if so, the variable @code{image-library-alist} 3182libraries on demand; if so, the variable @code{image-library-alist}
3166can be used to modify the set of known names for these dynamic 3183can be used to modify the set of known names for these dynamic
3167libraries (though it is not posible to add new image formats). 3184libraries (though it is not possible to add new image formats).
3168 3185
3169 The supported image formats include XBM, XPM (needing the 3186 The supported image formats include XBM, XPM (needing the
3170libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing 3187libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing
@@ -3392,7 +3409,7 @@ specifying @code{:mask nil}.
3392 3409
3393@item :pointer @var{shape} 3410@item :pointer @var{shape}
3394This specifies the pointer shape when the mouse pointer is over this 3411This specifies the pointer shape when the mouse pointer is over this
3395image. @xref{Pointer Shapes}, for available pointer shapes. 3412image. @xref{Pointer Shape}, for available pointer shapes.
3396 3413
3397@item :map @var{map} 3414@item :map @var{map}
3398This associates an image map of @dfn{hot spots} with this image. 3415This associates an image map of @dfn{hot spots} with this image.
@@ -3420,13 +3437,12 @@ When the mouse pointer is above a hot-spot area of an image, the
3420property it defines a tool-tip for the hot-spot, and if it contains 3437property it defines a tool-tip for the hot-spot, and if it contains
3421a @code{pointer} property, it defines the shape of the mouse cursor when 3438a @code{pointer} property, it defines the shape of the mouse cursor when
3422it is over the hot-spot. 3439it is over the hot-spot.
3423@xref{Pointer Shapes}, for available pointer shapes. 3440@xref{Pointer Shape}, for available pointer shapes.
3424 3441
3425When you click the mouse when the mouse pointer is over a hot-spot, an 3442When you click the mouse when the mouse pointer is over a hot-spot, an
3426event is composed by combining the @var{id} of the hot-spot with the 3443event is composed by combining the @var{id} of the hot-spot with the
3427mouse event, e.g. @samp{[area4 mouse-1]} if the hot-spot's @var{id} is 3444mouse event; for instance, @code{[area4 mouse-1]} if the hot-spot's
3428@samp{area4}. 3445@var{id} is @code{area4}.
3429
3430@end table 3446@end table
3431 3447
3432@defun image-mask-p spec &optional frame 3448@defun image-mask-p spec &optional frame
@@ -3709,12 +3725,12 @@ buffer's text.
3709 3725
3710The argument @var{slice} specifies a slice of the image to insert. If 3726The argument @var{slice} specifies a slice of the image to insert. If
3711@var{slice} is @code{nil} or omitted the whole image is inserted. 3727@var{slice} is @code{nil} or omitted the whole image is inserted.
3712Otherwise, @var{slice} is a list 3728Otherwise, @var{slice} is a list @code{(@var{x} @var{y} @var{width}
3713@code{(@var{x} @var{y} @var{width} @var{height})} 3729@var{height})} which specifies the @var{x} and @var{y} positions and
3714which specifies the @var{x} and @var{y} positions and
3715@var{width} and @var{height} of the image area to insert. Integer 3730@var{width} and @var{height} of the image area to insert. Integer
3716values are taken as pixel values. A floating point number in the 3731values are in units of pixels. A floating point number in the range
3717range 0.0 - 1.0 is relative to the width or height of the image. 37320.0--1.0 stands for that fraction of the width or height of the entire
3733image.
3718 3734
3719Internally, this function inserts @var{string} in the buffer, and gives 3735Internally, this function inserts @var{string} in the buffer, and gives
3720it a @code{display} property which specifies @var{image}. @xref{Display 3736it a @code{display} property which specifies @var{image}. @xref{Display
@@ -3722,9 +3738,9 @@ Property}.
3722@end defun 3738@end defun
3723 3739
3724@defun insert-sliced-image image &optional string area rows cols 3740@defun insert-sliced-image image &optional string area rows cols
3725This function inserts @var{image} in the current buffer at point like 3741This function inserts @var{image} in the current buffer at point, like
3726@code{insert-image}, but the image is automatically split into 3742@code{insert-image}, but splits the image into @var{rows}x@var{cols}
3727@var{rows} x @var{cols} equally sized slices. 3743equally sized slices.
3728@end defun 3744@end defun
3729 3745
3730@defun put-image image pos &optional string area 3746@defun put-image image pos &optional string area
diff --git a/lispref/hooks.texi b/lispref/hooks.texi
index ad5d709e720..1aa22b94686 100644
--- a/lispref/hooks.texi
+++ b/lispref/hooks.texi
@@ -35,6 +35,7 @@ however, we have renamed all of those.)
35@table @code 35@table @code
36@item activate-mark-hook 36@item activate-mark-hook
37@item after-change-functions 37@item after-change-functions
38@item after-change-major-mode-hook
38@item after-init-hook 39@item after-init-hook
39@item after-insert-file-functions 40@item after-insert-file-functions
40@item after-make-frame-functions 41@item after-make-frame-functions
diff --git a/lispref/modes.texi b/lispref/modes.texi
index 78b8fc440d7..f74f7c89da7 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2003 3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2003, 2004
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../info/modes 6@setfilename ../info/modes
@@ -103,6 +103,7 @@ Fundamental mode. Rmail mode is a complicated and specialized mode.
103* Mode Help:: Finding out how to use a mode. 103* Mode Help:: Finding out how to use a mode.
104* Derived Modes:: Defining a new major mode based on another major 104* Derived Modes:: Defining a new major mode based on another major
105 mode. 105 mode.
106* Mode Hooks:: Hooks run at the end of major mode functions.
106@end menu 107@end menu
107 108
108@node Major Mode Conventions 109@node Major Mode Conventions
@@ -276,7 +277,7 @@ other packages would interfere with them.
276Each major mode should have a @dfn{mode hook} named 277Each major mode should have a @dfn{mode hook} named
277@code{@var{modename}-mode-hook}. The major mode command should run that 278@code{@var{modename}-mode-hook}. The major mode command should run that
278hook, with @code{run-mode-hooks}, as the very last thing it 279hook, with @code{run-mode-hooks}, as the very last thing it
279does. @xref{Hooks}. 280does. @xref{Mode Hooks}.
280 281
281@item 282@item
282The major mode command may start by calling some other major mode 283The major mode command may start by calling some other major mode
@@ -284,9 +285,11 @@ command (called the @dfn{parent mode}) and then alter some of its
284settings. A mode that does this is called a @dfn{derived mode}. The 285settings. A mode that does this is called a @dfn{derived mode}. The
285recommended way to define one is to use @code{define-derived-mode}, 286recommended way to define one is to use @code{define-derived-mode},
286but this is not required. Such a mode should use 287but this is not required. Such a mode should use
287@code{delay-mode-hooks} around its entire body, including the call to 288@code{delay-mode-hooks} around its entire body (including the call to
288the parent mode command and the final call to @code{run-mode-hooks}. 289the parent mode command) @emph{except} for the final call to
289(Using @code{define-derived-mode} does this automatically.) 290@code{run-mode-hooks}, which runs the derived mode's hook. (Using
291@code{define-derived-mode} does this automatically.) @xref{Derived
292Modes}, and @ref{Mode Hooks}.
290 293
291@item 294@item
292If something special should be done if the user switches a buffer from 295If something special should be done if the user switches a buffer from
@@ -575,7 +578,7 @@ visited. It also processes local variables specified in the file text.
575in particular. Other major modes are defined in effect by comparison 578in particular. Other major modes are defined in effect by comparison
576with this one---their definitions say what to change, starting from 579with this one---their definitions say what to change, starting from
577Fundamental mode. The @code{fundamental-mode} function does @emph{not} 580Fundamental mode. The @code{fundamental-mode} function does @emph{not}
578run any hooks; you're not supposed to customize it. (If you want Emacs 581run any mode hooks; you're not supposed to customize it. (If you want Emacs
579to behave differently in Fundamental mode, change the @emph{global} 582to behave differently in Fundamental mode, change the @emph{global}
580state of Emacs.) 583state of Emacs.)
581@end deffn 584@end deffn
@@ -808,6 +811,58 @@ Do not write an @code{interactive} spec in the definition;
808@code{define-derived-mode} does that automatically. 811@code{define-derived-mode} does that automatically.
809@end defmac 812@end defmac
810 813
814@node Mode Hooks
815@subsection Mode Hooks
816
817The two last things a major mode function does is to run its mode
818hook and finally the mode independent normal hook
819@code{after-change-major-mode-hook}. If the major mode is a derived
820mode, that is if it calls another major mode (the parent mode) in its
821body, then the parent's mode hook is run just before the derived
822mode's hook. Neither the parent's mode hook nor
823@code{after-change-major-mode-hook} are run at the end of the actual
824call to the parent mode. This applies recursively if the parent mode
825has itself a parent. That is, the mode hooks of all major modes called
826directly or indirectly by the major mode function are all run in
827sequence at the end, just before @code{after-change-major-mode-hook}.
828
829If you are customizing a major mode, rather than defining one, the
830above is all you need to know about the hooks run at the end of a
831major mode. This also applies if you use @code{define-derived-mode}
832to define a major mode, because that macro will automatically
833implement the above for you.
834
835Programmers wishing to define a major mode without using
836@code{define-derived-mode}, should make sure that their major mode
837follows the above conventions. @xref{Major Mode Conventions}, for how
838this should be accomplished. Below, we give some implementation
839details.
840
841@defun run-mode-hooks &rest hookvars
842Major modes should run their mode hook using this function. It is
843similar to @code{run-hooks} (@pxref{Hooks}), but if run inside a
844@code{delay-mode-hooks} form, this function does not run any hooks.
845Instead, it arranges for @var{hookvars} to be run at a later call to
846the function. Otherwise, @code{run-mode-hooks} runs any delayed hooks
847in order, then @var{hookvars} and finally
848@code{after-change-major-mode-hook}.
849@end defun
850
851@defmac delay-mode-hooks body...
852This macro executes @var{body} like @code{progn}, but all calls to
853@code{run-mode-hooks} inside @var{body} delay running their hooks.
854They will be run by the first call to @code{run-mode-hooks} after exit
855from @code{delay-mode-hooks}.
856@end defmac
857
858@defvar after-change-major-mode-hook
859Every major mode function should run this normal hook at its very end.
860It normally does not need to do so explicitly. Indeed, a major mode
861function should normally run its mode hook with @code{run-mode-hooks}
862as the very last thing it does and @code{run-mode-hooks} runs
863@code{after-change-major-mode-hook} at its very end.
864@end defvar
865
811@node Minor Modes 866@node Minor Modes
812@section Minor Modes 867@section Minor Modes
813@cindex minor mode 868@cindex minor mode
@@ -2087,7 +2142,7 @@ if there is no subexpression numbered @var{subexp} in @var{matcher}.
2087Obviously, fontification of the subexpression numbered @var{subexp} will 2142Obviously, fontification of the subexpression numbered @var{subexp} will
2088not occur. However, fontification of other subexpressions (and other 2143not occur. However, fontification of other subexpressions (and other
2089regexps) will continue. If @var{laxmatch} is @code{nil}, and the 2144regexps) will continue. If @var{laxmatch} is @code{nil}, and the
2090specified subexpression is missing, then an error is signalled which 2145specified subexpression is missing, then an error is signaled which
2091terminates search-based fontification. 2146terminates search-based fontification.
2092 2147
2093Here are some examples of elements of this kind, and what they do: 2148Here are some examples of elements of this kind, and what they do:
@@ -2450,7 +2505,7 @@ a file, don't have to do anything to use this feature.
2450 2505
2451For buffers not visiting a file to have their state saved, the major 2506For buffers not visiting a file to have their state saved, the major
2452mode must bind the buffer local variable @code{desktop-save-buffer} to 2507mode must bind the buffer local variable @code{desktop-save-buffer} to
2453a non-nil value. 2508a non-@code{nil} value.
2454 2509
2455@defvar desktop-save-buffer 2510@defvar desktop-save-buffer
2456If this buffer-local variable is non-@code{nil}, the buffer will have 2511If this buffer-local variable is non-@code{nil}, the buffer will have
@@ -2563,26 +2618,8 @@ obsolete.) If the value is a function (either a lambda expression or
2563a symbol with a function definition), it is called. If it is a list 2618a symbol with a function definition), it is called. If it is a list
2564that isn't a function, its elements are called, consecutively. All 2619that isn't a function, its elements are called, consecutively. All
2565the hook functions are called with no arguments. 2620the hook functions are called with no arguments.
2566
2567For example, here's how @code{emacs-lisp-mode} runs its mode hook:
2568
2569@example
2570(run-hooks 'emacs-lisp-mode-hook)
2571@end example
2572@end defun 2621@end defun
2573 2622
2574@defun run-mode-hooks &rest hookvars
2575Like @code{run-hooks}, but is affected by the @code{delay-mode-hooks}
2576macro.
2577@end defun
2578
2579@defmac delay-mode-hooks body...
2580This macro executes the @var{body} forms but defers all calls to
2581@code{run-mode-hooks} within them until the end of @var{body}.
2582This macro enables a derived mode to arrange not to run
2583its parent modes' mode hooks until the end.
2584@end defmac
2585
2586@defun run-hook-with-args hook &rest args 2623@defun run-hook-with-args hook &rest args
2587This function is the way to run an abnormal hook and always call all 2624This function is the way to run an abnormal hook and always call all
2588of the hook functions. It calls each of the hook functions one by 2625of the hook functions. It calls each of the hook functions one by
diff --git a/lispref/searching.texi b/lispref/searching.texi
index fd0d0e172a0..93a152fbbe1 100644
--- a/lispref/searching.texi
+++ b/lispref/searching.texi
@@ -975,6 +975,32 @@ comes back" twice.
975@end example 975@end example
976@end defun 976@end defun
977 977
978@defun looking-back regexp &optional limit
979This function returns @code{t} if @var{regexp} matches text before
980point, ending at point, and @code{nil} otherwise.
981
982Because regular expression matching works only going forward, this is
983implemented by searching backwards from point for a match that ends at
984point. That can be quite slow if it has to search a long distance.
985You can bound the time required by specifying @var{limit}, which says
986not to search before @var{limit}. In this case, the match that is
987found must begin at or after @var{limit}.
988
989@example
990@group
991---------- Buffer: foo ----------
992I read "@point{}The cat in the hat
993comes back" twice.
994---------- Buffer: foo ----------
995
996(looking-back "read \"" 3)
997 @result{} t
998(looking-back "read \"" 4)
999 @result{} nil
1000@end group
1001@end example
1002@end defun
1003
978@node POSIX Regexps 1004@node POSIX Regexps
979@section POSIX Regular Expression Searching 1005@section POSIX Regular Expression Searching
980 1006
diff --git a/lispref/text.texi b/lispref/text.texi
index 5cbff228d27..caa3f21b7b1 100644
--- a/lispref/text.texi
+++ b/lispref/text.texi
@@ -2977,8 +2977,8 @@ Consecutive characters with the same @code{field} property constitute a
2977@item cursor 2977@item cursor
2978@kindex cursor @r{(text property)} 2978@kindex cursor @r{(text property)}
2979Normally, the cursor is displayed at the end of any overlay and text 2979Normally, the cursor is displayed at the end of any overlay and text
2980property string that may be present at the current window position. 2980property strings present at the current window position. You can
2981The cursor may be placed on any character of such strings by giving 2981place the cursor on any desired character of these strings by giving
2982that character a non-@code{nil} @var{cursor} text property. 2982that character a non-@code{nil} @var{cursor} text property.
2983 2983
2984@item pointer 2984@item pointer
@@ -2987,55 +2987,50 @@ This specifies a specific pointer shape when the mouse pointer is over
2987this text or image. See the variable @var{void-area-text-pointer} 2987this text or image. See the variable @var{void-area-text-pointer}
2988for possible pointer shapes. 2988for possible pointer shapes.
2989 2989
2990@item line-height 2990@item line-spacing
2991@kindex line-height @r{(text property)} 2991@kindex line-spacing @r{(text property)}
2992A newline may have @code{line-height} text or overlay properties that 2992A newline can have a @code{line-spacing} text or overlay property that
2993controls the height of the corresponding display row. 2993controls the height of the display line ending with that newline. The
2994 2994property value overrides the default frame line spacing and the buffer
2995If the @code{line-height} property value is @samp{0}, the newline does 2995local @code{line-spacing} variable. We will call the property value
2996not contribute to the height of the display row; instead the height of 2996@var{line-spacing}.
2997the newline glyph is reduced. Also, a @code{line-spacing} property on
2998this newline is ignored. This can be used to tile small images or
2999image slices without adding blank areas between the images.
3000 2997
3001If the @code{line-height} property value is a positive integer, the 2998If @var{line-spacing} is a positive integer, the value specifies
3002value specifies the minimum line height in pixels. If necessary, the 2999additional vertical space, below the display line, in pixels.
3003line height it increased by increasing the line's ascent.
3004 3000
3005If the @code{line-height} property value is a floating point number, 3001If @var{line-spacing} is a floating point number or cons, the
3006the minimum line height is calculated by multiplying the default frame 3002additional vertical space is the product of @var{line-spacing} and the
3007line height by the given value. 3003default frame line height.
3008 3004
3009If the @code{line-height} property value is a cons @code{(@var{ratio} 3005If the @var{line-spacing} value is a cons @code{(total .
3010. @var{face})}, the minimum line height is calculated as @var{ratio} * 3006@var{spacing})} where @var{spacing} is any of the forms described
3011height of named face @var{face}. The @var{ ratio} is an integer or a 3007above, the value of @var{spacing} specifies the total displayed height
3012floating point number. If @var{face} is @code{t}, it specifies the 3008of the line, regardless of the height of the characters in it. This
3013current face. 3009is equivalent to using the @code{line-height} property.
3014 3010
3015@item line-spacing 3011@item line-height
3016@kindex line-spacing @r{(text property)} 3012@kindex line-height @r{(text property)}
3017A newline may also have a @code{line-spacing} text or overlay 3013A newline can have a @code{line-height} text or overlay property that
3018properties that controls the height of the corresponding display row. 3014controls the total height of the display line ending in that newline.
3019 3015We will call the property value @var{line-height}.
3020If the @code{line-spacing} property value is an positive integer, the 3016
3021value is used as additional pixels to insert after the display line; 3017If @var{line-height} is 0, the height of the line is determined solely
3022this overrides the default frame line-spacing and any buffer local 3018from its contents; nothing is added. Any @code{line-spacing} property
3023value of the @var{line-spacing} variable. 3019on this newline is ignored. This case is useful for tiling small
3024 3020images or image slices without adding blank areas between the images.
3025If the @code{line-spacing} property is a floating point number or 3021
3026cons, the line spacing is calculated as specified above for the 3022If @var{line-height} is a positive integer, the value specifies the
3027@code{line-height} property. 3023minimum line height in pixels. The line's ascent height is
3028 3024increased as necessary to achieve the specified height.
3029If the @code{line-spacing} value is a cons @code{(total . @var{spacing})} 3025
3030where @var{spacing} is any of the forms described above, the value of 3026If @var{line-height} is a floating point number, the minimum line
3031@var{spacing} is used as the total height of the line, i.e. a varying 3027height is the product of @var{line-height} and the default frame line
3032number of pixels are inserted after each line to make each line 3028height.
3033exactly that many pixels high. 3029
3034 3030If @var{line-height} is a cons @code{(@var{ratio} . @var{face})}, the
3035Using the @code{line-spacing} property overrides the buffer local 3031minimum line height is calculated as @var{ratio} times the height of
3036@var{line-spacing} variable. That value of that variable may be an 3032face @var{face}. The @var{ratio} is an integer or a floating point
3037integer that specifies a number of pixels, or a floating point 3033number. If @var{face} is @code{t}, it refers to the current face.
3038number which gives the spacing relative to the default frame line height.
3039 3034
3040@item modification-hooks 3035@item modification-hooks
3041@cindex change hooks for a character 3036@cindex change hooks for a character
diff --git a/man/ChangeLog b/man/ChangeLog
index 7b20cda2bc0..fc0bd61497a 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,63 @@
12004-09-28 Kim F. Storm <storm@cua.dk>
2
3 * display.texi (Display Custom) <indicate-buffer-boundaries>:
4 Align with new functionality.
5
62004-09-26 Jesper Harder <harder@ifa.au.dk>
7
8 * sieve.texi (Manage Sieve API): nil -> @code{nil}.
9 * pgg.texi (User Commands, Backend methods): do.
10 * gnus.texi: Markup fixes.
11 (Setting Process Marks): Fix `M P a' entry.
12 * emacs-mime: Fixes.
13
142004-09-23 Reiner Steib <Reiner.Steib@gmx.de>
15
16 * gnus-faq.texi ([5.12]): Fix code example for FQDN in Message-Ids
17 again.
18 Use 5.10 instead of 5.10.0.
19
202004-09-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
21
22 * gnus.texi (Summary Mail Commands): S D e.
23
242004-09-20 Raymond Scholz <ray-2004@zonix.de> (tiny change)
25
26 * gnus.texi (Misc Article): Refer to `Summary Buffer Mode Line' in
27 the gnus-article-mode-line-format section.
28
292004-09-20 Helmut Waitzmann <Helmut.Waitzmann@web.de> (tiny change)
30
31 * gnus.texi (Various Summary Stuff): Fix the documentation for
32 gnus-newsgroup-variables.
33
342004-09-20 Reiner Steib <Reiner.Steib@gmx.de>
35
36 * gnus.texi (MIME Commands): Added
37 gnus-mime-display-multipart-as-mixed,
38 gnus-mime-display-multipart-alternative-as-mixed,
39 gnus-mime-display-multipart-related-as-mixed.
40 (Mail Source Customization): Clarify `mail-source-directory'.
41 (Splitting Mail): Mention gnus-group-find-new-groups.
42 (SpamOracle): Fixed typo.
43
44 * gnus-faq.texi: Untabify.
45 ([6.3]): nnir.el is in contrib directory.
46
47 * message.texi (News Headers): Clarify how a unique ID is created.
48
49 * gnus.texi (Batching Agents): Fixed typo in example. Reported
50 by Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp>.
51
522004-09-20 Andre Srinivasan <andre@e2open.com>
53
54 * gnus.texi (Group Parameters): Added more on hooks. (Small
55 change.)
56
572004-09-20 Florian Weimer <fw@deneb.enyo.de>
58
59 * gnus.texi (Charsets): Point to relevant section in emacs-mime.
60
12004-09-22 Luc Teirlinck <teirllm@auburn.edu> 612004-09-22 Luc Teirlinck <teirllm@auburn.edu>
2 62
3 * display.texi (Display Custom): Remove stray `@end defvar'. 63 * display.texi (Display Custom): Remove stray `@end defvar'.
diff --git a/man/display.texi b/man/display.texi
index 7d5e8ef84e0..b10589da576 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -1007,22 +1007,26 @@ This can be combined with up and down arrow bitmaps shown at the top
1007and bottom of the left or right fringe if the window can be scrolled 1007and bottom of the left or right fringe if the window can be scrolled
1008in either direction. 1008in either direction.
1009 1009
1010The buffer-local variable @code{indicate-buffer-boundaries} controls 1010 The buffer-local variable @code{indicate-buffer-boundaries} controls
1011how the buffer boundaries and window scrolling is indicated in the 1011how the buffer boundaries and window scrolling is indicated in the
1012fringes. 1012fringes.
1013 1013
1014If the value is @code{left} or @code{right}, both angle and arrow 1014 If the value is @code{left} or @code{right}, both angle and arrow
1015bitmaps are displayed in the left or right fringe, respectively. 1015bitmaps are displayed in the left or right fringe, respectively.
1016Any other non-@code{nil} value causes the bitmap on the top line to be 1016
1017displayed in the left fringe, and the bitmap on the bottom line in the 1017 If value is an alist, each element @code{(@var{indicator} .
1018right fringe. 1018@var{position})} specifies the position of one of the indicators.
1019 1019The @var{indicator} must be one of @code{top}, @code{bottom},
1020If value is a cons @code{(angles . arrows)}, the car specifies the 1020@code{up}, @code{down}, or @code{t} which specifies the default
1021position of the angle bitmaps, and the cdr specifies the position of 1021position for the indicators not present in the alist.
1022the arrow bitmaps. For example, @code{(t . right)} places the top 1022The @var{position} is one of @code{left}, @code{right}, or @code{ni}
1023angle bitmap in left fringe, the bottom angle bitmap in right fringe, 1023which specifies not to show this indicator.
1024and both arrow bitmaps in right fringe. To show just the angle 1024
1025bitmaps in the left fringe, but no arrow bitmaps, use @code{(left . nil)}. 1025 For example, @code{((top . left) (t . right))} places the top angle
1026bitmap in left fringe, the bottom angle bitmap in right fringe, and
1027both arrow bitmaps in right fringe. To show just the angle bitmaps in
1028the left fringe, but no arrow bitmaps, use @code{((top . left)
1029(bottom . left))}.
1026 1030
1027@vindex default-indicate-buffer-boundaries 1031@vindex default-indicate-buffer-boundaries
1028 The value of the variable @code{default-indicate-buffer-boundaries} 1032 The value of the variable @code{default-indicate-buffer-boundaries}
diff --git a/man/emacs-mime.texi b/man/emacs-mime.texi
index f30eec7e0fb..d60e40ebbd0 100644
--- a/man/emacs-mime.texi
+++ b/man/emacs-mime.texi
@@ -328,7 +328,7 @@ you could say something like:
328 328
329@item mm-inline-large-images 329@item mm-inline-large-images
330@vindex mm-inline-large-images 330@vindex mm-inline-large-images
331When displaying inline images that are larger than the window, XEmacs 331When displaying inline images that are larger than the window, Emacs
332does not enable scrolling, which means that you cannot see the whole 332does not enable scrolling, which means that you cannot see the whole
333image. To prevent this, the library tries to determine the image size 333image. To prevent this, the library tries to determine the image size
334before displaying it inline, and if it doesn't fit the window, the 334before displaying it inline, and if it doesn't fit the window, the
diff --git a/man/gnus-faq.texi b/man/gnus-faq.texi
index 42789ffa1f0..6f0fddc5562 100644
--- a/man/gnus-faq.texi
+++ b/man/gnus-faq.texi
@@ -102,7 +102,7 @@ Gnus is a Usenet Newsreader and Electronic Mail User Agent implemented
102 102
103@menu 103@menu
104* [1.1]:: What is the latest version of Gnus? 104* [1.1]:: What is the latest version of Gnus?
105* [1.2]:: What's new in 5.10.0? 105* [1.2]:: What's new in 5.10?
106* [1.3]:: Where and how to get Gnus? 106* [1.3]:: Where and how to get Gnus?
107* [1.4]:: What to do with the tarball now? 107* [1.4]:: What to do with the tarball now?
108* [1.5]:: Which version of Emacs do I need? 108* [1.5]:: Which version of Emacs do I need?
@@ -119,7 +119,7 @@ What is the latest version of Gnus?
119 119
120Answer: 120Answer:
121 121
122 Jingle please: Gnus 5.10.0 is released, get it while it's 122 Jingle please: Gnus 5.10 is released, get it while it's
123 hot! As well as the step in version number is rather 123 hot! As well as the step in version number is rather
124 small, Gnus 5.10 has tons of new features which you 124 small, Gnus 5.10 has tons of new features which you
125 shouldn't miss, however if you are cautious, you might 125 shouldn't miss, however if you are cautious, you might
@@ -131,7 +131,7 @@ Answer:
131@end ifnottex 131@end ifnottex
132@subsubheading Question 1.2: 132@subsubheading Question 1.2:
133 133
134What's new in 5.10.0? 134What's new in 5.10?
135 135
136Answer: 136Answer:
137 137
@@ -227,7 +227,7 @@ Which version of Emacs do I need?
227 227
228Answer: 228Answer:
229 229
230 Gnus 5.10.0 requires an Emacs version that is greater 230 Gnus 5.10 requires an Emacs version that is greater
231 than or equal to Emacs 20.7 or XEmacs 21.1. 231 than or equal to Emacs 20.7 or XEmacs 21.1.
232 232
233@ifnottex 233@ifnottex
@@ -440,7 +440,7 @@ the line
440@example 440@example
441 441
442SET HOME=C:\myhome 442SET HOME=C:\myhome
443 443
444@end example 444@end example
445 445
446@noindent 446@noindent
@@ -548,9 +548,9 @@ Answer:
548 548
549@example 549@example
550(add-to-list 'gnus-secondary-select-methods 550(add-to-list 'gnus-secondary-select-methods
551 '(nntp "news.yourSecondProvider.net")) 551 '(nntp "news.yourSecondProvider.net"))
552(add-to-list 'gnus-secondary-select-methods 552(add-to-list 'gnus-secondary-select-methods
553 '(nntp "news.yourThirdProvider.net")) 553 '(nntp "news.yourThirdProvider.net"))
554@end example 554@end example
555 555
556@ifnottex 556@ifnottex
@@ -745,9 +745,9 @@ Answer:
745(add-to-list 745(add-to-list
746 'gnus-secondary-select-methods 746 'gnus-secondary-select-methods
747 '(nnimap "Give the baby a name" 747 '(nnimap "Give the baby a name"
748 (nnimap-address "imap.yourProvider.net") 748 (nnimap-address "imap.yourProvider.net")
749 (nnimap-port 143) 749 (nnimap-port 143)
750 (nnimap-list-pattern "archive.*"))) 750 (nnimap-list-pattern "archive.*")))
751@end example 751@end example
752 752
753@noindent 753@noindent
@@ -877,7 +877,7 @@ Answer:
877 fetched when you enter a group and slow down the process of entering a group). 877 fetched when you enter a group and slow down the process of entering a group).
878 878
879 879
880 If you already use Gnus 5.10.0, you can say 880 If you already use Gnus 5.10, you can say
881 @samp{/o N} 881 @samp{/o N}
882 In summary buffer to load the last N messages, this feature is not available in 5.8.8 882 In summary buffer to load the last N messages, this feature is not available in 5.8.8
883 883
@@ -1000,7 +1000,7 @@ Answer:
1000 1000
1001Answer: 1001Answer:
1002 1002
1003 Only if you use Gnus 5.10.0 or younger. In this case you've got the 1003 Only if you use Gnus 5.10 or younger. In this case you've got the
1004 choice between w3, w3m, links, lynx and html2text, which 1004 choice between w3, w3m, links, lynx and html2text, which
1005 one is used can be specified in the variable 1005 one is used can be specified in the variable
1006 mm-text-html-renderer, so if you want links to render your 1006 mm-text-html-renderer, so if you want links to render your
@@ -1033,7 +1033,7 @@ Answer:
1033 @samp{W Y f} gives you full deuglify. 1033 @samp{W Y f} gives you full deuglify.
1034 See @samp{W Y C-h} or 1034 See @samp{W Y C-h} or
1035 have a look at the menus for other deuglifications). 1035 have a look at the menus for other deuglifications).
1036 Outlook deuglify is only available since Gnus 5.10.0. 1036 Outlook deuglify is only available since Gnus 5.10.
1037 1037
1038@ifnottex 1038@ifnottex
1039@node [4.9], [4.10], [4.8], FAQ 4 - Reading messages 1039@node [4.9], [4.10], [4.8], FAQ 4 - Reading messages
@@ -1204,8 +1204,8 @@ Answer:
1204@example 1204@example
1205(gnus-add-configuration 1205(gnus-add-configuration
1206 '(article (vertical 1.0 1206 '(article (vertical 1.0
1207 (summary .35 point) 1207 (summary .35 point)
1208 (article 1.0)))) 1208 (article 1.0))))
1209@end example 1209@end example
1210 1210
1211 1211
@@ -1252,7 +1252,7 @@ Answer:
1252 sadly hard tabulators are broken in 5.8.8. 1252 sadly hard tabulators are broken in 5.8.8.
1253 1253
1254 1254
1255 Since 5.10.0, Gnus offers you some very nice new specifiers, 1255 Since 5.10, Gnus offers you some very nice new specifiers,
1256 e.g. %B which draws a thread-tree and %&user-date which 1256 e.g. %B which draws a thread-tree and %&user-date which
1257 gives you a date where the details are dependent of the 1257 gives you a date where the details are dependent of the
1258 articles age. Here's an example which uses both: 1258 articles age. Here's an example which uses both:
@@ -1771,7 +1771,7 @@ Answer:
1771@end example 1771@end example
1772 1772
1773@noindent 1773@noindent
1774 if you already use Gnus 5.10.0, if you still use 5.8.8 or 1774 if you already use Gnus 5.10, if you still use 5.8.8 or
1775 5.9 try this instead: 1775 5.9 try this instead:
1776 1776
1777 1777
@@ -1793,7 +1793,7 @@ Answer:
1793 1793
1794Answer: 1794Answer:
1795 1795
1796 Since 5.10.0 Gnus doesn't generate a sender header by 1796 Since 5.10 Gnus doesn't generate a sender header by
1797 default. For older Gnus' try this in ~/.gnus: 1797 default. For older Gnus' try this in ~/.gnus:
1798 1798
1799 1799
@@ -1851,10 +1851,10 @@ Answer:
1851@end example 1851@end example
1852@noindent 1852@noindent
1853 in ~/.gnus. If you use Gnus 5.9 or ealier, you can use this 1853 in ~/.gnus. If you use Gnus 5.9 or ealier, you can use this
1854instead: 1854instead (works for newer versions a well):
1855@example 1855@example
1856(eval-after-load "message" 1856(eval-after-load "message"
1857 '(let (myfqdn "yourmachine.yourdomain.tld");; <-- Edit this! 1857 '(let ((fqdn "yourmachine.yourdomain.tld"));; <-- Edit this!
1858 (if (boundp 'message-user-fqdn) 1858 (if (boundp 'message-user-fqdn)
1859 (setq message-user-fqdn fqdn) 1859 (setq message-user-fqdn fqdn)
1860 (gnus-message 1 "Redefining `message-make-fqdn'.") 1860 (gnus-message 1 "Redefining `message-make-fqdn'.")
@@ -2021,7 +2021,7 @@ Answer:
2021 the raw message, look for the message-id, and say 2021 the raw message, look for the message-id, and say
2022 @samp{M-^ the@@message.id RET} in a 2022 @samp{M-^ the@@message.id RET} in a
2023 summary buffer. 2023 summary buffer.
2024 Since Gnus 5.10.0 there's also a Gnus interface for 2024 Since Gnus 5.10 there's also a Gnus interface for
2025 groups.google.com which you can call with 2025 groups.google.com which you can call with
2026 @samp{G W}) in group buffer. 2026 @samp{G W}) in group buffer.
2027 2027
@@ -2046,9 +2046,9 @@ Answer:
2046 engines and with the help of nnir you can search trough 2046 engines and with the help of nnir you can search trough
2047 the indexed mail and generate a temporary group with all 2047 the indexed mail and generate a temporary group with all
2048 messages which met your search criteria. If this sound 2048 messages which met your search criteria. If this sound
2049 cool to you get nnir.el from 2049 cool to you get nnir.el from the contrib directory of the Gnus
2050 @uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/} 2050 distribution or
2051 or @uref{ftp://ftp.is.informatik.uni-duisburg.de/pub/src/emacs/}. 2051 @uref{http://quimby.gnus.org/cgi-bin/cvsweb.cgi/~checkout~/gnus/contrib/nnir.el?rev=HEAD&content-type=text/plain}
2052 Instructions on how to use it are at the top of the file. 2052 Instructions on how to use it are at the top of the file.
2053 2053
2054@ifnottex 2054@ifnottex
@@ -2231,7 +2231,7 @@ Answer:
2231 later when you're offline. It kind of mimics offline 2231 later when you're offline. It kind of mimics offline
2232 newsreaders like e.g. Forte Agent. If you want to use 2232 newsreaders like e.g. Forte Agent. If you want to use
2233 the Agent place the following in ~/.gnus if you are 2233 the Agent place the following in ~/.gnus if you are
2234 still using 5.8.8 or 5.9 (it's the default since 5.10.0): 2234 still using 5.8.8 or 5.9 (it's the default since 5.10):
2235 2235
2236 2236
2237@example 2237@example
@@ -2524,7 +2524,7 @@ Answer:
2524 2524
2525@noindent 2525@noindent
2526 in ~/.emacs. If you don't care about width of CJK 2526 in ~/.emacs. If you don't care about width of CJK
2527 characters or use Gnus 5.10.0 or younger together with a 2527 characters or use Gnus 5.10 or younger together with a
2528 recent GNU Emacs, you should say 2528 recent GNU Emacs, you should say
2529 2529
2530 2530
@@ -2538,7 +2538,7 @@ Answer:
2538 two suggestions). Finally if you are still using 5.8.8 2538 two suggestions). Finally if you are still using 5.8.8
2539 or 5.9 and experience speed problems with summary 2539 or 5.9 and experience speed problems with summary
2540 buffer generation, you definitely should update to 2540 buffer generation, you definitely should update to
2541 5.10.0 since there quite some work on improving it has 2541 5.10 since there quite some work on improving it has
2542 been done. 2542 been done.
2543 2543
2544@ifnottex 2544@ifnottex
diff --git a/man/gnus.texi b/man/gnus.texi
index b435a34b462..c94845c7a8b 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -3013,11 +3013,23 @@ tag can be removed from the article subjects in the summary buffer for
3013the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} 3013the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3014into the group parameters for the group. 3014into the group parameters for the group.
3015 3015
3016This can also be used as a group-specific hook function, if you'd like. 3016This can also be used as a group-specific hook function. If you want to
3017If you want to hear a beep when you enter a group, you could put 3017hear a beep when you enter a group, you could put something like
3018something like @code{(dummy-variable (ding))} in the parameters of that 3018@code{(dummy-variable (ding))} in the parameters of that group.
3019group. @code{dummy-variable} will be set to the result of the 3019@code{dummy-variable} will be set to the (meaningless) result of the
3020@code{(ding)} form, but who cares? 3020@code{(ding)} form.
3021
3022Alternatively, since the VARIABLE becomes local to the group, this
3023pattern can be used to temporarily change a hook. For example, if the
3024following is added to a group parameter
3025
3026@lisp
3027(gnus-summary-prepared-hook
3028 '(lambda nil (local-set-key "d" (local-key-binding "n"))))
3029@end lisp
3030
3031when the group is entered, the 'd' key will not mark the article as
3032expired.
3021 3033
3022@end table 3034@end table
3023 3035
@@ -5368,6 +5380,13 @@ to the @code{root} account, you may want to resend it to
5368This command understands the process/prefix convention 5380This command understands the process/prefix convention
5369(@pxref{Process/Prefix}). 5381(@pxref{Process/Prefix}).
5370 5382
5383@item S D e
5384@kindex S D e (Summary)
5385@findex gnus-summary-resend-message-edit
5386
5387Like the previous command, but will allow you to edit the message as
5388if it were a new message before resending.
5389
5371@item S O m 5390@item S O m
5372@kindex S O m (Summary) 5391@kindex S O m (Summary)
5373@findex gnus-uu-digest-mail-forward 5392@findex gnus-uu-digest-mail-forward
@@ -6187,7 +6206,7 @@ Mark all series that have already had some articles marked
6187@item M P a 6206@item M P a
6188@kindex M P a (Summary) 6207@kindex M P a (Summary)
6189@findex gnus-uu-mark-all 6208@findex gnus-uu-mark-all
6190Mark all articles in series order (@code{gnus-uu-mark-series}). 6209Mark all articles in series order (@code{gnus-uu-mark-all}).
6191 6210
6192@item M P b 6211@item M P b
6193@kindex M P b (Summary) 6212@kindex M P b (Summary)
@@ -9328,6 +9347,26 @@ Here's an example function the does the latter:
9328@item gnus-mime-multipart-functions 9347@item gnus-mime-multipart-functions
9329Alist of @acronym{MIME} multipart types and functions to handle them. 9348Alist of @acronym{MIME} multipart types and functions to handle them.
9330 9349
9350@vindex gnus-mime-display-multipart-alternative-as-mixed
9351@item gnus-mime-display-multipart-alternative-as-mixed
9352Display "multipart/alternative" parts as "multipart/mixed".
9353
9354@vindex gnus-mime-display-multipart-related-as-mixed
9355@item gnus-mime-display-multipart-related-as-mixed
9356Display "multipart/related" parts as "multipart/mixed".
9357
9358If displaying "text/html" is discouraged, see
9359@code{mm-discouraged-alternatives} in @ref{Display Customization,
9360Display Customization, , emacs-mime, Emacs-Mime Manual}. Images or
9361other material inside a "multipart/related" part might be overlooked
9362when this variable is nil.
9363
9364@vindex gnus-mime-display-multipart-as-mixed
9365@item gnus-mime-display-multipart-as-mixed
9366Display "multipart" parts as "multipart/mixed". If t, it overrides nil
9367values of @code{gnus-mime-display-multipart-alternative-as-mixed} and
9368@code{gnus-mime-display-multipart-related-as-mixed}.
9369
9331@vindex mm-file-name-rewrite-functions 9370@vindex mm-file-name-rewrite-functions
9332@item mm-file-name-rewrite-functions 9371@item mm-file-name-rewrite-functions
9333List of functions used for rewriting file names of @acronym{MIME} parts. 9372List of functions used for rewriting file names of @acronym{MIME} parts.
@@ -9424,6 +9463,10 @@ encode using quoted-printable) or @code{t} (always use 8bit).
9424@cindex coding system aliases 9463@cindex coding system aliases
9425@cindex preferred charset 9464@cindex preferred charset
9426 9465
9466@xref{Encoding Customization, , Encoding Customization, emacs-mime,
9467The Emacs MIME Manual}, for additional variables that control which
9468MIME charsets are used when sending messages.
9469
9427Other charset tricks that may be useful, although not Gnus-specific: 9470Other charset tricks that may be useful, although not Gnus-specific:
9428 9471
9429If there are several @acronym{MIME} charsets that encode the same Emacs 9472If there are several @acronym{MIME} charsets that encode the same Emacs
@@ -10136,11 +10179,19 @@ the list in one particular group:
10136@vindex gnus-newsgroup-variables 10179@vindex gnus-newsgroup-variables
10137@item gnus-newsgroup-variables 10180@item gnus-newsgroup-variables
10138A list of newsgroup (summary buffer) local variables, or cons of 10181A list of newsgroup (summary buffer) local variables, or cons of
10139variables and their default values (when the default values are not 10182variables and their default expressions to be evalled (when the default
10140@code{nil}), that should be made global while the summary buffer is 10183values are not @code{nil}), that should be made global while the summary
10141active. These variables can be used to set variables in the group 10184buffer is active.
10142parameters while still allowing them to affect operations done in 10185
10143other buffers. For example: 10186Note: The default expressions will be evaluated (using function
10187@code{eval}) before assignment to the local variable rather than just
10188assigned to it. If the default expression is the symbol @code{global},
10189that symbol will not be evaluated but the global value of the local
10190variable will be used instead.
10191
10192These variables can be used to set variables in the group parameters
10193while still allowing them to affect operations done in other
10194buffers. For example:
10144 10195
10145@lisp 10196@lisp
10146(setq gnus-newsgroup-variables 10197(setq gnus-newsgroup-variables
@@ -10149,6 +10200,7 @@ other buffers. For example:
10149 "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:"))) 10200 "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10150@end lisp 10201@end lisp
10151 10202
10203Also @pxref{Group Parameters}.
10152@end table 10204@end table
10153 10205
10154 10206
@@ -11269,9 +11321,9 @@ no more new text to scroll in. The default is @code{nil}.
11269@vindex gnus-article-mode-line-format 11321@vindex gnus-article-mode-line-format
11270@item gnus-article-mode-line-format 11322@item gnus-article-mode-line-format
11271This variable is a format string along the same lines as 11323This variable is a format string along the same lines as
11272@code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}). It 11324@code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
11273accepts the same format specifications as that variable, with two 11325Line}). It accepts the same format specifications as that variable,
11274extensions: 11326with two extensions:
11275 11327
11276@table @samp 11328@table @samp
11277 11329
@@ -13203,7 +13255,9 @@ expression should @emph{always} be @samp{*} so that it matches any mails
13203that haven't been matched by any of the other regexps. (These rules are 13255that haven't been matched by any of the other regexps. (These rules are
13204processed from the beginning of the alist toward the end. The first 13256processed from the beginning of the alist toward the end. The first
13205rule to make a match will ``win'', unless you have crossposting enabled. 13257rule to make a match will ``win'', unless you have crossposting enabled.
13206In that case, all matching rules will ``win''.) 13258In that case, all matching rules will ``win''.) When new groups are
13259created by splitting mail, you may want to run
13260@code{gnus-group-find-new-groups} to see the new groups.
13207 13261
13208If you like to tinker with this yourself, you can set this variable to a 13262If you like to tinker with this yourself, you can set this variable to a
13209function of your choice. This function will be called without any 13263function of your choice. This function will be called without any
@@ -13771,10 +13825,10 @@ If non-@code{nil}, ignore errors when reading mail from a mail source.
13771 13825
13772@item mail-source-directory 13826@item mail-source-directory
13773@vindex mail-source-directory 13827@vindex mail-source-directory
13774Directory where files (if any) will be stored. The default is 13828Directory where incoming mail source files (if any) will be stored. The
13775@file{~/Mail/}. At present, the only thing this is used for is to say 13829default is @file{~/Mail/}. At present, the only thing this is used for
13776where the incoming files will be stored if the previous variable is 13830is to say where the incoming files will be stored if the variable
13777@code{nil}. 13831@code{mail-source-delete-incoming} is @code{nil} or a number.
13778 13832
13779@item mail-source-incoming-file-prefix 13833@item mail-source-incoming-file-prefix
13780@vindex mail-source-incoming-file-prefix 13834@vindex mail-source-incoming-file-prefix
@@ -16571,7 +16625,7 @@ follows:
16571This instructs the @code{imap.el} package to log any exchanges with 16625This instructs the @code{imap.el} package to log any exchanges with
16572the server. The log is stored in the buffer @samp{*imap-log*}. Look 16626the server. The log is stored in the buffer @samp{*imap-log*}. Look
16573for error messages, which sometimes are tagged with the keyword 16627for error messages, which sometimes are tagged with the keyword
16574@code{BAD} - but when submitting a bug, make sure to include all the 16628@code{BAD}---but when submitting a bug, make sure to include all the
16575data. 16629data.
16576 16630
16577@node Other Sources 16631@node Other Sources
@@ -18246,8 +18300,8 @@ placeholders if you care (See @code{gnus-auto-goto-ignores}).
18246While it may be obvious to all, the only headers and articles 18300While it may be obvious to all, the only headers and articles
18247available while unplugged are those headers and articles that were 18301available while unplugged are those headers and articles that were
18248fetched into the Agent while previously plugged. To put it another 18302fetched into the Agent while previously plugged. To put it another
18249way, "If you forget to fetch something while plugged, you might have a 18303way, ``If you forget to fetch something while plugged, you might have a
18250less than satisfying unplugged session". For this reason, the Agent 18304less than satisfying unplugged session''. For this reason, the Agent
18251adds two visual effects to your summary buffer. These effects display 18305adds two visual effects to your summary buffer. These effects display
18252the download status of each article so that you always know which 18306the download status of each article so that you always know which
18253articles will be available when unplugged. 18307articles will be available when unplugged.
@@ -18624,7 +18678,7 @@ following incantation:
18624 18678
18625@example 18679@example
18626#!/bin/sh 18680#!/bin/sh
18627emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1 18681emacs -batch -l ~/.emacs -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18628@end example 18682@end example
18629 18683
18630 18684
@@ -20436,8 +20490,8 @@ something like:
20436... 20490...
20437@end example 20491@end example
20438 20492
20439Then that means "score on the from header of the grandparent of the 20493Then that means ``score on the from header of the grandparent of the
20440current article". An indirection is quite fast, but it's better to say: 20494current article''. An indirection is quite fast, but it's better to say:
20441 20495
20442@example 20496@example
20443(1- 20497(1-
@@ -22656,7 +22710,7 @@ entering a group. Thus, entering a group with unseen or unread
22656articles becomes the substitute for checking incoming mail. Whether 22710articles becomes the substitute for checking incoming mail. Whether
22657only unseen articles or all unread articles will be processed is 22711only unseen articles or all unread articles will be processed is
22658determined by the @code{spam-autodetect-recheck-messages}. When set 22712determined by the @code{spam-autodetect-recheck-messages}. When set
22659to t, unread messages will be rechecked. 22713to @code{t}, unread messages will be rechecked.
22660 22714
22661@code{spam-autodetect} grants the user at once more and less control 22715@code{spam-autodetect} grants the user at once more and less control
22662of spam filtering. The user will have more control over each group's 22716of spam filtering. The user will have more control over each group's
diff --git a/man/message.texi b/man/message.texi
index acc043d8e83..6a52698ddb5 100644
--- a/man/message.texi
+++ b/man/message.texi
@@ -1551,8 +1551,8 @@ This optional header will be computed by Message.
1551@cindex Sun 1551@cindex Sun
1552@cindex i-did-not-set--mail-host-address--so-tickle-me 1552@cindex i-did-not-set--mail-host-address--so-tickle-me
1553This required header will be generated by Message. A unique ID will be 1553This required header will be generated by Message. A unique ID will be
1554created based on the date, time, user name and system name. For the 1554created based on the date, time, user name (for the local part) and the
1555domain part, message will look (in this order) at 1555domain part. For the domain part, message will look (in this order) at
1556@code{message-user-fqdn}, @code{system-name}, @code{mail-host-address} 1556@code{message-user-fqdn}, @code{system-name}, @code{mail-host-address}
1557and @code{message-user-mail-address} (i.e. @code{user-mail-address}) 1557and @code{message-user-mail-address} (i.e. @code{user-mail-address})
1558until a probably valid fully qualified domain name (FQDN) was found. 1558until a probably valid fully qualified domain name (FQDN) was found.
diff --git a/man/pgg.texi b/man/pgg.texi
index dc786c51609..8593a9e64a2 100644
--- a/man/pgg.texi
+++ b/man/pgg.texi
@@ -135,8 +135,9 @@ would be asked about the recipients.
135If encryption is successful, it replaces the current region contents (in 135If encryption is successful, it replaces the current region contents (in
136the accessible portion) with the resulting data. 136the accessible portion) with the resulting data.
137 137
138If optional argument @var{sign} is non-nil, the function is request to 138If optional argument @var{sign} is non-@code{nil}, the function is
139do a combined sign and encrypt. This currently only work with GnuPG. 139request to do a combined sign and encrypt. This currently only work
140with GnuPG.
140@end deffn 141@end deffn
141 142
142@deffn Command pgg-decrypt-region start end 143@deffn Command pgg-decrypt-region start end
@@ -301,9 +302,9 @@ keyrings.
301 302
302@deffn Method pgg-scheme-encrypt-region scheme start end recipients &optional sign 303@deffn Method pgg-scheme-encrypt-region scheme start end recipients &optional sign
303Encrypt the current region between @var{start} and @var{end} for 304Encrypt the current region between @var{start} and @var{end} for
304@var{recipients}. If @var{sign} is non-nil, do a combined sign and 305@var{recipients}. If @var{sign} is non-@code{nil}, do a combined sign
305encrypt. If encryption is successful, it returns @code{t}, otherwise 306and encrypt. If encryption is successful, it returns @code{t},
306@code{nil}. 307otherwise @code{nil}.
307@end deffn 308@end deffn
308 309
309@deffn Method pgg-scheme-decrypt-region scheme start end 310@deffn Method pgg-scheme-decrypt-region scheme start end
diff --git a/man/sieve.texi b/man/sieve.texi
index d70941bf229..a41463c5316 100644
--- a/man/sieve.texi
+++ b/man/sieve.texi
@@ -277,7 +277,7 @@ Sets the default port to use, the suggested port number is @code{2000}.
277 277
278@item sieve-manage-log 278@item sieve-manage-log
279@vindex sieve-manage-log 279@vindex sieve-manage-log
280If non-nil, should be a string naming a buffer where a protocol trace 280If non-@code{nil}, should be a string naming a buffer where a protocol trace
281is dumped (for debugging purposes). 281is dumped (for debugging purposes).
282 282
283@end table 283@end table
@@ -313,7 +313,8 @@ List scripts on the server.
313 313
314@item sieve-manage-havespace 314@item sieve-manage-havespace
315@findex sieve-manage-havespace 315@findex sieve-manage-havespace
316Returns non-nil iff server have roam for a script of given size. 316Returns non-@code{nil} iff server have roam for a script of given
317size.
317 318
318@item sieve-manage-getscript 319@item sieve-manage-getscript
319@findex sieve-manage-getscript 320@findex sieve-manage-getscript
diff --git a/src/ChangeLog b/src/ChangeLog
index e71a0e3217d..b71bffc5bce 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,47 @@
12004-09-29 Kim F. Storm <storm@cua.dk>
2
3 * dispextern.h (valid_fringe_bitmap_p): Fix prototype.
4
5 * fringe.c (Vfringe_bitmaps): New variable.
6 (syms_of_fringe): DEFVAR_LISP it.
7 (valid_fringe_bitmap_p): Rename from valid_fringe_bitmap_id_p.
8 Change arg to Lisp_Object and fail if not an integer.
9 (get_fringe_bitmap_name, resolve_fringe_bitmap)
10 (destroy_fringe_bitmap): New functions.
11 (Fdestroy_fringe_bitmap): Change arg to bitmap symbol. Use
12 destroy_fringe_bitmap. Remove symbol from Vfringe_bitmaps and
13 clear its fringe property.
14 (init_fringe_bitmap): Use destroy_fringe_bitmap instead of
15 Fdestroy_fringe_bitmap.
16 (Fdefine_fringe_bitmap): Add BITMAP arg specifying new or existing
17 bitmap symbol; remove WHICH arg. Add symbol to Vfringe_bitmaps
18 and set fringe property. Signal error if no free slots.
19 (Fset_fringe_bitmap_face): Change arg to bitmap symbol.
20 (Ffringe_bitmaps_at_pos): Return bitmap symbols instead of numbers.
21
22 * xdisp.c (handle_single_display_prop): Fringe bitmaps are now
23 symbols with a fringe property.
24
252004-09-27 Kim F. Storm <storm@cua.dk>
26
27 * buffer.c (syms_of_buffer) <indicate-buffer-boundaries>:
28 Doc fix. Format may now be a symbol or alist, not a cons.
29
30 * fringe.c (update_window_fringes): Handle new formats of
31 indicate-buffer-boundaries (symbol or alist). No longer
32 allow a simple cons.
33 (Ffringe_bitmaps_at_pos): Use nil value for no bitmap.
34
352004-09-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
36
37 * config.in: Rebuild
38
392004-09-24 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
40
41 * config.in: Rebuild.
42
43 * Makefile.in: Run setarch i386 ./temacs if exec-shield is present.
44
12004-09-18 Stefan Monnier <monnier@iro.umontreal.ca> 452004-09-18 Stefan Monnier <monnier@iro.umontreal.ca>
2 46
3 * xterm.c (x_term_init): Work around a bug in some X servers. 47 * xterm.c (x_term_init): Work around a bug in some X servers.
diff --git a/src/Makefile.in b/src/Makefile.in
index 1f719018c77..dc8964a42ca 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -909,6 +909,13 @@ LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \
909#define OBJECTS_MACHINE 909#define OBJECTS_MACHINE
910#endif 910#endif
911 911
912#ifdef HAVE_EXECSHIELD
913#undef i386
914RUN_TEMACS = @SETARCH@ i386 ./temacs
915#else
916RUN_TEMACS = ./temacs
917#endif
918
912all: emacs${EXEEXT} OTHER_FILES 919all: emacs${EXEEXT} OTHER_FILES
913 920
914emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} 921emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp}
@@ -917,9 +924,9 @@ emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp}
917 ln temacs${EXEEXT} emacs${EXEEXT} 924 ln temacs${EXEEXT} emacs${EXEEXT}
918#else 925#else
919#ifdef HAVE_SHM 926#ifdef HAVE_SHM
920 LC_ALL=C ./temacs -nl -batch -l loadup dump 927 LC_ALL=C $(RUN_TEMACS) -nl -batch -l loadup dump
921#else /* ! defined (HAVE_SHM) */ 928#else /* ! defined (HAVE_SHM) */
922 LC_ALL=C ./temacs -batch -l loadup dump 929 LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
923#endif /* ! defined (HAVE_SHM) */ 930#endif /* ! defined (HAVE_SHM) */
924#endif /* ! defined (CANNOT_DUMP) */ 931#endif /* ! defined (CANNOT_DUMP) */
925 -./emacs -q -batch -f list-load-path-shadows 932 -./emacs -q -batch -f list-load-path-shadows
@@ -1339,9 +1346,9 @@ bootstrap-emacs${EXEEXT}: temacs${EXEEXT}
1339 ln temacs${EXEEXT} bootstrap-emacs${EXEEXT} 1346 ln temacs${EXEEXT} bootstrap-emacs${EXEEXT}
1340#else 1347#else
1341#ifdef HAVE_SHM 1348#ifdef HAVE_SHM
1342 ./temacs -nl -batch -l loadup bootstrap 1349 $(RUN_TEMACS) -nl -batch -l loadup bootstrap
1343#else /* ! defined (HAVE_SHM) */ 1350#else /* ! defined (HAVE_SHM) */
1344 ./temacs --batch --load loadup bootstrap 1351 $(RUN_TEMACS) --batch --load loadup bootstrap
1345#endif /* ! defined (HAVE_SHM) */ 1352#endif /* ! defined (HAVE_SHM) */
1346 mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} 1353 mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT}
1347#endif /* ! defined (CANNOT_DUMP) */ 1354#endif /* ! defined (CANNOT_DUMP) */
diff --git a/src/buffer.c b/src/buffer.c
index b1c453816ce..b0368a842ca 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5682,16 +5682,20 @@ If non-nil, the first and last line of the buffer are marked in the fringe
5682of a window on window-systems with angle bitmaps, or if the window can be 5682of a window on window-systems with angle bitmaps, or if the window can be
5683scrolled, the top and bottom line of the window are marked with up and down 5683scrolled, the top and bottom line of the window are marked with up and down
5684arrow bitmaps. 5684arrow bitmaps.
5685If value is `left' or `right', both angle and arrow bitmaps are displayed in 5685
5686the left or right fringe, resp. Any other non-nil value causes the 5686If value is a symbol `left' or `right', both angle and arrow bitmaps
5687bitmap on the top line to be displayed in the left fringe, and the 5687are displayed in the left or right fringe, resp.
5688bitmap on the bottom line in the right fringe. 5688
5689If value is a cons (ANGLES . ARROWS), the car specifies the position 5689If value is an alist, each element (INDICATOR . POSITION) specifies
5690of the angle bitmaps, and the cdr specifies the position of the arrow 5690the position of one of the indicators. INDICATOR is one of `top',
5691bitmaps. For example, (t . right) places the top angle bitmap in left 5691`bottom', `up', `down', or t, which specifies the default position,
5692fringe, the bottom angle bitmap in right fringe, and both arrow 5692and POSITION is one of `left', `right', or nil, meaning do not show
5693this indicator.
5694
5695For example, ((top . left) (t . right)) places the top angle bitmap in
5696left fringe, the bottom angle bitmap in right fringe, and both arrow
5693bitmaps in right fringe. To show just the angle bitmaps in the left 5697bitmaps in right fringe. To show just the angle bitmaps in the left
5694fringe, but no arrow bitmaps, use (left . nil). */); 5698fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */);
5695 5699
5696 DEFVAR_PER_BUFFER ("scroll-up-aggressively", 5700 DEFVAR_PER_BUFFER ("scroll-up-aggressively",
5697 &current_buffer->scroll_up_aggressively, Qnil, 5701 &current_buffer->scroll_up_aggressively, Qnil,
diff --git a/src/config.in b/src/config.in
index 4fe82cd8f2d..e5d112ee81c 100644
--- a/src/config.in
+++ b/src/config.in
@@ -136,6 +136,9 @@ Boston, MA 02111-1307, USA. */
136/* Define to 1 if you have the `euidaccess' function. */ 136/* Define to 1 if you have the `euidaccess' function. */
137#undef HAVE_EUIDACCESS 137#undef HAVE_EUIDACCESS
138 138
139/* Define to 1 if this OS has exec shield and we can handle it. */
140#undef HAVE_EXECSHIELD
141
139/* Define to 1 if you have the <fcntl.h> header file. */ 142/* Define to 1 if you have the <fcntl.h> header file. */
140#undef HAVE_FCNTL_H 143#undef HAVE_FCNTL_H
141 144
diff --git a/src/dispextern.h b/src/dispextern.h
index 5f293219328..440c127508e 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2630,7 +2630,7 @@ extern int x_intersect_rectangles P_ ((XRectangle *, XRectangle *,
2630 2630
2631/* Defined in fringe.c */ 2631/* Defined in fringe.c */
2632 2632
2633int valid_fringe_bitmap_id_p (int); 2633int valid_fringe_bitmap_p (Lisp_Object);
2634void draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, int)); 2634void draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, int));
2635void draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); 2635void draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *));
2636void draw_window_fringes P_ ((struct window *)); 2636void draw_window_fringes P_ ((struct window *));
diff --git a/src/fringe.c b/src/fringe.c
index aecb51349fc..24a7bcb083a 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -32,12 +32,22 @@ Boston, MA 02111-1307, USA. */
32 32
33#ifdef HAVE_WINDOW_SYSTEM 33#ifdef HAVE_WINDOW_SYSTEM
34 34
35extern Lisp_Object Qfringe;
35extern Lisp_Object Qtop, Qbottom, Qcenter; 36extern Lisp_Object Qtop, Qbottom, Qcenter;
37extern Lisp_Object Qup, Qdown, Qleft, Qright;
36 38
37/* Non-nil means that newline may flow into the right fringe. */ 39/* Non-nil means that newline may flow into the right fringe. */
38 40
39Lisp_Object Voverflow_newline_into_fringe; 41Lisp_Object Voverflow_newline_into_fringe;
40 42
43/* List of known fringe bitmap symbols.
44
45 The fringe bitmap number is stored in the `fringe' property on
46 those symbols. Names for the built-in bitmaps are installed by
47 loading fringe.el.
48 */
49
50Lisp_Object Vfringe_bitmaps;
41 51
42enum fringe_bitmap_type 52enum fringe_bitmap_type
43{ 53{
@@ -444,15 +454,90 @@ static int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS;
444/* Return 1 if FRINGE_ID is a valid fringe bitmap id. */ 454/* Return 1 if FRINGE_ID is a valid fringe bitmap id. */
445 455
446int 456int
447valid_fringe_bitmap_id_p (fringe_id) 457valid_fringe_bitmap_p (bitmap)
448 int fringe_id; 458 Lisp_Object bitmap;
459{
460 int bn;
461
462 if (!INTEGERP (bitmap))
463 return 0;
464
465 bn = XINT (bitmap);
466 return (bn >= NO_FRINGE_BITMAP
467 && bn < max_used_fringe_bitmap
468 && (bn < MAX_STANDARD_FRINGE_BITMAPS
469 || fringe_bitmaps[bn] != NULL));
470}
471
472/* Get fringe bitmap name for bitmap number BN.
473
474 Found by traversing Vfringe_bitmaps comparing BN to the
475 fringe property for each symbol.
476
477 Return BN if not found in Vfringe_bitmaps. */
478
479static Lisp_Object
480get_fringe_bitmap_name (bn)
481 int bn;
482{
483 Lisp_Object bitmaps;
484 Lisp_Object num;
485
486 /* Zero means no bitmap -- return nil. */
487 if (bn <= 0)
488 return Qnil;
489
490 bitmaps = Vfringe_bitmaps;
491 num = make_number (bn);
492
493 while (CONSP (bitmaps))
494 {
495 Lisp_Object bitmap = XCAR (bitmaps);
496 if (EQ (num, Fget (bitmap, Qfringe)))
497 return bitmap;
498 bitmaps = XCDR (bitmaps);
499 }
500
501 return num;
502}
503
504
505/* Resolve a BITMAP parameter.
506
507 An INTEGER, corresponding to a bitmap number.
508 A STRING which is interned to a symbol.
509 A SYMBOL which has a fringe property which is a bitmap number.
510*/
511
512static int
513resolve_fringe_bitmap (bitmap, namep)
514 Lisp_Object bitmap;
515 Lisp_Object *namep;
449{ 516{
450 return (fringe_id >= NO_FRINGE_BITMAP 517 if (namep)
451 && fringe_id < max_used_fringe_bitmap 518 *namep = Qnil;
452 && (fringe_id < MAX_STANDARD_FRINGE_BITMAPS 519
453 || fringe_bitmaps[fringe_id] != NULL)); 520 if (STRINGP (bitmap))
521 bitmap = intern (SDATA (bitmap));
522
523 if (SYMBOLP (bitmap))
524 {
525 if (namep)
526 *namep = bitmap;
527 bitmap = Fget (bitmap, Qfringe);
528 }
529
530 if (valid_fringe_bitmap_p (bitmap))
531 {
532 if (namep && NILP (*namep))
533 *namep = get_fringe_bitmap_name (XINT (bitmap));
534 return XINT (bitmap);
535 }
536
537 return -1;
454} 538}
455 539
540
456/* Draw the bitmap WHICH in one of the left or right fringes of 541/* Draw the bitmap WHICH in one of the left or right fringes of
457 window W. ROW is the glyph row for which to display the bitmap; it 542 window W. ROW is the glyph row for which to display the bitmap; it
458 determines the vertical position at which the bitmap has to be 543 determines the vertical position at which the bitmap has to be
@@ -707,9 +792,10 @@ update_window_fringes (w, force_p)
707 int rn, nrows = w->current_matrix->nrows; 792 int rn, nrows = w->current_matrix->nrows;
708 int y; 793 int y;
709 int redraw_p = 0; 794 int redraw_p = 0;
710 Lisp_Object ind; 795 Lisp_Object boundary_top = Qnil, boundary_bot = Qnil;
711 int boundary_pos = 0, arrow_pos = 0; 796 Lisp_Object arrow_top = Qnil, arrow_bot = Qnil;
712 int empty_pos = 0; 797 Lisp_Object empty_pos;
798 Lisp_Object ind = Qnil;
713 799
714 if (w->pseudo_window_p) 800 if (w->pseudo_window_p)
715 return 0; 801 return 0;
@@ -717,23 +803,29 @@ update_window_fringes (w, force_p)
717 if (!MINI_WINDOW_P (w) 803 if (!MINI_WINDOW_P (w)
718 && (ind = XBUFFER (w->buffer)->indicate_buffer_boundaries, !NILP (ind))) 804 && (ind = XBUFFER (w->buffer)->indicate_buffer_boundaries, !NILP (ind)))
719 { 805 {
720 int do_eob = 1, do_bob = 1; 806 if (EQ (ind, Qleft) || EQ (ind, Qright))
721 Lisp_Object arrows; 807 boundary_top = boundary_bot = arrow_top = arrow_bot = ind;
722 808 else if (CONSP (ind) && CONSP (XCAR (ind)))
723 if (CONSP (ind)) 809 {
724 arrows = XCDR (ind), ind = XCAR (ind); 810 Lisp_Object pos;
811 if (pos = Fassq (Qt, ind), !NILP (pos))
812 boundary_top = boundary_bot = arrow_top = arrow_bot = XCDR (pos);
813 if (pos = Fassq (Qtop, ind), !NILP (pos))
814 boundary_top = XCDR (pos);
815 if (pos = Fassq (Qbottom, ind), !NILP (pos))
816 boundary_bot = XCDR (pos);
817 if (pos = Fassq (Qup, ind), !NILP (pos))
818 arrow_top = XCDR (pos);
819 if (pos = Fassq (Qdown, ind), !NILP (pos))
820 arrow_bot = XCDR (pos);
821 }
725 else 822 else
726 arrows = ind; 823 ind = Qnil;
727 824 }
728 if (EQ (ind, Qleft))
729 boundary_pos = -1;
730 else if (EQ (ind, Qright))
731 boundary_pos = 1;
732 825
733 if (EQ (arrows, Qleft)) 826 if (!NILP (ind))
734 arrow_pos = -1; 827 {
735 else if (EQ (arrows, Qright)) 828 int do_eob = 1, do_bob = 1;
736 arrow_pos = 1;
737 829
738 for (y = 0, rn = 0; 830 for (y = 0, rn = 0;
739 y < yb && rn < nrows; 831 y < yb && rn < nrows;
@@ -754,17 +846,17 @@ update_window_fringes (w, force_p)
754 row->indicate_bob_p = row->indicate_top_line_p = 0; 846 row->indicate_bob_p = row->indicate_top_line_p = 0;
755 row->indicate_eob_p = row->indicate_bottom_line_p = 0; 847 row->indicate_eob_p = row->indicate_bottom_line_p = 0;
756 848
757 if (!NILP (ind) 849 if (!NILP (boundary_top)
758 && MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer))) 850 && MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)))
759 row->indicate_bob_p = do_bob, do_bob = 0; 851 row->indicate_bob_p = do_bob, do_bob = 0;
760 else if (!NILP (arrows) 852 else if (!NILP (arrow_top)
761 && (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) == rn) 853 && (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) == rn)
762 row->indicate_top_line_p = 1; 854 row->indicate_top_line_p = 1;
763 855
764 if (!NILP (ind) 856 if (!NILP (boundary_bot)
765 && MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer))) 857 && MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)))
766 row->indicate_eob_p = do_eob, do_eob = 0; 858 row->indicate_eob_p = do_eob, do_eob = 0;
767 else if (!NILP (arrows) 859 else if (!NILP (arrow_bot)
768 && y + row->height >= yb) 860 && y + row->height >= yb)
769 row->indicate_bottom_line_p = 1; 861 row->indicate_bottom_line_p = 1;
770 862
@@ -776,10 +868,9 @@ update_window_fringes (w, force_p)
776 } 868 }
777 } 869 }
778 870
779 if (EQ (XBUFFER (w->buffer)->indicate_empty_lines, Qright)) 871 empty_pos = XBUFFER (w->buffer)->indicate_empty_lines;
780 empty_pos = 1; 872 if (!NILP (empty_pos) && !EQ (empty_pos, Qright))
781 else if (EQ (XBUFFER (w->buffer)->indicate_empty_lines, Qleft)) 873 empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft;
782 empty_pos = -1;
783 874
784 for (y = 0, rn = 0; 875 for (y = 0, rn = 0;
785 y < yb && rn < nrows; 876 y < yb && rn < nrows;
@@ -803,20 +894,20 @@ update_window_fringes (w, force_p)
803 left = row->left_user_fringe_bitmap; 894 left = row->left_user_fringe_bitmap;
804 left_face_id = row->left_user_fringe_face_id; 895 left_face_id = row->left_user_fringe_face_id;
805 } 896 }
806 else if (row->indicate_bob_p && boundary_pos <= 0) 897 else if (row->indicate_bob_p && EQ (boundary_top, Qleft))
807 left = ((row->indicate_eob_p && boundary_pos < 0) 898 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft))
808 ? LEFT_BRACKET_BITMAP : TOP_LEFT_ANGLE_BITMAP); 899 ? LEFT_BRACKET_BITMAP : TOP_LEFT_ANGLE_BITMAP);
809 else if (row->indicate_eob_p && boundary_pos < 0) 900 else if (row->indicate_eob_p && EQ (boundary_bot, Qleft))
810 left = BOTTOM_LEFT_ANGLE_BITMAP; 901 left = BOTTOM_LEFT_ANGLE_BITMAP;
811 else if (row->truncated_on_left_p) 902 else if (row->truncated_on_left_p)
812 left = LEFT_TRUNCATION_BITMAP; 903 left = LEFT_TRUNCATION_BITMAP;
813 else if (MATRIX_ROW_CONTINUATION_LINE_P (row)) 904 else if (MATRIX_ROW_CONTINUATION_LINE_P (row))
814 left = CONTINUATION_LINE_BITMAP; 905 left = CONTINUATION_LINE_BITMAP;
815 else if (row->indicate_empty_line_p && empty_pos <= 0) 906 else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft))
816 left = ZV_LINE_BITMAP; 907 left = ZV_LINE_BITMAP;
817 else if (row->indicate_top_line_p && arrow_pos <= 0) 908 else if (row->indicate_top_line_p && EQ (arrow_top, Qleft))
818 left = UP_ARROW_BITMAP; 909 left = UP_ARROW_BITMAP;
819 else if (row->indicate_bottom_line_p && arrow_pos < 0) 910 else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qleft))
820 left = DOWN_ARROW_BITMAP; 911 left = DOWN_ARROW_BITMAP;
821 else 912 else
822 left = NO_FRINGE_BITMAP; 913 left = NO_FRINGE_BITMAP;
@@ -829,22 +920,20 @@ update_window_fringes (w, force_p)
829 right = row->right_user_fringe_bitmap; 920 right = row->right_user_fringe_bitmap;
830 right_face_id = row->right_user_fringe_face_id; 921 right_face_id = row->right_user_fringe_face_id;
831 } 922 }
832 else if (row->indicate_bob_p && boundary_pos > 0) 923 else if (row->indicate_bob_p && EQ (boundary_top, Qright))
833 right = ((row->indicate_eob_p && boundary_pos >= 0) 924 right = ((row->indicate_eob_p && EQ (boundary_bot, Qright))
834 ? RIGHT_BRACKET_BITMAP : TOP_RIGHT_ANGLE_BITMAP); 925 ? RIGHT_BRACKET_BITMAP : TOP_RIGHT_ANGLE_BITMAP);
835 else if (row->indicate_eob_p && boundary_pos >= 0) 926 else if (row->indicate_eob_p && EQ (boundary_bot, Qright))
836 right = BOTTOM_RIGHT_ANGLE_BITMAP; 927 right = BOTTOM_RIGHT_ANGLE_BITMAP;
837 else if (row->truncated_on_right_p) 928 else if (row->truncated_on_right_p)
838 right = RIGHT_TRUNCATION_BITMAP; 929 right = RIGHT_TRUNCATION_BITMAP;
839 else if (row->continued_p) 930 else if (row->continued_p)
840 right = CONTINUED_LINE_BITMAP; 931 right = CONTINUED_LINE_BITMAP;
841 else if (row->indicate_top_line_p && arrow_pos > 0) 932 else if (row->indicate_top_line_p && EQ (arrow_top, Qright))
842 right = UP_ARROW_BITMAP; 933 right = UP_ARROW_BITMAP;
843 else if (row->indicate_bottom_line_p && arrow_pos >= 0) 934 else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qright))
844 right = DOWN_ARROW_BITMAP; 935 right = DOWN_ARROW_BITMAP;
845 else if (row->indicate_empty_line_p 936 else if (row->indicate_empty_line_p && EQ (empty_pos, Qright))
846 && (empty_pos > 0
847 || (WINDOW_LEFT_FRINGE_WIDTH (w) == 0 && empty_pos == 0)))
848 right = ZV_LINE_BITMAP; 937 right = ZV_LINE_BITMAP;
849 else 938 else
850 right = NO_FRINGE_BITMAP; 939 right = NO_FRINGE_BITMAP;
@@ -979,20 +1068,13 @@ compute_fringe_widths (f, redraw)
979 redraw_frame (f); 1068 redraw_frame (f);
980} 1069}
981 1070
982DEFUN ("destroy-fringe-bitmap", Fdestroy_fringe_bitmap, Sdestroy_fringe_bitmap, 1071
983 1, 1, 0, 1072void
984 doc: /* Destroy fringe bitmap WHICH. 1073destroy_fringe_bitmap (n)
985If WHICH overrides a standard fringe bitmap, the original bitmap is restored. */) 1074 int n;
986 (which)
987 Lisp_Object which;
988{ 1075{
989 int n;
990 struct fringe_bitmap **fbp; 1076 struct fringe_bitmap **fbp;
991 1077
992 CHECK_NUMBER (which);
993 if (n = XINT (which), n >= max_used_fringe_bitmap)
994 return Qnil;
995
996 fringe_faces[n] = FRINGE_FACE_ID; 1078 fringe_faces[n] = FRINGE_FACE_ID;
997 1079
998 fbp = &fringe_bitmaps[n]; 1080 fbp = &fringe_bitmaps[n];
@@ -1008,7 +1090,31 @@ If WHICH overrides a standard fringe bitmap, the original bitmap is restored. *
1008 while (max_used_fringe_bitmap > MAX_STANDARD_FRINGE_BITMAPS 1090 while (max_used_fringe_bitmap > MAX_STANDARD_FRINGE_BITMAPS
1009 && fringe_bitmaps[max_used_fringe_bitmap - 1] == NULL) 1091 && fringe_bitmaps[max_used_fringe_bitmap - 1] == NULL)
1010 max_used_fringe_bitmap--; 1092 max_used_fringe_bitmap--;
1093}
1094
1011 1095
1096DEFUN ("destroy-fringe-bitmap", Fdestroy_fringe_bitmap, Sdestroy_fringe_bitmap,
1097 1, 1, 0,
1098 doc: /* Destroy fringe bitmap BITMAP.
1099If BITMAP overrides a standard fringe bitmap, the original bitmap is restored. */)
1100 (bitmap)
1101 Lisp_Object bitmap;
1102{
1103 int n;
1104 Lisp_Object sym;
1105
1106 n = resolve_fringe_bitmap (bitmap, &sym);
1107 if (n < 0)
1108 return Qnil;
1109
1110 destroy_fringe_bitmap (n);
1111
1112 if (SYMBOLP (sym))
1113 {
1114 Vfringe_bitmaps = Fdelq (sym, Vfringe_bitmaps);
1115 /* It would be better to remove the fringe property. */
1116 Fput (sym, Qfringe, Qnil);
1117 }
1012 return Qnil; 1118 return Qnil;
1013} 1119}
1014 1120
@@ -1079,7 +1185,7 @@ init_fringe_bitmap (which, fb, once_p)
1079 1185
1080 if (!once_p) 1186 if (!once_p)
1081 { 1187 {
1082 Fdestroy_fringe_bitmap (make_number (which)); 1188 destroy_fringe_bitmap (which);
1083 1189
1084 /* XXX Is SELECTED_FRAME OK here? */ 1190 /* XXX Is SELECTED_FRAME OK here? */
1085 if (FRAME_RIF (SELECTED_FRAME ())->define_fringe_bitmap) 1191 if (FRAME_RIF (SELECTED_FRAME ())->define_fringe_bitmap)
@@ -1093,26 +1199,32 @@ init_fringe_bitmap (which, fb, once_p)
1093 1199
1094 1200
1095DEFUN ("define-fringe-bitmap", Fdefine_fringe_bitmap, Sdefine_fringe_bitmap, 1201DEFUN ("define-fringe-bitmap", Fdefine_fringe_bitmap, Sdefine_fringe_bitmap,
1096 1, 5, 0, 1202 2, 5, 0,
1097 doc: /* Define a fringe bitmap from BITS of height HEIGHT and width WIDTH. 1203 doc: /* Define fringe bitmap BITMAP from BITS of size HEIGHT x WIDTH.
1204BITMAP is a symbol or string naming the new fringe bitmap.
1098BITS is either a string or a vector of integers. 1205BITS is either a string or a vector of integers.
1099HEIGHT is height of bitmap. If HEIGHT is nil, use length of BITS. 1206HEIGHT is height of bitmap. If HEIGHT is nil, use length of BITS.
1100WIDTH must be an integer between 1 and 16, or nil which defaults to 8. 1207WIDTH must be an integer between 1 and 16, or nil which defaults to 8.
1101Optional fourth arg ALIGN may be one of `top', `center', or `bottom', 1208Optional fifth arg ALIGN may be one of `top', `center', or `bottom',
1102indicating the positioning of the bitmap relative to the rows where it 1209indicating the positioning of the bitmap relative to the rows where it
1103is used; the default is to center the bitmap. Fourth arg may also be a 1210is used; the default is to center the bitmap. Fourth arg may also be a
1104list (ALIGN PERIODIC) where PERIODIC non-nil specifies that the bitmap 1211list (ALIGN PERIODIC) where PERIODIC non-nil specifies that the bitmap
1105should be repeated. 1212should be repeated.
1106Optional fifth argument WHICH is bitmap number to redefine. 1213If BITMAP already exists, the existing definition is replaced. */)
1107Return new bitmap number, or nil of no more free bitmap slots. */) 1214 (bitmap, bits, height, width, align)
1108 (bits, height, width, align, which) 1215 Lisp_Object bitmap, bits, height, width, align;
1109 Lisp_Object bits, height, width, align, which;
1110{ 1216{
1111 Lisp_Object len; 1217 Lisp_Object len;
1112 int n, h, i, j; 1218 int n, h, i, j;
1113 unsigned short *b; 1219 unsigned short *b;
1114 struct fringe_bitmap fb, *xfb; 1220 struct fringe_bitmap fb, *xfb;
1115 int fill1 = 0, fill2 = 0; 1221 int fill1 = 0, fill2 = 0;
1222 Lisp_Object sym;
1223
1224 n = resolve_fringe_bitmap (bitmap, &sym);
1225
1226 if (NILP (sym) || INTEGERP (sym))
1227 sym = wrong_type_argument (Qsymbolp, bitmap);
1116 1228
1117 if (!STRINGP (bits) && !VECTORP (bits)) 1229 if (!STRINGP (bits) && !VECTORP (bits))
1118 bits = wrong_type_argument (Qstringp, bits); 1230 bits = wrong_type_argument (Qstringp, bits);
@@ -1165,7 +1277,7 @@ Return new bitmap number, or nil of no more free bitmap slots. */)
1165 else if (!NILP (align) && !EQ (align, Qcenter)) 1277 else if (!NILP (align) && !EQ (align, Qcenter))
1166 error ("Bad align argument"); 1278 error ("Bad align argument");
1167 1279
1168 if (NILP (which)) 1280 if (n < 0)
1169 { 1281 {
1170 if (max_used_fringe_bitmap < MAX_FRINGE_BITMAPS) 1282 if (max_used_fringe_bitmap < MAX_FRINGE_BITMAPS)
1171 n = max_used_fringe_bitmap++; 1283 n = max_used_fringe_bitmap++;
@@ -1177,16 +1289,11 @@ Return new bitmap number, or nil of no more free bitmap slots. */)
1177 if (fringe_bitmaps[n] == NULL) 1289 if (fringe_bitmaps[n] == NULL)
1178 break; 1290 break;
1179 if (n == MAX_FRINGE_BITMAPS) 1291 if (n == MAX_FRINGE_BITMAPS)
1180 return Qnil; 1292 error ("Cannot define more fringe bitmaps");
1181 } 1293 }
1182 which = make_number (n); 1294
1183 } 1295 Vfringe_bitmaps = Fcons (sym, Vfringe_bitmaps);
1184 else 1296 Fput (sym, Qfringe, make_number (n));
1185 {
1186 CHECK_NUMBER (which);
1187 n = XINT (which);
1188 if (n <= NO_FRINGE_BITMAP || n >= MAX_FRINGE_BITMAPS)
1189 error ("Invalid fringe bitmap number");
1190 } 1297 }
1191 1298
1192 fb.dynamic = 1; 1299 fb.dynamic = 1;
@@ -1214,21 +1321,22 @@ Return new bitmap number, or nil of no more free bitmap slots. */)
1214 1321
1215 init_fringe_bitmap (n, xfb, 0); 1322 init_fringe_bitmap (n, xfb, 0);
1216 1323
1217 return which; 1324 return sym;
1218} 1325}
1219 1326
1220DEFUN ("set-fringe-bitmap-face", Fset_fringe_bitmap_face, Sset_fringe_bitmap_face, 1327DEFUN ("set-fringe-bitmap-face", Fset_fringe_bitmap_face, Sset_fringe_bitmap_face,
1221 1, 2, 0, 1328 1, 2, 0,
1222 doc: /* Set face for fringe bitmap FRINGE-ID to FACE. 1329 doc: /* Set face for fringe bitmap BITMAP to FACE.
1223If FACE is nil, reset face to default fringe face. */) 1330If FACE is nil, reset face to default fringe face. */)
1224 (fringe_id, face) 1331 (bitmap, face)
1225 Lisp_Object fringe_id, face; 1332 Lisp_Object bitmap, face;
1226{ 1333{
1334 int bn;
1227 int face_id; 1335 int face_id;
1228 1336
1229 CHECK_NUMBER (fringe_id); 1337 bn = resolve_fringe_bitmap (bitmap, 0);
1230 if (!valid_fringe_bitmap_id_p (XINT (fringe_id))) 1338 if (bn < 0)
1231 error ("Invalid fringe id"); 1339 error ("Undefined fringe bitmap");
1232 1340
1233 if (!NILP (face)) 1341 if (!NILP (face))
1234 { 1342 {
@@ -1239,7 +1347,7 @@ If FACE is nil, reset face to default fringe face. */)
1239 else 1347 else
1240 face_id = FRINGE_FACE_ID; 1348 face_id = FRINGE_FACE_ID;
1241 1349
1242 fringe_faces [XINT (fringe_id)] = face_id; 1350 fringe_faces [bn] = face_id;
1243 1351
1244 return Qnil; 1352 return Qnil;
1245} 1353}
@@ -1250,7 +1358,8 @@ DEFUN ("fringe-bitmaps-at-pos", Ffringe_bitmaps_at_pos, Sfringe_bitmaps_at_pos,
1250If WINDOW is nil, use selected window. If POS is nil, use value of point 1358If WINDOW is nil, use selected window. If POS is nil, use value of point
1251in that window. Return value is a cons (LEFT . RIGHT) where LEFT and RIGHT 1359in that window. Return value is a cons (LEFT . RIGHT) where LEFT and RIGHT
1252are the fringe bitmap numbers for the bitmaps in the left and right fringe, 1360are the fringe bitmap numbers for the bitmaps in the left and right fringe,
1253resp. Return nil if POS is not visible in WINDOW. */) 1361resp. If left or right fringe is empty, the corresponding element is nil.
1362Return nil if POS is not visible in WINDOW. */)
1254 (pos, window) 1363 (pos, window)
1255 Lisp_Object pos, window; 1364 Lisp_Object pos, window;
1256{ 1365{
@@ -1276,8 +1385,8 @@ resp. Return nil if POS is not visible in WINDOW. */)
1276 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); 1385 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
1277 row = row_containing_pos (w, textpos, row, NULL, 0); 1386 row = row_containing_pos (w, textpos, row, NULL, 0);
1278 if (row) 1387 if (row)
1279 return Fcons (make_number (row->left_fringe_bitmap), 1388 return Fcons (get_fringe_bitmap_name (row->left_fringe_bitmap),
1280 make_number (row->right_fringe_bitmap)); 1389 get_fringe_bitmap_name (row->right_fringe_bitmap));
1281 else 1390 else
1282 return Qnil; 1391 return Qnil;
1283} 1392}
@@ -1290,7 +1399,6 @@ resp. Return nil if POS is not visible in WINDOW. */)
1290void 1399void
1291syms_of_fringe () 1400syms_of_fringe ()
1292{ 1401{
1293
1294 defsubr (&Sdestroy_fringe_bitmap); 1402 defsubr (&Sdestroy_fringe_bitmap);
1295 defsubr (&Sdefine_fringe_bitmap); 1403 defsubr (&Sdefine_fringe_bitmap);
1296 defsubr (&Sfringe_bitmaps_at_pos); 1404 defsubr (&Sfringe_bitmaps_at_pos);
@@ -1305,6 +1413,10 @@ is at the final newline, the cursor is shown in the right fringe.
1305If nil, also continue lines which are exactly as wide as the window. */); 1413If nil, also continue lines which are exactly as wide as the window. */);
1306 Voverflow_newline_into_fringe = Qt; 1414 Voverflow_newline_into_fringe = Qt;
1307 1415
1416 DEFVAR_LISP ("fringe-bitmaps", &Vfringe_bitmaps,
1417 doc: /* List of fringe bitmap symbols.
1418You must (require 'fringe) to use fringe bitmap symbols in your programs." */);
1419 Vfringe_bitmaps = Qnil;
1308} 1420}
1309 1421
1310/* Initialize this module when Emacs starts. */ 1422/* Initialize this module when Emacs starts. */
diff --git a/src/xdisp.c b/src/xdisp.c
index 90399c06031..2820bbb3883 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -307,6 +307,7 @@ extern Lisp_Object Qheight;
307extern Lisp_Object QCwidth, QCheight, QCascent; 307extern Lisp_Object QCwidth, QCheight, QCascent;
308extern Lisp_Object Qscroll_bar; 308extern Lisp_Object Qscroll_bar;
309extern Lisp_Object Qcursor; 309extern Lisp_Object Qcursor;
310extern Lisp_Object Qfringe;
310 311
311/* Non-nil means highlight trailing whitespace. */ 312/* Non-nil means highlight trailing whitespace. */
312 313
@@ -3574,8 +3575,9 @@ handle_single_display_prop (it, prop, object, position,
3574 3575
3575#ifdef HAVE_WINDOW_SYSTEM 3576#ifdef HAVE_WINDOW_SYSTEM
3576 value = XCAR (XCDR (prop)); 3577 value = XCAR (XCDR (prop));
3577 if (!NUMBERP (value) 3578 if (!SYMBOLP (value)
3578 || !valid_fringe_bitmap_id_p (XINT (value))) 3579 || (value = Fget (value, Qfringe),
3580 !valid_fringe_bitmap_p (value)))
3579 return 0; 3581 return 0;
3580 3582
3581 if (CONSP (XCDR (XCDR (prop)))) 3583 if (CONSP (XCDR (XCDR (prop))))