# HG changeset patch # User Miles Bader # Date 1179364378 0 # Node ID cf532dffa6eff8c788d6882386c0ccdde250dbca # Parent a624fe7396ce021cae21abf45b50534bea6f9f7d# Parent 9844e2d783f63b0a74af3eb3e305e22f22f2393b Merge from emacs--rel--22 Patches applied: * emacs--rel--22 (patch 18) - Update from CVS 2007-05-16 Richard Stallman * lisp/buff-menu.el (Buffer-menu-sort-column): Doc fix. 2007-05-16 Stefan Monnier * lisp/files.el (magic-mode-alist, magic-fallback-mode-alist): Move the *ml, Postscript, and XmCD entries to the fallback part. * lisp/files.el (magic-fallback-mode-alist): Rename from file-start-mode-alist. 2007-05-16 YAMAMOTO Mitsuharu * src/macterm.c [USE_CARBON_EVENTS] (mac_convert_event_ref): Also convert dead key repeat and up events. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-753 diff -r 9844e2d783f6 -r cf532dffa6ef ChangeLog --- a/ChangeLog Wed May 16 19:48:35 2007 +0000 +++ b/ChangeLog Thu May 17 01:12:58 2007 +0000 @@ -2,6 +2,15 @@ * configure: Tweak message about the absence of shell functions. +2007-04-27 Andreas Schwab + + * Makefile.in (config.status): Depend on + ${srcdir}/lisp/version.el. + +2007-04-26 Glenn Morris + + * README: Increase version to 22.1.50. + 2007-04-24 Juanma Barranquero * INSTALL (DETAILED BUILDING AND INSTALLATION): Fix typo. diff -r 9844e2d783f6 -r cf532dffa6ef INSTALL diff -r 9844e2d783f6 -r cf532dffa6ef MAINTAINERS --- a/MAINTAINERS Wed May 16 19:48:35 2007 +0000 +++ b/MAINTAINERS Thu May 17 01:12:58 2007 +0000 @@ -112,6 +112,12 @@ Thien-Thi Nguyen VMS +Juanma Barranquero + lisp/bs.el + lisp/server.el + lib-src/emacsclient.c + lib-src/grep-changelog + ============================================================================== 3. ============================================================================== @@ -149,13 +155,16 @@ src/filemode.c src/firstfile.c src/floatfns.c +src/fringe.c src/fns.c src/fontset.c src/getloadavg.c src/gmalloc.c +src/gtkutil.c src/hftctl.c src/indent.c src/insdel.c +src/image.c src/lastfile.c src/lread.c src/m/ diff -r 9844e2d783f6 -r cf532dffa6ef Makefile.in --- a/Makefile.in Wed May 16 19:48:35 2007 +0000 +++ b/Makefile.in Thu May 17 01:12:58 2007 +0000 @@ -311,7 +311,7 @@ Makefile: $(srcdir)/Makefile.in config.status ./config.status -config.status: ${srcdir}/configure +config.status: ${srcdir}/configure ${srcdir}/lisp/version.el ./config.status --recheck AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/m4/getopt.m4 diff -r 9844e2d783f6 -r cf532dffa6ef README --- a/README Wed May 16 19:48:35 2007 +0000 +++ b/README Thu May 17 01:12:58 2007 +0000 @@ -3,7 +3,7 @@ See the end of the file for license conditions. -This directory tree holds version 22.0.99 of GNU Emacs, the extensible, +This directory tree holds version 22.1.50 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff -r 9844e2d783f6 -r cf532dffa6ef admin/ChangeLog --- a/admin/ChangeLog Wed May 16 19:48:35 2007 +0000 +++ b/admin/ChangeLog Thu May 17 01:12:58 2007 +0000 @@ -1,3 +1,7 @@ +2007-04-25 Nick Roberts + + * make-tarball.txt: Add note about cutting the branch. + 2007-02-03 Eli Zaretskii * nt/makedist.bat: Change EOL format to DOS. Don't use diff -r 9844e2d783f6 -r cf532dffa6ef admin/FOR-RELEASE --- a/admin/FOR-RELEASE Wed May 16 19:48:35 2007 +0000 +++ b/admin/FOR-RELEASE Thu May 17 01:12:58 2007 +0000 @@ -22,6 +22,10 @@ Reminders sent out on 2006-06-08. +** Remove temporary +++/--- lines in NEWS. + +** Try to reorder NEWS: most important things first, related items together. + * WINDOWS SUPPORT BUGS. These don't need to be fixed before a release, but we call the @@ -36,6 +40,8 @@ * BUGS +See the copy of this file on the EMACS_22_BASE branch. + ** rcyeske@gmail.com, April 22: Failure to build on OpenBSD macppc. OpenBSD compilation works on i386. http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00932.html diff -r 9844e2d783f6 -r cf532dffa6ef admin/make-tarball.txt --- a/admin/make-tarball.txt Wed May 16 19:48:35 2007 +0000 +++ b/admin/make-tarball.txt Thu May 17 01:12:58 2007 +0000 @@ -76,7 +76,22 @@ 14. For a pretest, let Richard Stallman know about the new pretest and tell him to announce it using the announcement you prepared. Remind him to set a Reply-to header to . - For a release, Richard should prepare the announcement himself, + +15. Shortly before the release, cut the branch with the following commands: + + cvs rtag EMACS_`NUMBER'_BASE + cvs rtag -b EMACS_`NUMBER'_RC -r EMACS_`NUMBER'_BASE + +where `NUMBER' is the major version number of the release. This makes it +easier to see what changes have been applied to the branch with: + + cvs diff -r EMACS_`NUMBER'_BASE -r EMACS_`NUMBER'_RC + +or merge changes back to the trunk with "cvs update -j", if necessary. + +After doing this, increase the version number on the trunk as per step 4. + +16. For a release, Richard should prepare the announcement himself, possibly starting from a previous announcment. # arch-tag: c23c771f-ca26-4584-8a04-50ecf0989390 diff -r 9844e2d783f6 -r cf532dffa6ef admin/notes/copyright diff -r 9844e2d783f6 -r cf532dffa6ef etc/ChangeLog diff -r 9844e2d783f6 -r cf532dffa6ef etc/DEBUG --- a/etc/DEBUG Wed May 16 19:48:35 2007 +0000 +++ b/etc/DEBUG Thu May 17 01:12:58 2007 +0000 @@ -64,10 +64,10 @@ Put a breakpoint early in `main', or suspend the Emacs, to get an opportunity to do the set command. -When Emacs is running in a terminal, it is useful to use a separate terminal -for the debug session. This can be done by starting Emacs as usual, then -attaching to it from gdb with the `attach' command which is explained in the -node "Attach" of the GDB manual. +When Emacs is running in a terminal, it is sometimes useful to use a separate +terminal for the debug session. This can be done by starting Emacs as usual, +then attaching to it from gdb with the `attach' command which is explained in +the node "Attach" of the GDB manual. ** Examining Lisp object values. diff -r 9844e2d783f6 -r cf532dffa6ef etc/NEWS diff -r 9844e2d783f6 -r cf532dffa6ef etc/TODO --- a/etc/TODO Wed May 16 19:48:35 2007 +0000 +++ b/etc/TODO Thu May 17 01:12:58 2007 +0000 @@ -594,6 +594,33 @@ * Other known bugs: +** The \\{...} keymap dump output does not correctly remove shadowed entries: +From: "Drew Adams" + +(define-key minibuffer-local-map [(control ?=)] 'foo) +(define-key minibuffer-local-completion-map [(control ?=)] 'foo) + +(defun toto () "\\{minibuffer-local-completion-map}" 4) + +C-h f toto shows a duplicate entry for C-=: + +toto is a Lisp function. +(toto) + +key binding +- --- ------- + +C-g abort-recursive-edit +TAB minibuffer-complete +C-j exit-minibuffer +RET exit-minibuffer +ESC Prefix Command +SPC minibuffer-complete-word +? minibuffer-completion-help +C-= foo +C-= foo +... + ** a two-char comment-starter whose two chars are symbol constituents will not be noticed if it appears within a word. diff -r 9844e2d783f6 -r cf532dffa6ef etc/fr-refcard.ps --- a/etc/fr-refcard.ps Wed May 16 19:48:35 2007 +0000 +++ b/etc/fr-refcard.ps Thu May 17 01:12:58 2007 +0000 @@ -12,7 +12,7 @@ %DVIPSCommandLine: dvips -t a4 -t landscape fr-refcard.dvi -o %+ fr-refcard.ps %DVIPSParameters: dpi=600 -%DVIPSSource: TeX output 2007.05.15:0316 +%DVIPSSource: TeX output 2007.05.15:0314 %%BeginProcSet: tex.pro 0 0 %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S diff -r 9844e2d783f6 -r cf532dffa6ef lib-src/ChangeLog --- a/lib-src/ChangeLog Wed May 16 19:48:35 2007 +0000 +++ b/lib-src/ChangeLog Thu May 17 01:12:58 2007 +0000 @@ -1,3 +1,7 @@ +2007-04-26 Glenn Morris + + * makefile.w32-in (VERSION): Increase to 22.1.50. + 2007-02-26 Francesco Potort,Al(B * Makefile.in (etags, ctags): Define EMACS_NAME as "GNU Emacs". @@ -1845,7 +1849,7 @@ [WINDOWSNT]: #undef DOS_NT and #define it even if built with HAVE_CONFIG_H. This change does nothing in Emacs, as DOS_NT is always defined when HAVE_CONFIG_H and WINDOWS are both defined. - [!HAVE_UNISTD_H]: use defined(WINDOWSNT) instead of the bare + [!HAVE_UNISTD_H]: Use defined(WINDOWSNT) instead of the bare WINDOWSNT, as this is the correct way to use it. 2001-01-28 Francesco Potort,Al(B @@ -2996,7 +3000,7 @@ 1997-03-14 Francesco Potort,Al(B - * etags.c (add_regex): reset *putbuf before using it. + * etags.c (add_regex): Reset *putbuf before using it. 1997-02-23 Jonathan I. Kamens @@ -3560,7 +3564,7 @@ 1995-12-04 Francesco Potort,Al(B - * Makefile.in (ctags): depend on etags only for simplicity; + * Makefile.in (ctags): Depend on etags only for simplicity; compile with regexp support enabled. 1995-11-24 Richard Stallman @@ -3685,13 +3689,13 @@ 1995-06-27 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (plain_C_entries): new function. - (lowcase): new macro. - (tail, Fortran_functions, Pascal_functions): use new macro lowcase. - (lang_suffixes): new suffix ".pc" for Pro*C files. - (consider_token): don't tag all tokens beginning with DEFUN & Co.. - (tail): look for the end of the token when comparing. - (takeprec): since now tail behaves differently, use strneq. + * etags.c (plain_C_entries): New function. + (lowcase): New macro. + (tail, Fortran_functions, Pascal_functions): Use new macro lowcase. + (lang_suffixes): New suffix ".pc" for Pro*C files. + (consider_token): Don't tag all tokens beginning with DEFUN & Co.. + (tail): Look for the end of the token when comparing. + (takeprec): Since now tail behaves differently, use strneq. 1995-07-08 Paul Eggert @@ -3723,13 +3727,13 @@ 1995-06-27 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (plain_C_entries): new function. - (lowcase): new macro. - (tail, Fortran_functions, Pascal_functions): use new macro lowcase. - (lang_suffixes): new suffix ".pc" for Pro*C files. - (consider_token): don't tag all tokens beginning with DEFUN & Co.. - (tail): look for the end of the token when comparing. - (takeprec): since now tail behaves differently, use strneq. + * etags.c (plain_C_entries): New function. + (lowcase): New macro. + (tail, Fortran_functions, Pascal_functions): Use new macro lowcase. + (lang_suffixes): New suffix ".pc" for Pro*C files. + (consider_token): Don't tag all tokens beginning with DEFUN & Co.. + (tail): Look for the end of the token when comparing. + (takeprec): Since now tail behaves differently, use strneq. 1995-06-26 Richard Stallman @@ -3906,7 +3910,7 @@ 1995-03-13 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (process_file): free (filename) after using it. + * etags.c (process_file): Free (filename) after using it. (readline_internal): Do not access the char before start of line. 1995-02-22 Francesco Potort,Al(B (pot@cnuce.cnr.it) @@ -4039,8 +4043,8 @@ 1994-11-22 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (print_help): print --regex usage for ctags also. - (main): use -h in addition to -H as abbreviation for --help. + * etags.c (print_help): Print --regex usage for ctags also. + (main): Use -h in addition to -H as abbreviation for --help. 1994-11-16 Francesco Potort,Al(B (pot@cnuce.cnr.it) @@ -4105,9 +4109,9 @@ 1994-10-21 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (prestr, substr): return a logical type. + * etags.c (prestr, substr): Return a logical type. (consider_token): Comment out "EXFUN". Use "DEFUN" instead of "DEF". - (consider_token): set funcdef to fignore when a DEFUN is met. + (consider_token): Set funcdef to fignore when a DEFUN is met. (C_entries): Now we can use Tom Hageman patch for extern "C". 1994-10-20 Richard Stallman @@ -4190,8 +4194,8 @@ 1994-10-17 Francesco Potort,Al(B (pot@fly.cnuce.cnr.it) - * Makefile.in.in (etags): add dependency on regex.o, link with it. - (REGEXPOBJ, REGEXPDEPS, regex.o): target and macros added. + * Makefile.in.in (etags): Add dependency on regex.o, link with it. + (REGEXPOBJ, REGEXPDEPS, regex.o): Target and macros added. 1994-10-12 David J. MacKenzie (djm@duality.gnu.ai.mit.edu) @@ -4341,7 +4345,7 @@ 1994-07-08 Dave Love (d.love@dl.ac.uk) - * etags.c (takeprec): recognise `character*(*) function' + * etags.c (takeprec): Recognise `character*(*) function'. 1994-07-08 Francesco Potort,Al(B (pot@cnuce.cnr.it) @@ -4489,11 +4493,11 @@ 1994-04-18 Francesco Potort,Al(B (pot@fly.cnuce.cnr.it) - * etags.c (main, print_help): eliminate the -F option. + * etags.c (main, print_help): Eliminate the -F option. 1994-04-18 Francesco Potort,Al(B (pot@fly.cnuce.cnr.it) - * etags.c (absolute_filename): compare against '\0' instead of NULL. + * etags.c (absolute_filename): Compare against '\0' instead of NULL. 1994-04-16 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -4527,21 +4531,21 @@ 1994-04-08 Francesco Potort,Al(B (pot@fly.cnuce.cnr.it) - * etags.c (outf, outfiledir): renamed to tagf, tagfiledir. - (PF_funcs, Asm_funcs, L_funcs, PAS_funcs, TEX_funcs, - Scheme_funcs, prolog_funcs): renamed to Fortran_functions, + * etags.c (outf, outfiledir): Renamed to tagf, tagfiledir. + (PF_funcs, Asm_funcs, L_funcs, PAS_funcs, TEX_funcs) + (Scheme_funcs, prolog_funcs): Renamed to Fortran_functions, Asm_labels, Lisp_functions, Pascal_functions, Scheme_functions, TeX_functions, Prolog_functions. - (inf): no more a global variable. - (C_entries): take 2nd parameter `inf' instead of using the global one. - (find_entries): added the cp1 var for optimisation. - (find_entries): added more suffixes for assembler files. + (inf): No more a global variable. + (C_entries): Take 2nd parameter `inf' instead of using the global one. + (find_entries): Added the cp1 var for optimisation. + (find_entries): Added more suffixes for assembler files. (Asm_funcs): Now finds labels even without an ending colon. 1994-03-30 Francesco Potort,Al(B (pot@fly.cnuce.cnr.it) - * etags.c (main): use etags_getcwd for compatibility. - (etags_getcwd): new function. + * etags.c (main): Use etags_getcwd for compatibility. + (etags_getcwd): New function. 1994-03-25 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -4549,22 +4553,22 @@ 1994-03-25 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (emacs_tags_format, ETAGS): removed. Use CTAGS instead. - (main): don't allow the use of -t and -T in etags mode. - (print_help): don't show options enabled by default. - (print_version): show the emacs version number if VERSION is #defined. - (find_entries): add "ss" as suffix for Chez Scheme. + * etags.c (emacs_tags_format, ETAGS): Removed. Use CTAGS instead. + (main): Don't allow the use of -t and -T in etags mode. + (print_help): Don't show options enabled by default. + (print_version): Show the emacs version number if VERSION is #defined. + (find_entries): Add "ss" as suffix for Chez Scheme. 1994-03-23 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (cwd, outfiledir): vars added. + * etags.c (cwd, outfiledir): Vars added. (relative_filename, absolute_filename, absolute_dirname): functions added to compute filenames in tags files. - (process_file): filenames in tags file are relative to the + (process_file): Filenames in tags file are relative to the directory where the tags file is (useful with the -o option). - (main): initialise the outfiledir var. - (TYPEDST): added the `tignore' value. - (C_entries): corrected various small bugs. + (main): Initialise the outfiledir var. + (TYPEDST): Added the `tignore' value. + (C_entries): Corrected various small bugs. 1994-03-19 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -4579,8 +4583,8 @@ 1994-03-14 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (TYPEDST): added the `tignore' value. - (C_entries): corrected various bugs, now correctly parses the + * etags.c (TYPEDST): Added the `tignore' value. + (C_entries): Corrected various bugs, now correctly parses the `extern "C" {' construction (patch by Tom R.Hageman). 1994-03-05 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -4621,7 +4625,7 @@ 1994-02-22 Karl Heuer (kwzh@gnu.ai.mit.edu) * profile.c (get_time): Simplify; avoid calling index. - (main): exit on EOF. + (main): Exit on EOF. 1994-02-17 Francesco Potort,Al(B (pot@cnuce.cnr.it) @@ -4633,11 +4637,11 @@ 1994-02-14 Francesco Potort,Al(B (pot@fly) - * etags.c (absolute_pathnames, cwd): added global vars. - (longopts, print_help, main, process_file): put absolute filenames + * etags.c (absolute_pathnames, cwd): Added global vars. + (longopts, print_help, main, process_file): Put absolute filenames in the tag file if the -A --absolute-pathnames option is used. - (print_help): alfabetically order the options. - (malloc, realloc, strcpy, strncpy, strcmp): remove extern declar. + (print_help): Alfabetically order the options. + (malloc, realloc, strcpy, strncpy, strcmp): Remove extern declar. 1994-02-09 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -4666,15 +4670,15 @@ 1994-01-14 Francesco Potort,Al(B (pot@cnuce.cnr.it) * etags.c (stab_entry, stab_create, stab_find, stab_search, - stab_type, add_keyword, C_reate_stab, C_create_stabs): deleted. + stab_type, add_keyword, C_reate_stab, C_create_stabs): Deleted. Use gperf generated hash table instead of linked list. - (C_stab_entry, hash, in_word_set, get_C_stab, C_symtype): added. + (C_stab_entry, hash, in_word_set, get_C_stab, C_symtype): Added. Mostly code generated by gperf. - (consider_token): removed unused parameter `lp'. - (PF_funcs, getit): allow subroutine and similar declarations + (consider_token): Removed unused parameter `lp'. + (PF_funcs, getit): Allow subroutine and similar declarations to span multiple lines. - (C_entries): check for newline if inchar to avoid bus errors. - (process_file, find_entries): distinguish among nonexistent + (C_entries): Check for newline if inchar to avoid bus errors. + (process_file, find_entries): Distinguish among nonexistent and not regular file. 1994-01-14 Richard Stallman (rms@mole.gnu.ai.mit.edu) @@ -4811,14 +4815,14 @@ functions returning a pointer to a function, a la `signal', can be parsed. This also required new state `fstartlist' to `FUNCST'. (SAVE_TOKEN, RESTORE_TOKEN, TOKEN_SAVED_P): 1-deep token save stack. - (C_entries, CNL): use it to isolate preprocessor directive processing + (C_entries, CNL): Use it to isolate preprocessor directive processing from the other state engines. - (begtk): add '~', for C++ class destructors. + (begtk): Add '~', for C++ class destructors. 1993-11-02 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (consider_token): removed unused variable firsttok. - (prolog_getit): call pfnote with the right number of arguments. + * etags.c (consider_token): Removed unused variable firsttok. + (prolog_getit): Call pfnote with the right number of arguments. 1993-10-19 Paul Eggert (eggert@twinsun.com) @@ -4837,9 +4841,9 @@ 1993-10-01 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (process_file): dead code removed. + * etags.c (process_file): Dead code removed. (S_ISREG): #define it using S_IFREG if not defined. - (process_file): regular files have nothing to do with symlinks. + (process_file): Regular files have nothing to do with symlinks. 1993-09-28 Brian Fox (bfox@ai.mit.edu) @@ -4922,10 +4926,10 @@ 1993-08-04 Francesco Potort,Al(B (pot@spiff.gnu.ai.mit.edu) - * etags.c (L_isdef, L_isquote, L_getit): small optimisations. - (L_funcs): the (foo::defmumble stuff now should work. - (consider_token): function returned random value--corrected. - (C_entries): corrected == versus = typo. + * etags.c (L_isdef, L_isquote, L_getit): Small optimisations. + (L_funcs): The (foo::defmumble stuff now should work. + (consider_token): Function returned random value--corrected. + (C_entries): Corrected == versus = typo. 1993-08-01 Roland McGrath (roland@churchy.gnu.ai.mit.edu) @@ -4941,11 +4945,11 @@ * etags.c (FINCST): Added the fignore status. Means we are after the parameter list and before the open curly brace. Allows correct parsing of C++ constructors. - (C_entries, consider_token): make use of fignore. - (consider_token): reset funcdef when next_token_is_func: when in + (C_entries, consider_token): Make use of fignore. + (consider_token): Reset funcdef when next_token_is_func: when in ctags mode makes DEFVAR and others work better. - (L_isquote): function that recognises the "(quote" string. - (L_getit): ignore quoting via "'" or "(quote". Useful for defalias. + (L_isquote): Function that recognises the "(quote" string. + (L_getit): Ignore quoting via "'" or "(quote". Useful for defalias. 1993-07-29 Paul Eggert (eggert@twinsun.com) @@ -4977,20 +4981,20 @@ 1993-07-08 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (alloca): removed all references to it. - (main): now calls xnew instead of alloca for portability. - (../src/config.h): included only if HAVE_CONFIG_H. - (const): void definition removed--config.h takes care of it. + * etags.c (alloca): Removed all references to it. + (main): Now calls xnew instead of alloca for portability. + (../src/config.h): Included only if HAVE_CONFIG_H. + (const): Void definition removed--config.h takes care of it. 1993-07-08 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (consider_token): was `==', now is `='. + * etags.c (consider_token): Was `==', now is `='. (consider_token): DEFUNs now treated like funcs in ctags mode. - * etags.c (LEVEL_OK_FOR_FUNCDEF): removed. - (C_entries): optimized the test that used LEVEL_OK_FOR_FUNCDEF. - (C_entries): removed a piece of useless code. - (C_entries): making typedef tags is delayed until a semicolon + * etags.c (LEVEL_OK_FOR_FUNCDEF): Removed. + (C_entries): Optimized the test that used LEVEL_OK_FOR_FUNCDEF. + (C_entries): Removed a piece of useless code. + (C_entries): Making typedef tags is delayed until a semicolon is met. This handles "typedef int X, Y, Z;" correctly. 1993-07-06 Jim Blandy (jimb@geech.gnu.ai.mit.edu) @@ -5266,38 +5270,38 @@ 1993-03-22 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (YACC): flag added to c_ext. - (c_ext): no more a synonim for c_ext&C_PLPL because of YACC. - (find_entries): consistently use streq when reasonable. - (find_entries): a .y file is a yacc file. + * etags.c (YACC): Flag added to c_ext. + (c_ext): No more a synonim for c_ext&C_PLPL because of YACC. + (find_entries): Consistently use streq when reasonable. + (find_entries): A .y file is a yacc file. (get_C_stab): c_ext becomes c_ext&C_PLPL. - (C_entries): logical cplpl means c_ext&C_PLPL. - (C_entries): logical yacc_rules means we are after the first %%. - (C_entries): added logic for yacc files. + (C_entries): Logical cplpl means c_ext&C_PLPL. + (C_entries): Logical yacc_rules means we are after the first %%. + (C_entries): Added logic for yacc files. 1993-03-16 Francesco Potort,Al(B (pot@cnuce.cnr.it) * etags.c (C_entries): ':' case moved to the second switch. - (C_entries): do not examine token if structdef==scolonseen. + (C_entries): Do not examine token if structdef==scolonseen. (consider_token): structtag set to null string for enum. 1993-03-12 Francesco Potort,Al(B (pot@cnuce.cnr.it) - * etags.c (GET_COOKIE): and related macros removed. - (logical): is now int, no more a char. - (reg): define deleted. - (isgood, _gd, notgd): deleted. - (gotone): deleted. - (TOKEN): member linestart removed. - (linepos, prev_linepos, lb1): deleted. - (main): call initbuffer on lbs array instead of lb1. - (init): removed the initialisation of the logical _gd array; - (find_entries): a .sa suffix means assembler file. + * etags.c (GET_COOKIE): And related macros removed. + (logical): Is now int, no more a char. + (reg): Define deleted. + (isgood, _gd, notgd): Deleted. + (gotone): Deleted. + (TOKEN): Member linestart removed. + (linepos, prev_linepos, lb1): Deleted. + (main): Call initbuffer on lbs array instead of lb1. + (init): Removed the initialisation of the logical _gd array; + (find_entries): A .sa suffix means assembler file. (C_create_stab): "auto", "void", "extern", "static" are st_C_typespec. All C state machines rewritten. - (C_entries): complete rewrite. - (condider_token): complete rewrite. - (getline): deleted. + (C_entries): Complete rewrite. + (condider_token): Complete rewrite. + (getline): Deleted. 1993-03-01 Francesco Potort,Al(B (pot@fly.CNUCE.CNR.IT) @@ -5311,7 +5315,7 @@ 1993-03-19 Eric S. Raymond (eric@geech.gnu.ai.mit.edu) - * Makefile.in (EXECUTABLES): added rcs-checkin. + * Makefile.in (EXECUTABLES): Added rcs-checkin. * Makefile.in (unlock, relock): New productions. @@ -5594,7 +5598,7 @@ 1992-05-04 Jim Blandy (jimb@pogo.cs.oberlin.edu) - * Makefile.in: flags in CC invocations rearranged for no reason. + * Makefile.in: Flags in CC invocations rearranged for no reason. 1992-04-20 Jim Blandy (jimb@pogo.cs.oberlin.edu) @@ -6007,13 +6011,13 @@ 1989-04-18 Richard Stallman (rms@sugar-bombs.ai.mit.edu) - * loadst.c: on bsd4.3, use gettimeofday instead of CPUSTATES. + * loadst.c: On bsd4.3, use gettimeofday instead of CPUSTATES. 1989-03-15 Jeff Peck (rms@sugar-bombs.ai.mit.edu) * emacstool.c: setenv IN_EMACSTOOL=t, TERM=sun, TERMCAP=. - * emacsstool.1: update to document environment variables. + * emacsstool.1: Update to document environment variables. 1989-02-21 Richard Stallman (rms@sugar-bombs.ai.mit.edu) @@ -6114,7 +6118,7 @@ 1988-09-24 Richard Stallman (rms@gluteus.ai.mit.edu) - * etags.c (main): default setting of eflag was backwards. + * etags.c (main): Default setting of eflag was backwards. 1988-09-23 Richard Stallman (rms@sugar-bombs.ai.mit.edu) @@ -6197,7 +6201,7 @@ 1988-04-28 Richard Stallman (rms@frosted-flakes.ai.mit.edu) * movemail.c: #undef close, since config can #define it on V.3. - * emacsclient.c, fakemail.c, loadst.c, server.c: likewise. + * emacsclient.c, fakemail.c, loadst.c, server.c: Likewise. 1988-04-26 Richard Stallman (rms@lucky-charms.ai.mit.edu) @@ -6208,9 +6212,9 @@ 1988-03-20 Richard M. Stallman (rms@wilson) - * server.c [not BSD and not HAVE_SYSVIPC]: fix error message. - - * loadst.c (main) [XENIX]: use /usr/spool/mail, not /usr/mail. + * server.c [not BSD and not HAVE_SYSVIPC]: Fix error message. + + * loadst.c (main) [XENIX]: Use /usr/spool/mail, not /usr/mail. ;; Local Variables: ;; coding: iso-2022-7bit diff -r 9844e2d783f6 -r cf532dffa6ef lib-src/makefile.w32-in --- a/lib-src/makefile.w32-in Wed May 16 19:48:35 2007 +0000 +++ b/lib-src/makefile.w32-in Thu May 17 01:12:58 2007 +0000 @@ -24,7 +24,7 @@ .PHONY: $(ALL) -VERSION = 22.0.99 +VERSION = 22.1.50 LOCAL_FLAGS = -DWINDOWSNT -DDOS_NT -DSTDC_HEADERS=1 -DNO_LDAV=1 \ -DNO_ARCHIVES=1 -DHAVE_CONFIG_H=1 -I../nt/inc \ diff -r 9844e2d783f6 -r cf532dffa6ef lisp/ChangeLog --- a/lisp/ChangeLog Wed May 16 19:48:35 2007 +0000 +++ b/lisp/ChangeLog Thu May 17 01:12:58 2007 +0000 @@ -34,22 +34,43 @@ * view.el (view-inhibit-help-message): Fix typo in docstring. (view-scroll-auto-exit, view-try-extend-at-buffer-end): Doc fixes. +2007-05-16 Martin Rudalics + + * textmodes/ispell.el (ispell-start-process): Defend against bad + default-directory. + 2007-05-14 Eli Zaretskii * mail/rmail.el (rmail-convert-to-babyl-format): Check - content-transfer-encoding _last_, because we need its position in - base64-header-field-end. + content-transfer-encoding _last_, because it's its position that + we need as value of base64-header-field-end. 2007-05-14 Juanma Barranquero * files.el (mode-require-final-newline, require-final-newline) (enable-local-variables, enable-local-eval): Doc fixes. -2007-05-10 Edward O'Connor (tiny change) - - * progmodes/python.el (python-font-lock-keywords) - (python-open-block-statement-p, python-mode): Add support for the new - "with" keyword. +2007-05-13 Vinicius Jose Latorre + + * ps-print.el: Use default color when foreground or background color + are unspecified. Reported by Leo . + (ps-print-version): New version 6.7.4. + (ps-rgb-color): New argument. Use default color when color is + unspecified. + (ps-begin-job): Fix code. + +2007-05-12 Chong Yidong + + * longlines.el (longlines-mode): Make longlines-auto-wrap + buffer-local. Add hooks unconditionally. + (longlines-auto-wrap): Toggle wrapping. + (longlines-after-change-function) + (longlines-post-command-function): Check longlines-auto-wrap. + +2007-05-12 Nick Roberts + + * xt-mouse.el (xterm-mouse-debug-buffer): New variable. + (xterm-mouse-translate): Use it. 2007-05-10 Richard Stallman @@ -70,11 +91,60 @@ (set-auto-mode): Handle file-start-mode-alist. A little cleanup of structure. -2007-05-10 Davis Herring - - * calendar/timeclock.el (timeclock-in): Fix non-interactive - workday specifications. - (timeclock-log): Don't kill the log buffer if it already existed. +2007-05-10 Micha,Ak(Bl Cadilhac + + * man.el (Man-next-section): Don't consider the last line of the page + as being part of any section. + +2007-05-10 Stefan Monnier + + * textmodes/sgml-mode.el (sgml-value): Fix handling of attributes which + can take any number of values. + +2007-05-09 Stefan Monnier + + * textmodes/tex-mode.el (tex-font-lock-keywords-2): Add citet and citep + to the list of citation commands. + +2007-05-09 Stefan Monnier + + * vc-hooks.el (vc-find-root): Stop searching when the user changes. + +2007-05-09 Edward O'Connor (tiny change) + + * progmodes/python.el (python-font-lock-keywords) + (python-open-block-statement-p, python-mode): Add support for the new + "with" keyword. + +2007-05-08 Stefan Monnier + + * diff-mode.el (diff-apply-hunk, diff-test-hunk): Don't do by default + the exact opposite of diff-goto-source. + + * emacs-lisp/advice.el (ad-special-forms): Remove. + (ad-special-form-p): Use subr-arity. + + * newcomment.el (comment-search-forward): Make sure we search forward. + (comment-enter-backward): Try and distinguish the non-matching case at + EOB from the non-matching case with a missing comment-end-skip for + a 2-char comment ender. + (comment-choose-indent): New function extracted from comment-indent. + Improve the alignment algorithm. + (comment-indent): Use it. + + * textmodes/sgml-mode.el (sgml-lexical-context): Add handling of + XML style Processing Instructions. + (sgml-parse-tag-backward): Handle XML-style PIs. Also ensure progress. + (sgml-calculate-indent): Handle `pi' context. + + * vc.el: Ensure that update-changelog issues an error when used with + a backend that does not implement it. + (vc-update-changelog-rcs2log): Rename from vc-default-update-changelog. + Remove `backend' argument. Use expand-file-name. + (vc-cvs-update-changelog, vc-rcs-update-changelog): New aliases. + + * progmodes/python.el (python-end-of-block): Revert last change. + (python-end-of-statement): Make sure we move *forward*. 2007-05-08 Richard Stallman @@ -95,6 +165,29 @@ * emacs-lisp/eldoc.el (turn-on-eldoc-mode): Doc fix. +2007-05-05 Stefan Monnier + + * diff.el (diff): Use buffer-local vars diff-old-file and diff-new-file + rather than storing their value in the revert-buffer function. + +2007-05-04 Nick Roberts + + * t-mouse.el (t-mouse-mode): Do nothing on a graphical display + when disabling t-mouse-mode. + +2007-05-01 Davis Herring + + * calendar/timeclock.el: Update version number. + (timeclock-modeline-display): Mention timeclock-use-display-time + in explanatory message. + (timeclock-in): Fix non-interactive workday specifications. + (timeclock-log): Don't kill the log buffer if it already existed. + Suppress warnings when finding the log. Don't check for a nil + project twice. Run hooks after killing the buffer (if applicable). + (timeclock-geometric-mean): Rename to `timeclock-mean' (it never + was geometric). All uses changed. + (timeclock-generate-report): Support prefix argument. + 2007-05-03 Ryan Yeske * net/rcirc.el (rcirc-timeout-seconds): Increase to prevent unwanted @@ -104,11 +197,6 @@ * dired-x.el: Revert 2007-04-06 change. -2007-04-30 Nick Roberts - - * progmodes/gud.el (gud-menu-map): Pdb can't handle SIGINT so - don't put stop on toolbar. - 2007-04-29 Stephen Berman * find-dired.el (find-dired-filter): Propertize all text down to eob. @@ -126,6 +214,11 @@ * progmodes/sh-script.el (sh-mode): Recognize .profile as sh style. +2007-04-28 Nick Roberts + + * progmodes/gud.el (gud-menu-map): Pdb can't handle SIGINT so + don't put stop on toolbar. + 2007-04-28 Stefan Monnier * vc-hooks.el (vc-ignore-dir-regexp): Add /.../ for the DFS filesystem. @@ -135,8 +228,6 @@ * makefile.w32-in ($(lisp)/mh-e/mh-loaddefs.el): Use ./mh-e instead of $(lisp)/mh-e. - * textmodes/fill.el (fill-paragraph): Doc fix. - 2007-04-28 Glenn Morris * image-dired.el (image-dired-cmd-create-thumbnail-options) @@ -148,10 +239,13 @@ * textmodes/flyspell.el (flyspell-auto-correct-previous-word): Use window-start and window-end. -2007-04-26 Glenn Morris - - * progmodes/python.el: Restore file pending consideration of legal - status. +2007-04-27 Andreas Schwab + + * emacs-lisp/sregex.el (sregexq): Fix doc string quoting. + +2007-04-27 Eli Zaretskii + + * textmodes/fill.el (fill-paragraph): Doc fix. 2007-04-26 Luc Teirlinck @@ -162,6 +256,8 @@ * button.el (button): Use underline if supported, else fall back to color. + * version.el (emacs-version): Increase to 22.1.50. + 2007-04-25 Richard Stallman * hi-lock.el (hi-lock-file-patterns-policy): Default to `ask'. @@ -182,10 +278,6 @@ * custom.el (defface): Doc fix. -2007-04-24 Chong Yidong - - * progmodes/python.el: Remove due to unclear legal issues. - 2007-04-24 J.D. Smith * progmodes/idlw-shell.el (idlwave-shell-clear-all-bp): @@ -13729,8 +13821,8 @@ 2006-01-29 Edward O'Connor - * emulation/viper.el (viper-major-mode-modifier-list): Add - insert-state and vi-state entries for erc-mode. + * emulation/viper.el (viper-major-mode-modifier-list): + Add insert-state and vi-state entries for erc-mode. (viper-go-away, viper-set-hooks): Add and remove viper-comint-mode-hook from erc-mode-hook as appropriate. diff -r 9844e2d783f6 -r cf532dffa6ef lisp/calendar/timeclock.el --- a/lisp/calendar/timeclock.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/calendar/timeclock.el Thu May 17 01:12:58 2007 +0000 @@ -5,7 +5,7 @@ ;; Author: John Wiegley ;; Created: 25 Mar 1999 -;; Version: 2.6 +;; Version: 2.6.1 ;; Keywords: calendar data ;; This file is part of GNU Emacs. @@ -304,8 +304,8 @@ ;; Update immediately so there is a visible change ;; on calling this function. (if display-time-mode (timeclock-update-modeline) - (message "Activate `display-time-mode' to see \ -timeclock information")) + (message "Activate `display-time-mode' or turn off \ +`timeclock-use-display-time' to see timeclock information")) (add-hook 'display-time-hook 'timeclock-update-modeline)) (setq timeclock-update-timer (run-at-time nil 60 'timeclock-update-modeline)))) @@ -589,6 +589,38 @@ (message "%s" string) string))) +(defun timeclock-make-hours-explicit (old-default) + "Specify all workday lengths in `timeclock-file'. +OLD-DEFAULT hours are set for every day that has no number indicated." + (interactive "P") + (if old-default (setq old-default (prefix-numeric-value old-default)) + (error "timelog-make-hours-explicit requires an explicit argument")) + (let ((extant-timelog (find-buffer-visiting timeclock-file)) + current-date) + (with-current-buffer (find-file-noselect timeclock-file t) + (unwind-protect + (save-excursion + (save-restriction + (widen) + (goto-char (point-min)) + (while (progn (skip-chars-forward "\n") (not (eobp))) + ;; This is just a variant of `timeclock-moment-regexp'. + (unless (looking-at + (concat "^\\([bhioO]\\) \\([0-9]+/[0-9]+/[0-9]+\\) " + "\\([0-9]+:[0-9]+:[0-9]+\\)")) + (error "Can't parse `%s'" timeclock-file)) + (let ((this-date (match-string 2))) + (unless (or (and current-date + (string= this-date current-date)) + (string= (match-string 1) "h")) + (insert (format "h %s %s %s\n" (match-string 2) + (match-string 3) old-default))) + (if (string-match "^[ih]" (match-string 1)) ; ignore logouts + (setq current-date this-date))) + (forward-line)) + (save-buffer))) + (unless extant-timelog (kill-buffer (current-buffer))))))) + ;;; Internal Functions: (defvar timeclock-project-list nil) @@ -653,7 +685,7 @@ If PROJECT is a string, it represents the project which the event is being logged for. Normally only \"in\" events specify a project." (let ((extant-timelog (find-buffer-visiting timeclock-file))) - (with-current-buffer (find-file-noselect timeclock-file) + (with-current-buffer (find-file-noselect timeclock-file t) (save-excursion (save-restriction (widen) @@ -663,8 +695,7 @@ (let ((now (current-time))) (insert code " " (format-time-string "%Y/%m/%d %H:%M:%S" now) - (or (and project - (stringp project) + (or (and (stringp project) (> (length project) 0) (concat " " project)) "") @@ -679,8 +710,8 @@ timeclock-last-period))) (setq timeclock-last-event (list code now project))))) (save-buffer) - (run-hooks 'timeclock-event-hook) - (unless extant-timelog (kill-buffer (current-buffer)))))) + (unless extant-timelog (kill-buffer (current-buffer))))) + (run-hooks 'timeclock-event-hook)) (defvar timeclock-moment-regexp (concat "\\([bhioO]\\)\\s-+" @@ -1152,8 +1183,8 @@ (setcar (nthcdr 2 decoded) 0) (apply 'encode-time decoded))) -(defun timeclock-geometric-mean (l) - "Compute the geometric mean of the values in the list L." +(defun timeclock-mean (l) + "Compute the arithmetic mean of the values in the list L." (let ((total 0) (count 0)) (while l @@ -1168,7 +1199,7 @@ "Generate a summary report based on the current timelog file. By default, the report is in plain text, but if the optional argument HTML-P is non-nil, HTML markup is added." - (interactive) + (interactive "P") (let ((log (timeclock-log-data)) (today (timeclock-day-base))) (if html-p (insert "

