# HG changeset patch # User Miles Bader # Date 1178754471 0 # Node ID a0e8097f16969ad6930d2c52da2ff397f2eeee60 # Parent 4f3dcd505adb97c25e31ed07d590ddf415776485# Parent 8d4caf39c19f2b00cac1e4504d359336ccadab92 Merge from emacs--rel--22 Patches applied: * emacs--rel--22 (patch 12) - Update from CVS 2007-05-08 Richard Stallman * lisp/mail/mailabbrev.el (sendmail-pre-abbrev-expand-hook): Don't include non-self-insert commands in the exception for `-'. Revision: emacs@sv.gnu.org/emacs--devo--0--patch-739 diff -r 8d4caf39c19f -r a0e8097f1696 ChangeLog --- a/ChangeLog Tue May 08 18:15:58 2007 +0000 +++ b/ChangeLog Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 INSTALL diff -r 8d4caf39c19f -r a0e8097f1696 Makefile.in --- a/Makefile.in Tue May 08 18:15:58 2007 +0000 +++ b/Makefile.in Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 README --- a/README Tue May 08 18:15:58 2007 +0000 +++ b/README Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 admin/ChangeLog --- a/admin/ChangeLog Tue May 08 18:15:58 2007 +0000 +++ b/admin/ChangeLog Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 admin/FOR-RELEASE --- a/admin/FOR-RELEASE Tue May 08 18:15:58 2007 +0000 +++ b/admin/FOR-RELEASE Wed May 09 23:47:51 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,8 +40,7 @@ * BUGS -** python.el legal problem? -http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00459.html +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. diff -r 8d4caf39c19f -r a0e8097f1696 admin/make-tarball.txt --- a/admin/make-tarball.txt Tue May 08 18:15:58 2007 +0000 +++ b/admin/make-tarball.txt Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 admin/notes/copyright --- a/admin/notes/copyright Tue May 08 18:15:58 2007 +0000 +++ b/admin/notes/copyright Wed May 09 23:47:51 2007 +0000 @@ -228,6 +228,7 @@ the concept. rms: "My understanding is that game rules as such are not copyrightable." + rms: Legal advice is that we are ok and need not worry about this. lispref/doclicense.texi man/doclicense.texi @@ -405,6 +406,7 @@ Accordingly, FSF copyright was added. src/unexhp9k800.c (and dependent src/m/sr2k.h) + http://lists.gnu.org/archive/html/emacs-devel/2007-02/msg00138.html - briefly removed due to legal uncertainly Jan-Mar 2007. The relevant assignment is under "hp9k800" in copyright.list. File was written by John V. Morris at HP, and disclaimed by the author and @@ -549,9 +551,6 @@ Emacs 22 is released (though if they can be fixed before, that is obviously good): -Maybe some relevant comments here? - - Is it OK to just `cvs remove' a file for legal reasons, or is something more drastic needed? A removed file is still available from @@ -586,18 +585,10 @@ Done: TUTORIAL.eo -REMOVED src/unexhp9k800.c - - we would like to re-add this file if possible. Please let us know - if you can clarify its legal status. - http://lists.gnu.org/archive/html/emacs-devel/2007-02/msg00138.html - - *** These are copyright issues still to be addressed: python.el potential legal problem http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-04/msg00459.html - - This file is part of GNU Emacs. diff -r 8d4caf39c19f -r a0e8097f1696 etc/ChangeLog diff -r 8d4caf39c19f -r a0e8097f1696 etc/NEWS diff -r 8d4caf39c19f -r a0e8097f1696 etc/TODO --- a/etc/TODO Tue May 08 18:15:58 2007 +0000 +++ b/etc/TODO Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 lib-src/ChangeLog --- a/lib-src/ChangeLog Tue May 08 18:15:58 2007 +0000 +++ b/lib-src/ChangeLog Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 lib-src/makefile.w32-in --- a/lib-src/makefile.w32-in Tue May 08 18:15:58 2007 +0000 +++ b/lib-src/makefile.w32-in Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 lisp/ChangeLog --- a/lisp/ChangeLog Tue May 08 18:15:58 2007 +0000 +++ b/lisp/ChangeLog Wed May 09 23:47:51 2007 +0000 @@ -1,3 +1,43 @@ +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 * mail/mailabbrev.el (sendmail-pre-abbrev-expand-hook): @@ -17,6 +57,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 @@ -26,21 +89,10 @@ * 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. -2007-04-29 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-04-29 Richard Stallman * international/mule.el (auto-coding-alist): Add pdf => no-conversion. @@ -54,6 +106,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. @@ -63,8 +120,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) @@ -76,10 +131,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 @@ -90,6 +148,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'. @@ -110,10 +170,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): @@ -13657,8 +13713,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 8d4caf39c19f -r a0e8097f1696 lisp/ChangeLog.8 --- a/lisp/ChangeLog.8 Tue May 08 18:15:58 2007 +0000 +++ b/lisp/ChangeLog.8 Wed May 09 23:47:51 2007 +0000 @@ -5354,12 +5354,12 @@ * international/mule.el (auto-coding-alist): Add .tgz. -1999-05-2 Eli Zaretskii +1999-05-02 Eli Zaretskii * international/codepage.el (cp-coding-system-for-codepage-1): Make the magnification parameter for the -dos encoder be 2. -1999-05-2 Andrew Innes +1999-05-02 Andrew Innes * term/w32-win.el (w32-drag-n-drop): Select file in window where it is dropped, rather than current window. diff -r 8d4caf39c19f -r a0e8097f1696 lisp/calendar/timeclock.el --- a/lisp/calendar/timeclock.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/calendar/timeclock.el Wed May 09 23:47:51 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)))) @@ -375,8 +375,9 @@ (setq timeclock-discrepancy (- (or timeclock-discrepancy 0) workday)) (if (not (= workday timeclock-workday)) - (timeclock-log "h" (and (numberp arg) - (number-to-string arg)))))) + (timeclock-log "h" (number-to-string + (/ workday (if (zerop (% workday (* 60 60))) + 60 60.0) 60)))))) (timeclock-log "i" (or project (and timeclock-get-project-function (or find-project (interactive-p)) @@ -588,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) @@ -651,31 +684,34 @@ "Log the event CODE to the timeclock log, at the time of call. If PROJECT is a string, it represents the project which the event is being logged for. Normally only \"in\" events specify a project." - (with-current-buffer (find-file-noselect timeclock-file) - (goto-char (point-max)) - (if (not (bolp)) - (insert "\n")) - (let ((now (current-time))) - (insert code " " - (format-time-string "%Y/%m/%d %H:%M:%S" now) - (or (and project - (stringp project) - (> (length project) 0) - (concat " " project)) - "") - "\n") - (if (equal (downcase code) "o") - (setq timeclock-last-period - (- (timeclock-time-to-seconds now) - (timeclock-time-to-seconds - (cadr timeclock-last-event))) - timeclock-discrepancy - (+ timeclock-discrepancy - timeclock-last-period))) - (setq timeclock-last-event (list code now project))) - (save-buffer) - (run-hooks 'timeclock-event-hook) - (kill-buffer (current-buffer)))) + (let ((extant-timelog (find-buffer-visiting timeclock-file))) + (with-current-buffer (find-file-noselect timeclock-file t) + (save-excursion + (save-restriction + (widen) + (goto-char (point-max)) + (if (not (bolp)) + (insert "\n")) + (let ((now (current-time))) + (insert code " " + (format-time-string "%Y/%m/%d %H:%M:%S" now) + (or (and (stringp project) + (> (length project) 0) + (concat " " project)) + "") + "\n") + (if (equal (downcase code) "o") + (setq timeclock-last-period + (- (timeclock-time-to-seconds now) + (timeclock-time-to-seconds + (cadr timeclock-last-event))) + timeclock-discrepancy + (+ timeclock-discrepancy + timeclock-last-period))) + (setq timeclock-last-event (list code now project))))) + (save-buffer) + (unless extant-timelog (kill-buffer (current-buffer))))) + (run-hooks 'timeclock-event-hook)) (defvar timeclock-moment-regexp (concat "\\([bhioO]\\)\\s-+" @@ -1147,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 @@ -1163,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 "

