Mercurial > emacs
changeset 83211:b85b19b8eb65
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
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 29 Sep 2004 08:38:15 +0000 |
parents | e2877f047180 (current diff) cee5a9d8ee71 (diff) |
children | f70dc61a797f |
files | ChangeLog lisp/ChangeLog lisp/files.el lisp/subr.el man/ChangeLog src/Makefile.in src/buffer.c src/config.in src/dispextern.h src/fringe.c src/xdisp.c |
diffstat | 66 files changed, 1873 insertions(+), 842 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Sep 23 13:21:01 2004 +0000 +++ b/ChangeLog Wed Sep 29 08:38:15 2004 +0000 @@ -1,3 +1,13 @@ +2004-09-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * configure.in (HAVE_EXECSHIELD): Only define on x86. + * configure: Rebuild. + +2004-09-24 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * configure.in: Check for exec-shield. + * configure: Rebuild. + 2004-08-06 Andreas Schwab <schwab@suse.de> * Makefile.in (install-arch-indep, uninstall): Add flymake.
--- a/configure Thu Sep 23 13:21:01 2004 +0000 +++ b/configure Wed Sep 29 08:38:15 2004 +0000 @@ -310,7 +310,7 @@ # include <unistd.h> #endif" -ac_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' +ac_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' ac_subst_files='' # Initialize some variables set by options. @@ -4278,6 +4278,92 @@ +echo "$as_me:$LINENO: checking for /proc/sys/kernel/exec-shield" >&5 +echo $ECHO_N "checking for /proc/sys/kernel/exec-shield... $ECHO_C" >&6 +if test "${ac_cv_file__proc_sys_kernel_exec_shield+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "/proc/sys/kernel/exec-shield"; then + ac_cv_file__proc_sys_kernel_exec_shield=yes +else + ac_cv_file__proc_sys_kernel_exec_shield=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file__proc_sys_kernel_exec_shield" >&5 +echo "${ECHO_T}$ac_cv_file__proc_sys_kernel_exec_shield" >&6 +if test $ac_cv_file__proc_sys_kernel_exec_shield = yes; then + emacs_cv_execshield=1 +else + emacs_cv_execshield=0 +fi + +if test "$emacs_cv_execshield" = 1; then + # Extract the first word of "setarch", so it can be a program name with args. +set dummy setarch; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_SETARCH+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SETARCH in + [\\/]* | ?:[\\/]*) + ac_cv_path_SETARCH="$SETARCH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SETARCH="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_SETARCH" && ac_cv_path_SETARCH="no" + ;; +esac +fi +SETARCH=$ac_cv_path_SETARCH + +if test -n "$SETARCH"; then + echo "$as_me:$LINENO: result: $SETARCH" >&5 +echo "${ECHO_T}$SETARCH" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + if test "$setarch" != no && test "$machine" = "intel386"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_EXECSHIELD 1 +_ACEOF + + else + case "`cat /proc/sys/kernel/exec-shield`" in + 0) ;; + *) + { { echo "$as_me:$LINENO: error: Exec-shield is turned on. +Emacs can not dump itself if exec-shield is turned on. +See \`etc/PROBLEMS' for further information." >&5 +echo "$as_me: error: Exec-shield is turned on. +Emacs can not dump itself if exec-shield is turned on. +See \`etc/PROBLEMS' for further information." >&2;} + { (exit 1); exit 1; }; } + esac + fi +fi + #### Extract some information from the operating system and machine files. { echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out @@ -13277,7 +13363,6 @@ - for ac_func in gethostname getdomainname dup2 \ rename closedir mkdir rmdir sysinfo \ random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ @@ -13286,7 +13371,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ sendto recvfrom getsockopt setsockopt getsockname getpeername \ gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \ -memset memcmp memmove difftime memcpy mempcpy mblen mbrlen posix_memalign +memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 @@ -22002,6 +22087,7 @@ s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@INSTALL_INFO@,$INSTALL_INFO,;t t s,@EGREP@,$EGREP,;t t +s,@SETARCH@,$SETARCH,;t t s,@LIBSOUND@,$LIBSOUND,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t
--- a/configure.in Thu Sep 23 13:21:01 2004 +0000 +++ b/configure.in Wed Sep 29 08:38:15 2004 +0000 @@ -1286,6 +1286,26 @@ dnl checks for Unix variants AC_AIX +dnl check if exec-shield is present. +AC_CHECK_FILE(/proc/sys/kernel/exec-shield, emacs_cv_execshield=1, + emacs_cv_execshield=0) +if test "$emacs_cv_execshield" = 1; then + AC_PATH_PROG(SETARCH, setarch, no) + AC_SUBST(SETARCH) + if test "$setarch" != no && test "$machine" = "intel386"; then + AC_DEFINE(HAVE_EXECSHIELD, 1, + [Define to 1 if this OS has exec shield and we can handle it.]) + else + case "`cat /proc/sys/kernel/exec-shield`" in + 0) ;; + *) + AC_MSG_ERROR([Exec-shield is turned on. +Emacs can not dump itself if exec-shield is turned on. +See `etc/PROBLEMS' for further information.]) + esac + fi +fi + #### Extract some information from the operating system and machine files. AC_CHECKING([the machine- and system-dependent files to find out @@ -2342,7 +2362,7 @@ __fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \ sendto recvfrom getsockopt setsockopt getsockname getpeername \ gai_strerror mkstemp getline getdelim mremap memmove fsync bzero \ -memset memcmp memmove difftime memcpy mempcpy mblen mbrlen posix_memalign) +memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign) AC_CHECK_HEADERS(sys/un.h)
--- a/etc/ChangeLog Thu Sep 23 13:21:01 2004 +0000 +++ b/etc/ChangeLog Wed Sep 29 08:38:15 2004 +0000 @@ -1,3 +1,18 @@ +2004-09-26 Luc Teirlinck <teirllm@auburn.edu> + + * enriched.doc: `enriched-annotation-alist' is now called + `enriched-translations'. + +2004-09-26 Dan Nicolaescu <dann@ics.uci.edu> + + * e/eterm.ti: Comment out smcup, rmcup. Add kbs, kdch1, rc, sc. + Reformat. + * e/eterm: Regenerate. + +2004-09-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * PROBLEMS: Updated exec-shield description. + 2004-09-16 Dan Nicolaescu <dann@ics.uci.edu> * e/eterm.ti: Change the strings for smso and rmso.
--- a/etc/NEWS Thu Sep 23 13:21:01 2004 +0000 +++ b/etc/NEWS Wed Sep 29 08:38:15 2004 +0000 @@ -1409,6 +1409,7 @@ year and day number, and moves to that date. Negative day numbers count backward from the end of the year. +--- ** The functions `holiday-easter-etc' and `holiday-advent' now take arguments, and only report on the specified holiday rather than all. This makes customization of the variable `christian-holidays' simpler, @@ -2254,6 +2255,7 @@ * Lisp Changes in Emacs 21.4 ++++ ** Major mode functions now run the new normal hook `after-change-major-mode-hook', at their very end, after the mode hooks.
--- a/etc/PROBLEMS Thu Sep 23 13:21:01 2004 +0000 +++ b/etc/PROBLEMS Wed Sep 29 08:38:15 2004 +0000 @@ -2329,28 +2329,34 @@ *** Linux: Segfault during `make bootstrap' under certain recent versions of the Linux kernel. With certain recent Linux kernels (like the one of Redhat Fedora Core -1), the new "Exec-shield" functionality is enabled by default, which +1 and 2), the new "Exec-shield" functionality is enabled by default, which creates a different memory layout that breaks the emacs dumper. +Configure can overcome the problem of exec-shield if the architecture is +x86 and the program setarch is present. On other architectures no +workaround is known. + You can check the Exec-shield state like this: cat /proc/sys/kernel/exec-shield -It returns 1 or 2 when Exec-shield is enabled, 0 otherwise. Please +It returns non-zero when Exec-shield is enabled, 0 otherwise. Please read your system documentation for more details on Exec-shield and -associated commands. +associated commands. Exec-shield can be turned off with this command: + + echo "0" > /proc/sys/kernel/exec-shield When Exec-shield is enabled, building Emacs will segfault during the execution of this command: -temacs --batch --load loadup [dump|bootstrap] + ./temacs --batch --load loadup [dump|bootstrap] To work around this problem, it is necessary to temporarily disable -Exec-shield while building Emacs, using the `setarch' command like -this: - - setarch i386 ./configure <configure parameters> - setarch i386 make <make parameters> +Exec-shield while building Emacs, or, on x86, by using the `setarch' +command when running temacs like this: + + setarch i386 ./temacs --batch --load loadup [dump|bootstrap] + *** Fatal signal in the command temacs -l loadup inc dump.
--- a/etc/e/eterm.ti Thu Sep 23 13:21:01 2004 +0000 +++ b/etc/e/eterm.ti Wed Sep 29 08:38:15 2004 +0000 @@ -1,21 +1,61 @@ eterm, - lines#24,cols#80, - colors#8,pairs#64, - cuu1=\E[A,cud1=\n,cub1=\b,cuf1=\E[C,home=\E[H,cr=\r, - cuu=\E[%p1%dA,cud=\E[%p1%dB,cub=\E[%p1%dD,cuf=\E[%p1%dC, + colors#8, + cols#80, + lines#24, + pairs#64, + am, + mir, + xenl, + bel=^G, + bold=\E[1m, + clear=\E[H\E[J, + cr=\r, + csr=\E[%i%p1%d;%p2%dr, + cub1=\b, + cub=\E[%p1%dD, + cud1=\n, + cud=\E[%p1%dB, + cuf1=\E[C, + cuf=\E[%p1%dC, cup=\E[%i%p1%d;%p2%dH, - ind=\n,csr=\E[%i%p1%d;%p2%dr, - il1=\E[L,il=\E[%p1%dL, - clear=\E[H\E[J,ed=\E[J,el=\E[K,el1=\E[1K, - dl1=\E[M,dl=\E[%p1%dM,dch1=\E[P,dch=\E[%p1%dP, - smir=\E[4h,rmir=\E[4l,ich=\E[%p1%d@,mir, - smcup=\E7\E[?47h,rmcup=\E[2J\E[?47l\E8, - ht=\t,khome=\E[1~,kend=\E[4~,knp=\E[6~,kpp=\E[5~, - kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, - smso=\E[7m,rmso=\E[27m, - smul=\E[4m,rmul=\E[24m, - rev=\E[7m,bold=\E[1m,sgr0=\E[m, - invis=\E[8m,op=\E[39;49m, - setab=\E[%p1%{40}%+%dm, setaf=\E[%p1%{30}%+%dm, - bel=^G,xenl,am, - + cuu1=\E[A, + cuu=\E[%p1%dA, + dch1=\E[P, + dch=\E[%p1%dP, + dl1=\E[M, + dl=\E[%p1%dM, + ed=\E[J, + el1=\E[1K, + el=\E[K, + home=\E[H, + ht=\t, + ich=\E[%p1%d@, + il1=\E[L, + il=\E[%p1%dL, + ind=\n, + invis=\E[8m, + kbs=^?, + kcub1=\EOD, + kcud1=\EOB, + kcuf1=\EOC, + kcuu1=\EOA, + kdch1=\E[3~, + kend=\E[4~, + khome=\E[1~, + knp=\E[6~, + kpp=\E[5~, + op=\E[39;49m, + rc=\E8, + rev=\E[7m, + rmir=\E[4l, + rmso=\E[27m, + rmul=\E[24m, + sc=\E7, + setab=\E[%p1%{40}%+%dm, + setaf=\E[%p1%{30}%+%dm, + sgr0=\E[m, + smir=\E[4h, + smul=\E[4m, + smso=\E[7m, +# smcup=\E[?47h, +# rmcup=\E[?47l,
--- a/etc/enriched.doc Thu Sep 23 13:21:01 2004 +0000 +++ b/etc/enriched.doc Wed Sep 29 08:38:15 2004 +0000 @@ -196,11 +196,11 @@ enriched-verbose. </fixed></indent>-<indent> You can add annotations for your own text properties by making -additions to <fixed>enriched-annotation-alist</fixed>. Note that the -standard requires you to name your annotation starting<italic> "x-" -</italic>(as in <italic>"x-read-only"</italic>). Please send me any such additions that -you think might be of general interest so that I can include -them in the distribution.</indent> +additions to <fixed>enriched-translations</fixed>. Note that the standard +requires you to name your annotation starting<italic> "x-" </italic>(as in +<italic>"x-read-only"</italic>). Please send me any such additions that you +think might be of general interest so that I can include them +in the distribution.</indent> </indent>
--- a/leim/ChangeLog Thu Sep 23 13:21:01 2004 +0000 +++ b/leim/ChangeLog Wed Sep 29 08:38:15 2004 +0000 @@ -1,3 +1,8 @@ +2004-09-25 Kenichi Handa <handa@m17n.org> + + * quail/uni-input.el (ucs-input-method): Add error clause to + condition-case. + 2004-09-21 Kenichi Handa <handa@m17n.org> * quail/uni-input.el: Move the call of register-input-method to
--- a/leim/quail/uni-input.el Thu Sep 23 13:21:01 2004 +0000 +++ b/leim/quail/uni-input.el Wed Sep 29 08:38:15 2004 +0000 @@ -99,8 +99,9 @@ (ucs-input-insert-char key)) (let ((last-command-char key) (current-prefix-arg)) - (condition-case nil - (call-interactively (key-binding seq)))) + (condition-case err + (call-interactively (key-binding seq)) + (quail-error (message "%s" (cdr err)) (beep)))) (quail-delete-region) (throw 'non-digit (append (reverse events) (listify-key-sequence seq))))))
--- a/lisp/ChangeLog Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/ChangeLog Wed Sep 29 08:38:15 2004 +0000 @@ -1,4 +1,116 @@ -2004-09-23 H,Ae(Bkon Malmedal <hmalmedal@yahoo.no> +2004-09-28 Stefan <monnier@iro.umontreal.ca> + + * dired.el (dired-view-command-alist): Use more efficient regexps. + Remove dubious arguments. + (dired-align-file): New function. + (dired-insert-directory): Use it. + (dired-move-to-end-of-filename): Make the " -> " search more specific. + (dired-buffers-for-dir): Remove unused var `pattern'. + +2004-09-29 Kim F. Storm <storm@cua.dk> + + * progmodes/gdb-ui.el (breakpoint): Define as fringe bitmap. + (gdb-mouse-toggle-breakpoint): Fix fringe-bitmaps-at-pos usage. + (gdb-put-breakpoint-icon): Use breakpoint bitmap. + + * fringe.el (fringe-bitmap-p): New macro. + (fringe-bitmaps): Add standard fringe bitmaps on load. + +2004-09-28 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change) + + * calendar/diary-lib.el (list-diary-entries): Save diary buffer + from diary display excursion. Store diary buffer's point for + `simple-diary-display'. + (simple-diary-display): Set window point and start when + displaying buffer, to preserve point. + +2004-09-27 Luc Teirlinck <teirllm@auburn.edu> + + * textmodes/enriched.el (enriched-translations): Replace defconst + with defvar. + +2004-09-26 Vinicius Jose Latorre <viniciusjl@ig.com.br> + + * printing.el: Doc fix. + (pr-version): New version number (6.8.1). + (pr-ps-file-using-ghostscript): Use make-temp-file instead of + make-temp-name. + (pr-delete-file): Check if file exists before deleting it. Reported by + Lennart Borgman <lennart.borgman.073@student.lu.se>. + +2004-09-26 Stefan <monnier@iro.umontreal.ca> + + * term.el (term-display-table): New variable. + (term-mode): Use it. + (term-exec-1): Set the coding system to binary. + (term-emulate-terminal): Decode the string before inserting it. + +2004-09-26 Dan Nicolaescu <dann@ics.uci.edu> + + * term.el (term-ansi-at-eval-string, term-ansi-default-fg) + (term-ansi-default-bg, term-ansi-current-temp): Delete unused + vars. + (map): Bind S-prior, S-next and S-insert. + (term-mode): Set `indent-tabs-mode' to nil. + (term-paste): New function to be bound to S-insert. + (term-send-del, term-send-backspace): Change the strings sent. + (term-termcap-format): Synchronyze with etc/e/eterm.ti. + (term-handle-colors-array): Fix handling of underline and reverse. + (term-handle-ansi-escape): Do not handle smcup/rmcup. Add + comments. + (term-erase-in-line): Fix comparison. + (term-emulate-terminal): Fix line wrap handling. + (term-start-output-log): Renamed from `term-set-output-log'. + (term-stop-output-log): Renamed from `term-stop-photo'. + (term-switch-to-alternate-sub-buffer): Comment out, unused. + +2004-09-25 Stefan <monnier@iro.umontreal.ca> + + * dired.el (dired-move-to-filename): Don't output a message if + raise-error is non-nil. Fix return position and value. + + * files.el (insert-directory): Obey --dired even with symlinks. + +2004-09-25 Lars Hansen <larsh@math.ku.dk> + + * ls-lisp.el (ls-lisp-format): Mark file names with property + dired-filename. + +2004-09-25 Kim F. Storm <storm@cua.dk> + + * ido.el (ido-max-directory-size): New defcustom. + (ido-decorations): Add "too big" element. + (ido-directory-too-big): New dynamic var. + (ido-may-cache-directory): Don't cache big directories. + (ido-directory-too-big-p): New defun. + (ido-set-current-directory): Update ido-directory-too-big. + (ido-read-internal): Make empty ido-cur-item if too-big. + (ido-buffer-internal): Use ido-read-internal directly instead of + ido-read-buffer. + (ido-file-internal): Init ido-directory-too-big. + (ido-complete): <TAB> If ido-directory-too-big is set, clear it, + and redo completion with full list. + (ido-toggle-ignore): <C-a> If ido-directory-too-big is set, clear + it, and show completions. + (ido-all-completions): Let bind ido-directory-too-big to nil. + (ido-exhibit): Handle ido-directory-too-big. + (ido-read-buffer): Handle fallback to read-buffer. + Init ido-directory-too-big. + (ido-read-file-name, ido-read-directory-name, ido-completing-read): + Init ido-directory-too-big. + +2004-09-24 Luc Teirlinck <teirllm@auburn.edu> + + * subr.el (delay-mode-hooks): Doc fix. + +2004-09-23 Luc Teirlinck <teirllm@auburn.edu> + + * textmodes/enriched.el + (enriched-default-text-properties-local-flag): New variable. + (enriched-mode): Make sure that enabling and disabling the mode is + a no-op. Doc fix. + +2004-09-23 H,Ae(Bkon Malmedal <hmalmedal@yahoo.no> (tiny change) * calendar/holidays.el (holiday-advent): Report on a specified day offset from advent, not just advent.
--- a/lisp/calendar/diary-lib.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/calendar/diary-lib.el Wed Sep 29 08:38:15 2004 +0000 @@ -4,6 +4,7 @@ ;; Free Software Foundation, Inc. ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> +;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk> ;; Keywords: calendar ;; This file is part of GNU Emacs. @@ -296,6 +297,8 @@ :type 'sexp :version "21.4") +(defvar diary-saved-point) ; internal + (defun list-diary-entries (date number) "Create and display a buffer containing the relevant lines in diary-file. The arguments are DATE and NUMBER; the entries selected are those @@ -345,112 +348,116 @@ (set-buffer diary-buffer) (or (verify-visited-file-modtime diary-buffer) (revert-buffer t t)))) - (setq file-glob-attrs (nth 1 (diary-pull-attrs nil ""))) - (setq selective-display t) - (setq selective-display-ellipses nil) - (if diary-header-line-flag - (setq header-line-format diary-header-line-format)) - (setq old-diary-syntax-table (syntax-table)) - (set-syntax-table diary-syntax-table) - (unwind-protect - (let ((buffer-read-only nil) - (diary-modified (buffer-modified-p)) - (mark (regexp-quote diary-nonmarking-symbol))) - ;; First and last characters must be ^M or \n for - ;; selective display to work properly - (goto-char (1- (point-max))) - (if (not (looking-at "\^M\\|\n")) - (progn - (goto-char (point-max)) - (insert "\^M"))) - (goto-char (point-min)) - (if (not (looking-at "\^M\\|\n")) - (insert "\^M")) - (subst-char-in-region (point-min) (point-max) ?\n ?\^M t) - (calendar-for-loop i from 1 to number do - (let ((d diary-date-forms) - (month (extract-calendar-month date)) - (day (extract-calendar-day date)) - (year (extract-calendar-year date)) - (entry-found (list-sexp-diary-entries date))) - (while d - (let* - ((date-form (if (equal (car (car d)) 'backup) - (cdr (car d)) - (car d))) - (backup (equal (car (car d)) 'backup)) - (dayname - (format "%s\\|%s\\.?" - (calendar-day-name date) - (calendar-day-name date 'abbrev))) - (monthname - (format "\\*\\|%s\\|%s\\.?" - (calendar-month-name month) - (calendar-month-name month 'abbrev))) - (month (concat "\\*\\|0*" (int-to-string month))) - (day (concat "\\*\\|0*" (int-to-string day))) - (year - (concat - "\\*\\|0*" (int-to-string year) - (if abbreviated-calendar-year - (concat "\\|" (format "%02d" (% year 100))) - ""))) - (regexp - (concat - "\\(\\`\\|\^M\\|\n\\)" mark "?\\(" - (mapconcat 'eval date-form "\\)\\(") - "\\)")) - (case-fold-search t)) - (goto-char (point-min)) - (while (re-search-forward regexp nil t) - (if backup (re-search-backward "\\<" nil t)) - (if (and (or (char-equal (preceding-char) ?\^M) - (char-equal (preceding-char) ?\n)) - (not (looking-at " \\|\^I"))) - ;; Diary entry that consists only of date. - (backward-char 1) - ;; Found a nonempty diary entry--make it visible and - ;; add it to the list. - (setq entry-found t) - (let ((entry-start (point)) - date-start temp) - (re-search-backward "\^M\\|\n\\|\\`") - (setq date-start (point)) - (re-search-forward "\^M\\|\n" nil t 2) - (while (looking-at " \\|\^I") - (re-search-forward "\^M\\|\n" nil t)) - (backward-char 1) - (subst-char-in-region date-start - (point) ?\^M ?\n t) - (setq entry (buffer-substring entry-start (point)) - temp (diary-pull-attrs entry file-glob-attrs) - entry (nth 0 temp)) - (add-to-diary-list - date - entry - (buffer-substring - (1+ date-start) (1- entry-start)) - (copy-marker entry-start) (nth 1 temp)))))) - (setq d (cdr d))) - (or entry-found - (not diary-list-include-blanks) - (setq diary-entries-list - (append diary-entries-list - (list (list date "" "" "" ""))))) - (setq date - (calendar-gregorian-from-absolute - (1+ (calendar-absolute-from-gregorian date)))) - (setq entry-found nil))) - (set-buffer-modified-p diary-modified)) - (set-syntax-table old-diary-syntax-table)) - (goto-char (point-min)) - (run-hooks 'nongregorian-diary-listing-hook - 'list-diary-entries-hook) - (if diary-display-hook - (run-hooks 'diary-display-hook) - (simple-diary-display)) - (run-hooks 'diary-hook) - diary-entries-list)))) + ;; d-s-p is passed to the diary display function. + (let ((diary-saved-point (point))) + (save-excursion + (setq file-glob-attrs (nth 1 (diary-pull-attrs nil ""))) + (setq selective-display t) + (setq selective-display-ellipses nil) + (if diary-header-line-flag + (setq header-line-format diary-header-line-format)) + (setq old-diary-syntax-table (syntax-table)) + (set-syntax-table diary-syntax-table) + (unwind-protect + (let ((buffer-read-only nil) + (diary-modified (buffer-modified-p)) + (mark (regexp-quote diary-nonmarking-symbol))) + ;; First and last characters must be ^M or \n for + ;; selective display to work properly + (goto-char (1- (point-max))) + (if (not (looking-at "\^M\\|\n")) + (progn + (goto-char (point-max)) + (insert "\^M"))) + (goto-char (point-min)) + (if (not (looking-at "\^M\\|\n")) + (insert "\^M")) + (subst-char-in-region (point-min) (point-max) ?\n ?\^M t) + (calendar-for-loop + i from 1 to number do + (let ((d diary-date-forms) + (month (extract-calendar-month date)) + (day (extract-calendar-day date)) + (year (extract-calendar-year date)) + (entry-found (list-sexp-diary-entries date))) + (while d + (let* + ((date-form (if (equal (car (car d)) 'backup) + (cdr (car d)) + (car d))) + (backup (equal (car (car d)) 'backup)) + (dayname + (format "%s\\|%s\\.?" + (calendar-day-name date) + (calendar-day-name date 'abbrev))) + (monthname + (format "\\*\\|%s\\|%s\\.?" + (calendar-month-name month) + (calendar-month-name month 'abbrev))) + (month (concat "\\*\\|0*" (int-to-string month))) + (day (concat "\\*\\|0*" (int-to-string day))) + (year + (concat + "\\*\\|0*" (int-to-string year) + (if abbreviated-calendar-year + (concat "\\|" (format "%02d" (% year 100))) + ""))) + (regexp + (concat + "\\(\\`\\|\^M\\|\n\\)" mark "?\\(" + (mapconcat 'eval date-form "\\)\\(") + "\\)")) + (case-fold-search t)) + (goto-char (point-min)) + (while (re-search-forward regexp nil t) + (if backup (re-search-backward "\\<" nil t)) + (if (and (or (char-equal (preceding-char) ?\^M) + (char-equal (preceding-char) ?\n)) + (not (looking-at " \\|\^I"))) + ;; Diary entry that consists only of date. + (backward-char 1) + ;; Found a nonempty diary entry--make it + ;; visible and add it to the list. + (setq entry-found t) + (let ((entry-start (point)) + date-start temp) + (re-search-backward "\^M\\|\n\\|\\`") + (setq date-start (point)) + (re-search-forward "\^M\\|\n" nil t 2) + (while (looking-at " \\|\^I") + (re-search-forward "\^M\\|\n" nil t)) + (backward-char 1) + (subst-char-in-region date-start + (point) ?\^M ?\n t) + (setq entry (buffer-substring entry-start (point)) + temp (diary-pull-attrs entry file-glob-attrs) + entry (nth 0 temp)) + (add-to-diary-list + date + entry + (buffer-substring + (1+ date-start) (1- entry-start)) + (copy-marker entry-start) (nth 1 temp)))))) + (setq d (cdr d))) + (or entry-found + (not diary-list-include-blanks) + (setq diary-entries-list + (append diary-entries-list + (list (list date "" "" "" ""))))) + (setq date + (calendar-gregorian-from-absolute + (1+ (calendar-absolute-from-gregorian date)))) + (setq entry-found nil))) + (set-buffer-modified-p diary-modified)) + (set-syntax-table old-diary-syntax-table)) + (goto-char (point-min)) + (run-hooks 'nongregorian-diary-listing-hook + 'list-diary-entries-hook) + (if diary-display-hook + (run-hooks 'diary-display-hook) + (simple-diary-display)) + (run-hooks 'diary-hook) + diary-entries-list)))))) (defun include-other-diary-files () "Include the diary entries from other diary files with those of diary-file. @@ -528,8 +535,12 @@ (setq buffer-read-only t) (display-buffer holiday-buffer) (message "No diary entries for %s" date-string)) - (display-buffer (find-buffer-visiting - (substitute-in-file-name diary-file))) + (with-current-buffer + (find-buffer-visiting (substitute-in-file-name diary-file)) + (let ((window (display-buffer (current-buffer)))) + ;; d-s-p is passed from list-diary-entries. + (set-window-point window diary-saved-point) + (set-window-start window (point-min)))) (message "Preparing diary...done")))) (defface diary-button-face '((((type pc) (class color))
--- a/lisp/dired.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/dired.el Wed Sep 29 08:38:15 2004 +0000 @@ -202,10 +202,11 @@ ;; Fixme: This should use mailcap. (defcustom dired-view-command-alist - '(("[.]\\(ps\\|ps_pages\\|eps\\)\\'" . "gv -spartan -color -watch %s") - ("[.]pdf\\'" . "xpdf %s") - ("[.]\\(jpe?g\\|gif\\|png\\)\\'" . "eog %s") - ("[.]dvi\\'" . "xdvi -sidemargin 0.5 -topmargin 1 %s")) + '(("\\.\\(ps\\|ps_pages\\|eps\\)\\'" . "gv %s") + ("\\.pdf\\'" . "xpdf %s") + ;; ("\\.pod\\'" . "perldoc %s") + ("\\.\\(jpe?g\\|gif\\|png\\)\\'" . "eog %s") + ("\\.dvi\\'" . "xdvi %s")) "Alist specifying how to view special types of files. Each element has the form (REGEXP . SHELL-COMMAND). When the file name matches REGEXP, `dired-view-file' @@ -797,6 +798,112 @@ (dired-insert-directory dir dired-actual-switches file-list (not file-list) t))))) +(defun dired-align-file (beg end) + "Align the fields of a file to the ones of surrounding lines. +BEG..END is the line where the file info is located." + ;; Some versions of ls try to adjust the size of each field so as to just + ;; hold the largest element ("largest" in the current invocation, of + ;; course). So when a single line is output, the size of each field is + ;; just big enough for that one output. Thus when dired refreshes one + ;; line, the alignment if this line w.r.t the rest is messed up because + ;; the fields of that one line will generally be smaller. + ;; + ;; To work around this problem, we here add spaces to try and re-align the + ;; fields as needed. Since this is purely aesthetic, it is of utmost + ;; importance that it doesn't mess up anything like + ;; `dired-move-to-filename'. To this end, we limit ourselves to adding + ;; spaces only, and to only add them at places where there was already at + ;; least one space. This way, as long as `dired-move-to-filename-regexp' + ;; always matches spaces with "*" or "+", we know we haven't made anything + ;; worse. There is one spot where the exact number of spaces is + ;; important, which is just before the actual filename, so we refrain from + ;; adding spaces there (and within the filename as well, of course). + (save-excursion + (let (file file-col other other-col) + ;; Check the there is indeed a file, and that there is anoter adjacent + ;; file with which to align, and that additional spaces are needed to + ;; align the filenames. + (when (and (setq file (progn (goto-char beg) + (dired-move-to-filename nil end))) + (setq file-col (current-column)) + (setq other + (or (and (goto-char beg) + (zerop (forward-line -1)) + (dired-move-to-filename)) + (and (goto-char beg) + (zerop (forward-line 1)) + (dired-move-to-filename)))) + (setq other-col (current-column)) + (/= file other) + ;; Make sure there is some work left to do. + (> other-col file-col)) + ;; If we've only looked at the line above, check to see if the line + ;; below exists as well and if so, align with the shorter one. + (when (and (< other file) + (goto-char beg) + (zerop (forward-line 1)) + (dired-move-to-filename)) + (let ((alt-col (current-column))) + (when (< alt-col other-col) + (setq other-col alt-col) + (setq other (point))))) + ;; Keep positions uptodate when we insert stuff. + (if (> other file) (setq other (copy-marker other))) + (setq file (copy-marker file)) + ;; Main loop. + (goto-char beg) + (while (and (> other-col file-col) + (skip-chars-forward "^ ") + ;; Skip the spaces, and make sure there's at least one. + (> (skip-chars-forward " ") 0) + ;; Don't touch anything just before (and after) the + ;; beginning of the filename. + (> file (point))) + ;; We're now just in front of a field, with a space behind us. + (let* ((curcol (current-column)) + ;; Nums are right-aligned. + (num-align (looking-at "[0-9]")) + ;; Let's look at the other line, in the same column: we + ;; should be either near the end of the previous field, or + ;; in the space between that field and the next. + ;; [ Of course, it's also possible that we're already within + ;; the next field or even past it, but that's unlikely since + ;; other-col > file-col. ] + ;; Let's find the distance to the alignment-point (either + ;; the beginning or the end of the next field, depending on + ;; whether this field is left or right aligned). + (align-pt-offset + (save-excursion + (goto-char other) + (move-to-column curcol) + (when (looking-at + (concat + (if (eq (char-before) ?\ ) " *" "[^ ]* *") + (if num-align "[0-9][^ ]*"))) + (- (match-end 0) (match-beginning 0))))) + ;; Now, the number of spaces to insert is align-pt-offset + ;; minus the distance to the equivalent point on the + ;; current line. + (spaces + (if (not num-align) + align-pt-offset + (and align-pt-offset + (save-excursion + (skip-chars-forward "^ ") + (- align-pt-offset (- (current-column) curcol))))))) + (when (and spaces (> spaces 0)) + (setq file-col (+ spaces file-col)) + (if (> file-col other-col) + (setq spaces (- spaces (- file-col other-col)))) + (insert-char ?\s spaces) + ;; Let's just make really sure we did not mess up. + (unless (save-excursion + (equal (dired-move-to-filename) (marker-position file))) + ;; Damn! We messed up: let's revert the change. + (delete-char (- spaces)))))) + (set-marker file nil))))) + + (defun dired-insert-directory (dir switches &optional file-list wildcard hdr) "Insert a directory listing of DIR, Dired style. Use SWITCHES to make the listings. @@ -815,7 +922,10 @@ ;; with the new value of dired-move-to-filename-regexp. (if file-list (dolist (f file-list) - (insert-directory f switches nil nil)) + (let ((beg (point))) + (insert-directory f switches nil nil) + ;; Re-align fields, if necessary. + (dired-align-file beg (point)))) (insert-directory dir switches wildcard (not wildcard))) ;; Quote certain characters, unless ls quoted them for us. (if (not (string-match "b" dired-actual-switches)) @@ -1762,6 +1872,8 @@ ;; Move to first char of filename on this line. ;; Returns position (point) or nil if no filename on this line." (defun dired-move-to-filename (&optional raise-error eol) + "Move to the beginning of the filename on the current line. +Return the position of the beginning of the filename, or nil if none found." ;; This is the UNIX version. (or eol (setq eol (line-end-position))) (beginning-of-line) @@ -1774,8 +1886,10 @@ (goto-char (match-end 0))) ((re-search-forward dired-permission-flags-regexp eol t) ;; Ha! There *is* a file. Our regexp-from-hell just failed to find it. - (funcall (if raise-error 'error 'message) - "Unrecognized line! Check dired-move-to-filename-regexp")) + (if raise-error + (error "Unrecognized line! Check dired-move-to-filename-regexp")) + (beginning-of-line) + nil) (raise-error (error "No file on this line"))))) @@ -1818,9 +1932,9 @@ (or no-error (error "No file on this line")))) ;; Move point to end of name: (if symlink - (if (search-forward " ->" eol t) + (if (search-forward " -> " eol t) (progn - (forward-char -3) + (forward-char -4) (and used-F dired-ls-F-marks-symlinks (eq (preceding-char) ?@) ;; did ls really mark the link? @@ -1885,7 +1999,7 @@ ;; As a side effect, killed dired buffers for DIR are removed from ;; dired-buffers. (setq dir (file-name-as-directory dir)) - (let ((alist dired-buffers) result elt buf pattern) + (let ((alist dired-buffers) result elt buf) (while alist (setq elt (car alist) buf (cdr elt))
--- a/lisp/files.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/files.el Wed Sep 29 08:38:15 2004 +0000 @@ -4376,7 +4376,8 @@ (while (< (point) end) (let ((start (+ beg (read (current-buffer)))) (end (+ beg (read (current-buffer))))) - (if (= (char-after end) ?\n) + (if (memq (char-after end) '(?\n ?\ )) + ;; End is followed by \n or by " -> ". (put-text-property start end 'dired-filename t) ;; It seems that we can't trust ls's output as to ;; byte positions of filenames.
--- a/lisp/fringe.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/fringe.el Wed Sep 29 08:38:15 2004 +0000 @@ -37,27 +37,29 @@ ;; Standard fringe bitmaps -(defconst no-fringe-bitmap 0) -(defconst undef-fringe-bitmap 1) -(defconst left-truncation-fringe-bitmap 2) -(defconst right-truncation-fringe-bitmap 3) -(defconst up-arrow-fringe-bitmap 4) -(defconst down-arrow-fringe-bitmap 5) -(defconst continued-line-fringe-bitmap 6) -(defconst continuation-line-fringe-bitmap 7) -(defconst overlay-arrow-fringe-bitmap 8) -(defconst top-left-angle-fringe-bitmap 9) -(defconst top-right-angle-fringe-bitmap 10) -(defconst bottom-left-angle-fringe-bitmap 11) -(defconst bottom-right-angle-fringe-bitmap 12) -(defconst left-bracket-fringe-bitmap 13) -(defconst right-bracket-fringe-bitmap 14) -(defconst filled-box-cursor-fringe-bitmap 15) -(defconst hollow-box-cursor-fringe-bitmap 16) -(defconst hollow-square-fringe-bitmap 17) -(defconst bar-cursor-fringe-bitmap 18) -(defconst hbar-cursor-fringe-bitmap 19) -(defconst empty-line-fringe-bitmap 20) +(defmacro fringe-bitmap-p (symbol) + "Return non-nil if SYMBOL is a fringe bitmap." + `(get ,symbol 'fringe)) + +(defvar fringe-bitmaps) + +(unless (get 'left-truncation 'fringe) + (let ((bitmaps '(left-truncation right-truncation + up-arrow down-arrow + continued-line continuation-line + overlay-arrow + top-left-angle top-right-angle + bottom-left-angle bottom-right-angle + left-bracket right-bracket + filled-box-cursor hollow-box-cursor hollow-square + bar-cursor hbar-cursor + empty-line)) + (bn 2)) + (while bitmaps + (push (car bitmaps) fringe-bitmaps) + (put (car bitmaps) 'fringe bn) + (setq bitmaps (cdr bitmaps) + bn (1+ bn))))) ;; Control presence of fringes @@ -228,7 +230,7 @@ (window-fringes)) 0) (float (frame-char-width)))) - + (provide 'fringe) ;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d
--- a/lisp/gnus/ChangeLog Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/ChangeLog Wed Sep 29 08:38:15 2004 +0000 @@ -1,3 +1,77 @@ +2004-09-28 Jesper Harder <harder@ifa.au.dk> + + * gnus-picon.el: Require cl. + + * mml-sec.el (mml-signencrypt-style): Don't depend on Gnus. + + * mml-smime.el: Require cl. Autoload message-fetch-field. + + * gnus-fun.el: Require gnus-ems and gnus-util. + + * gnus-diary.el (gnus-diary-header-schedule): caddr -> car (cddr + + * gnus-art.el (gnus-article-edit-mode): Define before first + reference. + + * gnus.el (gnus-method-to-server): Move defsubst before first use. + + * spam.el (spam-check-spamoracle, spam-spamoracle-learn): Fix + format string mismatch. + * nnml.el (nnml-request-set-mark, nnml-save-marks): do. + * nnfolder.el (nnfolder-request-set-mark, nnfolder-save-marks): do. + +2004-09-27 Reiner Steib <Reiner.Steib@gmx.de> + + * gnus.el (gnus-version-number): Set to 5.11. + +2004-09-27 Katsumi Yamaoka <yamaoka@jpl.org> + + * mm-decode.el (mm-copy-to-buffer): Don't use set-buffer-multibyte. + +2004-09-26 Jesper Harder <harder@ifa.au.dk> + + * gnus-msg.el (gnus-post-news): Use blank Newsgroups line if + GROUP is a virtual group. + + * mm-util.el (mm-charset-synonym-alist): Remove obsolete entries + for big5 and gb2312. + + * rfc2047.el (rfc2047-pad-base64): Deal with more cases of invalid + padding. + + * mm-bodies.el (mm-7bit-chars): Don't include \r. + + * mml.el (mml-compute-boundary-1): Don't uncompress files. + + * rfc2047.el (rfc2047-qp-or-base64): New function to reduce + dependencies. + (rfc2047-encode): Use it. + + * flow-fill.el: Typo. + + * mml.el (mml-generate-mime-1): Don't use format=flowed with + inline PGP. + + * gnus.el (gnus-getenv-nntpserver): Strip whitespace. + + * gnus-cache.el (gnus-cache-save-buffers): Check if buffer is + alive. Reported by Laurent Martelli <laurent@aopsys.com>. + + * mm-util.el (mm-image-load-path): Handle nil in load-path. + From Christian Neukirchen <chneukirchen@yahoo.de>. + + * html2text.el (html2text-replace-list): Add & and '. + + * nnheader.el (nnheader-max-head-length): Increase to 8192. + + * message.el (message-clone-locals): Clone sendmail and smtp + variables. + +2004-09-23 Reiner Steib <Reiner.Steib@gmx.de> + + * gnus-msg.el (gnus-configure-posting-styles): Narrow to headers + in `header' match. Reported by Svend Tollak Munkejord. + 2004-09-20 Stefan Monnier <monnier@iro.umontreal.ca> * mm-decode.el (mm-copy-to-buffer): Preserve the data's unibyteness.
--- a/lisp/gnus/flow-fill.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/flow-fill.el Wed Sep 29 08:38:15 2004 +0000 @@ -1,4 +1,4 @@ -;;; flow-fill.el --- interprete RFC2646 "flowed" text +;;; flow-fill.el --- interpret RFC2646 "flowed" text ;; Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
--- a/lisp/gnus/gnus-art.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/gnus-art.el Wed Sep 29 08:38:15 2004 +0000 @@ -1464,6 +1464,8 @@ (defvar gnus-inhibit-hiding nil) +(defvar gnus-article-edit-mode nil) + ;;; Macros for dealing with the article buffer. (defmacro gnus-with-article-headers (&rest forms)
--- a/lisp/gnus/gnus-cache.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/gnus-cache.el Wed Sep 29 08:38:15 2004 +0000 @@ -125,9 +125,8 @@ (overview-file (gnus-cache-file-name (car gnus-cache-buffer) ".overview"))) ;; write the overview only if it was modified - (when (buffer-modified-p buffer) - (save-excursion - (set-buffer buffer) + (when (and (buffer-live-p buffer) (buffer-modified-p buffer)) + (with-current-buffer buffer (if (> (buffer-size) 0) ;; Non-empty overview, write it to a file. (let ((coding-system-for-write
--- a/lisp/gnus/gnus-diary.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/gnus-diary.el Wed Sep 29 08:38:15 2004 +0000 @@ -204,7 +204,7 @@ (let ((head (cdr (assoc (intern (format "X-Diary-%s" (car elt))) headers)))) (when head - (nndiary-parse-schedule-value head (cadr elt) (caddr elt))))) + (nndiary-parse-schedule-value head (cadr elt) (car (cddr elt)))))) nndiary-headers)) ;; #### NOTE: Gnus sometimes gives me a HEADER not corresponding to any
--- a/lisp/gnus/gnus-fun.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/gnus-fun.el Wed Sep 29 08:38:15 2004 +0000 @@ -26,8 +26,11 @@ ;;; Code: (eval-when-compile - (require 'cl) - (require 'mm-util)) + (require 'cl)) + +(require 'mm-util) +(require 'gnus-ems) +(require 'gnus-util) (defcustom gnus-x-face-directory (expand-file-name "x-faces" gnus-directory) "*Directory where X-Face PBM files are stored."
--- a/lisp/gnus/gnus-msg.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/gnus-msg.el Wed Sep 29 08:38:15 2004 +0000 @@ -915,7 +915,9 @@ (not to-address))) ;; This is news. (if post - (message-news (or to-group group)) + (message-news + (or to-group + (and (not (gnus-virtual-group-p pgroup)) group))) (set-buffer gnus-article-copy) (gnus-msg-treat-broken-reply-to) (message-followup (if (or newsgroup-p force-news) @@ -1801,9 +1803,11 @@ ;; Obsolete format of header match. (and (gnus-buffer-live-p gnus-article-copy) (with-current-buffer gnus-article-copy - (let ((header (message-fetch-field (pop style)))) - (and header - (string-match (pop style) header)))))) + (save-restriction + (nnheader-narrow-to-headers) + (let ((header (message-fetch-field (pop style)))) + (and header + (string-match (pop style) header))))))) ((or (symbolp match) (functionp match)) (cond @@ -1819,9 +1823,11 @@ ;; New format of header match. (and (gnus-buffer-live-p gnus-article-copy) (with-current-buffer gnus-article-copy - (let ((header (message-fetch-field (nth 1 match)))) - (and header - (string-match (nth 2 match) header)))))) + (save-restriction + (nnheader-narrow-to-headers) + (let ((header (message-fetch-field (nth 1 match)))) + (and header + (string-match (nth 2 match) header))))))) (t ;; This is a form to be evaled. (eval match)))))
--- a/lisp/gnus/gnus-picon.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/gnus-picon.el Wed Sep 29 08:38:15 2004 +0000 @@ -40,8 +40,9 @@ ;; ;;; Code: +(eval-when-compile (require 'cl)) + (require 'gnus) -(require 'custom) (require 'gnus-art) ;;; User variables:
--- a/lisp/gnus/gnus.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/gnus.el Wed Sep 29 08:38:15 2004 +0000 @@ -282,7 +282,7 @@ :link '(custom-manual "(gnus)Exiting Gnus") :group 'gnus) -(defconst gnus-version-number "5.10.6" +(defconst gnus-version-number "5.11" "Version number for this version of Gnus.") (defconst gnus-version (format "Gnus v%s" gnus-version-number) @@ -1104,9 +1104,8 @@ (and (file-readable-p gnus-nntpserver-file) (with-temp-buffer (insert-file-contents gnus-nntpserver-file) - (let ((name (buffer-string))) - (unless (string-match "\\`[ \t\n]*$" name) - name)))))) + (when (re-search-forward "[^ \t\n\r]+" nil t) + (match-string 0)))))) (defcustom gnus-select-method (condition-case nil @@ -3309,38 +3308,6 @@ (push (cons server result) gnus-server-method-cache)) result))) -(defsubst gnus-method-to-server (method) - (catch 'server-name - (setq method (or method gnus-select-method)) - - ;; Perhaps it is already in the cache. - (mapc (lambda (name-method) - (if (equal (cdr name-method) method) - (throw 'server-name (car name-method)))) - gnus-server-method-cache) - - (mapc - (lambda (server-alist) - (mapc (lambda (name-method) - (when (gnus-methods-equal-p (cdr name-method) method) - (unless (member name-method gnus-server-method-cache) - (push name-method gnus-server-method-cache)) - (throw 'server-name (car name-method)))) - server-alist)) - (let ((alists (list gnus-server-alist - gnus-predefined-server-alist))) - (if gnus-select-method - (push (list (cons "native" gnus-select-method)) alists)) - alists)) - - (let* ((name (if (member (cadr method) '(nil "")) - (format "%s" (car method)) - (format "%s:%s" (car method) (cadr method)))) - (name-method (cons name method))) - (unless (member name-method gnus-server-method-cache) - (push name-method gnus-server-method-cache)) - name))) - (defsubst gnus-server-get-method (group method) ;; Input either a server name, and extended server name, or a ;; select method, and return a select method.
--- a/lisp/gnus/html2text.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/html2text.el Wed Sep 29 08:38:15 2004 +0000 @@ -1,5 +1,5 @@ ;;; html2text.el --- a simple html to plain text converter -;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. ;; Author: Joakim Hove <hove@phys.ntnu.no> @@ -42,7 +42,8 @@ (defvar html2text-format-single-element-list '(("hr" . html2text-clean-hr))) (defvar html2text-replace-list - '((" " . " ") (">" . ">") ("<" . "<") (""" . "\"")) + '((" " . " ") (">" . ">") ("<" . "<") (""" . "\"") + ("&" . "&") ("'" . "'")) "The map of entity to text. This is an alist were each element is a dotted pair consisting of an
--- a/lisp/gnus/message.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/message.el Wed Sep 29 08:38:15 2004 +0000 @@ -6685,7 +6685,7 @@ (let ((locals (save-excursion (set-buffer buffer) (buffer-local-variables))) - (regexp "^gnus\\|^nn\\|^message\\|^user-mail-address")) + (regexp "^gnus\\|^nn\\|^message\\|^sendmail\\|^smtp\\|^user-mail-address")) (mapcar (lambda (local) (when (and (consp local)
--- a/lisp/gnus/mm-bodies.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/mm-bodies.el Wed Sep 29 08:38:15 2004 +0000 @@ -38,9 +38,16 @@ (require 'rfc2047) (require 'mm-encode) -;; 8bit treatment gets any char except: 0x32 - 0x7f, CR, LF, TAB, BEL, +;; 8bit treatment gets any char except: 0x32 - 0x7f, LF, TAB, BEL, ;; BS, vertical TAB, form feed, and ^_ -(defvar mm-7bit-chars "\x20-\x7f\r\n\t\x7\x8\xb\xc\x1f") +;; +;; Note that CR is *not* included, as that would allow a non-paired CR +;; in the body contrary to RFC 2822: +;; +;; - CR and LF MUST only occur together as CRLF; they MUST NOT +;; appear independently in the body. + +(defvar mm-7bit-chars "\x20-\x7f\n\t\x7\x8\xb\xc\x1f") (defcustom mm-body-charset-encoding-alist '((iso-2022-jp . 7bit)
--- a/lisp/gnus/mm-decode.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/mm-decode.el Wed Sep 29 08:38:15 2004 +0000 @@ -623,14 +623,14 @@ "Copy the contents of the current buffer to a fresh buffer." (save-excursion (let ((obuf (current-buffer)) - (multibyte enable-multibyte-characters) beg) (goto-char (point-min)) (search-forward-regexp "^\n" nil t) (setq beg (point)) - (set-buffer (generate-new-buffer " *mm*")) - ;; Preserve the data's unibyteness (for url-insert-file-contents). - (set-buffer-multibyte multibyte) + (set-buffer + ;; Preserve the data's unibyteness (for url-insert-file-contents). + (let ((default-enable-multibyte-characters (mm-multibyte-p))) + (generate-new-buffer " *mm*"))) (insert-buffer-substring obuf beg) (current-buffer))))
--- a/lisp/gnus/mm-util.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/mm-util.el Wed Sep 29 08:38:15 2004 +0000 @@ -133,15 +133,9 @@ (defvar mm-charset-synonym-alist `( - ;; Perfectly fine? A valid MIME name, anyhow. - ,@(unless (mm-coding-system-p 'big5) - '((big5 . cn-big5))) ;; Not in XEmacs, but it's not a proper MIME charset anyhow. ,@(unless (mm-coding-system-p 'x-ctext) '((x-ctext . ctext))) - ;; Apparently not defined in Emacs 20, but is a valid MIME name. - ,@(unless (mm-coding-system-p 'gb2312) - '((gb2312 . cn-gb-2312))) ;; ISO-8859-15 is very similar to ISO-8859-1. But it's _different_! ,@(unless (mm-coding-system-p 'iso-8859-15) '((iso-8859-15 . iso-8859-1))) @@ -785,11 +779,12 @@ (defun mm-image-load-path (&optional package) (let (dir result) (dolist (path load-path (nreverse result)) - (if (file-directory-p - (setq dir (concat (file-name-directory - (directory-file-name path)) - "etc/" (or package "gnus/")))) - (push dir result)) + (when (and path + (file-directory-p + (setq dir (concat (file-name-directory + (directory-file-name path)) + "etc/" (or package "gnus/"))))) + (push dir result)) (push path result)))) ;; Fixme: This doesn't look useful where it's used.
--- a/lisp/gnus/mml-sec.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/mml-sec.el Wed Sep 29 08:38:15 2004 +0000 @@ -113,7 +113,7 @@ (setf (second style-item) style) ;; otherwise, just return the current value (second style-item)) - (gnus-message 3 "Warning, attempt to set invalid signencrypt-style")))) + (message "Warning, attempt to set invalid signencrypt style")))) ;;; Security functions
--- a/lisp/gnus/mml-smime.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/mml-smime.el Wed Sep 29 08:38:15 2004 +0000 @@ -25,9 +25,12 @@ ;;; Code: +(eval-when-compile (require 'cl)) + (require 'smime) (require 'mm-decode) (autoload 'message-narrow-to-headers "message") +(autoload 'message-fetch-field "message") (defun mml-smime-sign (cont) (when (null smime-keys)
--- a/lisp/gnus/mml.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/mml.el Wed Sep 29 08:38:15 2004 +0000 @@ -450,6 +450,7 @@ ;; actually are hard newlines in the text. (let (use-hard-newlines) (when (and (string= type "text/plain") + (not (string= (cdr (assq 'sign cont)) "pgp")) (or (null (assq 'format cont)) (string= (cdr (assq 'format cont)) "flowed")) @@ -591,7 +592,7 @@ (insert-buffer-substring (cdr (assq 'buffer cont)))) ((and (setq filename (cdr (assq 'filename cont))) (not (equal (cdr (assq 'nofile cont)) "yes"))) - (mm-insert-file-contents filename)) + (mm-insert-file-contents filename nil nil nil nil t)) (t (insert (cdr (assq 'contents cont))))) (goto-char (point-min))
--- a/lisp/gnus/nnfolder.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/nnfolder.el Wed Sep 29 08:38:15 2004 +0000 @@ -1174,7 +1174,7 @@ (let ((range (nth 0 action)) (what (nth 1 action)) (marks (nth 2 action))) - (assert (or (eq what 'add) (eq what 'del)) t + (assert (or (eq what 'add) (eq what 'del)) nil "Unknown request-set-mark action: %s" what) (dolist (mark marks) (setq nnfolder-marks (gnus-update-alist-soft
--- a/lisp/gnus/nnheader.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/nnheader.el Wed Sep 29 08:38:15 2004 +0000 @@ -1,7 +1,7 @@ ;;; nnheader.el --- header access macros for Gnus and its backends ;; Copyright (C) 1987, 1988, 1989, 1990, 1993, 1994, 1995, 1996, -;; 1997, 1998, 2000, 2001, 2002, 2003 +;; 1997, 1998, 2000, 2001, 2002, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> @@ -58,7 +58,7 @@ :group 'gnus-server :type 'boolean) -(defvar nnheader-max-head-length 4096 +(defvar nnheader-max-head-length 8192 "*Max length of the head of articles. Value is an integer, nil, or t. nil means read in chunks of a file
--- a/lisp/gnus/nnml.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/nnml.el Wed Sep 29 08:38:15 2004 +0000 @@ -923,7 +923,7 @@ (let ((range (nth 0 action)) (what (nth 1 action)) (marks (nth 2 action))) - (assert (or (eq what 'add) (eq what 'del)) t + (assert (or (eq what 'add) (eq what 'del)) nil "Unknown request-set-mark action: %s" what) (dolist (mark marks) (setq nnml-marks (gnus-update-alist-soft
--- a/lisp/gnus/rfc2047.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/rfc2047.el Wed Sep 29 08:38:15 2004 +0000 @@ -126,6 +126,25 @@ ;;; Functions for encoding RFC2047 messages ;;; +(defun rfc2047-qp-or-base64 () + "Return the type with which to encode the buffer. +This is either `base64' or `quoted-printable'." + (save-excursion + (let ((limit (min (point-max) (+ 2000 (point-min)))) + (n8bit 0)) + (goto-char (point-min)) + (skip-chars-forward "\x20-\x7f\r\n\t" limit) + (while (< (point) limit) + (incf n8bit) + (forward-char 1) + (skip-chars-forward "\x20-\x7f\r\n\t" limit)) + (if (or (< (* 6 n8bit) (- limit (point-min))) + ;; Don't base64, say, a short line with a single + ;; non-ASCII char when splitting parts by charset. + (= n8bit 1)) + 'quoted-printable + 'base64)))) + (defun rfc2047-narrow-to-field () "Narrow the buffer to the header on the current line." (beginning-of-line) @@ -411,7 +430,7 @@ ;; encoding, choose the one that's shorter. (save-restriction (narrow-to-region b e) - (if (eq (mm-qp-or-base64) 'base64) + (if (eq (rfc2047-qp-or-base64) 'base64) 'B 'Q)))) (start (concat @@ -720,11 +739,15 @@ ;; Be more liberal to accept buggy base64 strings. If ;; base64-decode-string accepts buggy strings, this function could ;; be aliased to identity. - (case (mod (length string) 4) - (0 string) - (1 string) ;; Error, don't pad it. - (2 (concat string "==")) - (3 (concat string "=")))) + (if (= 0 (mod (length string) 4)) + string + (when (string-match "=+$" string) + (setq string (substring string 0 (match-beginning 0)))) + (case (mod (length string) 4) + (0 string) + (1 string) ;; Error, don't pad it. + (2 (concat string "==")) + (3 (concat string "="))))) (defun rfc2047-decode (charset encoding string) "Decode STRING from the given MIME CHARSET in the given ENCODING.
--- a/lisp/gnus/spam.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/gnus/spam.el Wed Sep 29 08:38:15 2004 +0000 @@ -1746,7 +1746,7 @@ (goto-char (point-min)) (when (re-search-forward "^X-Spam: yes;" nil t) spam-split-group)) - (error "Error running spamoracle" status)))))))) + (error "Error running spamoracle: %s" status)))))))) (defun spam-spamoracle-learn (articles article-is-spam-p &optional unregister) "Run spamoracle in training mode." @@ -1768,8 +1768,8 @@ `("-f" ,spam-spamoracle-database "add" ,arg) `("add" ,arg))))) - (when (not (eq 0 status)) - (error "Error running spamoracle" status))))))) + (unless (eq 0 status) + (error "Error running spamoracle: %s" status))))))) (defun spam-spamoracle-learn-ham (articles &optional unregister) (spam-spamoracle-learn articles nil unregister))
--- a/lisp/ido.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/ido.el Wed Sep 29 08:38:15 2004 +0000 @@ -666,6 +666,14 @@ :type 'integer :group 'ido) +(defcustom ido-max-directory-size 30000 + "*Maximum size (in bytes) for directories to use ido completion. +If you enter a directory with a size larger than this size, ido will +not provide the normal completion. To show the completions, use C-a." + :type '(choice (const :tag "No limit" nil) + (integer :tag "Size in bytes" 30000)) + :group 'ido) + (defcustom ido-rotate-file-list-default nil "*Non-nil means that `ido' will always rotate file list to get default in front." :type 'boolean @@ -699,9 +707,9 @@ :type '(choice string (const nil)) :group 'ido) -(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]") +(defcustom ido-decorations '( "{" "}" " | " " | ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]") "*List of strings used by ido to display the alternatives in the minibuffer. -There are 9 elements in this list: +There are 10 elements in this list: 1st and 2nd elements are used as brackets around the prospect list, 3rd element is the separator between prospects (ignored if ido-separator is set), 4th element is the string inserted at the end of a truncated list of prospects, @@ -709,7 +717,8 @@ can be completed using TAB, 7th element is the string displayed when there are a no matches, and 8th element is displayed if there is a single match (and faces are not used). -9th element is displayed when the current directory is non-readable." +9th element is displayed when the current directory is non-readable. +10th element is displayed when directory exceeds `ido-max-directory-size'." :type '(repeat string) :group 'ido) @@ -952,6 +961,9 @@ ;; Remember if current directory is non-readable (so we cannot do completion). (defvar ido-directory-nonreadable) +;; Remember if current directory is 'huge' (so we don't want to do completion). +(defvar ido-directory-too-big) + ;; Keep current item list if non-nil. (defvar ido-keep-item-list) @@ -1082,6 +1094,8 @@ (defun ido-may-cache-directory (&optional dir) (setq dir (or dir ido-current-directory)) (cond + ((ido-directory-too-big-p dir) + nil) ((and (ido-is-root-directory dir) (or ido-enable-tramp-completion (memq system-type '(windows-nt ms-dos)))) @@ -1425,6 +1439,16 @@ (file-directory-p dir) (not (file-readable-p dir))))) +(defun ido-directory-too-big-p (dir) + ;; Return t if dir is a directory, but too big to show + ;; Do not check for non-readable directories via tramp, as this causes a premature + ;; connect on incomplete tramp paths (after entring just method:). + (let ((ido-enable-tramp-completion nil)) + (and (numberp ido-max-directory-size) + (ido-final-slash dir) + (file-directory-p dir) + (> (nth 7 (file-attributes dir)) ido-max-directory-size)))) + (defun ido-set-current-directory (dir &optional subdir no-merge) ;; Set ido's current directory to DIR or DIR/SUBDIR (setq dir (ido-final-slash dir t)) @@ -1439,6 +1463,8 @@ (if (get-buffer ido-completion-buffer) (kill-buffer ido-completion-buffer)) (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir)) + (setq ido-directory-too-big (and (not ido-directory-nonreadable) + (ido-directory-too-big-p dir))) t)) (defun ido-set-current-home (&optional dir) @@ -1623,10 +1649,14 @@ ido-rescan nil)) ((eq ido-cur-item 'file) (setq ido-ignored-list nil - ido-cur-list (ido-make-file-list ido-default-item))) + ido-cur-list (and (not ido-directory-nonreadable) + (not ido-directory-too-big) + (ido-make-file-list ido-default-item)))) ((eq ido-cur-item 'dir) (setq ido-ignored-list nil - ido-cur-list (ido-make-dir-list ido-default-item))) + ido-cur-list (and (not ido-directory-nonreadable) + (not ido-directory-too-big) + (ido-make-dir-list ido-default-item)))) ((eq ido-cur-item 'buffer) (setq ido-ignored-list nil ido-cur-list (ido-make-buffer-list ido-default-item))) @@ -1802,7 +1832,10 @@ (if (not ido-mode) (call-interactively (or fallback 'switch-to-buffer)) (let* ((ido-context-switch-command switch-cmd) - (buf (ido-read-buffer (or prompt "Buffer: ") default nil initial))) + (ido-current-directory nil) + (ido-directory-nonreadable nil) + (ido-directory-too-big nil) + (buf (ido-read-internal 'buffer (or prompt "Buffer: ") 'ido-buffer-history default nil initial))) ;; Choose the buffer name: either the text typed in, or the head ;; of the list of matches @@ -1845,19 +1878,6 @@ (set-buffer-major-mode buf)) (ido-visit-buffer buf method t)))))) -;;;###autoload -(defun ido-read-buffer (prompt &optional default require-match initial) - "Replacement for the built-in `read-buffer'. -Return the name of a buffer selected. -PROMPT is the prompt to give to the user. DEFAULT if given is the default -buffer to be selected, which will go to the front of the list. -If REQUIRE-MATCH is non-nil, an existing-buffer must be selected. -If INITIAL is non-nil, it specifies the initial input string." - (let ((ido-current-directory nil) - (ido-directory-nonreadable nil) - (ido-context-switch-command (if (boundp 'ido-context-switch-command) ido-context-switch-command 'ignore))) - (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match initial))) - (defun ido-record-work-directory (&optional dir) (when (and (numberp ido-max-work-directory-list) (> ido-max-work-directory-list 0)) (if (and (setq dir (or dir ido-current-directory)) (> (length dir) 0)) @@ -1905,6 +1925,8 @@ (setq item 'file)) (let* ((ido-current-directory (ido-expand-directory default)) (ido-directory-nonreadable (ido-nonreadable-directory-p ido-current-directory)) + (ido-directory-too-big (and (not ido-directory-nonreadable) + (ido-directory-too-big-p ido-current-directory))) (ido-context-switch-command switch-cmd) filename) @@ -2079,6 +2101,12 @@ (setq ido-exit 'refresh) (exit-minibuffer)))) + (ido-directory-too-big + (setq ido-directory-too-big nil) + (setq ido-text-init ido-text) + (setq ido-exit 'refresh) + (exit-minibuffer)) + ((not ido-matches) (when ido-completion-buffer (call-interactively (setq this-command ido-cannot-complete-command)))) @@ -2182,7 +2210,9 @@ (defun ido-toggle-ignore () "Toggle ignoring files specified with `ido-ignore-files'." (interactive) - (setq ido-process-ignore-lists (not ido-process-ignore-lists)) + (if ido-directory-too-big + (setq ido-directory-too-big nil) + (setq ido-process-ignore-lists (not ido-process-ignore-lists))) (setq ido-text-init ido-text) (setq ido-exit 'refresh) (exit-minibuffer)) @@ -2324,6 +2354,7 @@ (not (equal dir ido-current-directory)) (file-directory-p dir) (or (not must-match) + ;; TODO. check for nonreadable and too-big. (ido-set-matches1 (if (eq ido-cur-item 'file) (ido-make-file-list1 dir) @@ -2581,7 +2612,8 @@ (defun ido-all-completions () ;; Return unsorted list of all competions. - (let ((ido-process-ignore-lists nil)) + (let ((ido-process-ignore-lists nil) + (ido-directory-too-big nil)) (cond ((eq ido-cur-item 'file) (ido-make-file-list1 ido-current-directory)) @@ -2700,6 +2732,7 @@ (or ido-merge-ftp-work-directories (not (ido-is-ftp-directory dir))) (file-directory-p dir) + ;; TODO. check for nonreadable and too-big. (setq fl (if (eq ido-cur-item 'file) (ido-make-file-list1 dir t) (ido-make-dir-list1 dir t)))) @@ -2780,6 +2813,8 @@ (defun ido-file-name-all-completions1 (dir) (cond ((ido-nonreadable-directory-p dir) '()) + ;; do not check (ido-directory-too-big-p dir) here. + ;; Caller must have done that if necessary. ((and ido-enable-tramp-completion (string-match "\\`/\\([^/:]+:\\([^/:@]+@\\)?\\)\\'" dir)) @@ -3616,7 +3651,7 @@ (expand-file-name "/" ido-current-directory) "/")) (setq refresh t)) - ((and ido-directory-nonreadable + ((and (or ido-directory-nonreadable ido-directory-too-big) (file-directory-p (concat ido-current-directory (file-name-directory contents)))) (ido-set-current-directory (concat ido-current-directory (file-name-directory contents))) @@ -3678,6 +3713,7 @@ (when (and (not ido-matches) (not ido-directory-nonreadable) + (not ido-directory-too-big) ;; ido-rescan ? ido-process-ignore-lists ido-ignored-list) @@ -3701,7 +3737,8 @@ (not (ido-is-root-directory)) (> (length contents) 1) (not (string-match "[$]" contents)) - (not ido-directory-nonreadable)) + (not ido-directory-nonreadable) + (not ido-directory-too-big)) (ido-trace "merge?") (if ido-use-merged-list (ido-undo-merge-work-directory contents nil) @@ -3766,6 +3803,8 @@ (cond (ido-directory-nonreadable (or (nth 8 ido-decorations) " [Not readable]")) + (ido-directory-too-big + (or (nth 9 ido-decorations) " [Too big]")) (ido-report-no-match (nth 6 ido-decorations)) ;; [No match] (t ""))) @@ -3872,8 +3911,26 @@ (put 'dired-do-rename 'ido 'ignore) ;;;###autoload +(defun ido-read-buffer (prompt &optional default require-match) + "Ido replacement for the built-in `read-buffer'. +Return the name of a buffer selected. +PROMPT is the prompt to give to the user. DEFAULT if given is the default +buffer to be selected, which will go to the front of the list. +If REQUIRE-MATCH is non-nil, an existing-buffer must be selected." + (let* ((ido-current-directory nil) + (ido-directory-nonreadable nil) + (ido-directory-too-big nil) + (ido-context-switch-command 'ignore) + (buf (ido-read-internal 'buffer prompt 'ido-buffer-history default require-match))) + (if (eq ido-exit 'fallback) + (let ((read-buffer-function nil)) + (read-buffer prompt default require-match)) + buf))) + +;;;###autoload (defun ido-read-file-name (prompt &optional dir default-filename mustmatch initial predicate) - "Read file name, prompting with PROMPT and completing in directory DIR. + "Ido replacement for the built-in `read-file-name'. +Read file name, prompting with PROMPT and completing in directory DIR. See `read-file-name' for additional parameters." (let (filename) (cond @@ -3890,6 +3947,8 @@ (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) (ido-current-directory (ido-expand-directory dir)) (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) + (ido-directory-too-big (and (not ido-directory-nonreadable) + (ido-directory-too-big-p ido-current-directory))) (ido-work-directory-index -1) (ido-work-file-index -1) (ido-find-literal nil)) @@ -3911,13 +3970,16 @@ ;;;###autoload (defun ido-read-directory-name (prompt &optional dir default-dirname mustmatch initial) - "Read directory name, prompting with PROMPT and completing in directory DIR. -See `read-file-name' for additional parameters." + "Ido replacement for the built-in `read-directory-name'. +Read directory name, prompting with PROMPT and completing in directory DIR. +See `read-directory-name' for additional parameters." (let* (filename (ido-context-switch-command 'ignore) ido-saved-vc-hb (ido-current-directory (ido-expand-directory dir)) (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) + (ido-directory-too-big (and (not ido-directory-nonreadable) + (ido-directory-too-big-p ido-current-directory))) (ido-work-directory-index -1) (ido-work-file-index -1)) (setq filename @@ -3929,7 +3991,8 @@ ;;;###autoload (defun ido-completing-read (prompt choices &optional predicate require-match initial-input hist def) - "Read a string in the minibuffer with ido-style completion. + "Ido replacement for the built-in `completing-read'. +Read a string in the minibuffer with ido-style completion. PROMPT is a string to prompt with; normally it ends in a colon and a space. CHOICES is a list of strings which are the possible completions. PREDICATE is currently ignored; it is included to be compatible @@ -3944,6 +4007,7 @@ DEF, if non-nil, is the default value." (let ((ido-current-directory nil) (ido-directory-nonreadable nil) + (ido-directory-too-big nil) (ido-context-switch-command 'ignore) (ido-choice-list choices)) (ido-read-internal 'list prompt hist def require-match initial-input)))
--- a/lisp/ls-lisp.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/ls-lisp.el Wed Sep 29 08:38:15 2004 +0000 @@ -534,7 +534,7 @@ " " (ls-lisp-format-time file-attr time-index now) " " - file-name + (propertize file-name 'dired-filename t) (if (stringp file-type) ; is a symbolic link (concat " -> " file-type)) "\n"
--- a/lisp/printing.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/printing.el Wed Sep 29 08:38:15 2004 +0000 @@ -5,13 +5,13 @@ ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> -;; Time-stamp: <2004/09/21 22:51:58 vinicius> +;; Time-stamp: <2004/09/26 22:11:24 vinicius> ;; Keywords: wp, print, PostScript -;; Version: 6.8 +;; Version: 6.8.1 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ -(defconst pr-version "6.8" - "printing.el, v 6.8 <2004/09/21 vinicius> +(defconst pr-version "6.8.1" + "printing.el, v 6.8.1 <2004/09/26 vinicius> Please send all bug fixes and enhancements to Vinicius Jose Latorre <viniciusjl@ig.com.br> @@ -125,16 +125,16 @@ ;; Novices (First Users) ;; --------------------- ;; -;; First of all, take a glance of printing documentation only to have an idea -;; of what `printing' is capable. +;; First of all, see printing documentation only to get an idea of what +;; `printing' is capable. ;; ;; Then try to set the variables: `pr-ps-name', `pr-ps-printer-alist', ;; `pr-txt-name', `pr-txt-printer-alist' and `pr-path-alist'. These variables ;; are the main variables for printing processing. ;; -;; Now, please, see these variables documentation more in deep. You can do -;; this by typing C-h v pr-ps-name RET (for example) if you already loaded -;; printing package, or by browsing printing.el source file. +;; Now, please, see these variables documentation deeper. You can do this by +;; typing C-h v pr-ps-name RET (for example) if you already loaded printing +;; package, or by browsing printing.el source file. ;; ;; If the documentation isn't clear or if you find a way to improve the ;; documentation, please, send an email to maintainer. All printing users @@ -263,7 +263,8 @@ ;; in Windows. The gsprint utility is faster than ghostscript to print ;; monochrome PostScript. ;; -;; The efficiency is similar to print non-monochrome PostScript file. +;; To print non-monochrome PostScript file, the efficiency of ghostscript +;; is similar to gsprint. ;; ;; Also the gsprint utility comes together with gsview distribution. ;; @@ -3887,7 +3888,7 @@ (interactive (list (pr-ps-infile-preprint "Print preview "))) (and (stringp filename) (file-exists-p filename) (let* ((file (pr-expand-file-name filename)) - (tempfile (pr-dosify-file-name (make-temp-name file)))) + (tempfile (pr-dosify-file-name (make-temp-file file)))) ;; gs use (pr-call-process pr-gs-command (format "-sDEVICE=%s" pr-gs-device) @@ -5221,7 +5222,8 @@ (defun pr-delete-file (file) - (and pr-delete-temp-file (delete-file file))) + (and pr-delete-temp-file (file-exists-p file) + (delete-file file))) (defun pr-expand-file-name (filename)
--- a/lisp/progmodes/gdb-ui.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/progmodes/gdb-ui.el Wed Sep 29 08:38:15 2004 +0000 @@ -1069,8 +1069,9 @@ (defvar breakpoint-disabled-icon nil "Icon for disabled breakpoint in display margin") -(defvar breakpoint-bitmap nil - "Bitmap for breakpoint in fringe") +;; Bitmap for breakpoint in fringe +(define-fringe-bitmap 'breakpoint + "\x3c\x7e\xff\xff\xff\xff\x7e\x3c") (defface breakpoint-enabled-bitmap-face '((t @@ -1140,9 +1141,8 @@ (save-excursion (goto-char (posn-point posn)) (if (or (posn-object posn) - (and breakpoint-bitmap - (eq (car (fringe-bitmaps-at-pos (posn-point posn))) - breakpoint-bitmap))) + (eq (car (fringe-bitmaps-at-pos (posn-point posn))) + 'breakpoint)) (gud-remove nil) (gud-break nil))))))) @@ -1831,11 +1831,7 @@ (if (>= (car (window-fringes)) 8) (gdb-put-string nil (1+ start) - `(left-fringe - ,(or breakpoint-bitmap - (setq breakpoint-bitmap - (define-fringe-bitmap - "\x3c\x7e\xff\xff\xff\xff\x7e\x3c"))) + `(left-fringe breakpoint ,(if enabled 'breakpoint-enabled-bitmap-face 'breakpoint-disabled-bitmap-face)))
--- a/lisp/subr.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/subr.el Wed Sep 29 08:38:15 2004 +0000 @@ -1970,6 +1970,8 @@ (defmacro delay-mode-hooks (&rest body) "Execute BODY, but delay any `run-mode-hooks'. +These hooks will be executed by the first following call to +`run-mode-hooks' that occurs outside any `delayed-mode-hooks' form. Only affects hooks run in the current buffer." (declare (debug t)) `(progn
--- a/lisp/term.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/term.el Wed Sep 29 08:38:15 2004 +0000 @@ -1,6 +1,6 @@ ;;; term.el --- general command interpreter in a window stuff -;;; Copyright (C) 1988, 1990, 1992, 1994, 1995 Free Software Foundation, Inc. +;;; Copyright (C) 1988, 1990, 1992, 1994, 1995, 2004 Free Software Foundation, Inc. ;; Author: Per Bothner <bothner@cygnus.com> ;; Based on comint mode written by: Olin Shivers <shivers@cs.cmu.edu> @@ -676,7 +676,6 @@ (defvar term-terminal-menu) ;;; Let's silence the byte-compiler -mm -(defvar term-ansi-at-eval-string nil) (defvar term-ansi-at-host nil) (defvar term-ansi-at-dir nil) (defvar term-ansi-at-user nil) @@ -692,9 +691,6 @@ (defvar term-ansi-current-highlight 0) (defvar term-ansi-current-reverse 0) (defvar term-ansi-current-invisible 0) -(defvar term-ansi-default-fg 0) -(defvar term-ansi-default-bg 0) -(defvar term-ansi-current-temp 0) ;;; Four should be enough, if you want more, just add. -mm (defvar term-terminal-more-parameters 0) @@ -917,6 +913,9 @@ (define-key term-raw-map [backspace] 'term-send-backspace) (define-key term-raw-map [home] 'term-send-home) (define-key term-raw-map [end] 'term-send-end) + (define-key term-raw-map [S-prior] 'scroll-down) + (define-key term-raw-map [S-next] 'scroll-up) + (define-key term-raw-map [S-insert] 'term-paste) (define-key term-raw-map [prior] 'term-send-prior) (define-key term-raw-map [next] 'term-send-next))) @@ -932,6 +931,27 @@ (put 'term-mode 'mode-class 'special) + +;;; Use this variable as a display table for `term-mode'. +(defvar term-display-table + (let ((dt (or (copy-sequence standard-display-table) + (make-display-table))) + i) + ;; avoid changing the display table for ^J + (setq i 0) + (while (< i 10) + (aset dt i (vector i)) + (setq i (1+ i))) + (setq i 11) + (while (< i 32) + (aset dt i (vector i)) + (setq i (1+ i))) + (setq i 128) + (while (< i 256) + (aset dt i (vector i)) + (setq i (1+ i))) + dt)) + (defun term-mode () "Major mode for interacting with an inferior interpreter. The interpreter name is same as buffer name, sans the asterisks. @@ -981,6 +1001,9 @@ (setq major-mode 'term-mode) (setq mode-name "Term") (use-local-map term-mode-map) + ;; we do not want indent to sneak in any tabs + (setq indent-tabs-mode nil) + (setq buffer-display-table term-display-table) (make-local-variable 'term-home-marker) (setq term-home-marker (copy-marker 0)) (make-local-variable 'term-saved-home-marker) @@ -1184,6 +1207,11 @@ ((eq arg '-) -1) (t (1- arg))))))) +(defun term-paste () + "Insert the last stretch of killed text at point." + (interactive) + (term-send-raw-string (current-kill 0))) + ;; Which would be better: "\e[A" or "\eOA"? readline accepts either. ;; For my configuration it's definitely better \eOA but YMMV. -mm ;; For example: vi works with \eOA while elm wants \e[A ... @@ -1195,8 +1223,8 @@ (defun term-send-end () (interactive) (term-send-raw-string "\e[4~")) (defun term-send-prior () (interactive) (term-send-raw-string "\e[5~")) (defun term-send-next () (interactive) (term-send-raw-string "\e[6~")) -(defun term-send-del () (interactive) (term-send-raw-string "\C-?")) -(defun term-send-backspace () (interactive) (term-send-raw-string "\C-H")) +(defun term-send-del () (interactive) (term-send-raw-string "\e[3~")) +(defun term-send-backspace () (interactive) (term-send-raw-string "\C-?")) (defun term-char-mode () "Switch to char (\"raw\") sub-mode of term mode. @@ -1366,14 +1394,15 @@ "%s%s:li#%d:co#%d:cl=\\E[H\\E[J:cd=\\E[J:bs:am:xn:cm=\\E[%%i%%d;%%dH\ :nd=\\E[C:up=\\E[A:ce=\\E[K:ho=\\E[H:pt\ :al=\\E[L:dl=\\E[M:DL=\\E[%%dM:AL=\\E[%%dL:cs=\\E[%%i%%d;%%dr:sf=^J\ -:te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ :dc=\\E[P:DC=\\E[%%dP:IC=\\E[%%d@:im=\\E[4h:ei=\\E[4l:mi:\ :so=\\E[7m:se=\\E[m:us=\\E[4m:ue=\\E[m:md=\\E[1m:mr=\\E[7m:me=\\E[m\ :UP=\\E[%%dA:DO=\\E[%%dB:LE=\\E[%%dD:RI=\\E[%%dC\ :kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\ :mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\ -:bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m:" +:bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\ +:kb=^?:kD=^[[3~:sc=\E7:rc=\E8:" ;;; : -undefine ic +;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ "termcap capabilities supported") ;;; This auxiliary function cranks up the process for term-exec in @@ -1400,9 +1429,10 @@ (process-connection-type t) ;; We should suppress conversion of end-of-line format. (inhibit-eol-conversion t) - ;; inhibit-eol-conversion doesn't seem to do the job, but this does. - (coding-system-for-read 'unknown-unix) - ) + ;; The process's output contains not just chars but also binary + ;; escape codes, so we need to see the raw output. We will have to + ;; do the decoding by hand on the parts that are made of chars. + (coding-system-for-read 'binary)) (apply 'start-process name buffer "/bin/sh" "-c" (format "stty -nl echo rows %d columns %d sane 2>/dev/null;\ @@ -2693,7 +2723,12 @@ (if (not funny) (setq funny str-length)) (cond ((> funny i) (cond ((eq term-terminal-state 1) - (term-move-columns 1) + ;; We are in state 1, we need to wrap + ;; around. Go to the beginning of + ;; the next line and switch to state + ;; 0. + (term-down 1) + (term-move-columns (- (term-current-column))) (setq term-terminal-state 0))) (setq count (- funny i)) (setq temp (- (+ (term-horizontal-column) count) @@ -2702,6 +2737,7 @@ ((> count temp) ;; Some chars fit. ;; This iteration, handle only what fits. (setq count (- count temp)) + (setq temp 0) (setq funny (+ count i))) ((or (not (or term-pager-count term-scroll-with-delete)) @@ -2722,7 +2758,7 @@ ;; following point if not eob nor insert-mode. (let ((old-column (current-column)) columns pos) - (insert (substring str i funny)) + (insert (decode-coding-string (substring str i funny) locale-coding-system)) (setq term-current-column (current-column) columns (- term-current-column old-column)) (when (not (or (eobp) term-insert-mode)) @@ -2741,7 +2777,7 @@ (setq term-terminal-state 1))) (setq i (1- funny))) ((and (setq term-terminal-state 0) - (eq char ?\^I)) ; TAB + (eq char ?\^I)) ; TAB (terminfo: ht) ;; FIXME: Does not handle line wrap! (setq count (term-current-column)) (setq count (+ count 8 (- (mod count 8)))) @@ -2768,7 +2804,7 @@ (if (not (and term-kill-echo-list (term-check-kill-echo-list))) (term-down 1 t))) - ((eq char ?\b) + ((eq char ?\b) ;; (terminfo: cub1) (term-move-columns -1)) ((eq char ?\033) ; Escape (setq term-terminal-state 2)) @@ -2818,13 +2854,13 @@ ((eq char ?M) ;; scroll reversed (term-insert-lines 1) (setq term-terminal-state 0)) - ((eq char ?7) ;; Save cursor + ((eq char ?7) ;; Save cursor (terminfo: sc) (term-handle-deferred-scroll) (setq term-saved-cursor (cons (term-current-row) (term-horizontal-column))) (setq term-terminal-state 0)) - ((eq char ?8) ;; Restore cursor + ((eq char ?8) ;; Restore cursor (terminfo: rc) (if term-saved-cursor (term-goto (car term-saved-cursor) (cdr term-saved-cursor))) @@ -2976,14 +3012,14 @@ ((eq parameter 8) (setq term-ansi-current-invisible 1)) +;;; Reset underline (i.e. terminfo rmul) + ((eq parameter 24) + (setq term-ansi-current-underline 0)) + ;;; Reset reverse (i.e. terminfo rmso) - ((eq parameter 24) + ((eq parameter 27) (setq term-ansi-current-reverse 0)) -;;; Reset underline (i.e. terminfo rmul) - ((eq parameter 27) - (setq term-ansi-current-underline 0)) - ;;; Foreground ((and (>= parameter 30) (<= parameter 37)) (setq term-ansi-current-color (- parameter 29))) @@ -3097,7 +3133,7 @@ (term-goto (1- term-terminal-previous-parameter) (1- term-terminal-parameter))) - ;; \E[A - cursor up + ;; \E[A - cursor up (terminfo: cuu1) ((eq char ?A) (term-handle-deferred-scroll) (term-down (- (max 1 term-terminal-parameter)) t)) @@ -3110,13 +3146,13 @@ ;; \E[D - cursor left ((eq char ?D) (term-move-columns (- (max 1 term-terminal-parameter)))) - ;; \E[J - clear to end of screen + ;; \E[J - clear to end of screen (terminfo: ed, clear) ((eq char ?J) (term-erase-in-display term-terminal-parameter)) - ;; \E[K - clear to end of line + ;; \E[K - clear to end of line (terminfo: el, el1) ((eq char ?K) (term-erase-in-line term-terminal-parameter)) - ;; \E[L - insert lines + ;; \E[L - insert lines (terminfo: il, il1) ((eq char ?L) (term-insert-lines (max 1 term-terminal-parameter))) ;; \E[M - delete lines @@ -3130,19 +3166,22 @@ (term-insert-spaces (max 1 term-terminal-parameter))) ;; \E[?h - DEC Private Mode Set ((eq char ?h) - (cond ((eq term-terminal-parameter 4) + (cond ((eq term-terminal-parameter 4) ;; (terminfo: smir) (setq term-insert-mode t)) - ((eq term-terminal-parameter 47) - (term-switch-to-alternate-sub-buffer t)))) + ;; ((eq term-terminal-parameter 47) ;; (terminfo: smcup) + ;; (term-switch-to-alternate-sub-buffer t)) + )) ;; \E[?l - DEC Private Mode Reset ((eq char ?l) - (cond ((eq term-terminal-parameter 4) + (cond ((eq term-terminal-parameter 4) ;; (terminfo: rmir) (setq term-insert-mode nil)) - ((eq term-terminal-parameter 47) - (term-switch-to-alternate-sub-buffer nil)))) + ;; ((eq term-terminal-parameter 47) ;; (terminfo: rmcup) + ;; (term-switch-to-alternate-sub-buffer nil)) + )) ;;; Modified to allow ansi coloring -mm - ;; \E[m - Set/reset standard mode + ;; \E[m - Set/reset modes, set bg/fg + ;;(terminfo: smso,rmso,smul,rmul,rev,bold,sgr0,invis,op,setab,setaf) ((eq char ?m) (when (= term-terminal-more-parameters 1) (if (>= term-terminal-previous-parameter-4 0) @@ -3186,32 +3225,32 @@ (not (and (= term-scroll-start 0) (= term-scroll-end term-height)))))) -(defun term-switch-to-alternate-sub-buffer (set) - ;; If asked to switch to (from) the alternate sub-buffer, and already (not) - ;; using it, do nothing. This test is needed for some programs (including - ;; Emacs) that emit the ti termcap string twice, for unknown reason. - (term-handle-deferred-scroll) - (if (eq set (not (term-using-alternate-sub-buffer))) - (let ((row (term-current-row)) - (col (term-horizontal-column))) - (cond (set - (goto-char (point-max)) - (if (not (eq (preceding-char) ?\n)) - (term-insert-char ?\n 1)) - (setq term-scroll-with-delete t) - (setq term-saved-home-marker (copy-marker term-home-marker)) - (set-marker term-home-marker (point))) - (t - (setq term-scroll-with-delete - (not (and (= term-scroll-start 0) - (= term-scroll-end term-height)))) - (set-marker term-home-marker term-saved-home-marker) - (set-marker term-saved-home-marker nil) - (setq term-saved-home-marker nil) - (goto-char term-home-marker))) - (setq term-current-column nil) - (setq term-current-row 0) - (term-goto row col)))) +;; (defun term-switch-to-alternate-sub-buffer (set) +;; ;; If asked to switch to (from) the alternate sub-buffer, and already (not) +;; ;; using it, do nothing. This test is needed for some programs (including +;; ;; Emacs) that emit the ti termcap string twice, for unknown reason. +;; (term-handle-deferred-scroll) +;; (if (eq set (not (term-using-alternate-sub-buffer))) +;; (let ((row (term-current-row)) +;; (col (term-horizontal-column))) +;; (cond (set +;; (goto-char (point-max)) +;; (if (not (eq (preceding-char) ?\n)) +;; (term-insert-char ?\n 1)) +;; (setq term-scroll-with-delete t) +;; (setq term-saved-home-marker (copy-marker term-home-marker)) +;; (set-marker term-home-marker (point))) +;; (t +;; (setq term-scroll-with-delete +;; (not (and (= term-scroll-start 0) +;; (= term-scroll-end term-height)))) +;; (set-marker term-home-marker term-saved-home-marker) +;; (set-marker term-saved-home-marker nil) +;; (setq term-saved-home-marker nil) +;; (goto-char term-home-marker))) +;; (setq term-current-column nil) +;; (setq term-current-row 0) +;; (term-goto row col)))) ;; Default value for the symbol term-command-hook. @@ -3521,11 +3560,11 @@ (if (not (bolp)) (insert-before-markers ?\n))) (defun term-erase-in-line (kind) - (if (> kind 1) ;; erase left of point + (if (= kind 1) ;; erase left of point (let ((cols (term-horizontal-column)) (saved-point (point))) (term-vertical-motion 0) (delete-region (point) saved-point) - (term-insert-char ?\n cols))) + (term-insert-char ? cols))) (if (not (eq kind 1)) ;; erase right of point (let ((saved-point (point)) (wrapped (and (zerop (term-horizontal-column)) @@ -3624,7 +3663,7 @@ (term-insert-char ?\n lines) (goto-char start))) -(defun term-set-output-log (name) +(defun term-start-output-log (name) "Record raw inferior process output in a buffer." (interactive (list (if term-log-buffer nil @@ -3646,10 +3685,10 @@ (message "Recording terminal emulator output into buffer \"%s\"" (buffer-name term-log-buffer)))) -(defun term-stop-photo () +(defun term-stop-output-log () "Discontinue raw inferior process logging." (interactive) - (term-set-output-log nil)) + (term-start-output-log nil)) (defun term-show-maximum-output () "Put the end of the buffer at the bottom of the window."
--- a/lisp/textmodes/enriched.el Thu Sep 23 13:21:01 2004 +0000 +++ b/lisp/textmodes/enriched.el Wed Sep 29 08:38:15 2004 +0000 @@ -102,7 +102,7 @@ (defconst enriched-annotation-regexp "<\\(/\\)?\\([-A-Za-z0-9]+\\)>" "Regular expression matching enriched-text annotations.") -(defconst enriched-translations +(defvar enriched-translations '((face (bold-italic "bold" "italic") (bold "bold") (italic "italic") @@ -154,6 +154,12 @@ The value is a list of \(VAR VALUE VAR VALUE...).") (make-variable-buffer-local 'enriched-old-bindings) +;; The next variable is buffer local if and only if Enriched mode is +;; enabled. The buffer local value records whether +;; `default-text-properties' should remain buffer local when disabling +;; Enriched mode. For technical reasons, the default value should be t. +(defvar enriched-default-text-properties-local-flag t) + ;; Technical internal variable. Bound to t if `enriched-mode' is ;; being rerun by a major mode to allow it to restore buffer-local ;; variables and to correctly update `enriched-old-bindings'. @@ -169,7 +175,7 @@ "Minor mode for editing text/enriched files. These are files with embedded formatting information in the MIME standard text/enriched format. -Turning the mode on runs `enriched-mode-hook'. +Turning the mode on or off runs `enriched-mode-hook'. More information about Enriched mode is available in the file etc/enriched.doc in the Emacs distribution directory. @@ -183,7 +189,11 @@ (setq buffer-file-format (delq 'text/enriched buffer-file-format)) ;; restore old variable values (while enriched-old-bindings - (set (pop enriched-old-bindings) (pop enriched-old-bindings)))) + (set (pop enriched-old-bindings) (pop enriched-old-bindings))) + (unless enriched-default-text-properties-local-flag + (kill-local-variable 'default-text-properties)) + (kill-local-variable 'enriched-default-text-properties-local-flag) + (unless use-hard-newlines (use-hard-newlines 0))) ((and (memq 'text/enriched buffer-file-format) (not enriched-rerun-flag)) @@ -196,7 +206,11 @@ ;; These will be restored if we exit Enriched mode. (setq enriched-old-bindings (list 'buffer-display-table buffer-display-table - 'default-text-properties default-text-properties)) + 'default-text-properties default-text-properties + 'use-hard-newlines use-hard-newlines)) + (make-local-variable 'enriched-default-text-properties-local-flag) + (setq enriched-default-text-properties-local-flag + (local-variable-p 'default-text-properties)) (make-local-variable 'default-text-properties) (setq buffer-display-table enriched-display-table) (use-hard-newlines 1 (if enriched-rerun-flag 'never nil))
--- a/lispref/ChangeLog Thu Sep 23 13:21:01 2004 +0000 +++ b/lispref/ChangeLog Wed Sep 29 08:38:15 2004 +0000 @@ -1,3 +1,43 @@ +2004-09-28 Richard M. Stallman <rms@gnu.org> + + * text.texi (Special Properties): Clarify line-spacing and line-height. + + * searching.texi (Regexp Search): Add looking-back. + +2004-09-25 Luc Teirlinck <teirllm@auburn.edu> + + * display.texi: Correct typos. + (Image Descriptors): Correct xref's. + +2004-09-25 Richard M. Stallman <rms@gnu.org> + + * text.texi (Special Properties): Cleanups in `cursor'. + Rewrites in `line-height' and `line-spacing'; exchange them. + + * display.texi (Fringes): Rewrite previous change. + (Fringe Bitmaps): Merge text from Display Fringe Bitmaps. Rewrite. + (Display Fringe Bitmaps): Node deleted, text moved. + (Customizing Bitmaps): Split off from Fringe Bitmaps. Rewrite. + (Scroll Bars): Clarify set-window-scroll-bars. + (Pointer Shape): Rewrite. + (Specified Space): Clarify :align-to, etc. + (Pixel Specification): Use @var. Clarify new text. + (Other Display Specs): Clarify `slice'. + (Image Descriptors): Cleanups. + (Showing Images): Cleanups. + +2004-09-24 Luc Teirlinck <teirllm@auburn.edu> + + * hooks.texi (Standard Hooks): Add `after-change-major-mode-hook'. + + * modes.texi: Various minor changes in addition to: + (Major Mode Conventions): Final call to `run-mode-hooks' should + not be inside the `delay-mode-hooks' form. + (Mode Hooks): New node. + (Hooks): Delete obsolete example. + Move definitions of `run-mode-hooks' and `delay-mode-hooks' to new + node "Mode Hooks". + 2004-09-22 Luc Teirlinck <teirllm@auburn.edu> * display.texi: Correct various typos.
--- a/lispref/display.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/lispref/display.texi Wed Sep 29 08:38:15 2004 +0000 @@ -25,7 +25,8 @@ * Faces:: A face defines a graphics style for text characters: font, colors, etc. * Fringes:: Controlling window fringes. -* Fringe Bitmaps:: Customizing fringe bitmaps. +* Fringe Bitmaps:: Displaying bitmaps in the window fringes. +* Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes. * Scroll Bars:: Controlling vertical scroll bars. * Pointer Shape:: Controlling the mouse pointer shape. * Display Property:: Enabling special display features. @@ -2599,66 +2600,46 @@ @end defun @defvar overflow-newline-into-fringe -This variable, if non-@code{nil}, specifies that lines which are -exactly as wide as the window (not counting the final newline -character) shall not be broken into two lines on the display (with -just the newline on the second line). Instead, the newline now -overflows into the right fringe, and the cursor will be displayed in -the fringe when positioned on that newline. -@end defvar - -@defvar indicate-buffer-boundaries -This buffer-local variable controls how the buffer boundaries and -window scrolling is indicated in the fringes. - - The buffer boundaries, i.e. first and last line in the buffer, can be -marked with angle bitmaps in the left or right fringe. This can be -combined with up and down arrow bitmaps shown at the top and bottom of -the left or right fringe if the window can be scrolled in either -direction. - - If the value is @code{left} or @code{right}, both angle and arrow -bitmaps are displayed in the left or right fringe, respectively. -Any other non-@code{nil} value causes the bitmap on the top line to be -displayed in the left fringe, and the bitmap on the bottom line in the -right fringe. - - If value is a cons @code{(angles . arrows)}, the car specifies the -position of the angle bitmaps, and the cdr specifies the position of -the arrow bitmaps. For example, @code{(t . right)} places the top -angle bitmap in left fringe, the bottom angle bitmap in right fringe, -and both arrow bitmaps in right fringe. To show just the angle -bitmaps in the left fringe, but no arrow bitmaps, use @code{(left . nil)}. -@end defvar - -@defvar default-indicate-buffer-boundaries -The value of this variable is the default value for -@code{indicate-buffer-boundaries} in buffers that do not override it. +If this is non-@code{nil}, lines exactly as wide as the window (not +counting the final newline character) are not continued. Instead, +when point is at the end of the line, the cursor appears in the right +fringe. @end defvar @node Fringe Bitmaps @section Fringe Bitmaps -@cindex Fringe Bitmaps - - The @dfn{fringe bitmaps} are tiny icons Emacs displays in the fringe -on a window system to indicate truncated or continued lines, buffer -boundaries, overlay arrow, etc. The fringe bitmaps are shared by all -frames and windows. - - You can redefine the built-in fringe bitmaps, and you can define new -fringe bitmaps. Emacs can handle a maximum of 255 different fringe -bitmaps. - -A fringe bitmap is identified by an opaque integer, but Lisp code -should use the following names defined by @code{(require 'fringe)}: - -Truncation and continuation line bitmaps: +@cindex fringe bitmaps +@cindex bitmaps, fringe + + The @dfn{fringe bitmaps} are tiny icons Emacs displays in the window +fringe (on a graphic display) to indicate truncated or continued +lines, buffer boundaries, overlay arrow, etc. The fringe bitmaps are +shared by all frames and windows. You can redefine the built-in +fringe bitmaps, and you can define new fringe bitmaps. However, Emacs +can handle only 255 different fringe bitmaps. + + The way to display a bitmap in the left or right fringes for a given +line in a window is by specifying the @code{display} property for one +of the characters that appears in it. Use a display specification of +the form @code{(left-fringe @var{bitmap} [@var{face}])} or +@code{(right-fringe @var{bitmap} [@var{face}])} (@pxref{Display +Property}). Here, @var{bitmap} is an integer identifying the bitmap +you want, and @var{face} (which is optional) is the name of the face +whose colors should be used for displaying the bitmap. +@c ??? Shouldn't the symbol name be used? + + These are the symbols identify the standard fringe bitmaps. +Evaluate @code{(require 'fringe)} to define them. Each symbol's +value is an integer that identifies the corresponding bitmap. + +@table @asis +@item Truncation and continuation line bitmaps: @code{left-truncation-fringe-bitmap}, @code{right-truncation-fringe-bitmap}, @code{continued-line-fringe-bitmap}, @code{continuation-line-fringe-bitmap}. -Buffer indication bitmaps: +@item Buffer indication bitmaps: @code{up-arrow-fringe-bitmap}, @code{down-arrow-fringe-bitmap}, @code{top-left-angle-fringe-bitmap}, @@ -2668,76 +2649,141 @@ @code{left-bracket-fringe-bitmap}, @code{right-bracket-fringe-bitmap}. -Empty line indication bitmap: +@item Empty line indication bitmap: @code{empty-line-fringe-bitmap}. -Overlay arrow bitmap: +@item Overlay arrow bitmap: @code{overlay-arrow-fringe-bitmap}. -Bitmaps for displaying the cursor in right fringe: +@item Bitmaps for displaying the cursor in right fringe: @code{filled-box-cursor-fringe-bitmap}, @code{hollow-box-cursor-fringe-bitmap}, @code{hollow-square-fringe-bitmap}, @code{bar-cursor-fringe-bitmap}, @code{hbar-cursor-fringe-bitmap}. -Fringe bitmap opaque value indicating that no fringe bitmap is present: +@item Value indicating that no fringe bitmap is present: @code{no-fringe-bitmap}. - -Fringe bitmap opaque value indicating a reference to an undefined bitmap: +@c ??? I don't understand what that means. +@c ??? Where would you find that value? + +@item Value indicating a reference to an undefined bitmap: @code{undef-fringe-bitmap}. - - To display an specific fringe bitmap on a line in an Emacs window, -use it as a @code{left-fringe} or @code{right-fringe} specifier in the -@code{display} property of some text that is displayed on that line -(@pxref{Display Property}). +@c ??? I don't understand what that means. +@c ??? Where would you find that value? +@end table + +@defun fringe-bitmaps-at-pos &optional pos window +This function returns the fringe bitmaps of the display line +containing position @var{pos} in window @var{window}. The return +value has the form @code{(@var{left} . @var{right})}, where @var{left} +is a list of fringe bitmap numbers for left fringe, and @var{right} is +similar for the right fringe. These bitmap numbers are usually values +of symbols such as the ones listed above. + +@c ??? Why not return a list of symbols that identify the bitmaps? +@c ??? This is Lisp, not C. + +The value is @code{nil} if @var{pos} is not visible in @var{window}. +If @var{window} is @code{nil}, that stands for the selected window. +If @var{pos} is @code{nil}, that stands for the value of point in +@var{window}. +@end defun + +@node Customizing Bitmaps +@section Customizing Fringe Bitmaps + +@c ??? Why not pass a symbol as the first argument +@c ??? and define that symbol. It would be cleaner. @defun define-fringe-bitmap bits &optional height width align bitmap -Define a new fringe bitmap, or change an existing bitmap. - -The argument @code{bits} is either a string or a vector of integers, -where each element (typically) corresponds to one row of the bitmap, -and each bit of an integer corresponds to one pixel of the bitmap. - -The optional argument @code{height} specifies the height of the bitmap. -If @code{height} is @code{nil}, the length of @code{bits} is used. - -The optional argument @code{width} specifies the width of the bitmap; -it must be an integer between 1 and 16, or @code{nil} which defaults -to a width of 8 pixels. - -The optional argument @code{align} may be one of @code{top}, -@code{center}, or @code{bottom}, indicating the positioning of the -bitmap relative to the rows where it is used; the default is to center -the bitmap. - -The @code{align} argument may also be a list @code{(ALIGN PERIODIC)} -where @code{ALIGN} is intepreted as described above, and if -@code{PERIODIC} is non-@code{nil} it specifies that the @code{bits} should -be repeated until a bitmap of the specified @code{height} is created. - -The optional argument @code{bitmap} specifies the opaque integer that -identifies an existing bitmap to redefine. - -The return value is a new opaque integer identifying the new bitmap number, -or @code{nil} of there are no more free bitmap slots. +This function defines a new fringe bitmap, or replaces an existing +bitmap. + +The argument @var{bits} specifies the image to use. It should be +either a string or a vector of integers, where each element (an +integer) corresponds to one row of the bitmap. Each bit of an integer +corresponds to one pixel of the bitmap. +@c ??? Is the low bit the leftmost or the rightmost bit? + +The height is normally the length of @var{bits}. However, you +can specify a different height with non-@code{nil} @var{height}. The width +is normally 8, but you can specify a different width with non-@code{nil} +@var{width}. The width must be an integer between 1 and 16. + +The argument @var{align} specifies the positioning of the bitmap +relative to the range of rows where it is used; the default is to +center the bitmap. The allowed values are @code{top}, @code{center}, +or @code{bottom}. + +The @var{align} argument may also be a list @code{(@var{align} +@var{periodic})} where @var{align} is interpreted as described above. +If @var{periodic} is non-@code{nil}, it specifies that the rows in +@code{bits} should be repeated enough times to reach the specified +height. + +The argument @var{bitmap} specifies an existing bitmap to redefine. +You should pass the value of the symbol that identifies the bitmap. + +The return value on success is an integer identifying the new bitmap. +You should save that integer in a variable so it can be used to select +this bitmap. The value can also be @code{nil} of there are no more +free bitmap slots. +@c ??? Why not signal an error? That would be cleaner. @end defun @defun destroy-fringe-bitmap bitmap -Destroy the fringe bitmap identified by the opaque integer -@code{bitmap}. If @code{bitmap} identifies a standard fringe bitmap, -the original built-in bitmap is restored. +This function destroy the fringe bitmap identified by @var{bitmap}. +If @var{bitmap} identifies a standard fringe bitmap, it actually +restores the standard definition of that bitmap, instead of +eliminating it entirely. @end defun @defun set-fringe-bitmap-face bitmap &optional face -Set face for a specific fringe bitmap @code{bitmap} to the face -specified by the argument @code{face}. -If @code{face} is @code{nil}, reset face to default @code{fringe} face. - -Normally, the specified face should be a face derived from the -@code{fringe} face, only specifying the foreground color as the -desired color of the fringe bitmap. +This sets the face for the fringe bitmap @var{bitmap} to @var{face}. +If @var{face} is @code{nil}, it selects the @code{fringe} face. The +bitmap's face controls the color to draw it in. + +The face you use here should be derived from @code{fringe}, and should +specify only the foreground color. @end defun +@defvar indicate-buffer-boundaries +This buffer-local variable controls how the buffer boundaries and +window scrolling are indicated in the window fringes. + +Emacs can indicate the buffer boundaries---that is, the first and last +line in the buffer---with angle icons when they appear on the screen. +In addition, Emacs can display an up-arrow in the fringe to show +that there is text above the screen, and a down-arrow to show +there is text below the screen. + +There are four kinds of basic values: + +@table @asis +@item @code{nil} +Don't display the icons. +@item @code{left} +Display them in the left fringe. +@item @code{right} +Display them in the right fringe. +@item @var{anything-else} +Display the icon at the top of the window top in the left fringe, and other +in the right fringe. +@end table + +If value is a cons @code{(@var{angles} . @var{arrows})}, @var{angles} +controls the angle icons, and @var{arrows} controls the arrows. Both +@var{angles} and @var{arrows} work according to the table above. +Thus, @code{(t . right)} places the top angle icon in the left +fringe, the bottom angle icon in the right fringe, and both arrows in +the right fringe. +@end defvar + +@defvar default-indicate-buffer-boundaries +The value of this variable is the default value for +@code{indicate-buffer-boundaries} in buffers that do not override it. +@end defvar + @node Scroll Bars @section Scroll Bars @@ -2751,18 +2797,19 @@ @code{set-window-scroll-bars} to specify what to do for a specific window: @defun set-window-scroll-bars window width &optional vertical-type horizontal-type -Set width and type of scroll bars of window @var{window}. -If @var{window} is @code{nil}, the selected window is used. +This function sets the width and type of scroll bars for window +@var{window}. + @var{width} specifies the scroll bar width in pixels (@code{nil} means -use whatever is specified for width for the frame). -@var{vertical-type} specifies whether to have a vertical scroll bar -and, if so, where. The possible values are @code{left}, @code{right} -and @code{nil}, just like the values of the -@code{vertical-scroll-bars} frame parameter. +use the width specified for the frame). @var{vertical-type} specifies +whether to have a vertical scroll bar and, if so, where. The possible +values are @code{left}, @code{right} and @code{nil}, just like the +values of the @code{vertical-scroll-bars} frame parameter. The argument @var{horizontal-type} is meant to specify whether and where to have horizontal scroll bars, but since they are not -implemented, it has no effect. +implemented, it has no effect. If @var{window} is @code{nil}, the +selected window is used. @end defun @defun window-scroll-bars &optional window @@ -2789,18 +2836,16 @@ @node Pointer Shape @section Pointer Shape -Normally, the mouse pointer has the @code{text} shape over text and + Normally, the mouse pointer has the @code{text} shape over text and the @code{arrow} shape over window areas which do not correspond to -any buffer text. - -The available pointer shapes are: @code{text} (or @code{nil}), +any buffer text. You can specify the mouse pointer shape over text or +images via the @code{pointer} text property, and for images with the +@code{:pointer} and @code{:map} image properties. + + The available pointer shapes are: @code{text} (or @code{nil}), @code{arrow}, @code{hand}, @code{vdrag}, @code{hdrag}, @code{modeline}, and @code{hourglass}. -The mouse pointer shape over text or images can be changed via the -@code{pointer} text property, and for image with the @code{:pointer} -and @code{:map} image properties. - @defvar void-text-area-pointer @tindex void-text-area-pointer This variable specifies the mouse pointer shape in void text areas, @@ -2828,7 +2873,6 @@ up or down on the page; adjusting the width of spaces within text. * Display Margins:: Displaying text or images to the side of the main text. -* Display Fringe Bitmaps:: Displaying a fringe bitmap in a specific line. * Conditional Display:: Making any of the above features conditional depending on some Lisp expression. @end menu @@ -2851,7 +2895,7 @@ @item :width @var{width} If @var{width} is an integer or floating point number, it specifies that the space width should be @var{width} times the normal character -width. The @var{width} may also be a @dfn{pixel width} specification +width. @var{width} can also be a @dfn{pixel width} specification (@pxref{Pixel Specification}). @item :relative-width @var{factor} @@ -2862,16 +2906,13 @@ @item :align-to @var{hpos} Specifies that the space should be wide enough to reach @var{hpos}. -If the value @var{hpos} is an integer or a floating point number, it -is measured in units of the normal character width. The @var{hpos} -may also be a @dfn{pixel width} specification (@pxref{Pixel Specification}). +If @var{hpos} is a number, it is measured in units of the normal +character width. @var{hpos} can also be a @dfn{pixel width} +specification (@pxref{Pixel Specification}). @end table - The @code{:height} and @code{:align-to} properties are also supported -on non-window systems. - You should use one and only one of the above properties. You can -also specify the height of the space, with other properties: +also specify the height of the space, with these properties: @table @code @item :height @var{height} @@ -2896,39 +2937,43 @@ Don't use both @code{:height} and @code{:relative-height} together. + The @code{:height} and @code{:align-to} properties are supported on +non-graphic terminals, but the other space properties in this section +are not. + @node Pixel Specification @subsection Pixel Specification for Spaces @cindex spaces, pixel specification The value of the @code{:width}, @code{:align-to}, @code{:height}, -and @code{:ascent} properties can be a (trivial) expression -which is evaluated during redisplay. The result of the evaluation is -used as an absolute number of pixels. +and @code{:ascent} properties can be a special kind of expression that +is evaluated during redisplay. The result of the evaluation is used +as an absolute number of pixels. The following expressions are supported: @example @group - EXPR ::= NUM | (NUM) | UNIT | ELEM | POS | IMAGE | FORM - NUM ::= INTEGER | FLOAT | SYMBOL - UNIT ::= in | mm | cm | width | height - ELEM ::= left-fringe | right-fringe | left-margin | right-margin + @var{expr} ::= @var{num} | (@var{num}) | @var{unit} | @var{elem} | @var{pos} | IMAGE | @var{form} + @var{num} ::= @var{integer} | @var{float} | @var{symbol} + @var{unit} ::= in | mm | cm | width | height + @var{elem} ::= left-fringe | right-fringe | left-margin | right-margin | scroll-bar | text - POS ::= left | center | right - FORM ::= (NUM . EXPR) | (OP EXPR ...) - OP ::= + | - + @var{pos} ::= left | center | right + @var{form} ::= (@var{num} . @var{expr}) | (@var{op} @var{expr} ...) + @var{op} ::= + | - @end group @end example - The form @var{NUM} specifies a fractional width or height of the -default frame font size. The form @code{(@var{NUM})} specifies an -absolute number of pixels. If a symbol @var{SYMBOL} is specified, its + The form @var{num} specifies a fraction of the default frame font +height or width. The form @code{(@var{num})} specifies an absolute +number of pixels. If @var{num} is a symbol, @var{symbol}, its buffer-local variable binding is used. - The @code{in}, @code{mm}, and @code{cm} units specifies the number -of pixels per inch, milli-meter, and centi-meter, resp. The -@code{width} and @code{height} units correspond to the width and -height of the current face font. An image specification @var{IMAGE} + The @code{in}, @code{mm}, and @code{cm} units specify the number of +pixels per inch, millimeter, and centimeter, respectively. The +@code{width} and @code{height} units correspond to the default width +and height of the current face. An image specification @code{IMAGE} corresponds to the width or height of the image. The @code{left-fringe}, @code{right-fringe}, @code{left-margin}, @@ -2939,11 +2984,11 @@ used with @code{:align-to} to specify a position relative to the left edge, center, or right edge of the text area. - One of the above window elements (except @code{text}) can also be + Any of the above window elements (except @code{text}) can also be used with @code{:align-to} to specify that the position is relative to the left edge of the given area. Once the base offset for a relative position has been set (by the first occurrence of one of these -symbols), further occurences of these symbols are interpreted as the +symbols), further occurrences of these symbols are interpreted as the width of the specified area. For example, to align to the center of the left-margin, use @@ -2955,20 +3000,21 @@ to the left edge of the text area. For example, @samp{:align-to 0} in a header-line aligns with the first text column in the text area. - The value of the form @code{(@var{NUM} . @var{EXPR})} is the value of -@var{NUM} multiplied by the value of the expression @var{EXPR}. For -example, @samp{(2 . in)} specifies a width of 2 inches, while -@samp{(0.5 . IMAGE)} specifies half the width (or height) of the -specified image. - - The form @code{(+ @var{EXPR} ...)} adds up the value of the -expressions. The form @code{(- @var{EXPR} ...)} negates or subtracts + A value of the form @code{(@var{num} . @var{expr})} stands +multiplying the values of @var{num} and @var{expr}. For example, +@code{(2 . in)} specifies a width of 2 inches, while @code{(0.5 . +IMAGE)} specifies half the width (or height) of the specified image. + + The form @code{(+ @var{expr} ...)} adds up the value of the +expressions. The form @code{(- @var{expr} ...)} negates or subtracts the value of the expressions. - @node Other Display Specs @subsection Other Display Specifications + Here are the other sorts of display specifications that you can use +in the @code{display} text property. + @table @code @item (image . @var{image-props}) This is in fact an image descriptor (@pxref{Images}). When used as a @@ -2976,13 +3022,13 @@ that has the display specification. @item (slice @var{x} @var{y} @var{width} @var{height}) -This property is used with an @code{image} property to specify a -@dfn{slice} (a partial area) of the image to display. The top left -corner of the slice is specified by @var{y} and @var{x} and the width -and height of the slice is specified by @var{width} and @var{height}. -Integer values are taken as pixel values. A floating point number in -the range 0.0 - 1.0 is relative to the width or height of the whole -image. +This specification together with @code{image} specifies a @dfn{slice} +(a partial area) of the image to display. The elements @var{y} and +@var{x} specify the top left corner of the slice, within the image; +@var{width} and @var{height} specify the width and height of the +slice. Integer values are numbers of pixels. A floating point number +in the range 0.0--1.0 stands for that fraction of the width or height +of the entire image. @item ((margin nil) @var{string}) @itemx @var{string} @@ -3106,35 +3152,6 @@ If @var{window} is @code{nil}, the selected window is used. @end defun -@node Display Fringe Bitmaps -@subsection Displaying Bitmaps in the Fringes -@cindex display fringes -@cindex margins, fringes - - You can display a bitmap in the left or right fringes for a given -line in a window using the @code{display} property. - - To put text in the left or right fringe of the window, use a -display specification of the form @code{(left-fringe @var{bitmap} [@var{face}])} -or @code{(right-fringe @var{bitmap} [@var{face}])} on one of the -characters on the corresponding text line. - - The @var{bitmap} is an opaque integer identifying the bitmap, and the -optional @var{face} is the name of the face whose foreground and -background color is to be used for displaying the bitmap. - -@defun fringe-bitmaps-at-pos &optional pos window -This function returns the fringe bitmaps of the display row containing -position @var{pos} in window @var{window}. The return value is a cons -@code{(@var{left} . @var{right})} where @var{left} and @var{right} -are the fringe bitmap numbers for the bitmaps in the left and right -fringe, resp. - - Returns @code{nil} if @var{pos} is not visible in window -@var{window}. If @var{window} is @code{nil}, use the selected window. -If @var{pos} is @code{nil}, use value of point in that window. -@end defun - @node Conditional Display @subsection Conditional Display Specifications @cindex conditional display specifications @@ -3164,7 +3181,7 @@ your machine. In some environments, Emacs allows loading image libraries on demand; if so, the variable @code{image-library-alist} can be used to modify the set of known names for these dynamic -libraries (though it is not posible to add new image formats). +libraries (though it is not possible to add new image formats). The supported image formats include XBM, XPM (needing the libraries @code{libXpm} version 3.4k and @code{libz}), GIF (needing @@ -3392,7 +3409,7 @@ @item :pointer @var{shape} This specifies the pointer shape when the mouse pointer is over this -image. @xref{Pointer Shapes}, for available pointer shapes. +image. @xref{Pointer Shape}, for available pointer shapes. @item :map @var{map} This associates an image map of @dfn{hot spots} with this image. @@ -3420,13 +3437,12 @@ property it defines a tool-tip for the hot-spot, and if it contains a @code{pointer} property, it defines the shape of the mouse cursor when it is over the hot-spot. -@xref{Pointer Shapes}, for available pointer shapes. +@xref{Pointer Shape}, for available pointer shapes. When you click the mouse when the mouse pointer is over a hot-spot, an event is composed by combining the @var{id} of the hot-spot with the -mouse event, e.g. @samp{[area4 mouse-1]} if the hot-spot's @var{id} is -@samp{area4}. - +mouse event; for instance, @code{[area4 mouse-1]} if the hot-spot's +@var{id} is @code{area4}. @end table @defun image-mask-p spec &optional frame @@ -3709,12 +3725,12 @@ The argument @var{slice} specifies a slice of the image to insert. If @var{slice} is @code{nil} or omitted the whole image is inserted. -Otherwise, @var{slice} is a list -@code{(@var{x} @var{y} @var{width} @var{height})} -which specifies the @var{x} and @var{y} positions and +Otherwise, @var{slice} is a list @code{(@var{x} @var{y} @var{width} +@var{height})} which specifies the @var{x} and @var{y} positions and @var{width} and @var{height} of the image area to insert. Integer -values are taken as pixel values. A floating point number in the -range 0.0 - 1.0 is relative to the width or height of the image. +values are in units of pixels. A floating point number in the range +0.0--1.0 stands for that fraction of the width or height of the entire +image. Internally, this function inserts @var{string} in the buffer, and gives it a @code{display} property which specifies @var{image}. @xref{Display @@ -3722,9 +3738,9 @@ @end defun @defun insert-sliced-image image &optional string area rows cols -This function inserts @var{image} in the current buffer at point like -@code{insert-image}, but the image is automatically split into -@var{rows} x @var{cols} equally sized slices. +This function inserts @var{image} in the current buffer at point, like +@code{insert-image}, but splits the image into @var{rows}x@var{cols} +equally sized slices. @end defun @defun put-image image pos &optional string area
--- a/lispref/hooks.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/lispref/hooks.texi Wed Sep 29 08:38:15 2004 +0000 @@ -35,6 +35,7 @@ @table @code @item activate-mark-hook @item after-change-functions +@item after-change-major-mode-hook @item after-init-hook @item after-insert-file-functions @item after-make-frame-functions
--- a/lispref/modes.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/lispref/modes.texi Wed Sep 29 08:38:15 2004 +0000 @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Emacs Lisp Reference Manual. -@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2003 +@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2003, 2004 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions. @setfilename ../info/modes @@ -103,6 +103,7 @@ * Mode Help:: Finding out how to use a mode. * Derived Modes:: Defining a new major mode based on another major mode. +* Mode Hooks:: Hooks run at the end of major mode functions. @end menu @node Major Mode Conventions @@ -276,7 +277,7 @@ Each major mode should have a @dfn{mode hook} named @code{@var{modename}-mode-hook}. The major mode command should run that hook, with @code{run-mode-hooks}, as the very last thing it -does. @xref{Hooks}. +does. @xref{Mode Hooks}. @item The major mode command may start by calling some other major mode @@ -284,9 +285,11 @@ settings. A mode that does this is called a @dfn{derived mode}. The recommended way to define one is to use @code{define-derived-mode}, but this is not required. Such a mode should use -@code{delay-mode-hooks} around its entire body, including the call to -the parent mode command and the final call to @code{run-mode-hooks}. -(Using @code{define-derived-mode} does this automatically.) +@code{delay-mode-hooks} around its entire body (including the call to +the parent mode command) @emph{except} for the final call to +@code{run-mode-hooks}, which runs the derived mode's hook. (Using +@code{define-derived-mode} does this automatically.) @xref{Derived +Modes}, and @ref{Mode Hooks}. @item If something special should be done if the user switches a buffer from @@ -575,7 +578,7 @@ in particular. Other major modes are defined in effect by comparison with this one---their definitions say what to change, starting from Fundamental mode. The @code{fundamental-mode} function does @emph{not} -run any hooks; you're not supposed to customize it. (If you want Emacs +run any mode hooks; you're not supposed to customize it. (If you want Emacs to behave differently in Fundamental mode, change the @emph{global} state of Emacs.) @end deffn @@ -808,6 +811,58 @@ @code{define-derived-mode} does that automatically. @end defmac +@node Mode Hooks +@subsection Mode Hooks + +The two last things a major mode function does is to run its mode +hook and finally the mode independent normal hook +@code{after-change-major-mode-hook}. If the major mode is a derived +mode, that is if it calls another major mode (the parent mode) in its +body, then the parent's mode hook is run just before the derived +mode's hook. Neither the parent's mode hook nor +@code{after-change-major-mode-hook} are run at the end of the actual +call to the parent mode. This applies recursively if the parent mode +has itself a parent. That is, the mode hooks of all major modes called +directly or indirectly by the major mode function are all run in +sequence at the end, just before @code{after-change-major-mode-hook}. + +If you are customizing a major mode, rather than defining one, the +above is all you need to know about the hooks run at the end of a +major mode. This also applies if you use @code{define-derived-mode} +to define a major mode, because that macro will automatically +implement the above for you. + +Programmers wishing to define a major mode without using +@code{define-derived-mode}, should make sure that their major mode +follows the above conventions. @xref{Major Mode Conventions}, for how +this should be accomplished. Below, we give some implementation +details. + +@defun run-mode-hooks &rest hookvars +Major modes should run their mode hook using this function. It is +similar to @code{run-hooks} (@pxref{Hooks}), but if run inside a +@code{delay-mode-hooks} form, this function does not run any hooks. +Instead, it arranges for @var{hookvars} to be run at a later call to +the function. Otherwise, @code{run-mode-hooks} runs any delayed hooks +in order, then @var{hookvars} and finally +@code{after-change-major-mode-hook}. +@end defun + +@defmac delay-mode-hooks body... +This macro executes @var{body} like @code{progn}, but all calls to +@code{run-mode-hooks} inside @var{body} delay running their hooks. +They will be run by the first call to @code{run-mode-hooks} after exit +from @code{delay-mode-hooks}. +@end defmac + +@defvar after-change-major-mode-hook +Every major mode function should run this normal hook at its very end. +It normally does not need to do so explicitly. Indeed, a major mode +function should normally run its mode hook with @code{run-mode-hooks} +as the very last thing it does and @code{run-mode-hooks} runs +@code{after-change-major-mode-hook} at its very end. +@end defvar + @node Minor Modes @section Minor Modes @cindex minor mode @@ -2087,7 +2142,7 @@ Obviously, fontification of the subexpression numbered @var{subexp} will not occur. However, fontification of other subexpressions (and other regexps) will continue. If @var{laxmatch} is @code{nil}, and the -specified subexpression is missing, then an error is signalled which +specified subexpression is missing, then an error is signaled which terminates search-based fontification. Here are some examples of elements of this kind, and what they do: @@ -2450,7 +2505,7 @@ For buffers not visiting a file to have their state saved, the major mode must bind the buffer local variable @code{desktop-save-buffer} to -a non-nil value. +a non-@code{nil} value. @defvar desktop-save-buffer If this buffer-local variable is non-@code{nil}, the buffer will have @@ -2563,26 +2618,8 @@ a symbol with a function definition), it is called. If it is a list that isn't a function, its elements are called, consecutively. All the hook functions are called with no arguments. - -For example, here's how @code{emacs-lisp-mode} runs its mode hook: - -@example -(run-hooks 'emacs-lisp-mode-hook) -@end example @end defun -@defun run-mode-hooks &rest hookvars -Like @code{run-hooks}, but is affected by the @code{delay-mode-hooks} -macro. -@end defun - -@defmac delay-mode-hooks body... -This macro executes the @var{body} forms but defers all calls to -@code{run-mode-hooks} within them until the end of @var{body}. -This macro enables a derived mode to arrange not to run -its parent modes' mode hooks until the end. -@end defmac - @defun run-hook-with-args hook &rest args This function is the way to run an abnormal hook and always call all of the hook functions. It calls each of the hook functions one by
--- a/lispref/searching.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/lispref/searching.texi Wed Sep 29 08:38:15 2004 +0000 @@ -975,6 +975,32 @@ @end example @end defun +@defun looking-back regexp &optional limit +This function returns @code{t} if @var{regexp} matches text before +point, ending at point, and @code{nil} otherwise. + +Because regular expression matching works only going forward, this is +implemented by searching backwards from point for a match that ends at +point. That can be quite slow if it has to search a long distance. +You can bound the time required by specifying @var{limit}, which says +not to search before @var{limit}. In this case, the match that is +found must begin at or after @var{limit}. + +@example +@group +---------- Buffer: foo ---------- +I read "@point{}The cat in the hat +comes back" twice. +---------- Buffer: foo ---------- + +(looking-back "read \"" 3) + @result{} t +(looking-back "read \"" 4) + @result{} nil +@end group +@end example +@end defun + @node POSIX Regexps @section POSIX Regular Expression Searching
--- a/lispref/text.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/lispref/text.texi Wed Sep 29 08:38:15 2004 +0000 @@ -2977,8 +2977,8 @@ @item cursor @kindex cursor @r{(text property)} Normally, the cursor is displayed at the end of any overlay and text -property string that may be present at the current window position. -The cursor may be placed on any character of such strings by giving +property strings present at the current window position. You can +place the cursor on any desired character of these strings by giving that character a non-@code{nil} @var{cursor} text property. @item pointer @@ -2987,55 +2987,50 @@ this text or image. See the variable @var{void-area-text-pointer} for possible pointer shapes. +@item line-spacing +@kindex line-spacing @r{(text property)} +A newline can have a @code{line-spacing} text or overlay property that +controls the height of the display line ending with that newline. The +property value overrides the default frame line spacing and the buffer +local @code{line-spacing} variable. We will call the property value +@var{line-spacing}. + +If @var{line-spacing} is a positive integer, the value specifies +additional vertical space, below the display line, in pixels. + +If @var{line-spacing} is a floating point number or cons, the +additional vertical space is the product of @var{line-spacing} and the +default frame line height. + +If the @var{line-spacing} value is a cons @code{(total . +@var{spacing})} where @var{spacing} is any of the forms described +above, the value of @var{spacing} specifies the total displayed height +of the line, regardless of the height of the characters in it. This +is equivalent to using the @code{line-height} property. + @item line-height @kindex line-height @r{(text property)} -A newline may have @code{line-height} text or overlay properties that -controls the height of the corresponding display row. - -If the @code{line-height} property value is @samp{0}, the newline does -not contribute to the height of the display row; instead the height of -the newline glyph is reduced. Also, a @code{line-spacing} property on -this newline is ignored. This can be used to tile small images or -image slices without adding blank areas between the images. - -If the @code{line-height} property value is a positive integer, the -value specifies the minimum line height in pixels. If necessary, the -line height it increased by increasing the line's ascent. - -If the @code{line-height} property value is a floating point number, -the minimum line height is calculated by multiplying the default frame -line height by the given value. - -If the @code{line-height} property value is a cons @code{(@var{ratio} -. @var{face})}, the minimum line height is calculated as @var{ratio} * -height of named face @var{face}. The @var{ ratio} is an integer or a -floating point number. If @var{face} is @code{t}, it specifies the -current face. - -@item line-spacing -@kindex line-spacing @r{(text property)} -A newline may also have a @code{line-spacing} text or overlay -properties that controls the height of the corresponding display row. - -If the @code{line-spacing} property value is an positive integer, the -value is used as additional pixels to insert after the display line; -this overrides the default frame line-spacing and any buffer local -value of the @var{line-spacing} variable. - -If the @code{line-spacing} property is a floating point number or -cons, the line spacing is calculated as specified above for the -@code{line-height} property. - -If the @code{line-spacing} value is a cons @code{(total . @var{spacing})} -where @var{spacing} is any of the forms described above, the value of -@var{spacing} is used as the total height of the line, i.e. a varying -number of pixels are inserted after each line to make each line -exactly that many pixels high. - -Using the @code{line-spacing} property overrides the buffer local -@var{line-spacing} variable. That value of that variable may be an -integer that specifies a number of pixels, or a floating point -number which gives the spacing relative to the default frame line height. +A newline can have a @code{line-height} text or overlay property that +controls the total height of the display line ending in that newline. +We will call the property value @var{line-height}. + +If @var{line-height} is 0, the height of the line is determined solely +from its contents; nothing is added. Any @code{line-spacing} property +on this newline is ignored. This case is useful for tiling small +images or image slices without adding blank areas between the images. + +If @var{line-height} is a positive integer, the value specifies the +minimum line height in pixels. The line's ascent height is +increased as necessary to achieve the specified height. + +If @var{line-height} is a floating point number, the minimum line +height is the product of @var{line-height} and the default frame line +height. + +If @var{line-height} is a cons @code{(@var{ratio} . @var{face})}, the +minimum line height is calculated as @var{ratio} times the height of +face @var{face}. The @var{ratio} is an integer or a floating point +number. If @var{face} is @code{t}, it refers to the current face. @item modification-hooks @cindex change hooks for a character
--- a/man/ChangeLog Thu Sep 23 13:21:01 2004 +0000 +++ b/man/ChangeLog Wed Sep 29 08:38:15 2004 +0000 @@ -1,3 +1,63 @@ +2004-09-28 Kim F. Storm <storm@cua.dk> + + * display.texi (Display Custom) <indicate-buffer-boundaries>: + Align with new functionality. + +2004-09-26 Jesper Harder <harder@ifa.au.dk> + + * sieve.texi (Manage Sieve API): nil -> @code{nil}. + * pgg.texi (User Commands, Backend methods): do. + * gnus.texi: Markup fixes. + (Setting Process Marks): Fix `M P a' entry. + * emacs-mime: Fixes. + +2004-09-23 Reiner Steib <Reiner.Steib@gmx.de> + + * gnus-faq.texi ([5.12]): Fix code example for FQDN in Message-Ids + again. + Use 5.10 instead of 5.10.0. + +2004-09-20 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus.texi (Summary Mail Commands): S D e. + +2004-09-20 Raymond Scholz <ray-2004@zonix.de> (tiny change) + + * gnus.texi (Misc Article): Refer to `Summary Buffer Mode Line' in + the gnus-article-mode-line-format section. + +2004-09-20 Helmut Waitzmann <Helmut.Waitzmann@web.de> (tiny change) + + * gnus.texi (Various Summary Stuff): Fix the documentation for + gnus-newsgroup-variables. + +2004-09-20 Reiner Steib <Reiner.Steib@gmx.de> + + * gnus.texi (MIME Commands): Added + gnus-mime-display-multipart-as-mixed, + gnus-mime-display-multipart-alternative-as-mixed, + gnus-mime-display-multipart-related-as-mixed. + (Mail Source Customization): Clarify `mail-source-directory'. + (Splitting Mail): Mention gnus-group-find-new-groups. + (SpamOracle): Fixed typo. + + * gnus-faq.texi: Untabify. + ([6.3]): nnir.el is in contrib directory. + + * message.texi (News Headers): Clarify how a unique ID is created. + + * gnus.texi (Batching Agents): Fixed typo in example. Reported + by Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp>. + +2004-09-20 Andre Srinivasan <andre@e2open.com> + + * gnus.texi (Group Parameters): Added more on hooks. (Small + change.) + +2004-09-20 Florian Weimer <fw@deneb.enyo.de> + + * gnus.texi (Charsets): Point to relevant section in emacs-mime. + 2004-09-22 Luc Teirlinck <teirllm@auburn.edu> * display.texi (Display Custom): Remove stray `@end defvar'.
--- a/man/display.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/man/display.texi Wed Sep 29 08:38:15 2004 +0000 @@ -1007,22 +1007,26 @@ and bottom of the left or right fringe if the window can be scrolled in either direction. -The buffer-local variable @code{indicate-buffer-boundaries} controls + The buffer-local variable @code{indicate-buffer-boundaries} controls how the buffer boundaries and window scrolling is indicated in the fringes. -If the value is @code{left} or @code{right}, both angle and arrow + If the value is @code{left} or @code{right}, both angle and arrow bitmaps are displayed in the left or right fringe, respectively. -Any other non-@code{nil} value causes the bitmap on the top line to be -displayed in the left fringe, and the bitmap on the bottom line in the -right fringe. -If value is a cons @code{(angles . arrows)}, the car specifies the -position of the angle bitmaps, and the cdr specifies the position of -the arrow bitmaps. For example, @code{(t . right)} places the top -angle bitmap in left fringe, the bottom angle bitmap in right fringe, -and both arrow bitmaps in right fringe. To show just the angle -bitmaps in the left fringe, but no arrow bitmaps, use @code{(left . nil)}. + If value is an alist, each element @code{(@var{indicator} . +@var{position})} specifies the position of one of the indicators. +The @var{indicator} must be one of @code{top}, @code{bottom}, +@code{up}, @code{down}, or @code{t} which specifies the default +position for the indicators not present in the alist. +The @var{position} is one of @code{left}, @code{right}, or @code{ni} +which specifies not to show this indicator. + + For example, @code{((top . left) (t . right))} places the top angle +bitmap in left fringe, the bottom angle bitmap in right fringe, and +both arrow bitmaps in right fringe. To show just the angle bitmaps in +the left fringe, but no arrow bitmaps, use @code{((top . left) +(bottom . left))}. @vindex default-indicate-buffer-boundaries The value of the variable @code{default-indicate-buffer-boundaries}
--- a/man/emacs-mime.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/man/emacs-mime.texi Wed Sep 29 08:38:15 2004 +0000 @@ -328,7 +328,7 @@ @item mm-inline-large-images @vindex mm-inline-large-images -When displaying inline images that are larger than the window, XEmacs +When displaying inline images that are larger than the window, Emacs does not enable scrolling, which means that you cannot see the whole image. To prevent this, the library tries to determine the image size before displaying it inline, and if it doesn't fit the window, the
--- a/man/gnus-faq.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/man/gnus-faq.texi Wed Sep 29 08:38:15 2004 +0000 @@ -102,7 +102,7 @@ @menu * [1.1]:: What is the latest version of Gnus? -* [1.2]:: What's new in 5.10.0? +* [1.2]:: What's new in 5.10? * [1.3]:: Where and how to get Gnus? * [1.4]:: What to do with the tarball now? * [1.5]:: Which version of Emacs do I need? @@ -119,7 +119,7 @@ Answer: - Jingle please: Gnus 5.10.0 is released, get it while it's + Jingle please: Gnus 5.10 is released, get it while it's hot! As well as the step in version number is rather small, Gnus 5.10 has tons of new features which you shouldn't miss, however if you are cautious, you might @@ -131,7 +131,7 @@ @end ifnottex @subsubheading Question 1.2: -What's new in 5.10.0? +What's new in 5.10? Answer: @@ -227,7 +227,7 @@ Answer: - Gnus 5.10.0 requires an Emacs version that is greater + Gnus 5.10 requires an Emacs version that is greater than or equal to Emacs 20.7 or XEmacs 21.1. @ifnottex @@ -440,7 +440,7 @@ @example SET HOME=C:\myhome - + @end example @noindent @@ -548,9 +548,9 @@ @example (add-to-list 'gnus-secondary-select-methods - '(nntp "news.yourSecondProvider.net")) + '(nntp "news.yourSecondProvider.net")) (add-to-list 'gnus-secondary-select-methods - '(nntp "news.yourThirdProvider.net")) + '(nntp "news.yourThirdProvider.net")) @end example @ifnottex @@ -745,9 +745,9 @@ (add-to-list 'gnus-secondary-select-methods '(nnimap "Give the baby a name" - (nnimap-address "imap.yourProvider.net") - (nnimap-port 143) - (nnimap-list-pattern "archive.*"))) + (nnimap-address "imap.yourProvider.net") + (nnimap-port 143) + (nnimap-list-pattern "archive.*"))) @end example @noindent @@ -877,7 +877,7 @@ fetched when you enter a group and slow down the process of entering a group). - If you already use Gnus 5.10.0, you can say + If you already use Gnus 5.10, you can say @samp{/o N} In summary buffer to load the last N messages, this feature is not available in 5.8.8 @@ -1000,7 +1000,7 @@ Answer: - Only if you use Gnus 5.10.0 or younger. In this case you've got the + Only if you use Gnus 5.10 or younger. In this case you've got the choice between w3, w3m, links, lynx and html2text, which one is used can be specified in the variable mm-text-html-renderer, so if you want links to render your @@ -1033,7 +1033,7 @@ @samp{W Y f} gives you full deuglify. See @samp{W Y C-h} or have a look at the menus for other deuglifications). - Outlook deuglify is only available since Gnus 5.10.0. + Outlook deuglify is only available since Gnus 5.10. @ifnottex @node [4.9], [4.10], [4.8], FAQ 4 - Reading messages @@ -1204,8 +1204,8 @@ @example (gnus-add-configuration '(article (vertical 1.0 - (summary .35 point) - (article 1.0)))) + (summary .35 point) + (article 1.0)))) @end example @@ -1252,7 +1252,7 @@ sadly hard tabulators are broken in 5.8.8. - Since 5.10.0, Gnus offers you some very nice new specifiers, + Since 5.10, Gnus offers you some very nice new specifiers, e.g. %B which draws a thread-tree and %&user-date which gives you a date where the details are dependent of the articles age. Here's an example which uses both: @@ -1771,7 +1771,7 @@ @end example @noindent - if you already use Gnus 5.10.0, if you still use 5.8.8 or + if you already use Gnus 5.10, if you still use 5.8.8 or 5.9 try this instead: @@ -1793,7 +1793,7 @@ Answer: - Since 5.10.0 Gnus doesn't generate a sender header by + Since 5.10 Gnus doesn't generate a sender header by default. For older Gnus' try this in ~/.gnus: @@ -1851,10 +1851,10 @@ @end example @noindent in ~/.gnus. If you use Gnus 5.9 or ealier, you can use this -instead: +instead (works for newer versions a well): @example (eval-after-load "message" - '(let (myfqdn "yourmachine.yourdomain.tld");; <-- Edit this! + '(let ((fqdn "yourmachine.yourdomain.tld"));; <-- Edit this! (if (boundp 'message-user-fqdn) (setq message-user-fqdn fqdn) (gnus-message 1 "Redefining `message-make-fqdn'.") @@ -2021,7 +2021,7 @@ the raw message, look for the message-id, and say @samp{M-^ the@@message.id RET} in a summary buffer. - Since Gnus 5.10.0 there's also a Gnus interface for + Since Gnus 5.10 there's also a Gnus interface for groups.google.com which you can call with @samp{G W}) in group buffer. @@ -2046,9 +2046,9 @@ engines and with the help of nnir you can search trough the indexed mail and generate a temporary group with all messages which met your search criteria. If this sound - cool to you get nnir.el from - @uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/} - or @uref{ftp://ftp.is.informatik.uni-duisburg.de/pub/src/emacs/}. + cool to you get nnir.el from the contrib directory of the Gnus + distribution or + @uref{http://quimby.gnus.org/cgi-bin/cvsweb.cgi/~checkout~/gnus/contrib/nnir.el?rev=HEAD&content-type=text/plain} Instructions on how to use it are at the top of the file. @ifnottex @@ -2231,7 +2231,7 @@ later when you're offline. It kind of mimics offline newsreaders like e.g. Forte Agent. If you want to use the Agent place the following in ~/.gnus if you are - still using 5.8.8 or 5.9 (it's the default since 5.10.0): + still using 5.8.8 or 5.9 (it's the default since 5.10): @example @@ -2524,7 +2524,7 @@ @noindent in ~/.emacs. If you don't care about width of CJK - characters or use Gnus 5.10.0 or younger together with a + characters or use Gnus 5.10 or younger together with a recent GNU Emacs, you should say @@ -2538,7 +2538,7 @@ two suggestions). Finally if you are still using 5.8.8 or 5.9 and experience speed problems with summary buffer generation, you definitely should update to - 5.10.0 since there quite some work on improving it has + 5.10 since there quite some work on improving it has been done. @ifnottex
--- a/man/gnus.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/man/gnus.texi Wed Sep 29 08:38:15 2004 +0000 @@ -3013,11 +3013,23 @@ the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} into the group parameters for the group. -This can also be used as a group-specific hook function, if you'd like. -If you want to hear a beep when you enter a group, you could put -something like @code{(dummy-variable (ding))} in the parameters of that -group. @code{dummy-variable} will be set to the result of the -@code{(ding)} form, but who cares? +This can also be used as a group-specific hook function. If you want to +hear a beep when you enter a group, you could put something like +@code{(dummy-variable (ding))} in the parameters of that group. +@code{dummy-variable} will be set to the (meaningless) result of the +@code{(ding)} form. + +Alternatively, since the VARIABLE becomes local to the group, this +pattern can be used to temporarily change a hook. For example, if the +following is added to a group parameter + +@lisp +(gnus-summary-prepared-hook + '(lambda nil (local-set-key "d" (local-key-binding "n")))) +@end lisp + +when the group is entered, the 'd' key will not mark the article as +expired. @end table @@ -5368,6 +5380,13 @@ This command understands the process/prefix convention (@pxref{Process/Prefix}). +@item S D e +@kindex S D e (Summary) +@findex gnus-summary-resend-message-edit + +Like the previous command, but will allow you to edit the message as +if it were a new message before resending. + @item S O m @kindex S O m (Summary) @findex gnus-uu-digest-mail-forward @@ -6187,7 +6206,7 @@ @item M P a @kindex M P a (Summary) @findex gnus-uu-mark-all -Mark all articles in series order (@code{gnus-uu-mark-series}). +Mark all articles in series order (@code{gnus-uu-mark-all}). @item M P b @kindex M P b (Summary) @@ -9328,6 +9347,26 @@ @item gnus-mime-multipart-functions Alist of @acronym{MIME} multipart types and functions to handle them. +@vindex gnus-mime-display-multipart-alternative-as-mixed +@item gnus-mime-display-multipart-alternative-as-mixed +Display "multipart/alternative" parts as "multipart/mixed". + +@vindex gnus-mime-display-multipart-related-as-mixed +@item gnus-mime-display-multipart-related-as-mixed +Display "multipart/related" parts as "multipart/mixed". + +If displaying "text/html" is discouraged, see +@code{mm-discouraged-alternatives} in @ref{Display Customization, +Display Customization, , emacs-mime, Emacs-Mime Manual}. Images or +other material inside a "multipart/related" part might be overlooked +when this variable is nil. + +@vindex gnus-mime-display-multipart-as-mixed +@item gnus-mime-display-multipart-as-mixed +Display "multipart" parts as "multipart/mixed". If t, it overrides nil +values of @code{gnus-mime-display-multipart-alternative-as-mixed} and +@code{gnus-mime-display-multipart-related-as-mixed}. + @vindex mm-file-name-rewrite-functions @item mm-file-name-rewrite-functions List of functions used for rewriting file names of @acronym{MIME} parts. @@ -9424,6 +9463,10 @@ @cindex coding system aliases @cindex preferred charset +@xref{Encoding Customization, , Encoding Customization, emacs-mime, +The Emacs MIME Manual}, for additional variables that control which +MIME charsets are used when sending messages. + Other charset tricks that may be useful, although not Gnus-specific: If there are several @acronym{MIME} charsets that encode the same Emacs @@ -10136,11 +10179,19 @@ @vindex gnus-newsgroup-variables @item gnus-newsgroup-variables A list of newsgroup (summary buffer) local variables, or cons of -variables and their default values (when the default values are not -@code{nil}), that should be made global while the summary buffer is -active. These variables can be used to set variables in the group -parameters while still allowing them to affect operations done in -other buffers. For example: +variables and their default expressions to be evalled (when the default +values are not @code{nil}), that should be made global while the summary +buffer is active. + +Note: The default expressions will be evaluated (using function +@code{eval}) before assignment to the local variable rather than just +assigned to it. If the default expression is the symbol @code{global}, +that symbol will not be evaluated but the global value of the local +variable will be used instead. + +These variables can be used to set variables in the group parameters +while still allowing them to affect operations done in other +buffers. For example: @lisp (setq gnus-newsgroup-variables @@ -10149,6 +10200,7 @@ "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:"))) @end lisp +Also @pxref{Group Parameters}. @end table @@ -11269,9 +11321,9 @@ @vindex gnus-article-mode-line-format @item gnus-article-mode-line-format This variable is a format string along the same lines as -@code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}). It -accepts the same format specifications as that variable, with two -extensions: +@code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode +Line}). It accepts the same format specifications as that variable, +with two extensions: @table @samp @@ -13203,7 +13255,9 @@ that haven't been matched by any of the other regexps. (These rules are processed from the beginning of the alist toward the end. The first rule to make a match will ``win'', unless you have crossposting enabled. -In that case, all matching rules will ``win''.) +In that case, all matching rules will ``win''.) When new groups are +created by splitting mail, you may want to run +@code{gnus-group-find-new-groups} to see the new groups. If you like to tinker with this yourself, you can set this variable to a function of your choice. This function will be called without any @@ -13771,10 +13825,10 @@ @item mail-source-directory @vindex mail-source-directory -Directory where files (if any) will be stored. The default is -@file{~/Mail/}. At present, the only thing this is used for is to say -where the incoming files will be stored if the previous variable is -@code{nil}. +Directory where incoming mail source files (if any) will be stored. The +default is @file{~/Mail/}. At present, the only thing this is used for +is to say where the incoming files will be stored if the variable +@code{mail-source-delete-incoming} is @code{nil} or a number. @item mail-source-incoming-file-prefix @vindex mail-source-incoming-file-prefix @@ -16571,7 +16625,7 @@ This instructs the @code{imap.el} package to log any exchanges with the server. The log is stored in the buffer @samp{*imap-log*}. Look for error messages, which sometimes are tagged with the keyword -@code{BAD} - but when submitting a bug, make sure to include all the +@code{BAD}---but when submitting a bug, make sure to include all the data. @node Other Sources @@ -18246,8 +18300,8 @@ While it may be obvious to all, the only headers and articles available while unplugged are those headers and articles that were fetched into the Agent while previously plugged. To put it another -way, "If you forget to fetch something while plugged, you might have a -less than satisfying unplugged session". For this reason, the Agent +way, ``If you forget to fetch something while plugged, you might have a +less than satisfying unplugged session''. For this reason, the Agent adds two visual effects to your summary buffer. These effects display the download status of each article so that you always know which articles will be available when unplugged. @@ -18624,7 +18678,7 @@ @example #!/bin/sh -emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1 +emacs -batch -l ~/.emacs -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1 @end example @@ -20436,8 +20490,8 @@ ... @end example -Then that means "score on the from header of the grandparent of the -current article". An indirection is quite fast, but it's better to say: +Then that means ``score on the from header of the grandparent of the +current article''. An indirection is quite fast, but it's better to say: @example (1- @@ -22656,7 +22710,7 @@ articles becomes the substitute for checking incoming mail. Whether only unseen articles or all unread articles will be processed is determined by the @code{spam-autodetect-recheck-messages}. When set -to t, unread messages will be rechecked. +to @code{t}, unread messages will be rechecked. @code{spam-autodetect} grants the user at once more and less control of spam filtering. The user will have more control over each group's
--- a/man/message.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/man/message.texi Wed Sep 29 08:38:15 2004 +0000 @@ -1551,8 +1551,8 @@ @cindex Sun @cindex i-did-not-set--mail-host-address--so-tickle-me This required header will be generated by Message. A unique ID will be -created based on the date, time, user name and system name. For the -domain part, message will look (in this order) at +created based on the date, time, user name (for the local part) and the +domain part. For the domain part, message will look (in this order) at @code{message-user-fqdn}, @code{system-name}, @code{mail-host-address} and @code{message-user-mail-address} (i.e. @code{user-mail-address}) until a probably valid fully qualified domain name (FQDN) was found.
--- a/man/pgg.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/man/pgg.texi Wed Sep 29 08:38:15 2004 +0000 @@ -135,8 +135,9 @@ If encryption is successful, it replaces the current region contents (in the accessible portion) with the resulting data. -If optional argument @var{sign} is non-nil, the function is request to -do a combined sign and encrypt. This currently only work with GnuPG. +If optional argument @var{sign} is non-@code{nil}, the function is +request to do a combined sign and encrypt. This currently only work +with GnuPG. @end deffn @deffn Command pgg-decrypt-region start end @@ -301,9 +302,9 @@ @deffn Method pgg-scheme-encrypt-region scheme start end recipients &optional sign Encrypt the current region between @var{start} and @var{end} for -@var{recipients}. If @var{sign} is non-nil, do a combined sign and -encrypt. If encryption is successful, it returns @code{t}, otherwise -@code{nil}. +@var{recipients}. If @var{sign} is non-@code{nil}, do a combined sign +and encrypt. If encryption is successful, it returns @code{t}, +otherwise @code{nil}. @end deffn @deffn Method pgg-scheme-decrypt-region scheme start end
--- a/man/sieve.texi Thu Sep 23 13:21:01 2004 +0000 +++ b/man/sieve.texi Wed Sep 29 08:38:15 2004 +0000 @@ -277,7 +277,7 @@ @item sieve-manage-log @vindex sieve-manage-log -If non-nil, should be a string naming a buffer where a protocol trace +If non-@code{nil}, should be a string naming a buffer where a protocol trace is dumped (for debugging purposes). @end table @@ -313,7 +313,8 @@ @item sieve-manage-havespace @findex sieve-manage-havespace -Returns non-nil iff server have roam for a script of given size. +Returns non-@code{nil} iff server have roam for a script of given +size. @item sieve-manage-getscript @findex sieve-manage-getscript
--- a/src/ChangeLog Thu Sep 23 13:21:01 2004 +0000 +++ b/src/ChangeLog Wed Sep 29 08:38:15 2004 +0000 @@ -1,3 +1,47 @@ +2004-09-29 Kim F. Storm <storm@cua.dk> + + * dispextern.h (valid_fringe_bitmap_p): Fix prototype. + + * fringe.c (Vfringe_bitmaps): New variable. + (syms_of_fringe): DEFVAR_LISP it. + (valid_fringe_bitmap_p): Rename from valid_fringe_bitmap_id_p. + Change arg to Lisp_Object and fail if not an integer. + (get_fringe_bitmap_name, resolve_fringe_bitmap) + (destroy_fringe_bitmap): New functions. + (Fdestroy_fringe_bitmap): Change arg to bitmap symbol. Use + destroy_fringe_bitmap. Remove symbol from Vfringe_bitmaps and + clear its fringe property. + (init_fringe_bitmap): Use destroy_fringe_bitmap instead of + Fdestroy_fringe_bitmap. + (Fdefine_fringe_bitmap): Add BITMAP arg specifying new or existing + bitmap symbol; remove WHICH arg. Add symbol to Vfringe_bitmaps + and set fringe property. Signal error if no free slots. + (Fset_fringe_bitmap_face): Change arg to bitmap symbol. + (Ffringe_bitmaps_at_pos): Return bitmap symbols instead of numbers. + + * xdisp.c (handle_single_display_prop): Fringe bitmaps are now + symbols with a fringe property. + +2004-09-27 Kim F. Storm <storm@cua.dk> + + * buffer.c (syms_of_buffer) <indicate-buffer-boundaries>: + Doc fix. Format may now be a symbol or alist, not a cons. + + * fringe.c (update_window_fringes): Handle new formats of + indicate-buffer-boundaries (symbol or alist). No longer + allow a simple cons. + (Ffringe_bitmaps_at_pos): Use nil value for no bitmap. + +2004-09-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * config.in: Rebuild + +2004-09-24 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * config.in: Rebuild. + + * Makefile.in: Run setarch i386 ./temacs if exec-shield is present. + 2004-09-18 Stefan Monnier <monnier@iro.umontreal.ca> * xterm.c (x_term_init): Work around a bug in some X servers.
--- a/src/Makefile.in Thu Sep 23 13:21:01 2004 +0000 +++ b/src/Makefile.in Wed Sep 29 08:38:15 2004 +0000 @@ -909,6 +909,13 @@ #define OBJECTS_MACHINE #endif +#ifdef HAVE_EXECSHIELD +#undef i386 +RUN_TEMACS = @SETARCH@ i386 ./temacs +#else +RUN_TEMACS = ./temacs +#endif + all: emacs${EXEEXT} OTHER_FILES emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp} @@ -917,9 +924,9 @@ ln temacs${EXEEXT} emacs${EXEEXT} #else #ifdef HAVE_SHM - LC_ALL=C ./temacs -nl -batch -l loadup dump + LC_ALL=C $(RUN_TEMACS) -nl -batch -l loadup dump #else /* ! defined (HAVE_SHM) */ - LC_ALL=C ./temacs -batch -l loadup dump + LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump #endif /* ! defined (HAVE_SHM) */ #endif /* ! defined (CANNOT_DUMP) */ -./emacs -q -batch -f list-load-path-shadows @@ -1339,9 +1346,9 @@ ln temacs${EXEEXT} bootstrap-emacs${EXEEXT} #else #ifdef HAVE_SHM - ./temacs -nl -batch -l loadup bootstrap + $(RUN_TEMACS) -nl -batch -l loadup bootstrap #else /* ! defined (HAVE_SHM) */ - ./temacs --batch --load loadup bootstrap + $(RUN_TEMACS) --batch --load loadup bootstrap #endif /* ! defined (HAVE_SHM) */ mv -f emacs${EXEEXT} bootstrap-emacs${EXEEXT} #endif /* ! defined (CANNOT_DUMP) */
--- a/src/buffer.c Thu Sep 23 13:21:01 2004 +0000 +++ b/src/buffer.c Wed Sep 29 08:38:15 2004 +0000 @@ -5682,16 +5682,20 @@ of a window on window-systems with angle bitmaps, or if the window can be scrolled, the top and bottom line of the window are marked with up and down arrow bitmaps. -If value is `left' or `right', both angle and arrow bitmaps are displayed in -the left or right fringe, resp. Any other non-nil value causes the -bitmap on the top line to be displayed in the left fringe, and the -bitmap on the bottom line in the right fringe. -If value is a cons (ANGLES . ARROWS), the car specifies the position -of the angle bitmaps, and the cdr specifies the position of the arrow -bitmaps. For example, (t . right) places the top angle bitmap in left -fringe, the bottom angle bitmap in right fringe, and both arrow + +If value is a symbol `left' or `right', both angle and arrow bitmaps +are displayed in the left or right fringe, resp. + +If value is an alist, each element (INDICATOR . POSITION) specifies +the position of one of the indicators. INDICATOR is one of `top', +`bottom', `up', `down', or t, which specifies the default position, +and POSITION is one of `left', `right', or nil, meaning do not show +this indicator. + +For example, ((top . left) (t . right)) places the top angle bitmap in +left fringe, the bottom angle bitmap in right fringe, and both arrow bitmaps in right fringe. To show just the angle bitmaps in the left -fringe, but no arrow bitmaps, use (left . nil). */); +fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). */); DEFVAR_PER_BUFFER ("scroll-up-aggressively", ¤t_buffer->scroll_up_aggressively, Qnil,
--- a/src/config.in Thu Sep 23 13:21:01 2004 +0000 +++ b/src/config.in Wed Sep 29 08:38:15 2004 +0000 @@ -136,6 +136,9 @@ /* Define to 1 if you have the `euidaccess' function. */ #undef HAVE_EUIDACCESS +/* Define to 1 if this OS has exec shield and we can handle it. */ +#undef HAVE_EXECSHIELD + /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H
--- a/src/dispextern.h Thu Sep 23 13:21:01 2004 +0000 +++ b/src/dispextern.h Wed Sep 29 08:38:15 2004 +0000 @@ -2630,7 +2630,7 @@ /* Defined in fringe.c */ -int valid_fringe_bitmap_id_p (int); +int valid_fringe_bitmap_p (Lisp_Object); void draw_fringe_bitmap P_ ((struct window *, struct glyph_row *, int)); void draw_row_fringe_bitmaps P_ ((struct window *, struct glyph_row *)); void draw_window_fringes P_ ((struct window *));
--- a/src/fringe.c Thu Sep 23 13:21:01 2004 +0000 +++ b/src/fringe.c Wed Sep 29 08:38:15 2004 +0000 @@ -32,12 +32,22 @@ #ifdef HAVE_WINDOW_SYSTEM +extern Lisp_Object Qfringe; extern Lisp_Object Qtop, Qbottom, Qcenter; +extern Lisp_Object Qup, Qdown, Qleft, Qright; /* Non-nil means that newline may flow into the right fringe. */ Lisp_Object Voverflow_newline_into_fringe; +/* List of known fringe bitmap symbols. + + The fringe bitmap number is stored in the `fringe' property on + those symbols. Names for the built-in bitmaps are installed by + loading fringe.el. + */ + +Lisp_Object Vfringe_bitmaps; enum fringe_bitmap_type { @@ -444,15 +454,90 @@ /* Return 1 if FRINGE_ID is a valid fringe bitmap id. */ int -valid_fringe_bitmap_id_p (fringe_id) - int fringe_id; +valid_fringe_bitmap_p (bitmap) + Lisp_Object bitmap; +{ + int bn; + + if (!INTEGERP (bitmap)) + return 0; + + bn = XINT (bitmap); + return (bn >= NO_FRINGE_BITMAP + && bn < max_used_fringe_bitmap + && (bn < MAX_STANDARD_FRINGE_BITMAPS + || fringe_bitmaps[bn] != NULL)); +} + +/* Get fringe bitmap name for bitmap number BN. + + Found by traversing Vfringe_bitmaps comparing BN to the + fringe property for each symbol. + + Return BN if not found in Vfringe_bitmaps. */ + +static Lisp_Object +get_fringe_bitmap_name (bn) + int bn; { - return (fringe_id >= NO_FRINGE_BITMAP - && fringe_id < max_used_fringe_bitmap - && (fringe_id < MAX_STANDARD_FRINGE_BITMAPS - || fringe_bitmaps[fringe_id] != NULL)); + Lisp_Object bitmaps; + Lisp_Object num; + + /* Zero means no bitmap -- return nil. */ + if (bn <= 0) + return Qnil; + + bitmaps = Vfringe_bitmaps; + num = make_number (bn); + + while (CONSP (bitmaps)) + { + Lisp_Object bitmap = XCAR (bitmaps); + if (EQ (num, Fget (bitmap, Qfringe))) + return bitmap; + bitmaps = XCDR (bitmaps); + } + + return num; } + +/* Resolve a BITMAP parameter. + + An INTEGER, corresponding to a bitmap number. + A STRING which is interned to a symbol. + A SYMBOL which has a fringe property which is a bitmap number. +*/ + +static int +resolve_fringe_bitmap (bitmap, namep) + Lisp_Object bitmap; + Lisp_Object *namep; +{ + if (namep) + *namep = Qnil; + + if (STRINGP (bitmap)) + bitmap = intern (SDATA (bitmap)); + + if (SYMBOLP (bitmap)) + { + if (namep) + *namep = bitmap; + bitmap = Fget (bitmap, Qfringe); + } + + if (valid_fringe_bitmap_p (bitmap)) + { + if (namep && NILP (*namep)) + *namep = get_fringe_bitmap_name (XINT (bitmap)); + return XINT (bitmap); + } + + return -1; +} + + /* Draw the bitmap WHICH in one of the left or right fringes of window W. ROW is the glyph row for which to display the bitmap; it determines the vertical position at which the bitmap has to be @@ -707,9 +792,10 @@ int rn, nrows = w->current_matrix->nrows; int y; int redraw_p = 0; - Lisp_Object ind; - int boundary_pos = 0, arrow_pos = 0; - int empty_pos = 0; + Lisp_Object boundary_top = Qnil, boundary_bot = Qnil; + Lisp_Object arrow_top = Qnil, arrow_bot = Qnil; + Lisp_Object empty_pos; + Lisp_Object ind = Qnil; if (w->pseudo_window_p) return 0; @@ -717,23 +803,29 @@ if (!MINI_WINDOW_P (w) && (ind = XBUFFER (w->buffer)->indicate_buffer_boundaries, !NILP (ind))) { - int do_eob = 1, do_bob = 1; - Lisp_Object arrows; - - if (CONSP (ind)) - arrows = XCDR (ind), ind = XCAR (ind); + if (EQ (ind, Qleft) || EQ (ind, Qright)) + boundary_top = boundary_bot = arrow_top = arrow_bot = ind; + else if (CONSP (ind) && CONSP (XCAR (ind))) + { + Lisp_Object pos; + if (pos = Fassq (Qt, ind), !NILP (pos)) + boundary_top = boundary_bot = arrow_top = arrow_bot = XCDR (pos); + if (pos = Fassq (Qtop, ind), !NILP (pos)) + boundary_top = XCDR (pos); + if (pos = Fassq (Qbottom, ind), !NILP (pos)) + boundary_bot = XCDR (pos); + if (pos = Fassq (Qup, ind), !NILP (pos)) + arrow_top = XCDR (pos); + if (pos = Fassq (Qdown, ind), !NILP (pos)) + arrow_bot = XCDR (pos); + } else - arrows = ind; + ind = Qnil; + } - if (EQ (ind, Qleft)) - boundary_pos = -1; - else if (EQ (ind, Qright)) - boundary_pos = 1; - - if (EQ (arrows, Qleft)) - arrow_pos = -1; - else if (EQ (arrows, Qright)) - arrow_pos = 1; + if (!NILP (ind)) + { + int do_eob = 1, do_bob = 1; for (y = 0, rn = 0; y < yb && rn < nrows; @@ -754,17 +846,17 @@ row->indicate_bob_p = row->indicate_top_line_p = 0; row->indicate_eob_p = row->indicate_bottom_line_p = 0; - if (!NILP (ind) + if (!NILP (boundary_top) && MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer))) row->indicate_bob_p = do_bob, do_bob = 0; - else if (!NILP (arrows) + else if (!NILP (arrow_top) && (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) == rn) row->indicate_top_line_p = 1; - if (!NILP (ind) + if (!NILP (boundary_bot) && MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer))) row->indicate_eob_p = do_eob, do_eob = 0; - else if (!NILP (arrows) + else if (!NILP (arrow_bot) && y + row->height >= yb) row->indicate_bottom_line_p = 1; @@ -776,10 +868,9 @@ } } - if (EQ (XBUFFER (w->buffer)->indicate_empty_lines, Qright)) - empty_pos = 1; - else if (EQ (XBUFFER (w->buffer)->indicate_empty_lines, Qleft)) - empty_pos = -1; + empty_pos = XBUFFER (w->buffer)->indicate_empty_lines; + if (!NILP (empty_pos) && !EQ (empty_pos, Qright)) + empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft; for (y = 0, rn = 0; y < yb && rn < nrows; @@ -803,20 +894,20 @@ left = row->left_user_fringe_bitmap; left_face_id = row->left_user_fringe_face_id; } - else if (row->indicate_bob_p && boundary_pos <= 0) - left = ((row->indicate_eob_p && boundary_pos < 0) + else if (row->indicate_bob_p && EQ (boundary_top, Qleft)) + left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft)) ? LEFT_BRACKET_BITMAP : TOP_LEFT_ANGLE_BITMAP); - else if (row->indicate_eob_p && boundary_pos < 0) + else if (row->indicate_eob_p && EQ (boundary_bot, Qleft)) left = BOTTOM_LEFT_ANGLE_BITMAP; else if (row->truncated_on_left_p) left = LEFT_TRUNCATION_BITMAP; else if (MATRIX_ROW_CONTINUATION_LINE_P (row)) left = CONTINUATION_LINE_BITMAP; - else if (row->indicate_empty_line_p && empty_pos <= 0) + else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft)) left = ZV_LINE_BITMAP; - else if (row->indicate_top_line_p && arrow_pos <= 0) + else if (row->indicate_top_line_p && EQ (arrow_top, Qleft)) left = UP_ARROW_BITMAP; - else if (row->indicate_bottom_line_p && arrow_pos < 0) + else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qleft)) left = DOWN_ARROW_BITMAP; else left = NO_FRINGE_BITMAP; @@ -829,22 +920,20 @@ right = row->right_user_fringe_bitmap; right_face_id = row->right_user_fringe_face_id; } - else if (row->indicate_bob_p && boundary_pos > 0) - right = ((row->indicate_eob_p && boundary_pos >= 0) + else if (row->indicate_bob_p && EQ (boundary_top, Qright)) + right = ((row->indicate_eob_p && EQ (boundary_bot, Qright)) ? RIGHT_BRACKET_BITMAP : TOP_RIGHT_ANGLE_BITMAP); - else if (row->indicate_eob_p && boundary_pos >= 0) + else if (row->indicate_eob_p && EQ (boundary_bot, Qright)) right = BOTTOM_RIGHT_ANGLE_BITMAP; else if (row->truncated_on_right_p) right = RIGHT_TRUNCATION_BITMAP; else if (row->continued_p) right = CONTINUED_LINE_BITMAP; - else if (row->indicate_top_line_p && arrow_pos > 0) + else if (row->indicate_top_line_p && EQ (arrow_top, Qright)) right = UP_ARROW_BITMAP; - else if (row->indicate_bottom_line_p && arrow_pos >= 0) + else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qright)) right = DOWN_ARROW_BITMAP; - else if (row->indicate_empty_line_p - && (empty_pos > 0 - || (WINDOW_LEFT_FRINGE_WIDTH (w) == 0 && empty_pos == 0))) + else if (row->indicate_empty_line_p && EQ (empty_pos, Qright)) right = ZV_LINE_BITMAP; else right = NO_FRINGE_BITMAP; @@ -979,20 +1068,13 @@ redraw_frame (f); } -DEFUN ("destroy-fringe-bitmap", Fdestroy_fringe_bitmap, Sdestroy_fringe_bitmap, - 1, 1, 0, - doc: /* Destroy fringe bitmap WHICH. -If WHICH overrides a standard fringe bitmap, the original bitmap is restored. */) - (which) - Lisp_Object which; + +void +destroy_fringe_bitmap (n) + int n; { - int n; struct fringe_bitmap **fbp; - CHECK_NUMBER (which); - if (n = XINT (which), n >= max_used_fringe_bitmap) - return Qnil; - fringe_faces[n] = FRINGE_FACE_ID; fbp = &fringe_bitmaps[n]; @@ -1008,7 +1090,31 @@ while (max_used_fringe_bitmap > MAX_STANDARD_FRINGE_BITMAPS && fringe_bitmaps[max_used_fringe_bitmap - 1] == NULL) max_used_fringe_bitmap--; +} + +DEFUN ("destroy-fringe-bitmap", Fdestroy_fringe_bitmap, Sdestroy_fringe_bitmap, + 1, 1, 0, + doc: /* Destroy fringe bitmap BITMAP. +If BITMAP overrides a standard fringe bitmap, the original bitmap is restored. */) + (bitmap) + Lisp_Object bitmap; +{ + int n; + Lisp_Object sym; + + n = resolve_fringe_bitmap (bitmap, &sym); + if (n < 0) + return Qnil; + + destroy_fringe_bitmap (n); + + if (SYMBOLP (sym)) + { + Vfringe_bitmaps = Fdelq (sym, Vfringe_bitmaps); + /* It would be better to remove the fringe property. */ + Fput (sym, Qfringe, Qnil); + } return Qnil; } @@ -1079,7 +1185,7 @@ if (!once_p) { - Fdestroy_fringe_bitmap (make_number (which)); + destroy_fringe_bitmap (which); /* XXX Is SELECTED_FRAME OK here? */ if (FRAME_RIF (SELECTED_FRAME ())->define_fringe_bitmap) @@ -1093,26 +1199,32 @@ DEFUN ("define-fringe-bitmap", Fdefine_fringe_bitmap, Sdefine_fringe_bitmap, - 1, 5, 0, - doc: /* Define a fringe bitmap from BITS of height HEIGHT and width WIDTH. + 2, 5, 0, + doc: /* Define fringe bitmap BITMAP from BITS of size HEIGHT x WIDTH. +BITMAP is a symbol or string naming the new fringe bitmap. BITS is either a string or a vector of integers. HEIGHT is height of bitmap. If HEIGHT is nil, use length of BITS. WIDTH must be an integer between 1 and 16, or nil which defaults to 8. -Optional fourth arg ALIGN may be one of `top', `center', or `bottom', +Optional fifth arg ALIGN may be one of `top', `center', or `bottom', indicating the positioning of the bitmap relative to the rows where it is used; the default is to center the bitmap. Fourth arg may also be a list (ALIGN PERIODIC) where PERIODIC non-nil specifies that the bitmap should be repeated. -Optional fifth argument WHICH is bitmap number to redefine. -Return new bitmap number, or nil of no more free bitmap slots. */) - (bits, height, width, align, which) - Lisp_Object bits, height, width, align, which; +If BITMAP already exists, the existing definition is replaced. */) + (bitmap, bits, height, width, align) + Lisp_Object bitmap, bits, height, width, align; { Lisp_Object len; int n, h, i, j; unsigned short *b; struct fringe_bitmap fb, *xfb; int fill1 = 0, fill2 = 0; + Lisp_Object sym; + + n = resolve_fringe_bitmap (bitmap, &sym); + + if (NILP (sym) || INTEGERP (sym)) + sym = wrong_type_argument (Qsymbolp, bitmap); if (!STRINGP (bits) && !VECTORP (bits)) bits = wrong_type_argument (Qstringp, bits); @@ -1165,7 +1277,7 @@ else if (!NILP (align) && !EQ (align, Qcenter)) error ("Bad align argument"); - if (NILP (which)) + if (n < 0) { if (max_used_fringe_bitmap < MAX_FRINGE_BITMAPS) n = max_used_fringe_bitmap++; @@ -1177,16 +1289,11 @@ if (fringe_bitmaps[n] == NULL) break; if (n == MAX_FRINGE_BITMAPS) - return Qnil; + error ("Cannot define more fringe bitmaps"); } - which = make_number (n); - } - else - { - CHECK_NUMBER (which); - n = XINT (which); - if (n <= NO_FRINGE_BITMAP || n >= MAX_FRINGE_BITMAPS) - error ("Invalid fringe bitmap number"); + + Vfringe_bitmaps = Fcons (sym, Vfringe_bitmaps); + Fput (sym, Qfringe, make_number (n)); } fb.dynamic = 1; @@ -1214,21 +1321,22 @@ init_fringe_bitmap (n, xfb, 0); - return which; + return sym; } DEFUN ("set-fringe-bitmap-face", Fset_fringe_bitmap_face, Sset_fringe_bitmap_face, 1, 2, 0, - doc: /* Set face for fringe bitmap FRINGE-ID to FACE. + doc: /* Set face for fringe bitmap BITMAP to FACE. If FACE is nil, reset face to default fringe face. */) - (fringe_id, face) - Lisp_Object fringe_id, face; + (bitmap, face) + Lisp_Object bitmap, face; { + int bn; int face_id; - CHECK_NUMBER (fringe_id); - if (!valid_fringe_bitmap_id_p (XINT (fringe_id))) - error ("Invalid fringe id"); + bn = resolve_fringe_bitmap (bitmap, 0); + if (bn < 0) + error ("Undefined fringe bitmap"); if (!NILP (face)) { @@ -1239,7 +1347,7 @@ else face_id = FRINGE_FACE_ID; - fringe_faces [XINT (fringe_id)] = face_id; + fringe_faces [bn] = face_id; return Qnil; } @@ -1250,7 +1358,8 @@ If WINDOW is nil, use selected window. If POS is nil, use value of point in that window. Return value is a cons (LEFT . RIGHT) where LEFT and RIGHT are the fringe bitmap numbers for the bitmaps in the left and right fringe, -resp. Return nil if POS is not visible in WINDOW. */) +resp. If left or right fringe is empty, the corresponding element is nil. +Return nil if POS is not visible in WINDOW. */) (pos, window) Lisp_Object pos, window; { @@ -1276,8 +1385,8 @@ row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); row = row_containing_pos (w, textpos, row, NULL, 0); if (row) - return Fcons (make_number (row->left_fringe_bitmap), - make_number (row->right_fringe_bitmap)); + return Fcons (get_fringe_bitmap_name (row->left_fringe_bitmap), + get_fringe_bitmap_name (row->right_fringe_bitmap)); else return Qnil; } @@ -1290,7 +1399,6 @@ void syms_of_fringe () { - defsubr (&Sdestroy_fringe_bitmap); defsubr (&Sdefine_fringe_bitmap); defsubr (&Sfringe_bitmaps_at_pos); @@ -1305,6 +1413,10 @@ If nil, also continue lines which are exactly as wide as the window. */); Voverflow_newline_into_fringe = Qt; + DEFVAR_LISP ("fringe-bitmaps", &Vfringe_bitmaps, + doc: /* List of fringe bitmap symbols. +You must (require 'fringe) to use fringe bitmap symbols in your programs." */); + Vfringe_bitmaps = Qnil; } /* Initialize this module when Emacs starts. */
--- a/src/xdisp.c Thu Sep 23 13:21:01 2004 +0000 +++ b/src/xdisp.c Wed Sep 29 08:38:15 2004 +0000 @@ -307,6 +307,7 @@ extern Lisp_Object QCwidth, QCheight, QCascent; extern Lisp_Object Qscroll_bar; extern Lisp_Object Qcursor; +extern Lisp_Object Qfringe; /* Non-nil means highlight trailing whitespace. */ @@ -3574,8 +3575,9 @@ #ifdef HAVE_WINDOW_SYSTEM value = XCAR (XCDR (prop)); - if (!NUMBERP (value) - || !valid_fringe_bitmap_id_p (XINT (value))) + if (!SYMBOLP (value) + || (value = Fget (value, Qfringe), + !valid_fringe_bitmap_p (value))) return 0; if (CONSP (XCDR (XCDR (prop))))