")) @@ -1300,14 +1331,10 @@ ;; average statistics (let ((i 0) (l 5)) (while (< i l) - (aset time-in i (timeclock-geometric-mean - (cdr (aref time-in i)))) - (aset time-out i (timeclock-geometric-mean - (cdr (aref time-out i)))) - (aset breaks i (timeclock-geometric-mean - (cdr (aref breaks i)))) - (aset workday i (timeclock-geometric-mean - (cdr (aref workday i)))) + (aset time-in i (timeclock-mean (cdr (aref time-in i)))) + (aset time-out i (timeclock-mean (cdr (aref time-out i)))) + (aset breaks i (timeclock-mean (cdr (aref breaks i)))) + (aset workday i (timeclock-mean (cdr (aref workday i)))) (setq i (1+ i)))) ;; Output the HTML table (insert "\n") diff -r 9844e2d783f6 -r cf532dffa6ef lisp/dabbrev.el --- a/lisp/dabbrev.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/dabbrev.el Thu May 17 01:12:58 2007 +0000 @@ -128,7 +128,7 @@ (const :tag "off" nil)) :group 'dabbrev) -(defcustom dabbrev--eliminate-newlines t +(defcustom dabbrev-eliminate-newlines t "*Non-nil means dabbrev should not insert newlines. Instead it converts them to spaces." :type 'boolean @@ -913,10 +913,12 @@ ((equal abbrev (downcase abbrev)) 'downcase))))) ;; Convert whitespace to single spaces. - (if dabbrev--eliminate-newlines - ;; Start searching at end of ABBREV so that any whitespace - ;; carried over from the existing text is not changed. - (let ((pos (length abbrev))) + (if dabbrev-eliminate-newlines + (let ((pos + (if (equal abbrev " ") 0 (length abbrev)))) + ;; If ABBREV is real, search after the end of it. + ;; If ABBREV is space and we are copying successive words, + ;; search starting at the front. (while (string-match "[\n \t]+" expansion pos) (setq pos (1+ (match-beginning 0))) (setq expansion (replace-match " " nil nil expansion))))) diff -r 9844e2d783f6 -r cf532dffa6ef lisp/diff-mode.el --- a/lisp/diff-mode.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/diff-mode.el Thu May 17 01:12:58 2007 +0000 @@ -72,7 +72,7 @@ :group 'diff-mode) (defcustom diff-jump-to-old-file nil - "*Non-nil means `diff-goto-source' jumps to the old file. + "Non-nil means `diff-goto-source' jumps to the old file. Else, it jumps to the new file." :type 'boolean :group 'diff-mode) @@ -1276,7 +1276,7 @@ (if (> (- (car forw) orig) (- orig (car back))) back forw) (or back forw)))) -(defsubst diff-xor (a b) (if a (not b) b)) +(defsubst diff-xor (a b) (if a (if (not b) a) b)) (defun diff-find-source-location (&optional other-file reverse) "Find out (BUF LINE-OFFSET POS SRC DST SWITCHED). @@ -1358,8 +1358,15 @@ With a prefix argument, REVERSE the hunk." (interactive "P") (destructuring-bind (buf line-offset pos old new &optional switched) - ;; If REVERSE go to the new file, otherwise go to the old. - (diff-find-source-location (not reverse) reverse) + ;; Sometimes we'd like to have the following behavior: if REVERSE go + ;; to the new file, otherwise go to the old. But that means that by + ;; default we use the old file, which is the opposite of the default + ;; for diff-goto-source, and is thus confusing. Also when you don't + ;; know about it it's pretty surprising. + ;; TODO: make it possible to ask explicitly for this behavior. + ;; + ;; This is duplicated in diff-test-hunk. + (diff-find-source-location nil reverse) (cond ((null line-offset) (error "Can't find the text to patch")) @@ -1403,8 +1410,7 @@ With a prefix argument, try to REVERSE the hunk." (interactive "P") (destructuring-bind (buf line-offset pos src dst &optional switched) - ;; If REVERSE go to the new file, otherwise go to the old. - (diff-find-source-location (not reverse) reverse) + (diff-find-source-location nil reverse) (set-window-point (display-buffer buf) (+ (car pos) (cdr src))) (diff-hunk-status-msg line-offset (diff-xor reverse switched) t))) diff -r 9844e2d783f6 -r cf532dffa6ef lisp/diff.el --- a/lisp/diff.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/diff.el Thu May 17 01:12:58 2007 +0000 @@ -124,9 +124,13 @@ (erase-buffer)) (buffer-enable-undo (current-buffer)) (diff-mode) + ;; Use below 2 vars for backward-compatibility. + (set (make-local-variable 'diff-old-file) old) + (set (make-local-variable 'diff-new-file) new) + (set (make-local-variable 'diff-extra-args) (list switches no-async)) (set (make-local-variable 'revert-buffer-function) - `(lambda (ignore-auto noconfirm) - (diff ',old ',new ',switches ',no-async))) + (lambda (ignore-auto noconfirm) + (apply 'diff diff-old-file diff-new-file diff-extra-args))) (set (make-local-variable 'diff-old-temp-file) old-alt) (set (make-local-variable 'diff-new-temp-file) new-alt) (setq default-directory thisdir) @@ -186,5 +190,5 @@ (provide 'diff) -;;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd +;; arch-tag: 7de2c29b-7ea5-4b85-9b9d-72dd860de2bd ;;; diff.el ends here diff -r 9844e2d783f6 -r cf532dffa6ef lisp/dired.el diff -r 9844e2d783f6 -r cf532dffa6ef lisp/emacs-lisp/advice.el --- a/lisp/emacs-lisp/advice.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/emacs-lisp/advice.el Thu May 17 01:12:58 2007 +0000 @@ -2467,23 +2467,11 @@ "Take a macro function DEFINITION and make a lambda out of it." `(cdr ,definition)) -;; There is no way to determine whether some subr is a special form or not, -;; hence we need this list (which is probably out of date): -(defvar ad-special-forms - (let ((tem '(and catch cond condition-case defconst defmacro - defun defvar function if interactive let let* - or prog1 prog2 progn quote save-current-buffer - save-excursion save-restriction save-window-excursion - setq setq-default unwind-protect while - with-output-to-temp-buffer))) - ;; track-mouse could be void in some configurations. - (if (fboundp 'track-mouse) - (push 'track-mouse tem)) - (mapcar 'symbol-function tem))) - -(defmacro ad-special-form-p (definition) - ;;"non-nil if DEFINITION is a special form." - (list 'memq definition 'ad-special-forms)) +(defun ad-special-form-p (definition) + "Non-nil iff DEFINITION is a special form." + (if (and (symbolp definition) (fboundp definition)) + (setq definition (indirect-function definition))) + (and (subrp definition) (eq (cdr (subr-arity definition)) 'unevalled))) (defmacro ad-interactive-p (definition) ;;"non-nil if DEFINITION can be called interactively." diff -r 9844e2d783f6 -r cf532dffa6ef lisp/emacs-lisp/sregex.el --- a/lisp/emacs-lisp/sregex.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/emacs-lisp/sregex.el Thu May 17 01:12:58 2007 +0000 @@ -436,11 +436,11 @@ or end of a word. - the symbol `bow' - Stands for \"\\\\\\=<\", matching the empty string at the beginning of a + Stands for \"\\\\=\\<\", matching the empty string at the beginning of a word. - the symbol `eow' - Stands for \"\\\\\\=>\", matching the empty string at the end of a word. + Stands for \"\\\\=\\>\", matching the empty string at the end of a word. - the symbol `wordchar' Stands for the regex \"\\\\w\", matching a word-constituent character diff -r 9844e2d783f6 -r cf532dffa6ef lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Wed May 16 19:48:35 2007 +0000 +++ b/lisp/gnus/ChangeLog Thu May 17 01:12:58 2007 +0000 @@ -1,3 +1,8 @@ +2007-05-10 Reiner Steib + + * gnus-art.el (gnus-article-mode): Fix comment about displaying + non-break space. + 2007-05-09 Didier Verna * gnus-diary.el, nndiary.el: Remove the description comment (nndiary is diff -r 9844e2d783f6 -r cf532dffa6ef lisp/gnus/gnus-art.el --- a/lisp/gnus/gnus-art.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/gnus/gnus-art.el Thu May 17 01:12:58 2007 +0000 @@ -3925,7 +3925,8 @@ (make-local-variable 'gnus-article-image-alist) (make-local-variable 'gnus-article-charset) (make-local-variable 'gnus-article-ignored-charsets) - ;; Prevent recent Emacsen from displaying non-break space as "\ ". + ;; Prevent Emacs 22 from displaying non-break space with `nobreak-space' + ;; face. (set (make-local-variable 'nobreak-char-display) nil) (setq cursor-in-non-selected-windows nil) (gnus-set-default-directory) diff -r 9844e2d783f6 -r cf532dffa6ef lisp/gnus/nndiary.el diff -r 9844e2d783f6 -r cf532dffa6ef lisp/longlines.el --- a/lisp/longlines.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/longlines.el Thu May 17 01:12:58 2007 +0000 @@ -110,6 +110,7 @@ (add-hook 'change-major-mode-hook 'longlines-mode-off nil t) (add-hook 'before-revert-hook 'longlines-before-revert-hook nil t) (make-local-variable 'buffer-substring-filters) + (make-local-variable 'longlines-auto-wrap) (set (make-local-variable 'isearch-search-fun-function) 'longlines-search-function) (add-to-list 'buffer-substring-filters 'longlines-encode-string) @@ -149,12 +150,10 @@ (add-to-list 'message-indent-citation-function 'longlines-decode-region t))) + (add-hook 'after-change-functions 'longlines-after-change-function nil t) + (add-hook 'post-command-hook 'longlines-post-command-function nil t) (when longlines-auto-wrap - (auto-fill-mode 0) - (add-hook 'after-change-functions - 'longlines-after-change-function nil t) - (add-hook 'post-command-hook - 'longlines-post-command-function nil t))) + (auto-fill-mode 0))) ;; Turn off longlines mode (setq buffer-file-format (delete 'longlines buffer-file-format)) (if longlines-showing @@ -365,29 +364,27 @@ ;; Auto wrap (defun longlines-auto-wrap (&optional arg) - "Turn on automatic line wrapping, and wrap the entire buffer. -With optional argument ARG, turn off line wrapping." + "Toggle automatic line wrapping. +With optional argument ARG, turn on line wrapping if and only if ARG is positive. +If automatic line wrapping is turned on, wrap the entire buffer." (interactive "P") - (remove-hook 'after-change-functions 'longlines-after-change-function t) - (remove-hook 'post-command-hook 'longlines-post-command-function t) - (if arg - (progn (setq longlines-auto-wrap nil) - (message "Auto wrap disabled.")) - (setq longlines-auto-wrap t) - (add-hook 'after-change-functions - 'longlines-after-change-function nil t) - (add-hook 'post-command-hook - 'longlines-post-command-function nil t) - (let ((mod (buffer-modified-p))) - (longlines-wrap-region (point-min) (point-max)) - (set-buffer-modified-p mod)) - (message "Auto wrap enabled."))) + (and (null arg) + (null longlines-auto-wrap) + (setq arg 1)) + (if (> (prefix-numeric-value arg) 0) + (let ((mod (buffer-modified-p))) + (setq longlines-auto-wrap t) + (longlines-wrap-region (point-min) (point-max)) + (set-buffer-modified-p mod) + (message "Auto wrap enabled.")) + (setq longlines-auto-wrap nil) + (message "Auto wrap disabled."))) (defun longlines-after-change-function (beg end len) "Update `longlines-wrap-beg' and `longlines-wrap-end'. This is called by `after-change-functions' to keep track of the region that has changed." - (unless undo-in-progress + (when (and longlines-auto-wrap (not undo-in-progress)) (setq longlines-wrap-beg (if longlines-wrap-beg (min longlines-wrap-beg beg) beg)) (setq longlines-wrap-end @@ -396,7 +393,7 @@ (defun longlines-post-command-function () "Perform line wrapping on the parts of the buffer that have changed. This is called by `post-command-hook' after each command." - (when longlines-wrap-beg + (when (and longlines-auto-wrap longlines-wrap-beg) (if (or (eq this-command 'yank) (eq this-command 'yank-pop)) (longlines-decode-region (point) (mark t))) diff -r 9844e2d783f6 -r cf532dffa6ef lisp/man.el --- a/lisp/man.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/man.el Thu May 17 01:12:58 2007 +0000 @@ -1296,7 +1296,9 @@ (forward-line 1)) (if (re-search-forward Man-heading-regexp (point-max) t n) (beginning-of-line) - (goto-char (point-max))))) + (goto-char (point-max)) + ;; The last line doesn't belong to any section. + (forward-line -1)))) (defun Man-previous-section (n) "Move point to Nth previous section (default 1)." diff -r 9844e2d783f6 -r cf532dffa6ef lisp/newcomment.el --- a/lisp/newcomment.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/newcomment.el Thu May 17 01:12:58 2007 +0000 @@ -97,10 +97,10 @@ ;;;###autoload (defcustom comment-column 32 "Column to indent right-margin comments to. -Each mode establishes a different default value for this variable; you +Each mode may establish a different default value for this variable; you can set the value for a particular mode using that mode's hook. -Comments might be indented to a value smaller than this in order -not to go beyond `comment-fill-column'." +Comments might be indented to a different value in order not to go beyond +`comment-fill-column' or in order to align them with surrounding comments." :type 'integer :group 'comment) (make-variable-buffer-local 'comment-column) @@ -491,16 +491,24 @@ (goto-char (point-min)) (re-search-forward (concat comment-end-skip "\\'") nil t)) (goto-char (match-beginning 0))) - ;; comment-end-skip not found. Maybe we're at EOB which implicitly - ;; closes the comment. - ((eobp) (skip-syntax-backward " ")) - (t - ;; else comment-end-skip was not found probably because it was not - ;; set right. Since \\s> should catch the single-char case, we'll - ;; blindly assume we're at the end of a two-char comment-end. + ;; comment-end-skip not found probably because it was not set + ;; right. Since \\s> should catch the single-char case, let's + ;; check that we're looking at a two-char comment ender. + ((not (or (<= (- (point-max) (line-beginning-position)) 1) + (zerop (logand (car (syntax-after (- (point) 1))) + ;; Here we take advantage of the fact that + ;; the syntax class " " is encoded to 0, + ;; so " 4" gives us just the 4 bit. + (car (string-to-syntax " 4")))) + (zerop (logand (car (syntax-after (- (point) 2))) + (car (string-to-syntax " 3")))))) (backward-char 2) (skip-chars-backward (string (char-after))) - (skip-syntax-backward " "))))) + (skip-syntax-backward " ")) + ;; No clue what's going on: maybe we're really not right after the + ;; end of a comment. Maybe we're at the "end" because of EOB rather + ;; than because of a marker. + (t (skip-syntax-backward " "))))) ;;;; ;;;; Commands @@ -516,6 +524,58 @@ (and (> comment-add 0) (looking-at "\\s<\\(\\S<\\|\\'\\)"))) comment-column))) +(defun comment-choose-indent (&optional indent) + "Choose the indentation to use for a right-hand-side comment. +The criteria are (in this order): +- try to keep the comment's text within `comment-fill-column'. +- try to align with surrounding comments. +- prefer INDENT (or `comment-column' if nil). +Point is expected to be at the start of the comment." + (unless indent (setq indent comment-column)) + ;; Avoid moving comments past the fill-column. + (let ((max (+ (current-column) + (- (or comment-fill-column fill-column) + (save-excursion (end-of-line) (current-column))))) + (other nil) + (min (save-excursion (skip-chars-backward " \t") + (1+ (current-column))))) + ;; Fix up the range. + (if (< max min) (setq max min)) + ;; Don't move past the fill column. + (if (<= max indent) (setq indent max)) + ;; We can choose anywhere between min..max. + ;; Let's try to align to a comment on the previous line. + (save-excursion + (when (and (zerop (forward-line -1)) + (setq other (comment-search-forward + (line-end-position) t))) + (goto-char other) (setq other (current-column)))) + (if (and other (<= other max) (>= other min)) + ;; There is a comment and it's in the range: bingo! + other + ;; Can't align to a previous comment: let's try to align to comments + ;; on the following lines, then. These have not been re-indented yet, + ;; so we can't directly align ourselves with them. All we do is to try + ;; and choose an indentation point with which they will be able to + ;; align themselves. + (save-excursion + (while (and (zerop (forward-line 1)) + (setq other (comment-search-forward + (line-end-position) t))) + (goto-char other) + (let ((omax (+ (current-column) + (- (or comment-fill-column fill-column) + (save-excursion (end-of-line) (current-column))))) + (omin (save-excursion (skip-chars-backward " \t") + (1+ (current-column))))) + (if (and (>= omax min) (<= omin max)) + (progn (setq min (max omin min)) + (setq max (min omax max))) + ;; Can't align with this anyway, so exit the loop. + (goto-char (point-max)))))) + ;; Return the closest point to indent within min..max. + (max min (min max indent))))) + ;;;###autoload (defun comment-indent (&optional continue) "Indent this line's comment to `comment-column', or insert an empty comment. @@ -569,38 +629,9 @@ (if (not indent) ;; comment-indent-function refuses: delegate to line-indent. (indent-according-to-mode) - ;; If the comment is at the left of code, adjust the indentation. + ;; If the comment is at the right of code, adjust the indentation. (unless (save-excursion (skip-chars-backward " \t") (bolp)) - ;; Avoid moving comments past the fill-column. - (let ((max (+ (current-column) - (- (or comment-fill-column fill-column) - (save-excursion (end-of-line) (current-column)))))) - (if (<= max indent) - (setq indent max) ;Don't move past the fill column. - ;; We can choose anywhere between indent..max. - ;; Let's try to align to a comment on the previous line. - (let ((other nil) - (min (max indent - (save-excursion (skip-chars-backward " \t") - (1+ (current-column)))))) - (save-excursion - (when (and (zerop (forward-line -1)) - (setq other (comment-search-forward - (line-end-position) t))) - (goto-char other) (setq other (current-column)))) - (if (and other (<= other max) (>= other min)) - ;; There is a comment and it's in the range: bingo. - (setq indent other) - ;; Let's try to align to a comment on the next line, then. - (let ((other nil)) - (save-excursion - (when (and (zerop (forward-line 1)) - (setq other (comment-search-forward - (line-end-position) t))) - (goto-char other) (setq other (current-column)))) - (if (and other (<= other max) (> other min)) - ;; There is a comment and it's in the range: bingo. - (setq indent other)))))))) + (setq indent (comment-choose-indent indent))) ;; Update INDENT to leave at least one space ;; after other nonwhite text on the line. (save-excursion diff -r 9844e2d783f6 -r cf532dffa6ef lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/progmodes/compile.el Thu May 17 01:12:58 2007 +0000 @@ -1860,7 +1860,24 @@ (let* ((name (read-file-name (format "Find this %s in (default %s): " compilation-error filename) - spec-dir filename t nil)) + spec-dir filename t nil + ;; The predicate below is fine when called from + ;; minibuffer-complete-and-exit, but it's too + ;; restrictive otherwise, since it also prevents the + ;; user from completing "fo" to "foo/" when she + ;; wants to enter "foo/bar". + ;; + ;; Try to make sure the user can only select + ;; a valid answer. This predicate may be ignored, + ;; tho, so we still have to double-check afterwards. + ;; TODO: We should probably fix read-file-name so + ;; that it never ignores this predicate, even when + ;; using popup dialog boxes. + ;; (lambda (name) + ;; (if (file-directory-p name) + ;; (setq name (expand-file-name filename name))) + ;; (file-exists-p name)) + )) (origname name)) (cond ((not (file-exists-p name)) diff -r 9844e2d783f6 -r cf532dffa6ef lisp/progmodes/python.el --- a/lisp/progmodes/python.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/progmodes/python.el Thu May 17 01:12:58 2007 +0000 @@ -883,10 +883,13 @@ nil) ((eq 'string (syntax-ppss-context s)) ;; Go to start of string and skip it. - (goto-char (nth 8 s)) - (condition-case () ; beware invalid syntax - (progn (forward-sexp) t) - (error (end-of-line)))) + (let ((pos (point))) + (goto-char (nth 8 s)) + (condition-case () ; beware invalid syntax + (progn (forward-sexp) t) + ;; If there's a mismatched string, make sure + ;; we still overall move *forward*. + (error (goto-char pos) (end-of-line))))) ((python-skip-out t s)))) (end-of-line)) (unless comment @@ -981,15 +984,11 @@ (_ (if (python-comment-line-p) (python-skip-comments/blanks t))) (ci (current-indentation)) - (open (python-open-block-statement-p)) - opoint) + (open (python-open-block-statement-p))) (if (and (zerop ci) (not open)) (not (goto-char point)) (catch 'done - (setq opoint (point)) - (while (and (zerop (python-next-statement)) - (not (= opoint (point)))) - (setq opoint (point)) + (while (zerop (python-next-statement)) (when (or (and open (<= (current-indentation) ci)) (< (current-indentation) ci)) (python-skip-comments/blanks t) diff -r 9844e2d783f6 -r cf532dffa6ef lisp/ps-print.el --- a/lisp/ps-print.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/ps-print.el Thu May 17 01:12:58 2007 +0000 @@ -10,11 +10,11 @@ ;; Maintainer: Kenichi Handa (multi-byte characters) ;; Vinicius Jose Latorre ;; Keywords: wp, print, PostScript -;; Version: 6.7.3 +;; Version: 6.7.4 ;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre -(defconst ps-print-version "6.7.3" - "ps-print.el, v 6.7.3 <2007/02/06 vinicius> +(defconst ps-print-version "6.7.4" + "ps-print.el, v 6.7.4 <2007/05/13 vinicius> Vinicius's last change version -- this file may have been edited as part of Emacs without changes to the version number. When reporting bugs, please also @@ -5817,21 +5817,27 @@ (ps-get-size (symbol-value font-sym) "font size" font-sym)) -(defun ps-rgb-color (color default) - (cond ((and color (listp color) (= (length color) 3) - (let ((cl color) - (ok t) e) - (while (and ok cl) - (setq e (car cl) - cl (cdr cl) - ok (and (floatp e) (<= 0.0 e) (<= e 1.0)))) - ok)) - color) - ((and (floatp color) (<= 0.0 color) (<= color 1.0)) - (list color color color)) - ((stringp color) (ps-color-scale color)) - (t (list default default default)) - )) +(defun ps-rgb-color (color unspecified default) + (cond + ;; (float float float) ==> (R G B) + ((and color (listp color) (= (length color) 3) + (let ((cl color) + (ok t) e) + (while (and ok cl) + (setq e (car cl) + cl (cdr cl) + ok (and (floatp e) (<= 0.0 e) (<= e 1.0)))) + ok)) + color) + ;; float ==> 0.0 = black .. 1.0 = white + ((and (floatp color) (<= 0.0 color) (<= color 1.0)) + (list color color color)) + ;; "colorName" but different from "unspecified-[bf]g" + ((and (stringp color) (not (string= color unspecified))) + (ps-color-scale color)) + ;; ok, use the default + (t + (list default default default)))) (defun ps-begin-job (genfunc) @@ -5913,6 +5919,7 @@ (ps-face-background-name 'default)) (t ps-default-bg)) + "unspecified-bg" 1.0) ps-default-foreground (ps-rgb-color (cond @@ -5924,6 +5931,7 @@ (ps-face-foreground-name 'default)) (t ps-default-fg)) + "unspecified-fg" 0.0) ps-default-color (and (eq ps-print-color-p t) ps-default-foreground) ps-current-color ps-default-color diff -r 9844e2d783f6 -r cf532dffa6ef lisp/t-mouse.el --- a/lisp/t-mouse.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/t-mouse.el Thu May 17 01:12:58 2007 +0000 @@ -275,32 +275,32 @@ Turn it on to use Emacs mouse commands, and off to use t-mouse commands." nil " Mouse" nil :global t - (if t-mouse-mode - ;; Turn it on - (unless window-system - ;; Starts getting a stream of mouse events from an asynchronous process. - ;; Only works if Emacs is running on a virtual terminal without a window system. + (unless window-system + (if t-mouse-mode + ;; Turn it on. Starts getting a stream of mouse events from an + ;; asynchronous process. Only works if Emacs is running on a virtual + ;; terminal without a window system. (progn - (setq mouse-position-function #'t-mouse-mouse-position-function) - (let ((tty (t-mouse-tty)) - (process-connection-type t)) - (if (not (stringp tty)) - (error "Cannot find a virtual terminal")) - (setq t-mouse-process - (start-process "t-mouse" nil - "mev" "-i" "-E" "-C" tty - (if t-mouse-swap-alt-keys - "-M-leftAlt" "-M-rightAlt") - "-e-move" - "-dall" "-d-hard" - "-f"))) - (setq t-mouse-filter-accumulator "") - (set-process-filter t-mouse-process 't-mouse-process-filter) - (set-process-query-on-exit-flag t-mouse-process nil))) + (setq mouse-position-function #'t-mouse-mouse-position-function) + (let ((tty (t-mouse-tty)) + (process-connection-type t)) + (if (not (stringp tty)) + (error "Cannot find a virtual terminal")) + (setq t-mouse-process + (start-process "t-mouse" nil + "mev" "-i" "-E" "-C" tty + (if t-mouse-swap-alt-keys + "-M-leftAlt" "-M-rightAlt") + "-e-move" + "-dall" "-d-hard" + "-f"))) + (setq t-mouse-filter-accumulator "") + (set-process-filter t-mouse-process 't-mouse-process-filter) + (set-process-query-on-exit-flag t-mouse-process nil)) ;; Turn it off - (setq mouse-position-function nil) - (delete-process t-mouse-process) - (setq t-mouse-process nil))) + (setq mouse-position-function nil) + (delete-process t-mouse-process) + (setq t-mouse-process nil)))) (provide 't-mouse) diff -r 9844e2d783f6 -r cf532dffa6ef lisp/textmodes/ispell.el --- a/lisp/textmodes/ispell.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/textmodes/ispell.el Thu May 17 01:12:58 2007 +0000 @@ -2483,7 +2483,12 @@ (defun ispell-start-process () "Start the ispell process, with support for no asynchronous processes. Keeps argument list for future ispell invocations for no async support." - (let (args) + (let ((default-directory default-directory) + args) + (unless (and (file-directory-p default-directory) + (file-readable-p default-directory)) + ;; Defend against bad `default-directory'. + (setq default-directory (expand-file-name "~/"))) ;; Local dictionary becomes the global dictionary in use. (setq ispell-current-dictionary (or ispell-local-dictionary ispell-dictionary)) diff -r 9844e2d783f6 -r cf532dffa6ef lisp/textmodes/sgml-mode.el --- a/lisp/textmodes/sgml-mode.el Wed May 16 19:48:35 2007 +0000 +++ b/lisp/textmodes/sgml-mode.el Thu May 17 01:12:58 2007 +0000 @@ -45,12 +45,12 @@ :group 'languages) (defcustom sgml-basic-offset 2 - "*Specifies the basic indentation level for `sgml-indent-line'." + "Specifies the basic indentation level for `sgml-indent-line'." :type 'integer :group 'sgml) (defcustom sgml-transformation-function 'identity - "*Default value for `skeleton-transformation-function' in SGML mode." + "Default value for `skeleton-transformation-function' in SGML mode." :type 'function :group 'sgml) @@ -166,7 +166,7 @@ "Syntax table used to parse SGML tags.") (defcustom sgml-name-8bit-mode nil - "*When non-nil, insert non-ASCII characters as named entities." + "When non-nil, insert non-ASCII characters as named entities." :type 'boolean :group 'sgml) @@ -225,7 +225,7 @@ ;; The -s option suppresses output. (defcustom sgml-validate-command "nsgmls -s" ; replaced old `sgmls' - "*The command to validate an SGML document. + "The command to validate an SGML document. The file name of current buffer file name will be appended to this, separated by a space." :type 'string @@ -238,7 +238,7 @@ ;; I doubt that null end tags are used much for large elements, ;; so use a small distance here. (defcustom sgml-slash-distance 1000 - "*If non-nil, is the maximum distance to search for matching `/'." + "If non-nil, is the maximum distance to search for matching `/'." :type '(choice (const nil) integer) :group 'sgml) @@ -318,7 +318,7 @@ ("!doctype") ("!element") ("!entity")) - "*Alist of tag names for completing read and insertion rules. + "Alist of tag names for completing read and insertion rules. This alist is made up as ((\"tag\" . TAGRULE) @@ -348,15 +348,14 @@ ("!doctype" . "Document type (DTD) declaration") ("!element" . "Tag declaration") ("!entity" . "Entity (macro) declaration")) - "*Alist of tag name and short description." + "Alist of tag name and short description." :type '(repeat (cons (string :tag "Tag Name") (string :tag "Description"))) :group 'sgml) (defcustom sgml-xml-mode nil - "*When non-nil, tag insertion functions will be XML-compliant. -If this variable is customized, the custom value is used always. -Otherwise, it is set to be buffer-local when the file has + "When non-nil, tag insertion functions will be XML-compliant. +It is set to be buffer-local when the file has a DOCTYPE or an XML declaration." :type 'boolean :version "22.1" @@ -937,7 +936,7 @@ (defun sgml-lexical-context (&optional limit) "Return the lexical context at point as (TYPE . START). START is the location of the start of the lexical element. -TYPE is one of `string', `comment', `tag', `cdata', or `text'. +TYPE is one of `string', `comment', `tag', `cdata', `pi', or `text'. Optional argument LIMIT is the position to start parsing from. If nil, start from a preceding tag at indentation." @@ -964,12 +963,19 @@ (let ((cdata-start (point))) (unless (search-forward "]]>" pos 'move) (list 0 nil nil 'cdata nil nil nil nil cdata-start)))) + ((and sgml-xml-mode (looking-at "<\\?")) + ;; Processing Instructions. + ;; In SGML, it's basically a normal tag of the form + ;; but in XML, it takes the form . + (let ((pi-start (point))) + (unless (search-forward "?>" pos 'move) + (list 0 nil nil 'pi nil nil nil nil pi-start)))) (t ;; We've reached a tag. Parse it. ;; FIXME: Handle net-enabling start-tags (parse-partial-sexp (point) pos 0)))))) (cond - ((eq (nth 3 state) 'cdata) (cons 'cdata (nth 8 state))) + ((memq (nth 3 state) '(cdata pi)) (cons (nth 3 state) (nth 8 state))) ((nth 3 state) (cons 'string (nth 8 state))) ((nth 4 state) (cons 'comment (nth 8 state))) ((and state (> (nth 0 state) 0)) (cons 'tag (nth 1 state))) @@ -1003,8 +1009,10 @@ (insert alist ?\") (delete-backward-char 2))) (insert "=\"") - (when alist - (insert (skeleton-read '(completing-read "Value: " alist)))) + (if (cdr alist) + (insert (skeleton-read '(completing-read "Value: " alist))) + (when (null alist) + (insert (skeleton-read '(read-string "Value: "))))) (insert ?\")))) (defun sgml-quote (start end &optional unquotep) @@ -1093,9 +1101,15 @@ (when (eq (char-after) ?<) ;; Oops!! Looks like we were not in a textual context after all!. ;; Let's try to recover. + ;; Remember the tag-start so we don't need to look for it later. + ;; This is not just an optimization but also makes sure we don't get + ;; stuck in infloops in cases where "looking back for <" would not go + ;; back far enough. + (setq tag-start (point)) (with-syntax-table sgml-tag-syntax-table (let ((pos (point))) (condition-case nil + ;; FIXME: This does not correctly skip over PI an CDATA tags. (forward-sexp) (scan-error ;; This < seems to be just a spurious one, let's ignore it. @@ -1110,33 +1124,41 @@ (cond ((sgml-looking-back-at "--") ; comment (setq tag-type 'comment - tag-start (search-backward "