")) @@ -1295,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 8d4caf39c19f -r a0e8097f1696 lisp/diff-mode.el --- a/lisp/diff-mode.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/diff-mode.el Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 lisp/diff.el --- a/lisp/diff.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/diff.el Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 lisp/emacs-lisp/advice.el --- a/lisp/emacs-lisp/advice.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/emacs-lisp/advice.el Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 lisp/emacs-lisp/sregex.el --- a/lisp/emacs-lisp/sregex.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/emacs-lisp/sregex.el Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Tue May 08 18:15:58 2007 +0000 +++ b/lisp/gnus/ChangeLog Wed May 09 23:47:51 2007 +0000 @@ -1,3 +1,9 @@ +2007-05-09 Didier Verna + + * gnus-diary.el, nndiary.el: Remove the description comment (nndiary is + now properly documented in the Gnus manual). Fix the spelling of "Back + End". + 2007-04-19 Katsumi Yamaoka * gnus-art.el (gnus-mime-strip-charset-parameters): New function. diff -r 8d4caf39c19f -r a0e8097f1696 lisp/gnus/gnus-diary.el --- a/lisp/gnus/gnus-diary.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/gnus/gnus-diary.el Wed May 09 23:47:51 2007 +0000 @@ -1,4 +1,4 @@ -;;; gnus-diary.el --- Wrapper around the NNDiary Gnus backend +;;; gnus-diary.el --- Wrapper around the NNDiary Gnus back end ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, ;; 2006, 2007 Free Software Foundation, Inc. @@ -33,63 +33,8 @@ ;; Description: ;; =========== -;; Gnus-Diary is a wrapper around the NNDiary Gnus backend. It is here to -;; make your nndiary-user life easier in different ways. So, you don't have -;; to use it if you don't want to. But, really, you should. - -;; Gnus-Diary offers the following features on top of the NNDiary backend: - -;; - A nice summary line format: -;; Displaying diary messages in standard summary line format (usually -;; something like ": ") is pretty useless. Most of the -;; time, you're the one who wrote the message, and you mostly want to see -;; the event's date. Gnus-Diary offers you a nice summary line format -;; which will do this. By default, a summary line will appear like this: -;; -;; : -;; -;; for example, here's how Joe's birthday is displayed in my -;; "nndiary:birhdays" summary buffer (the message is expirable, but will -;; never be deleted, as it specifies a regular event): -;; -;; E Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week) - -;; - More article sorting functions: -;; Gnus-Diary adds a new sorting function called -;; `gnus-summary-sort-by-schedule'. This function lets you organize your -;; diary summary buffers from the closest event to the farthest one. - -;; - Automatic generation of diary group parameters: -;; When you create a new diary group, or visit one, Gnus-Diary checks your -;; group parameters, and if needed, sets the summary line format to the -;; diary-specific value, adds the diary-specific sorting functions, and -;; also adds the different `X-Diary-*' headers to the group's -;; posting-style. It is then easier to send a diary message, because if -;; you use `C-u a' or `C-u m' on a diary group to prepare a message, these -;; headers will be inserted automatically (but not filled with proper -;; values yet). - -;; - An interactive mail-to-diary convertion function: -;; The function `gnus-diary-check-message' ensures that the current message -;; contains all the required diary headers, and prompts you for values / -;; correction if needed. This function is hooked in the nndiary backend so -;; that moving an article to an nndiary group will trigger it -;; automatically. It is also bound to `C-c D c' in message-mode and -;; article-edit-mode in order to ease the process of converting a usual -;; mail to a diary one. This function takes a prefix argument which will -;; force prompting of all diary headers, regardless of their -;; presence/validity. That way, you can very easily reschedule a diary -;; message for instance. - - -;; Usage: -;; ===== - -;; 0/ Don't use any `gnus-user-format-function-[d|D]'. Gnus-Diary provides -;; both of these (sorry if you used them before). -;; 1/ Add '(require 'gnus-diary) to your gnusrc file. -;; 2/ Customize your gnus-diary options to suit your needs. - +;; gnus-diary is a utility toolkit used on top of the nndiary back end. It is +;; now fully documented in the Gnus manual. ;; Bugs / Todo: @@ -103,7 +48,7 @@ (require 'gnus-art) (defgroup gnus-diary nil - "Utilities on top of the nndiary backend for Gnus." + "Utilities on top of the nndiary back end for Gnus." :version "22.1" :group 'gnus) @@ -136,7 +81,7 @@ :group 'gnus-diary) (defconst gnus-diary-version nndiary-version - "Current Diary backend version.") + "Current Diary back end version.") ;; Compatibility functions ================================================== @@ -334,7 +279,7 @@ )) ;; Called when a group is subscribed. This is needed because groups created -;; because of mail splitting are *not* created with the backend function. +;; because of mail splitting are *not* created with the back end function. ;; Thus, `nndiary-request-create-group-hooks' is inoperative. (defun gnus-diary-maybe-update-group-parameters (group) (when (eq (car (gnus-find-method-for-group group)) 'nndiary) @@ -452,7 +397,7 @@ ;; The end ================================================================== (defun gnus-diary-version () - "Current Diary backend version." + "Current Diary back end version." (interactive) (message "NNDiary version %s" nndiary-version)) diff -r 8d4caf39c19f -r a0e8097f1696 lisp/gnus/nndiary.el --- a/lisp/gnus/nndiary.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/gnus/nndiary.el Wed May 09 23:47:51 2007 +0000 @@ -1,4 +1,4 @@ -;;; nndiary.el --- A diary backend for Gnus +;;; nndiary.el --- A diary back end for Gnus ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, ;; 2005, 2006, 2007 Free Software Foundation, Inc. @@ -33,127 +33,8 @@ ;; Description: ;; =========== -;; This package implements NNDiary, a diary backend for Gnus. NNDiary is a -;; mail backend, pretty similar to nnml in its functionnning (it has all the -;; features of nnml, actually), but in which messages are treated as event -;; reminders. - -;; Here is a typical scenario: -;; - You've got a date with Andy Mc Dowell or Bruce Willis (select according -;; to your sexual preference) in one month. You don't want to forget it. -;; - Send a (special) diary message to yourself (see below). -;; - Forget all about it and keep on getting and reading new mail, as usual. -;; - From time to time, as you type `g' in the group buffer and as the date -;; is getting closer, the message will pop up again, just like if it were -;; new and unread. -;; - Read your "new" messages, this one included, and start dreaming of the -;; night you're gonna have. -;; - Once the date is over (you actually fell asleep just after dinner), the -;; message will be automatically deleted if it is marked as expirable. - -;; Some more notes on the diary backend: -;; - NNDiary is a *real* mail backend. You *really* send real diary -;; messsages. This means for instance that you can give appointements to -;; anybody (provided they use Gnus and NNDiary) by sending the diary message -;; to them as well. -;; - However, since NNDiary also has a 'request-post method, you can also -;; `C-u a' instead of `C-u m' on a diary group and the message won't actually -;; be sent; just stored in the group. -;; - The events you want to remember need not be punctual. You can set up -;; reminders for regular dates (like once each week, each monday at 13:30 -;; and so on). Diary messages of this kind will never be deleted (unless -;; you do it explicitely). But that, you guessed. - - -;; Usage: -;; ===== - -;; 1/ NNDiary has two modes of operation: traditional (the default) and -;; autonomous. -;; a/ In traditional mode, NNDiary does not get new mail by itself. You -;; have to move mails from your primary mail backend to nndiary -;; groups. -;; b/ In autonomous mode, NNDiary retrieves its own mail and handles it -;; independantly of your primary mail backend. To use NNDiary in -;; autonomous mode, you have several things to do: -;; i/ Put (setq nndiary-get-new-mail t) in your gnusrc file. -;; ii/ Diary messages contain several `X-Diary-*' special headers. -;; You *must* arrange that these messages be split in a private -;; folder *before* Gnus treat them. You need this because Gnus -;; is not able yet to manage multiple backends for mail -;; retrieval. Getting them from a separate source will -;; compensate this misfeature to some extent, as we will see. -;; As an example, here's my procmailrc entry to store diary files -;; in ~/.nndiary (the default nndiary mail source file): -;; -;; :0 HD : -;; * ^X-Diary -;; .nndiary -;; iii/ Customize the variables `nndiary-mail-sources' and -;; `nndiary-split-methods'. These are replacements for the usual -;; mail sources and split methods which, and will be used in -;; autonomous mode. `nndiary-mail-sources' defaults to -;; '(file :path "~/.nndiary"). -;; 2/ Install nndiary somewhere Emacs / Gnus can find it. Normally, you -;; *don't* have to '(require 'nndiary) anywhere. Gnus will do so when -;; appropriate as long as nndiary is somewhere in the load path. -;; 3/ Now, customize the rest of nndiary. In particular, you should -;; customize `nndiary-reminders', the list of times when you want to be -;; reminded of your appointements (e.g. 3 weeks before, then 2 days -;; before, then 1 hour before and that's it). -;; 4/ You *must* use the group timestamp feature of Gnus. This adds a -;; timestamp to each groups' parameters (please refer to the Gnus -;; documentation ("Group Timestamp" info node) to see how it's done. -;; 5/ Once you have done this, you may add a permanent nndiary virtual server -;; (something like '(nndiary "")) to your `gnus-secondary-select-methods'. -;; Yes, this server will be able to retrieve mails and split them when you -;; type `g' in the group buffer, just as if it were your only mail backend. -;; This is the benefit of using a private folder. -;; 6/ Hopefully, almost everything (see the TODO section below) will work as -;; expected when you restart Gnus: in the group buffer, `g' and `M-g' will -;; also get your new diary mails, `F' will find your new diary groups etc. - - -;; How to send diary messages: -;; ========================== - -;; There are 7 special headers in diary messages. These headers are of the -;; form `X-Diary-', the being one of `Minute', `Hour', -;; `Dom', `Month', `Year', `Time-Zone' and `Dow'. `Dom' means "Day of Month", -;; and `dow' means "Day of Week". These headers actually behave like crontab -;; specifications and define the event date(s). - -;; For all headers but the `Time-Zone' one, a header value is either a -;; star (meaning all possible values), or a list of fields (separated by a -;; comma). A field is either an integer, or a range. A range is two integers -;; separated by a dash. Possible integer values are 0-59 for `Minute', 0-23 -;; for `Hour', 1-31 for `Dom', `1-12' for Month, above 1971 for `Year' and 0-6 -;; for `Dow' (0 = sunday). As a special case, a star in either `Dom' or `Dow' -;; doesn't mean "all possible values", but "use only the other field". Note -;; that if both are star'ed, the use of either one gives the same result :-), - -;; The `Time-Zone' header is special in that it can have only one value (you -;; bet ;-). -;; A star doesn't mean "all possible values" (because it has no sense), but -;; "the current local time zone". - -;; As an example, here's how you would say "Each Monday and each 1st of month, -;; at 12:00, 20:00, 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010" (I let -;; you find what to do then): -;; -;; X-Diary-Minute: 0 -;; X-Diary-Hour: 12, 20-24 -;; X-Diary-Dom: 1 -;; X-Diary-Month: * -;; X-Diary-Year: 1999-2010 -;; X-Diary-Dow: 1 -;; X-Diary-Time-Zone: * -;; -;; -;; Sending a diary message is not different from sending any other kind of -;; mail, except that such messages are identified by the presence of these -;; special headers. - +;; nndiary is a mail back end designed to handle mails as diary event +;; reminders. It is now fully documented in the Gnus manual. ;; Bugs / Todo: @@ -161,43 +42,43 @@ ;; * Respooling doesn't work because contrary to the request-scan function, ;; Gnus won't allow me to override the split methods when calling the -;; respooling backend functions. +;; respooling back end functions. ;; * There's a bug in the time zone mechanism with variable TZ locations. ;; * We could allow a keyword like `ask' in X-Diary-* headers, that would mean ;; "ask for value upon reception of the message". ;; * We could add an optional header X-Diary-Reminders to specify a special ;; reminders value for this message. Suggested by Jody Klymak. ;; * We should check messages validity in other circumstances than just -;; moving an article from sonwhere else (request-accept). For instance, when -;; editing / saving and so on. +;; moving an article from somewhere else (request-accept). For instance, +;; when editing / saving and so on. ;; Remarks: ;; ======= -;; * nnoo. -;; NNDiary is very similar to nnml. This makes the idea of using nnoo (to -;; derive nndiary from nnml) natural. However, my experience with nnoo is -;; that for reasonably complex backends like this one, noo is a burden -;; rather than an help. It's tricky to use, not everything can be -;; inherited, what can be inherited and when is not very clear, and you've -;; got to be very careful because a little mistake can fuck up your your -;; other backends, especially because their variables will be use instead of -;; your real ones. Finally, I found it easier to just clone the needed -;; parts of nnml, and tracking nnml updates is not a big deal. +;; * nnoo. NNDiary is very similar to nnml. This makes the idea of using nnoo +;; (to derive nndiary from nnml) natural. However, my experience with nnoo +;; is that for reasonably complex back ends like this one, noo is a burden +;; rather than an help. It's tricky to use, not everything can be inherited, +;; what can be inherited and when is not very clear, and you've got to be +;; very careful because a little mistake can fuck up your other back ends, +;; especially because their variables will be use instead of your real ones. +;; Finally, I found it easier to just clone the needed parts of nnml, and +;; tracking nnml updates is not a big deal. ;; IMHO, nnoo is actually badly designed. A much simpler, and yet more ;; powerful one would be to make *real* functions and variables for a new -;; backend based on another. Lisp is a reflexive language so that's a very +;; back end based on another. Lisp is a reflexive language so that's a very ;; easy thing to do: inspect the function's form, replace occurences of ;; (even in strings) with , and you're done. ;; * nndiary-get-new-mail, nndiary-mail-source and nndiary-split-methods: ;; NNDiary has some experimental parts, in the sense Gnus normally uses only -;; one mail backends for mail retreival and splitting. This backend is also -;; an attempt to make it behave differently. For Gnus developpers: as you -;; can see if you snarf into the code, that was not a very difficult thing -;; to do. Something should be done about the respooling breakage though. +;; one mail back ends for mail retreival and splitting. This back end is +;; also an attempt to make it behave differently. For Gnus developpers: as +;; you can see if you snarf into the code, that was not a very difficult +;; thing to do. Something should be done about the respooling breakage +;; though. ;;; Code: @@ -220,10 +101,10 @@ (apply #'error args)))) -;; Backend behavior customization =========================================== +;; Back End behavior customization =========================================== (defgroup nndiary nil - "The Gnus Diary backend." + "The Gnus Diary back end." :version "22.1" :group 'gnus-diary) @@ -326,27 +207,27 @@ :type 'boolean) -;; Backend declaration ====================================================== +;; Back End declaration ====================================================== ;; Well, most of this is nnml clonage. (nnoo-declare nndiary) (defvoo nndiary-directory (nnheader-concat gnus-directory "diary/") - "Spool directory for the nndiary backend.") + "Spool directory for the nndiary back end.") (defvoo nndiary-active-file (expand-file-name "active" nndiary-directory) - "Active file for the nndiary backend.") + "Active file for the nndiary back end.") (defvoo nndiary-newsgroups-file (expand-file-name "newsgroups" nndiary-directory) - "Newsgroups description file for the nndiary backend.") + "Newsgroups description file for the nndiary back end.") (defvoo nndiary-get-new-mail nil "Whether nndiary gets new mail and split it. -Contrary to traditional mail backends, this variable can be set to t -even if your primary mail backend also retreives mail. In such a case, +Contrary to traditional mail back ends, this variable can be set to t +even if your primary mail back end also retreives mail. In such a case, NDiary uses its own mail-sources and split-methods.") (defvoo nndiary-nov-is-evil nil @@ -367,10 +248,10 @@ (defconst nndiary-version "0.2-b14" - "Current Diary backend version.") + "Current Diary back end version.") (defun nndiary-version () - "Current Diary backend version." + "Current Diary back end version." (interactive) (message "NNDiary version %s" nndiary-version)) @@ -631,7 +512,7 @@ (deffoo nndiary-request-scan (&optional group server) ;; Use our own mail sources and split methods while Gnus doesn't let us have - ;; multiple backends for retrieving mail. + ;; multiple back ends for retrieving mail. (let ((mail-sources nndiary-mail-sources) (nnmail-split-methods nndiary-split-methods)) (setq nndiary-article-file-alist nil) diff -r 8d4caf39c19f -r a0e8097f1696 lisp/newcomment.el --- a/lisp/newcomment.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/newcomment.el Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/progmodes/compile.el Wed May 09 23:47:51 2007 +0000 @@ -1863,7 +1863,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 8d4caf39c19f -r a0e8097f1696 lisp/progmodes/python.el --- a/lisp/progmodes/python.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/progmodes/python.el Wed May 09 23:47:51 2007 +0000 @@ -96,7 +96,7 @@ "import" "in" "is" "lambda" "not" "or" "pass" "print" "raise" "return" "try" "while" "yield" ;; Future keywords - "as" "None" + "as" "None" "with" ;; Not real keywords, but close enough to be fontified as such "self" "True" "False") symbol-end) @@ -374,7 +374,7 @@ (save-excursion (unless bos (python-beginning-of-statement)) (looking-at (rx (and (or "if" "else" "elif" "while" "for" "def" - "class" "try" "except" "finally") + "class" "try" "except" "finally" "with") symbol-end))))) (defun python-close-block-statement-p (&optional bos) @@ -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) @@ -2240,7 +2239,7 @@ #'python-current-defun) (set (make-local-variable 'outline-regexp) (rx (* space) (or "class" "def" "elif" "else" "except" "finally" - "for" "if" "try" "while") + "for" "if" "try" "while" "with") symbol-end)) (set (make-local-variable 'outline-heading-end-regexp) ":\\s-*\n") (set (make-local-variable 'outline-level) #'python-outline-level) diff -r 8d4caf39c19f -r a0e8097f1696 lisp/t-mouse.el --- a/lisp/t-mouse.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/t-mouse.el Wed May 09 23:47:51 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 8d4caf39c19f -r a0e8097f1696 lisp/textmodes/sgml-mode.el --- a/lisp/textmodes/sgml-mode.el Tue May 08 18:15:58 2007 +0000 +++ b/lisp/textmodes/sgml-mode.el Wed May 09 23:47:51 2007 +0000 @@ -937,7 +937,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 +964,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))) @@ -1093,9 +1100,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 +1123,41 @@ (cond ((sgml-looking-back-at "--") ; comment (setq tag-type 'comment - tag-start (search-backward "