# HG changeset patch # User Karoly Lorentey # Date 1160844981 0 # Node ID 694bbb62a75d9b2712900274f92427874b40e4ec # Parent 0c89a85addc3e2958ae6444b7b57d44794f01482# Parent e5542d6aad7fcb2c8f8c64faaa7a3bb09e542840 Merged from emacs@sv.gnu.org Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-371 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-372 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-373 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-374 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-375 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-376 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-377 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-378 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-379 Merge from erc--emacs--21 * emacs@sv.gnu.org/emacs--devo--0--patch-380 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-381 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-382 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-383 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-384 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-385 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-386 Update from erc--emacs--22 * emacs@sv.gnu.org/emacs--devo--0--patch-387 Fix ERC bug introduced in last patch * emacs@sv.gnu.org/emacs--devo--0--patch-388 Update from erc--emacs--22 * emacs@sv.gnu.org/emacs--devo--0--patch-389 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-390 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-391 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-392 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-393 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-394 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-395 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-396 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-397 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-398 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-399 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-400 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-401 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-402 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-403 Rcirc update from Ryan Yeske * emacs@sv.gnu.org/emacs--devo--0--patch-404 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-405 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-406 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-407 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-408 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-409 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-410 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-411 Miscellaneous tq-related fixes. * emacs@sv.gnu.org/emacs--devo--0--patch-412 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-121 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-122 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-123 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-124 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-125 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-126 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-127 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-581 diff -r 0c89a85addc3 -r 694bbb62a75d ChangeLog --- a/ChangeLog Sun Jul 30 10:19:46 2006 +0000 +++ b/ChangeLog Sat Oct 14 16:56:21 2006 +0000 @@ -1,3 +1,12 @@ +2006-08-16 Andreas Schwab + + * configure.in (PKG_CHECK_MODULES): Use AS_MESSAGE_LOG_FD instead + of hardcoding it. + +2006-08-16 Richard Stallman + + * INSTALL.CVS: Clean up wording. + 2006-07-14 Eli Zaretskii * configure.in (PKG_CHECK_MODULES): Redirect the output of diff -r 0c89a85addc3 -r 694bbb62a75d INSTALL.CVS --- a/INSTALL.CVS Sun Jul 30 10:19:46 2006 +0000 +++ b/INSTALL.CVS Sat Oct 14 16:56:21 2006 +0000 @@ -12,8 +12,9 @@ before it builds the final Emacs binary. Normally, it is not necessary to use "make bootstrap" after every CVS -update. Unless there are problems, we suggest the following -procedure: +update. Unless there are problems, we suggest using the following +alternative procedure after you have done "make bootstrap" at least +once: $ ./configure $ make diff -r 0c89a85addc3 -r 694bbb62a75d admin/ChangeLog --- a/admin/ChangeLog Sun Jul 30 10:19:46 2006 +0000 +++ b/admin/ChangeLog Sat Oct 14 16:56:21 2006 +0000 @@ -1,3 +1,7 @@ +2006-08-13 Chong Yidong + + * FOR-RELEASE: Elisp manual checking completed. + 2006-07-17 Reiner Steib * FOR-RELEASE: Update refcard section. diff -r 0c89a85addc3 -r 694bbb62a75d admin/FOR-RELEASE --- a/admin/FOR-RELEASE Sun Jul 30 10:19:46 2006 +0000 +++ b/admin/FOR-RELEASE Sat Oct 14 16:56:21 2006 +0000 @@ -29,7 +29,9 @@ ** Send an email to the various distributions, including the GNOME and KDE projects, to use the new Emacs icons in etc/images/icons. -* BUGS +* WINDOWS SUPPORT BUGS. +These don't need to be fixed to start pretest, but we call the +attention of Windows users to fixing them. ** Markus Gritsch's report about Emacs looping on Windoze with the following .emacs file, and then reduce Emacs frame width to "something quite narrow": @@ -39,73 +41,23 @@ '(hscroll-step 1) ) -** David Kastrup's report on strange scrolling of large images. +** Drew Adams 12 Aug bug rpt: overlay display artifact: trace left behind +Windows only bug. -** Jorgen Schaefer 's June 18 bug report about - fields and invisible overlays needs attention from a field expert. +* BUGS + +** Milan Zamazal's Aug 23 bug report about crashes with certain fonts. + +** C-g fails to interrupt accept-process-output in Gnus. ** Implement buffer-chars-modified-tick. -* DOCUMENTATION - -** Check the Emacs Lisp manual. - -Each manual section should be checked for factual correctness -regarding recent changes by at least two people. After each file -name, on the same line or the following line, come the names of the -people who have checked it. +** henman@it.to-be.co.jp 09 Aug 2006: ispell.el problem. -SECTION READERS ----------------------------------- -lispref/abbrevs.texi "Luc Teirlinck" Chong Yidong -lispref/advice.texi Joakim Verona Chong Yidong -lispref/anti.texi Chong Yidong Kim F. Storm -lispref/backups.texi "Luc Teirlinck" Chong Yidong -lispref/buffers.texi "Luc Teirlinck" Chong Yidong -lispref/calendar.texi Joakim Verona Chong Yidong -lispref/commands.texi "Luc Teirlinck" Chong Yidong -lispref/compile.texi "Luc Teirlinck" Chong Yidong -lispref/control.texi "Luc Teirlinck" Chong Yidong -lispref/customize.texi Chong Yidong "Luc Teirlinck" -lispref/debugging.texi Joakim Verona Lute Kamstra -lispref/display.texi Chong Yidong Jason Rumney -lispref/edebug.texi Chong Yidong "Luc Teirlinck" -lispref/elisp.texi "Luc Teirlinck" Lute Kamstra -lispref/errors.texi "Luc Teirlinck" Chong Yidong -lispref/eval.texi "Luc Teirlinck" Chong Yidong -lispref/files.texi "Luc Teirlinck" Chong Yidong -lispref/frames.texi "Luc Teirlinck" Chong Yidong -lispref/functions.texi "Luc Teirlinck" Chong Yidong -lispref/hash.texi "Luc Teirlinck" Chong Yidong -lispref/help.texi "Luc Teirlinck" Chong Yidong -lispref/hooks.texi Lute Kamstra Chong Yidong -lispref/internals.texi "Luc Teirlinck" Chong Yidong -lispref/intro.texi "Luc Teirlinck" Josh Varner -lispref/keymaps.texi "Luc Teirlinck" Chong Yidong -lispref/lists.texi "Luc Teirlinck" Chong Yidong -lispref/loading.texi "Luc Teirlinck" Chong Yidong -lispref/locals.texi Chong Yidong Nick Roberts -lispref/macros.texi "Luc Teirlinck" Chong Yidong -lispref/maps.texi Chong Yidong Kim F. Storm -lispref/markers.texi "Luc Teirlinck" Chong Yidong -lispref/minibuf.texi "Luc Teirlinck" Chong Yidong -lispref/modes.texi Chong Yidong -lispref/nonascii.texi "Luc Teirlinck" Chong Yidong -lispref/numbers.texi "Luc Teirlinck" Chong Yidong -lispref/objects.texi "Luc Teirlinck" Chong Yidong -lispref/os.texi "Luc Teirlinck" Chong Yidong -lispref/positions.texi "Luc Teirlinck" Chong Yidong -lispref/processes.texi Chong Yidong ttn -lispref/searching.texi "Luc Teirlinck" Chong Yidong -lispref/sequences.texi "Luc Teirlinck" Chong Yidong -lispref/streams.texi "Luc Teirlinck" Chong Yidong -lispref/strings.texi "Luc Teirlinck" Chong Yidong -lispref/symbols.texi "Luc Teirlinck" Chong Yidong -lispref/syntax.texi "Luc Teirlinck" Chong Yidong -lispref/text.texi Chong Yidong -lispref/tips.texi "Luc Teirlinck" Chong Yidong -lispref/variables.texi "Luc Teirlinck" Chong Yidong -lispref/windows.texi "Luc Teirlinck" Chong Yidong +** Make key-binding use the maps specified by positions given in the events. + + +* DOCUMENTATION ** Check the Emacs Tutorial. diff -r 0c89a85addc3 -r 694bbb62a75d configure.in --- a/configure.in Sun Jul 30 10:19:46 2006 +0000 +++ b/configure.in Sat Oct 14 16:56:21 2006 +0000 @@ -1500,7 +1500,7 @@ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(for $2) - if $PKG_CONFIG --exists "$2" 2>&5; then + if $PKG_CONFIG --exists "$2" 2>&AS_MESSAGE_LOG_FD; then AC_MSG_RESULT(yes) succeeded=yes diff -r 0c89a85addc3 -r 694bbb62a75d etc/ChangeLog --- a/etc/ChangeLog Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/ChangeLog Sat Oct 14 16:56:21 2006 +0000 @@ -1,3 +1,79 @@ +2006-08-25 Richard Stallman + + * TUTORIAL: Give priority to graphical terminals over text terminals + regarding C-z. + +2006-08-21 Sun Yijiang + + * TUTORIAL.cn: Sync with the latest TUTORIAL. + +2006-08-20 Dave Love + + * emacs.py: Update to Dave Love's latest version. + (__all__): Fix args -> eargs. Add new `modpath' fun. + (eargs): Add `imports' arg. + (all_names): New fun. + (complete): Rewrite without using rlcompleter. + Remove `namespace' arg, add `imports' arg. + (ehelp): Replace g and l args with `imports'. + (eimport): Use __main__ rather than `emacs' namespace. + (modpath): New fun. + +2006-08-20 Slawomir Nowaczyk (tiny change) + + * emacs.py (eexecfile): Use the __main__ rather than `emacs' namespace. + +2006-08-18 Primoz PETERLIN + + * TUTORIAL.sl: Synchronize with TUTORIAL. + +2006-08-18 Mats Lidell + + * TUTORIAL.sv: Synchronize with TUTORIAL. + +2006-08-18 Alfredo Finelli + + * TUTORIAL.it: Synchronize with TUTORIAL. + +2006-08-15 Carsten Dominik + + * orgcard.tex: Version number change. + +2006-08-12 Werner Lemberg + + * TUTORIAL.de: Synchronize with TUTORIAL. + +2006-08-10 Romain Francoise + + * NEWS: Mention that zone-mode.el is now obsolete. + +2006-08-09 Richard Stallman + + * TUTORIAL: Don't say which side scroll bar is on. + +2006-08-06 Nick Roberts + + * DEBUG (Note): Add note about following a longjmp call. + Add local variables list for outline mode. + +2006-08-03 Michael Olson + + * ERC-NEWS: Update for ERC 5.1.4. + +2006-08-01 Kenichi Handa + + * NEWS (find-operation-coding-system): Describe the more detail of + the change. + +2006-07-28 Reiner Steib + + * GNUS-NEWS: Regenerate from Oort Gnus node in texi/gnus.texi using + texi/gnus-news.el of the trunk. + +2006-07-29 Reiner Steib + + * NEWS: Fix typo. + 2006-07-17 Reiner Steib * ru-refcard.ps: Regenerate. @@ -168,7 +244,7 @@ 2006-05-29 Jan Dj,Ad(Brv - * NEWS: Mention F10 for Gtk+/Leddtif/Lucid menus. + * NEWS: Mention F10 for Gtk+/Lesstif/Lucid menus. 2006-05-26 Eli Zaretskii diff -r 0c89a85addc3 -r 694bbb62a75d etc/DEBUG --- a/etc/DEBUG Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/DEBUG Sat Oct 14 16:56:21 2006 +0000 @@ -272,6 +272,13 @@ The above commands also exist in a version with an `x' suffix which takes an object of the relevant type as argument. +** Following longjmp call. + +Recent versions of glibc (2.4+?) encrypt stored values for setjmp/longjmp which +prevents GDB from being able to follow a longjmp call using `next'. To +disable this protection you need to set the environment variable +LD_POINTER_GUARD to 0. + ** Using GDB in Emacs Debugging with GDB in Emacs offers some advantages over the command line (See @@ -739,4 +746,10 @@ and look at those registers directly, to see the actual current values of these variables. + +Local variables: +mode: outline +paragraph-separate: "[ ]*$" +end: + ;;; arch-tag: fbf32980-e35d-481f-8e4c-a2eca2586e6b diff -r 0c89a85addc3 -r 694bbb62a75d etc/ERC-NEWS --- a/etc/ERC-NEWS Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/ERC-NEWS Sat Oct 14 16:56:21 2006 +0000 @@ -1,6 +1,27 @@ ERC NEWS -*- outline -*- -* Changes in ERC 5.2 (unreleased) +* Changes in ERC 5.1.4 + +** Make find-function and find-variable work in Emacs 22 for +names that are constructed by `define-erc-module'. + +** Fix bug introduced in ERC 5.1.3 that caused messages to go the +wrong buffer. + +** Changes and additions to modules + +*** Highlighting (erc-match.el) + +**** Don't activate view-mode. + +*** Logging (erc-log.el) + +**** When this module is activated, make sure logging is enabled on +already-opened buffers. Ditto for disabling logging when the module +is deactivated. + +**** Fix some errors that occur when exiting Emacs without first +quitting open IRC servers. * Changes in ERC 5.1.3 diff -r 0c89a85addc3 -r 694bbb62a75d etc/GNUS-NEWS --- a/etc/GNUS-NEWS Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/GNUS-NEWS Sat Oct 14 16:56:21 2006 +0000 @@ -1,152 +1,201 @@ GNUS NEWS -- history of user-visible changes. -Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006 Free Software Foundation, Inc. See the end for copying conditions. Please send Gnus bug reports to bugs@gnus.org. For older news, see Gnus info node "New Features". -* Changes in Oort Gnus - -** `F' (`gnus-article-followup-with-original') and `R' -(`gnus-article-reply-with-original') only yank the text in the region if the -region is active. - -** `gnus-group-read-ephemeral-group' can be called interactively, using `G M'. - -** In draft groups, `e' is now bound to `gnus-draft-edit-message'. -Use `B w' for `gnus-summary-edit-article' instead. - -** The revised Gnus FAQ is included in the manual. -See the info node "Frequently Asked Questions". +* Installation changes ** Upgrading from previous (stable) version if you have used Oort. If you have tried Oort (the unstable Gnus branch leading to this -release) but went back to a stable version, be careful when upgrading -to this version. In particular, you will probably want to remove all -.marks (nnml) and .mrk (nnfolder) files, so that flags are read from -your ~/.newsrc.eld instead of from the .marks/.mrk file where this +release) but went back to a stable version, be careful when upgrading to +this version. In particular, you will probably want to remove all +`.marks' (nnml) and `.mrk' (nnfolder) files, so that flags are read from +your `.newsrc.eld' instead of from the `.marks'/`.mrk' file where this release store flags. See a later entry for more information about -marks. Note that downgrading isn't safe in general. +marks. Note that downgrading isn't save in general. + +** Lisp files are now installed in `.../site-lisp/gnus/' by default. It +defaulted to `.../site-lisp/' formerly. In addition to this, the new +installer issues a warning if other Gnus installations which will shadow +the latest one are detected. You can then remove those shadows manually +or remove them using `make remove-installed-shadows'. + +** New `make.bat' for compiling and installing Gnus under MS Windows + +Use `make.bat' if you want to install Gnus under MS Windows, the first +argument to the batch-program should be the directory where `xemacs.exe' +respectively `emacs.exe' is located, iff you want to install Gnus after +compiling it, give `make.bat' `/copy' as the second parameter. + +`make.bat' has been rewritten from scratch, it now features automatic +recognition of XEmacs and GNU Emacs, generates `gnus-load.el', checks if +errors occur while compilation and generation of info files and reports +them at the end of the build process. It now uses `makeinfo' if it is +available and falls back to `infohack.el' otherwise. `make.bat' should +now install all files which are necessary to run Gnus and be generally a +complete replacement for the `configure; make; make install' cycle used +under Unix systems. + +The new `make.bat' makes `make-x.bat' and `xemacs.mak' superfluous, so +they have been removed. + +** `~/News/overview/' not used. + +As a result of the following change, the `~/News/overview/' directory is +not used any more. You can safely delete the entire hierarchy. + +** `(require 'gnus-load)' + +If you use a stand-alone Gnus distribution, you'd better add `(require +'gnus-load)' into your `~/.emacs' after adding the Gnus lisp directory +into load-path. + +File `gnus-load.el' contains autoload commands, functions and variables, +some of which may not be included in distributions of Emacsen. + + + +* New packages and libraries within Gnus + +** The revised Gnus FAQ is included in the manual, *Note Frequently Asked +Questions::. + +** TLS wrapper shipped with Gnus + +TLS/SSL is now supported in IMAP and NNTP via `tls.el' and GNUTLS. The +old TLS/SSL support via (external third party) `ssl.el' and OpenSSL +still works. + +** Improved anti-spam features. + +Gnus is now able to take out spam from your mail and news streams using +a wide variety of programs and filter rules. Among the supported +methods are RBL blocklists, bogofilter and white/blacklists. Hooks for +easy use of external packages such as SpamAssassin and Hashcash are also +new. *Note Thwarting Email Spam::. + +** Gnus supports server-side mail filtering using Sieve. + +Sieve rules can be added as Group Parameters for groups, and the +complete Sieve script is generated using `D g' from the Group buffer, +and then uploaded to the server using `C-c C-l' in the generated Sieve +buffer. *Note Sieve Commands::, and the new Sieve manual *Note Top: +(sieve)Top. + + + +* Changes in group mode + +** `gnus-group-read-ephemeral-group' can be called interactively, using `G +M'. + +** Retrieval of charters and control messages + +There are new commands for fetching newsgroup charters (`H c') and +control messages (`H C'). + +** The new variable `gnus-parameters' can be used to set group parameters. + +Earlier this was done only via `G p' (or `G c'), which stored the +parameters in `~/.newsrc.eld', but via this variable you can enjoy the +powers of customize, and simplified backups since you set the variable +in `~/.gnus.el' instead of `~/.newsrc.eld'. The variable maps regular +expressions matching group names to group parameters, a'la: +(setq gnus-parameters + '(("mail\\..*" + (gnus-show-threads nil) + (gnus-use-scoring nil)) + ("^nnimap:\\(foo.bar\\)$" + (to-group . "\\1")))) + +** Unread count correct in nnimap groups. + +The estimated number of unread articles in the group buffer should now +be correct for nnimap groups. This is achieved by calling +`nnimap-fixup-unread-after-getting-new-news' from the +`gnus-setup-news-hook' (called on startup) and +`gnus-after-getting-new-news-hook'. (called after getting new mail). If +you have modified those variables from the default, you may want to add +`nnimap-fixup-unread-after-getting-new-news' again. If you were happy +with the estimate and want to save some (minimal) time when getting new +mail, remove the function. + +** Group names are treated as UTF-8 by default. + +This is supposedly what USEFOR wanted to migrate to. See +`gnus-group-name-charset-group-alist' and +`gnus-group-name-charset-method-alist' for customization. + +** `gnus-group-charset-alist' and `gnus-group-ignored-charsets-alist'. + +The regexps in these variables are compared with full group names +instead of real group names in 5.8. Users who customize these variables +should change those regexps accordingly. For example: +("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr) + + + +* Changes in summary and article mode + +** `F' (`gnus-article-followup-with-original') and `R' +(`gnus-article-reply-with-original') only yank the text in the region if +the region is active. + +** In draft groups, `e' is now bound to `gnus-draft-edit-message'. Use `B +w' for `gnus-summary-edit-article' instead. ** Article Buttons -More buttons for URLs, mail addresses, Message-IDs, Info links, man pages and -Emacs or Gnus related references, see the info node "Article Buttons". The -variables `gnus-button-*-level' can be used to control the appearance of all -article buttons, see the info node "Article Button Levels". - -** Dired integration - -`gnus-dired-minor-mode' installs key bindings in dired buffers to send a file -as an attachment (`C-c C-m C-a'), open a file using the approriate mailcap -entry (`C-c C-m C-l'), and print a file using the mailcap entry (`C-c C-m -C-p'). See the info node "Other modes". - - -** Gnus can display RSS newsfeeds as a newsgroup. To get started do `B -nnrss RET RET' in the Group buffer. +More buttons for URLs, mail addresses, Message-IDs, Info links, man +pages and Emacs or Gnus related references. *Note Article Buttons::. +The variables `gnus-button-*-level' can be used to control the +appearance of all article buttons. *Note Article Button Levels::. ** Single-part yenc encoded attachments can be decoded. ** Picons -The picons code has been reimplemented to work in Emacs 21 -- some of -the previous options have been removed or renamed. + +The picons code has been reimplemented to work in GNU Emacs--some of the +previous options have been removed or renamed. Picons are small "personal icons" representing users, domain and -newsgroups, which can be displayed in the Article buffer. To enable -picons, install the picons database from - - http://www.cs.indiana.edu/picons/ftp/index.html - -and point `gnus-picon-databases' to that location. - -** If the new option `gnus-treat-body-boundary' is `head', a boundary -line is drawn at the end of the headers. +newsgroups, which can be displayed in the Article buffer. *Note +Picons::. -** Retrieval of charters and control messages -There are new commands for fetching newsgroup charters (`H c') and -control messages (`H C'). - -** Delayed articles -You can delay the sending of a message with `C-c C-j' in the Message -buffer. The messages are delivered at specified time. This is useful -for sending yourself reminders. Setup with (gnus-delay-initialize). - -** If `auto-compression-mode' is enabled, attachments are automatically -decompressed when activated. - -** If the new option `nnml-use-compressed-files' is non-nil, -the nnml back end allows compressed message files. +** If the new option `gnus-treat-body-boundary' is non-`nil', a boundary +line is drawn at the end of the headers. ** Signed article headers (X-PGP-Sig) can be verified with `W p'. -** The Summary Buffer uses an arrow in the fringe to indicate the -current article in Emacs 21 running on a graphical display. Customize -`gnus-summary-display-arrow' to disable it. +** The Summary Buffer uses an arrow in the fringe to indicate the current +article. Use `(setq gnus-summary-display-arrow nil)' to disable it. ** Warn about email replies to news + Do you often find yourself replying to news by email by mistake? Then the new option `gnus-confirm-mail-reply-to-news' is just the thing for you. -** If the new option `gnus-summary-display-while-building' is non-nil, +** If the new option `gnus-summary-display-while-building' is non-`nil', the summary buffer is shown and updated as it's being built. -** The new `recent' mark "." indicates newly arrived messages (as -opposed to old but unread messages). - -** The new option `gnus-gcc-mark-as-read' automatically marks -Gcc articles as read. - -** The nndoc back end now supports mailman digests and exim bounces. +** The new `recent' mark `.' indicates newly arrived messages (as opposed +to old but unread messages). ** Gnus supports RFC 2369 mailing list headers, and adds a number of -related commands in mailing list groups. +related commands in mailing list groups. *Note Mailing List::. -** The Date header can be displayed in a format that can be read aloud -in English, see `gnus-treat-date-english'. - -** The envelope sender address can be customized when using Sendmail, see -`message-sendmail-envelope-from'. +** The Date header can be displayed in a format that can be read aloud in +English. *Note Article Date::. ** diffs are automatically highlighted in groups matching `mm-uu-diff-groups-regexp' -** TLS wrapper shipped with Gnus - -TLS/SSL is now supported in IMAP and NNTP via tls.el and GNUTLS. The -old TLS/SSL support via (external third party) ssl.el and OpenSSL -still works. - -** New make.bat for compiling and installing Gnus under MS Windows - -Use make.bat if you want to install Gnus under MS Windows, the first -argument to the batch-program should be the directory where xemacs.exe -respectively emacs.exe is located, iff you want to install Gnus after -compiling it, give make.bat /copy as the second parameter. - -`make.bat' has been rewritten from scratch, it now features automatic -recognition of XEmacs and GNU Emacs, generates gnus-load.el, checks if -errors occur while compilation and generation of info files and reports -them at the end of the build process. It now uses makeinfo if it is -available and falls back to infohack.el otherwise. `make.bat' should now -install all files which are necessary to run Gnus and be generally a -complete replacement for the "configure; make; make install" cycle used -under Unix systems. - -The new make.bat makes make-x.bat superfluous, so it has been removed. - -** Support for non-ASCII domain names - -Message supports non-ASCII domain names in From:, To: and Cc: and will -encode them when you try to send a message. The variable -`message-use-idna' controls this. Gnus will also decode non-ASCII -domain names in From:, To: and Cc: when you view a message. The -variable `gnus-use-idna' controls this. - ** Better handling of Microsoft citation styles Gnus now tries to recognize the mangled header block that some Microsoft @@ -155,227 +204,183 @@ `gnus-cite-unsightly-citation-regexp' matches the start of these citations. -** gnus-article-skip-boring - -If you set `gnus-article-skip-boring' to t, then Gnus will not scroll -down to show you a page that contains only boring text, which by -default means cited text and signature. You can customize what is -skippable using `gnus-article-boring-faces'. - -This feature is especially useful if you read many articles that -consist of a little new content at the top with a long, untrimmed -message cited below. - -** The format spec %C for positioning point has changed to %*. +The new command `W Y f' (`gnus-article-outlook-deuglify-article') allows +deuglifying broken Outlook (Express) articles. -** The new variable `gnus-parameters' can be used to set group parameters. - -Earlier this was done only via `G p' (or `G c'), which stored the -parameters in ~/.newsrc.eld, but via this variable you can enjoy the -powers of customize, and simplified backups since you set the variable -in ~/.emacs instead of ~/.newsrc.eld. The variable maps regular -expressions matching group names to group parameters, a'la: - - (setq gnus-parameters - '(("mail\\..*" - (gnus-show-threads nil) - (gnus-use-scoring nil)) - ("^nnimap:\\(foo.bar\\)$" - (to-group . "\\1")))) +** `gnus-article-skip-boring' -** Smileys (":-)", ";-)" etc) are now iconized for Emacs too. - -Customize `gnus-treat-display-smileys' to disable it. - -** Gnus no longer generates the Sender: header automatically. +If you set `gnus-article-skip-boring' to `t', then Gnus will not scroll +down to show you a page that contains only boring text, which by default +means cited text and signature. You can customize what is skippable +using `gnus-article-boring-faces'. -Earlier it was generated iff the user configurable email address was -different from the Gnus guessed default user address. As the guessing -algorithm is rarely correct these days, and (more controversially) the -only use of the Sender: header was to check if you are entitled to -cancel/supersede news (which is now solved by Cancel Locks instead, -see another entry), generation of the header has been disabled by -default. See the variables `message-required-headers', -`message-required-news-headers', and `message-required-mail-headers'. - -** Features from third party message-utils.el added to message.el. - -Message now asks if you wish to remove "(was: )" from -subject lines (see `message-subject-trailing-was-query'). C-c M-m and -C-c M-f inserts markers indicating included text. C-c C-f a adds a -X-No-Archive: header. C-c C-f x inserts appropriate headers and a -note in the body for cross-postings and followups (see the variables -`message-cross-post-*'). - -** References and X-Draft-Headers are no longer generated when you -start composing messages and `message-generate-headers-first' is nil. - -** Improved anti-spam features. +This feature is especially useful if you read many articles that consist +of a little new content at the top with a long, untrimmed message cited +below. -Gnus is now able to take out spam from your mail and news streams -using a wide variety of programs and filter rules. Among the supported -methods are RBL blocklists, bogofilter and white/blacklists. Hooks -for easy use of external packages such as SpamAssassin and Hashcash -are also new. - -** Easy inclusion of X-Faces headers. - -** In the summary buffer, the new command / N inserts new messages and -/ o inserts old messages. - -** Gnus decodes morse encoded messages if you press W m. +** Smileys (`:-)', `;-)' etc) are now displayed graphically in Emacs too. -** Unread count correct in nnimap groups. +Put `(setq gnus-treat-display-smileys nil)' in `~/.gnus.el' to disable +it. -The estimated number of unread articles in the group buffer should now -be correct for nnimap groups. This is achieved by calling -`nnimap-fixup-unread-after-getting-new-news' from the -`gnus-setup-news-hook' (called on startup) and -`gnus-after-getting-new-news-hook' (called after getting new mail). -If you have modified those variables from the default, you may want to -add n-f-u-a-g-n-n again. If you were happy with the estimate and want -to save some (minimal) time when getting new mail, remove the -function. - -** Group Carbon Copy (GCC) quoting +** Face headers handling. *Note Face::. -To support groups that contains SPC and other weird characters, groups -are quoted before they are placed in the Gcc: header. This means -variables such as `gnus-message-archive-group' should no longer -contain quote characters to make groups containing SPC work. Also, if -you are using the string "nnml:foo, nnml:bar" (indicating Gcc into two -groups) you must change it to return the list ("nnml:foo" "nnml:bar"), -otherwise the Gcc: line will be quoted incorrectly. Note that -returning the string "nnml:foo, nnml:bar" was incorrect earlier, it -just didn't generate any problems since it was inserted directly. - -** ~/News/overview/ not used. - -As a result of the following change, the ~/News/overview/ directory is -not used any more. You can safely delete the entire hierarchy. - -** gnus-agent +** In the summary buffer, the new command `/ N' inserts new messages and `/ +o' inserts old messages. -The Gnus Agent has seen a major update. It is now enabled by default, -and all nntp and nnimap servers from `gnus-select-method' and -`gnus-secondary-select-method' are agentized by default. Earlier only -the server in `gnus-select-method' was agentized by the default, and the -agent was disabled by default. When the agent is enabled, headers are -now also retrieved from the Agent cache instead of the backends when -possible. Earlier this only happened in the unplugged state. You can -enroll or remove servers with `J a' and `J r' in the server buffer. -Gnus will not download articles into the Agent cache, unless you -instruct it to do so, though, by using `J u' or `J s' from the Group -buffer. You revert to the old behaviour of having the Agent disabled -by customizing `gnus-agent'. Note that putting `(gnus-agentize)' in -~/.gnus is not needed any more. +** Gnus decodes morse encoded messages if you press `W m'. -** gnus-summary-line-format +** `gnus-summary-line-format' -The default value changed to "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n". +The default value changed to `%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n'. Moreover `gnus-extra-headers', `nnmail-extra-headers' and `gnus-ignored-from-addresses' changed their default so that the users -name will be replaced by the recipient's name or the group name -posting to for NNTP groups. - -** deuglify.el (gnus-article-outlook-deuglify-article) - -A new file from Raymond Scholz for deuglifying -broken Outlook (Express) articles. - -** (require 'gnus-load) - -If you use a stand-alone Gnus distribution, you'd better add -"(require 'gnus-load)" to your ~/.emacs after adding the Gnus -lisp directory into load-path. - -File gnus-load.el contains autoload commands, functions and variables, -some of which may not be included in distributions of Emacsen. - -** gnus-slave-unplugged +name will be replaced by the recipient's name or the group name posting +to for NNTP groups. -A new command which starts gnus offline in slave mode. - -** message-insinuate-rmail - -Adding (message-insinuate-rmail) in .emacs and customizing -`mail-user-agent' to `gnus-user-agent' convinces Rmail to compose, -reply and forward messages in Message mode, where you can enjoy the -power of MML. - -** message-minibuffer-local-map - -The line below enables BBDB in resending a message: - -(define-key message-minibuffer-local-map [?\t] 'bbdb-complete-name) - -** Externalizing and deleting of attachments. - -If `gnus-gcc-externalize-attachments' (or -`message-fcc-externalize-attachments') is non-nil, attach local files -as external parts. +** Deleting of attachments. The command `gnus-mime-save-part-and-strip' (bound to `C-o' on MIME buttons) saves a part and replaces the part with an external one. `gnus-mime-delete-part' (bound to `d' on MIME buttons) removes a part. It works only on back ends that support editing. -** gnus-default-charset +** `gnus-default-charset' + +The default value is determined from the `current-language-environment' +variable, instead of `iso-8859-1'. Also the `.*' item in +`gnus-group-charset-alist' is removed. + +** Printing capabilities are enhanced. + +Gnus supports Muttprint natively with `O P' from the Summary and Article +buffers. Also, each individual MIME part can be printed using `p' on +the MIME button. + +** Extended format specs. + +Format spec `%&user-date;' is added into +`gnus-summary-line-format-alist'. Also, user defined extended format +specs are supported. The extended format specs look like `%u&foo;', +which invokes function `gnus-user-format-function-FOO'. Because `&' is +used as the escape character, old user defined format `%u&' is no longer +supported. + +** `/ *' (`gnus-summary-limit-include-cached') is rewritten. + +It was aliased to `Y c' (`gnus-summary-insert-cached-articles'). The +new function filters out other articles. + +** Some limiting commands accept a `C-u' prefix to negate the match. + +If `C-u' is used on subject, author or extra headers, i.e., `/ s', `/ +a', and `/ x' (`gnus-summary-limit-to-{subject,author,extra}') +respectively, the result will be to display all articles that do not +match the expression. + +** Gnus inlines external parts (message/external). + + + +* Changes in Message mode and related Gnus features + +** Delayed articles + +You can delay the sending of a message with `C-c C-j' in the Message +buffer. The messages are delivered at specified time. This is useful +for sending yourself reminders. *Note Delayed Articles::. + +** If the new option `nnml-use-compressed-files' is non-`nil', the nnml +back end allows compressed message files. + +** The new option `gnus-gcc-mark-as-read' automatically marks Gcc articles +as read. + +** Externalizing of attachments -The default value now guesses on the basis of your environment instead -of using Latin-1. Also the ".*" item in gnus-group-charset-alist is -removed. +If `gnus-gcc-externalize-attachments' or +`message-fcc-externalize-attachments' is non-`nil', attach local files +as external parts. + +** The envelope sender address can be customized when using Sendmail. + *Note Mail Variables: (message)Mail Variables. + +** Gnus no longer generate the Sender: header automatically. + +Earlier it was generated iff the user configurable email address was +different from the Gnus guessed default user address. As the guessing +algorithm is rarely correct these days, and (more controversially) the +only use of the Sender: header was to check if you are entitled to +cancel/supersede news (which is now solved by Cancel Locks instead, see +another entry), generation of the header has been disabled by default. +See the variables `message-required-headers', +`message-required-news-headers', and `message-required-mail-headers'. + +** Features from third party `message-utils.el' added to `message.el'. + +Message now asks if you wish to remove `(was: )' from +subject lines (see `message-subject-trailing-was-query'). `C-c M-m' and +`C-c M-f' inserts markers indicating included text. `C-c C-f a' adds a +X-No-Archive: header. `C-c C-f x' inserts appropriate headers and a +note in the body for cross-postings and followups (see the variables +`message-cross-post-*'). -** gnus-posting-styles +** References and X-Draft-From headers are no longer generated when you +start composing messages and `message-generate-headers-first' is `nil'. + +** Easy inclusion of X-Faces headers. *Note X-Face::. + +** Group Carbon Copy (GCC) quoting + +To support groups that contains SPC and other weird characters, groups +are quoted before they are placed in the Gcc: header. This means +variables such as `gnus-message-archive-group' should no longer contain +quote characters to make groups containing SPC work. Also, if you are +using the string `nnml:foo, nnml:bar' (indicating Gcc into two groups) +you must change it to return the list `("nnml:foo" "nnml:bar")', +otherwise the Gcc: line will be quoted incorrectly. Note that returning +the string `nnml:foo, nnml:bar' was incorrect earlier, it just didn't +generate any problems since it was inserted directly. + +** `message-insinuate-rmail' + +Adding `(message-insinuate-rmail)' and `(setq mail-user-agent +'gnus-user-agent)' in `.emacs' convinces Rmail to compose, reply and +forward messages in message-mode, where you can enjoy the power of MML. + +** `message-minibuffer-local-map' + +The line below enables BBDB in resending a message: +(define-key message-minibuffer-local-map [(tab)] + 'bbdb-complete-name) + +** `gnus-posting-styles' Add a new format of match like - - ((header "to" "larsi.*org") - (Organization "Somewhere, Inc.")) - +((header "to" "larsi.*org") + (Organization "Somewhere, Inc.")) The old format like the lines below is obsolete, but still accepted. +(header "to" "larsi.*org" + (Organization "Somewhere, Inc.")) - (header "to" "larsi.*org" - (Organization "Somewhere, Inc.")) +** `message-ignored-news-headers' and `message-ignored-mail-headers' -** message-ignored-news-headers and message-ignored-mail-headers - -X-Draft-From and X-Gnus-Agent-Meta-Information have been added into +`X-Draft-From' and `X-Gnus-Agent-Meta-Information' have been added into these two variables. If you customized those, perhaps you need add those two headers too. -** Gnus reads the NOV and articles in the Agent if plugged. - -If one reads an article while plugged, and the article already exists -in the Agent, it won't get downloaded once more. Customize -`gnus-agent-cache' to revert to the old behavior. - -** Gnus supports the "format=flowed" (RFC 2646) parameter. - -On composing messages, it is enabled by `use-hard-newlines'. Decoding -format=flowed was present but not documented in earlier versions. +** Gnus supports the "format=flowed" (RFC 2646) parameter. On composing +messages, it is enabled by `use-hard-newlines'. Decoding format=flowed +was present but not documented in earlier versions. ** The option `mm-fill-flowed' can be used to disable treatment of -format=flowed messages. Also, flowed text is disabled when sending -inline PGP signed messages. (New in Gnus 5.10.8) - -** The tool bar icons are now (de)activated correctly in the group -buffer, see the variable `gnus-group-update-tool-bar'. It's default -value depends on your Emacs version. (New in Gnus 5.10.8) - -** Gnus supports the generation of RFC 2298 Disposition Notification requests. +"format=flowed" messages. Also, flowed text is disabled when sending +inline PGP signed messages. (New in Gnus 5.10.7) -This is invoked with the C-c M-n key binding from message mode. - -** Gnus supports Maildir groups. - -Gnus includes a new backend nnmaildir.el. +** Gnus supports the generation of RFC 2298 Disposition Notification +requests. -** Printing capabilities are enhanced. - -Gnus supports Muttprint natively with O P from the Summary and Article -buffers. Also, each individual MIME part can be printed using p on -the MIME button. +This is invoked with the `C-c M-n' key binding from message mode. ** Message supports the Importance: (RFC 2156) header. @@ -384,151 +389,130 @@ ** Gnus supports Cancel Locks in News. -This means a header "Cancel-Lock" is inserted in news posting. It is -used to determine if you wrote a article or not (for cancelling and +This means a header `Cancel-Lock' is inserted in news posting. It is +used to determine if you wrote an article or not (for canceling and superseding). Gnus generates a random password string the first time -you post a message, and saves it using the Custom system. While the -variable is called `canlock-password', it is not security sensitive -data. Publishing your canlock string on the web will not allow anyone -to be able to anything she could not already do. The behaviour can be -changed by customizing `message-insert-canlock'. - -** Gnus supports server-side mail filtering using Sieve. - -Sieve rules can be added as Group Parameters for groups, and the -complete Sieve script is generated using `D g' from the Group buffer, -and then uploaded to the server using `C-c C-l' in the generated Sieve -buffer. Search the online Gnus manual for "sieve", and see the new -Sieve manual, for more information. - -** Extended format specs. - -Format spec "%&user-date;" is added into -`gnus-summary-line-format-alist'. Also, user defined extended format -specs are supported. The extended format specs look like "%u&foo;", -which invokes function `gnus-user-format-function-foo'. Because "&" is -used as the escape character, old user defined format "%u&" is no -longer supported. - -** `/ *' (gnus-summary-limit-include-cached) is rewritten. - -It was aliased to `Y c' (gnus-summary-insert-cached-articles). The new -function filters out other articles. - -** Some limiting commands accept a C-u prefix to negate the match. +you post a message, and saves it in your `~/.emacs' using the Custom +system. While the variable is called `canlock-password', it is not +security sensitive data. Publishing your canlock string on the web will +not allow anyone to be able to anything she could not already do. The +behavior can be changed by customizing `message-insert-canlock'. -If C-u is used on subject, author or extra headers, i.e., `/ s', `/ -a', and `/ x' (gnus-summary-limit-to-{subject,author,extra}) -respectively, the result will be to display all articles that do not -match the expression. - -** Group names are treated as UTF-8 by default. - -This is supposedly what USEFOR wanted to migrate to. See -`gnus-group-name-charset-group-alist' and -`gnus-group-name-charset-method-alist' for customization. - -** The nnml and nnfolder backends store marks for each group. - -This makes it possible to take backup of nnml/nnfolder servers/groups -separately of ~/.newsrc.eld, while preserving marks. It also makes it -possible to share articles and marks between users (without sharing -the ~/.newsrc.eld file) within e.g. a department. It works by storing -the marks stored in ~/.newsrc.eld in a per-group file ".marks" (for -nnml) and "groupname.mrk" (for nnfolder, named "groupname"). If the -nnml/nnfolder is moved to another machine, Gnus will automatically use -the .marks or .mrk file instead of the information in ~/.newsrc.eld. -The new server variables `nnml-marks-is-evil' and -`nnfolder-marks-is-evil' can be used to disable this feature. - -** The menu bar item (in Group and Summary buffer) named "Misc" has -been renamed to "Gnus". - -** The menu bar item (in Message mode) named "MML" has been renamed to -"Attachments". Note that this menu also contains security related -stuff, like signing and encryption. - -** gnus-group-charset-alist and gnus-group-ignored-charsets-alist. - -The regexps in these variables are compared with full group names -instead of real group names in 5.8. Users who customize these -variables should change those regexps accordingly. For example: - - ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr) - -** Gnus supports PGP (RFC 1991/2440), PGP/MIME (RFC 2015/3156) and -S/MIME (RFC 2630-2633). +** Gnus supports PGP (RFC 1991/2440), PGP/MIME (RFC 2015/3156) and S/MIME +(RFC 2630-2633). It needs an external S/MIME and OpenPGP implementation, but no -additional lisp libraries. This add several menu items to the -Attachments menu, and C-c RET key bindings, when composing messages. +additional Lisp libraries. This add several menu items to the +Attachments menu, and `C-c RET' key bindings, when composing messages. This also obsoletes `gnus-article-hide-pgp-hook'. -** Gnus inlines external parts (message/external). - ** MML (Mime compose) prefix changed from `M-m' to `C-c C-m'. This change was made to avoid conflict with the standard binding of `back-to-indentation', which is also useful in message mode. -** The default for message-forward-show-mml changed to symbol best. +** The default for `message-forward-show-mml' changed to the symbol `best'. + +The behavior for the `best' value is to show MML (i.e., convert to MIME) +when appropriate. MML will not be used when forwarding signed or +encrypted messages, as the conversion invalidate the digital signature. + +** If `auto-compression-mode' is enabled, attachments are automatically +decompressed when activated. + +** Support for non-ASCII domain names + +Message supports non-ASCII domain names in From:, To: and Cc: and will +query you whether to perform encoding when you try to send a message. +The variable `message-use-idna' controls this. Gnus will also decode +non-ASCII domain names in From:, To: and Cc: when you view a message. +The variable `gnus-use-idna' controls this. + +** You can now drag and drop attachments to the Message buffer. See +`mml-dnd-protocol-alist' and `mml-dnd-attach-options'. *Note MIME: +(message)MIME. + -The behaviour for the `best' value is to show MML (i.e., convert MIME -to MML) when appropriate. MML will not be used when forwarding signed -or encrypted messages, as the conversion invalidate the digital -signature. + +* Changes in back ends + +** Gnus can display RSS newsfeeds as a newsgroup. *Note RSS::. + +** The nndoc back end now supports mailman digests and exim bounces. + +** Gnus supports Maildir groups. + +Gnus includes a new back end `nnmaildir.el'. *Note Maildir::. -** Bug fixes. +** The nnml and nnfolder back ends store marks for each groups. + +This makes it possible to take backup of nnml/nnfolder servers/groups +separately of `~/.newsrc.eld', while preserving marks. It also makes it +possible to share articles and marks between users (without sharing the +`~/.newsrc.eld' file) within e.g. a department. It works by storing the +marks stored in `~/.newsrc.eld' in a per-group file `.marks' (for nnml) +and `GROUPNAME.mrk' (for nnfolder, named GROUPNAME). If the +nnml/nnfolder is moved to another machine, Gnus will automatically use +the `.marks' or `.mrk' file instead of the information in +`~/.newsrc.eld'. The new server variables `nnml-marks-is-evil' and +`nnfolder-marks-is-evil' can be used to disable this feature. + -* Changes in Pterodactyl Gnus (5.8/5.9) +* Appearance -The Gnus NEWS entries are short, but they reflect sweeping changes in -four areas: Article display treatment, MIME treatment, -internationalization and mail-fetching. +** The menu bar item (in Group and Summary buffer) named "Misc" has been +renamed to "Gnus". -** The mail-fetching functions have changed. See the manual for the -many details. In particular, all procmail fetching variables are gone. - -If you used procmail like in +** The menu bar item (in Message mode) named "MML" has been renamed to +"Attachments". Note that this menu also contains security related +stuff, like signing and encryption (*note Security: (message)Security.). -(setq nnmail-use-procmail t) -(setq nnmail-spool-file 'procmail) -(setq nnmail-procmail-directory "~/mail/incoming/") -(setq nnmail-procmail-suffix "\\.in") +** The tool bars have been updated to use GNOME icons in Group, Summary and +Message mode. You can also customize the tool bars. This is a new +feature in Gnus 5.10.9. (Only for Emacs, not in XEmacs.) -this now has changed to +** The tool bar icons are now (de)activated correctly in the group buffer, +see the variable `gnus-group-update-tool-bar'. Its default value +depends on your Emacs version. This is a new feature in Gnus 5.10.9. -(setq mail-sources - '((directory :path "~/mail/incoming/" - :suffix ".in"))) + +* Miscellaneous changes + +** `gnus-agent' -More information is available in the info doc at Select Methods -> -Getting Mail -> Mail Sources - -** Gnus is now a MIME-capable reader. This affects many parts of -Gnus, and adds a slew of new commands. See the manual for details. +The Gnus Agent has seen a major updated and is now enabled by default, +and all nntp and nnimap servers from `gnus-select-method' and +`gnus-secondary-select-method' are agentized by default. Earlier only +the server in `gnus-select-method' was agentized by the default, and the +agent was disabled by default. When the agent is enabled, headers are +now also retrieved from the Agent cache instead of the back ends when +possible. Earlier this only happened in the unplugged state. You can +enroll or remove servers with `J a' and `J r' in the server buffer. +Gnus will not download articles into the Agent cache, unless you +instruct it to do so, though, by using `J u' or `J s' from the Group +buffer. You revert to the old behavior of having the Agent disabled +with `(setq gnus-agent nil)'. Note that putting `(gnus-agentize)' in +`~/.gnus.el' is not needed any more. -** Gnus has also been multilingualized. This also affects too -many parts of Gnus to summarize here, and adds many new variables. - -** gnus-auto-select-first can now be a function to be -called to position point. +** Gnus reads the NOV and articles in the Agent if plugged. -** The user can now decide which extra headers should be included in -summary buffers and NOV files. +If one reads an article while plugged, and the article already exists in +the Agent, it won't get downloaded once more. `(setq gnus-agent-cache +nil)' reverts to the old behavior. -** `gnus-article-display-hook' has been removed. Instead, a number -of variables starting with `gnus-treat-' have been added. +** Dired integration -** The Gnus posting styles have been redone again and now works in a -subtly different manner. +`gnus-dired-minor-mode' (see *Note Other modes::) installs key bindings +in dired buffers to send a file as an attachment, open a file using the +appropriate mailcap entry, and print a file using the mailcap entry. -** New web-based backends have been added: nnslashdot, nnwarchive -and nnultimate. nnweb has been revamped, again, to keep up with -ever-changing layouts. +** The format spec `%C' for positioning point has changed to `%*'. -** Gnus can now read IMAP mail via nnimap. +** `gnus-slave-unplugged' + +A new command which starts Gnus offline in slave mode. + * For older news, see Gnus info node "New Features". @@ -536,8 +520,8 @@ ---------------------------------------------------------------------- Copyright information: -Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the diff -r 0c89a85addc3 -r 694bbb62a75d etc/NEWS --- a/etc/NEWS Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/NEWS Sat Oct 14 16:56:21 2006 +0000 @@ -95,7 +95,6 @@ Its name is `pt-br-refcard.tex'. The corresponding PostScript file is also included. - --- ** A French translation of the `Emacs Survival Guide' is available. @@ -202,6 +201,13 @@ all frames you create. A position specified with --geometry only affects the initial frame. +--- +** Emacs built for MS-Windows now behaves like Emacs on X does, +wrt its frame position: if you don't specify a position (in your +.emacs init file, in the Registry, or with the --geometry command-line +option), Emacs leaves the frame position to the Windows' window +manager. + +++ ** Emacs can now be invoked in full-screen mode on a windowed display. When Emacs is invoked on a window system, the new command-line options @@ -241,8 +247,9 @@ +++ ** If the environment variable EMAIL is defined, Emacs now uses its value -to compute the default value of `use-mail-address', in preference to +to compute the default value of `user-mail-address', in preference to concatenation of `user-login-name' with the name of your host machine. + * Incompatible Editing Changes in Emacs 22.1 @@ -832,6 +839,13 @@ the window now works sensibly, by automatically adjusting the window's vscroll property. +*** New customize option `overline-margin' controls the space between +overline and text. + +*** New variable `x-underline-at-descent-line' controls the relative +position of the underline. When set, it overrides the +`x-use-underline-position-properties' variables. + +++ *** The new face `mode-line-inactive' is used to display the mode line of non-selected windows. The `mode-line' face is now used to display @@ -1764,9 +1778,8 @@ available in `etc/orgcard.tex' and `etc/orgcard.ps'. +++ -** The new package dns-mode.el add syntax highlight of DNS master files. -The key binding C-c C-s (`dns-mode-soa-increment-serial') can be used -to increment the SOA serial. +** The new package dns-mode.el adds syntax highlighting of DNS master files. +It is a modern replacement for zone-mode.el, which is now obsolete. --- ** The new global minor mode `file-name-shadow-mode' modifies the way @@ -1987,6 +2000,7 @@ buffers and no warning will be issued (for compatibility with the behavior in older versions of Emacs). +--- ** Changes in Allout *** Topic cryptography added, enabling easy gpg topic encryption and @@ -1995,11 +2009,19 @@ and/or public key modes. Time-limited key caching, user-provided symmetric key hinting and consistency verification, auto-encryption of pending topics on save, and more, make it easy to use encryption in -powerful ways. +powerful ways. Encryption behavior customization is collected in the +allout-encryption customization group. *** `allout-view-change-hook' marked as being deprecated - use -`allout-exposure-change-hook' instead. Both are currently being used, but -`allout-view-change-hook' will be ignored in a subsequent allout version. +`allout-exposure-change-hook' instead. Both are still invoked, but +`allout-view-change-hook' will eventually be ignored. The new +`allout-exposure-change-hook' is called with args that were passed to +`allout-flag-region', making it easier to use. + +*** Other allout functions which change the outline structure also have +hooks, enabling cooperative allout enhancements. See +`allout-structure-added-hook', `allout-structure-deleted-hook', and +`allout-structure-shifted-hook'. *** Default command prefix changed to "\C-c " (control-c space), to avoid intruding on user's keybinding space. Customize the @@ -2010,23 +2032,43 @@ particular avoiding the need for kludges for isearch dynamic-display, discretionary handling of edits of concealed text, undo concerns, etc. +*** Some previously rough topic-header format edge cases are reconciled. +Level 1 topics use the mode's comment format, and lines starting with the +asterisk - for instance, the comment close of some languages (eg, c's "*/" +or mathematica's "*)") - at the beginning of line are no longer are +interpreted as level 1 topics in those modes. (Yay!) + *** Many substantial fixes and refinements, including: - - repaired inhibition of inadvertent edits to concealed text - - repaired retention of topic body hanging indent upon topic depth shifts + - repaired regexp-quoting of custom header prefixes, so any literals + will now work (for instance, mathematica's "(*" is now properly + accepted). + - repaired inhibition of inadvertent edits to concealed text. - refuse to create "containment discontinuities", where a topic is shifted deeper than the offspring-depth of its' container - auto-fill-mode is now left inactive when allout-mode starts, if it already was inactive. also, `allout-inhibit-auto-fill' custom configuration variable makes it easy to disable auto fill in allout outlines in general or on a per-buffer basis. - - new hook `allout-mode-deactivate-hook', for coordinating with - deactivation of allout-mode. + - mode hook changes: new hook `allout-mode-deactivate-hook', for + coordinating with deactivation of allout-mode. `allout-mode-hook' is + now run after the `allout-mode' variable is changed, as is the new + `allout-mode-deactivate-hook'. + - allout now tolerates fielded text in outlines without disruption. + - hot-spot navigation now is modularized with a new function, + `allout-hotspot-key-handler', enabling easier articulation and + enhancement of the functionality by allout addons. + - topic body navigation is easier, where repeated beginning of line and + end of line key commands cycle through the actually beginning/end of + line and then beginning/end of topic, etc. see new customization vars + `allout-beginning-of-line-cycles' and `allout-end-of-line-cycles'. + - repaired retention of topic body hanging indent upon topic depth shifts - bulleting variation is simpler and more accommodating, both in the default behavior and in ability to vary when creating new topics - mode deactivation now does cleans up effectively, more properly restoring affected variables and hooks to former state, removing - overlays, etc. + overlays, etc. see `allout-add-resumptions' and + `allout-do-resumptions', which replace the old `allout-resumptions'. - included a few unit-tests for interior functionality. developers can have them automatically run at the end of module load by customizing the option `allout-run-unit-tests-on-load'. @@ -3506,6 +3548,9 @@ ** iso-acc.el is now obsolete. Use one of the latin input methods instead. --- +** zone-mode.el is now obsolete. Use dns-mode.el instead. + +--- ** cplus-md.el has been deleted. ** Ewoc changes @@ -3654,8 +3699,10 @@ * Incompatible Lisp Changes in Emacs 22.1 -** The function find-operation-coding-system accepts a cons (FILENAME -. BUFFER) in an argument correponding to the target. +** The function find-operation-coding-system may be called with a cons +(FILENAME . BUFFER) in the second argument if the first argument +OPERATION is `insert-file-contents', and thus a function registered in +`file-coding-system-alist' is also called with such an argument. --- ** The variables post-command-idle-hook and post-command-idle-delay have @@ -4625,6 +4672,7 @@ *** The definition of a key-binding passed to define-key can use XEmacs-style key-sequences, such as [(control a)]. + ** Abbrev changes: +++ @@ -5354,6 +5402,11 @@ property over the second half of the command to force (deferred) refontification of `bar' whenever the `e' is added/removed. +*** `font-lock-extend-region-functions' makes it possible to alter the way +the fontification region is chosen. This can be used to prevent rounding +up to whole lines, or to extend the region to include all related lines +of multiline constructs so that such constructs get properly recognized. + ** Major mode mechanism changes: +++ @@ -5448,6 +5501,9 @@ *** `emacsserver' now runs `pre-command-hook' and `post-command-hook' when it receives a request from emacsclient. ++++ +*** `current-idle-time' reports how long Emacs has been idle. + ** Lisp file loading changes: +++ diff -r 0c89a85addc3 -r 694bbb62a75d etc/TODO --- a/etc/TODO Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/TODO Sat Oct 14 16:56:21 2006 +0000 @@ -21,7 +21,7 @@ but if you type M-n you should get the visited file name of the current buffer. -** whitespace-cleanup should work only on the region if the region is active. +** describe-face should show an example of text in the face. ** Distribute a bar cursor of width > 1 evenly between the two glyphs on each side of the bar (what to do at the edges?). @@ -125,6 +125,9 @@ ** Internationalize Emacs's messages. +** Set up a facility to save backtraces when errors happen during +specified filters, specified timers, and specified hooks. + ** Install mmc@maruska.dyndns.org's no-flicker change. ** Add a "current vertical pixel level" value that goes with point, diff -r 0c89a85addc3 -r 694bbb62a75d etc/TUTORIAL --- a/etc/TUTORIAL Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/TUTORIAL Sat Oct 14 16:56:21 2006 +0000 @@ -217,7 +217,7 @@ to scroll it down again, you can give an argument to M-v. If you are using a windowed display, such as X11 or MS-Windows, there -should be a tall rectangular area called a scroll bar at the left hand +should be a tall rectangular area called a scroll bar at the side of the Emacs window. You can scroll the text by clicking the mouse in the scroll bar. @@ -644,18 +644,18 @@ changes you have made; C-x C-c offers to save each changed file before it kills the Emacs.) -C-z is the command to exit Emacs *temporarily*--so that you can go -back to the same Emacs session afterward. +If you are using a graphical display that supports multiple +applications in parallel, you don't need any special command to move +from Emacs to another application. You can do this with the mouse or +with window manager commands. However, if you're using a text +terminal which can only show one application at a time, you need to +"suspend" Emacs to move to any other program. -On systems which allow it, C-z "suspends" Emacs; that is, it returns -to the shell but does not destroy the Emacs. In the most common -shells, you can resume Emacs with the `fg' command or with `%emacs'. - -On systems which do not implement suspending, C-z creates a subshell -running under Emacs to give you the chance to run other programs and -return to Emacs afterward; it does not truly "exit" from Emacs. In -this case, the shell command `exit' is the usual way to get back to -Emacs from the subshell. +C-z is the command to exit Emacs *temporarily*--so that you can go +back to the same Emacs session afterward. When Emacs is running on a +text terminal, C-z "suspends" Emacs; that is, it returns to the shell +but does not destroy the Emacs. In the most common shells, you can +resume Emacs with the `fg' command or with `%emacs'. The time to use C-x C-c is when you are about to log out. It's also the right thing to use to exit an Emacs invoked under mail handling diff -r 0c89a85addc3 -r 694bbb62a75d etc/TUTORIAL.cn --- a/etc/TUTORIAL.cn Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/TUTORIAL.cn Sat Oct 14 16:56:21 2006 +0000 @@ -165,7 +165,7 @@ ´ó²¿·ÖµÄ Emacs ÃüÁî½ÓÊÜÊý×Ö²ÎÊý£¬²¢ÇÒ¶ÔÓÚ¶àÊýÃüÁî¶øÑÔ£¬ÕâЩÊý×Ö²ÎÊýµÄ×÷ ÓÃÊÇÖ¸¶¨ÃüÁîµÄÖظ´´ÎÊý¡£ÎªÒ»¸öÃüÁîÖ¸¶¨Êý×Ö²ÎÊý£¨Ò²¾ÍÊÇÖظ´´ÎÊý£©µÄ·½·¨ ÊÇ£ºÏÈÊäÈë C-u£¬È»ºóÊäÈëÊý×Ö×÷Ϊ²ÎÊý£¬×îºóÔÙÊäÈëÃüÁî¡£Èç¹ûÄãÓÐMETA £¨»ò -EDIT »ò ALT£©¼ü£¬ÄÇô»¹ÓÐÁíÒ»ÖÖ°ì·¨£º°´×¡ META ¼ü²»¶¯£¬È»ºóÊäÈëÊý×Ö¡£²» +EDIT »ò ALT£©¼ü£¬ÄÇô»¹ÓÐÁíÒ»ÖÖ°ì·¨£º°´×¡ META ¼ü²»·Å£¬È»ºóÊäÈëÊý×Ö¡£²» ¹ýÎÒÃÇ»¹Êǽ¨ÒéÄãÓà C-u£¬ÒòΪËüÔÚÈκÎÖն˻úÉ϶¼ÄÜÓá£ÕâÖÖÊý×Ö²ÎÊýÒ²³ÆΪ ¡°Ç°×º²ÎÊý¡±£¬Òâ˼ÊÇ˵Õâ¸ö²ÎÊýÊÇÏÈÓÚʹÓÃËüµÄÃüÁî¶øÊäÈëµÄ¡£ @@ -174,9 +174,9 @@ >> Ϊ C-n »òÕß C-p Ö¸¶¨Ò»¸öÊý×Ö²ÎÊý£¬ÕâÑùÄã¿ÉÒÔÖ»ÓÃÒ»¸öÃüÁî¾Í°Ñ¹â±êÒƶ¯ µ½±¾Ðеĸ½½ü¡£ -ËäÈ»´ó²¿·ÖÃüÁîÓÃÊý×Ö²ÎÊýÀ´×÷ΪÆäÖظ´´ÎÊý£¬µ«ÊÇÒ²ÓÐЩÃüÁîÀýÍ⣬ËüÃǽ«Êý -×Ö²ÎÊýÁí×öËüÓᣱÈÈçÓÐЩÃüÁĿǰ»¹Ã»Ñ§µ½£©½ö½ö½«Ç°×º²ÎÊý×÷Ϊһ¸ö±ê -Ö¾¡ª¡ªÖ»ÒªÓÐÒ»¸öǰ׺²ÎÊý³öÏÖ£¬²»¹ÜÆäֵΪºÎ£¬ÃüÁîµÄ¹¦Äܶ¼»á¸Ä±ä¡£ +ËäÈ»´ó²¿·ÖÃüÁî°ÑÊý×Ö²ÎÊý½âÊÍΪÆäÖظ´´ÎÊý£¬µ«ÊÇÒ²ÓÐЩÃüÁîÀýÍ⣬ËüÃǽ«Êý +×Ö²ÎÊýÁí×öËüÓᣱÈÈçÓÐЩÃüÁÎÒÃÇÄ¿Ç°»¹Ã»Ñ§µ½£©½ö½ö½«Ç°×º²ÎÊý×÷Ϊһ¸ö +±êÖ¾¡ª¡ªÖ»Òª¸ø³öÓÐÒ»¸öǰ׺²ÎÊý£¬²»¹ÜÆäֵΪºÎ£¬Ëü¶¼»á¸Ä±äÃüÁîµÄ¹¦ÄÜ¡£ ¶ø C-v ºÍ M-v ÔòÊôÓÚÁíÒ»ÖÖÀàÐ͵ÄÀýÍâ¡£µ±¸ø¶¨Ò»¸ö²ÎÊýʱ£¬ËüÃǽ«¹ö¶¯ÄãÖ¸ ¶¨µÄ¡°ÐÐÊý¡±£¬¶ø²»ÊÇ¡°ÆÁÊý¡±¡£¾ÙÀýÀ´Ëµ£¬C-u 8 C-v ½«ÆÁÄ»ÏòϹö¶¯ 8 ÐУ¬ @@ -188,8 +188,8 @@ ÒÔ¸ø¶¨Ò»¸ö²ÎÊýÈ»ºóÖ´ÐÐ M-v¡£ Èç¹ûÄãÕýÔÚʹÓÃÒ»¸ö´°¿Úϵͳ£¬±ÈÈç X11 »òÕß΢ÈíµÄ Windows£¬ÄÇôÔÚ Emacs -´°¿ÚµÄ×ó±ß»òÕßÓÒ±ßÓ¦¸ÃÓÐÒ»¸ö³¤·½ÐεÄÇøÓò½Ð¡°¹ö¶¯Ìõ¡±£¬Äã¿ÉÒÔÓÃÊó±ê²Ù×Ý -¹ö¶¯ÌõÀ´¹ö¶¯ÎÄ×Ö¡£ +´°¿ÚµÄ±ßÔµÓ¦¸ÃÓÐÒ»¸ö³¤·½ÐεÄÇøÓò½Ð¡°¹ö¶¯Ìõ¡±£¬Äã¿ÉÒÔÓÃÊó±ê²Ù×ݹö¶¯ÌõÀ´ +¹ö¶¯ÎÄ×Ö¡£ >> ÊÔ×ÅÔÚ¡°¹ö¶¯ÌõÄڵķ´°×ÇøÓò¡±ÉÏ°´Ò»ÏÂÊó±êÖмü¡£ ÎÄ×ÖÓ¦¸Ã»á¹ö¶¯µ½Êó±êËùָʾµÄλÖᣠ@@ -202,10 +202,10 @@ * ÔÚ EMACS ʧȥÏìÓ¦µÄʱºò£¨WHEN EMACS IS HUNG£© ----------------------------------------------- -Èç¹û Emacs ¶ÔÄãµÄÃüÁîʧȥÏìÓ¦£¬Äã¿ÉÒԺܰ²È«µØÓà C-g À´ÖÕÖ¹Õâ¸öÃüÁî¡£ -C-g Ò²¿ÉÒÔ±»ÓÃÀ´ÖÕÖ¹Ò»¸öÖ´Ðйý¾ÃµÄÃüÁî¡£ +Èç¹û Emacs ¶ÔÄãµÄÃüÁîʧȥÏìÓ¦£¬Äã¿ÉÒÔÓà C-g À´°²È«µØÖÕÖ¹ÕâÌõÃüÁî¡£C-g +Ò²¿ÉÒÔÖÕÖ¹Ò»ÌõÖ´Ðйý¾ÃµÄÃüÁî¡£ -C-g »¹¿ÉÒÔ±»À´È¡ÏûÊý×Ö²ÎÊýºÍÄÇЩÊäÈëµ½Ò»°ëµÄÃüÁî¡£ +C-g »¹¿ÉÒÔÈ¡ÏûÊý×Ö²ÎÊýºÍÖ»ÊäÈëµ½Ò»°ëµÄÃüÁî¡£ >> ÊäÈë C-u 100 É趨һ¸öֵΪ 100 µÄÊý×Ö²ÎÊý£¬È»ºó°´ C-g¡£ ÏÖÔÚÔÙ°´ C-f£¬¹â±êÓ¦¸ÃÖ»»áÒƶ¯Ò»¸ö×Ö·û£¬ÒòΪÄãÒѾ­Óà C-g È¡ÏûÁ˲ÎÊý¡£ @@ -219,16 +219,16 @@ ----------------------------------- ÓÐһЩ Emacs ÃüÁî±»¡°½ûÓá±ÁË£¬ÒÔ±ÜÃâ³õѧÕßÔÚ²»Á˽âÆäÈ·Çй¦ÄܵÄÇé¿öÏÂÎó -ÓÃÕâЩÃüÁÔì³ÉÂé·³¡£ +ÓÃËüÃÇ£¬Ôì³ÉÂé·³¡£ Èç¹ûÄãÓõ½ÁËÒ»¸ö±»½ûÓõÄÃüÁEmacs »áÏÔʾһ¸öÌáʾÏûÏ¢£¬¸æËßÄãÕâ¸öÃüÁî µ½µ×ÊǸÉʲôµÄ£¬Ñ¯ÎÊÄãÊÇ·ñÒª¼ÌÐø£¬²¢Ôڵõ½ÄãµÄ¿Ï¶¨Ö®ºóÔÙÖ´ÐÐÕâÃüÁî¡£ -ÄãÒªÊÇÕæµÄÏëÖ´Ðб»½ûÓõÄÃüÁÄÇôÔÚ Emacs ѯÎÊÄãµÄʱºòÓ¦¸Ã°´¿Õ¸ñ¡£Ò»°ã -À´Ëµ£¬Èç¹ûÄã²»ÏëÖ´ÐУ¬°´¡°n¡±¾ÍÐÐÁË¡£ +Èç¹ûÄãÕæµÄÏëÓÃÕâÌõÃüÁÔÚ Emacs ѯÎÊÄãµÄʱºòÓ¦¸Ã°´¿Õ¸ñ¡£Ò»°ãÀ´Ëµ£¬Èç¹û +Äã²»ÏëÓ㬾Ͱ´¡°n¡±¡£ >> ÊÔÊÔ C-x C-l £¨ÕâÊÇÒ»¸ö±»½ûÓõÄÃüÁ - È»ºóÓà n À´»Ø´ðÎÊÌâ¡£ + È»ºóÓà n À´»Ø´ðѯÎÊ¡£ * ´°¸ñ£¨WINDOWS£© @@ -245,7 +245,7 @@ >> °Ñ¹â±êÒƵ½±¾ÐÐÈ»ºóÊäÈë C-u 0 C-l¡£ >> ÊäÈë CONTROL-h k CONTROL-f¡£¹Û²ìµ±Ò»¸öд°¸ñ³öÏÖʱµ±Ç°´°¸ñ£¨ÓÃÀ´ÏÔʾ - CONTROL-f ÃüÁîµÄÎĵµ£©ÊÇÈçºÎËõСµÄ¡£ + CONTROL-f ÃüÁîµÄÎĵµ£©ÊÇÈçºÎ±äСµÄ¡£ >> ÊäÈë C-x 1 ¹ØµôÎĵµ´°¸ñ¡£ @@ -265,33 +265,33 @@ Ó÷¨Ó¦¸ÃÒ»Ñù¡£Ò»°ãÀ´Ëµ ¾ÍÊÇλÓÚ ¼üÉÏ·½Ä³´¦µÄÒ»¸ö´óºÅ ¼ü£¬Í¨³£±»±êʾΪ¡°Delete¡±¡¢¡°Del¡±»òÕß¡°Backspace¡±¡£ -Èç¹ûÄãÕÒµ½Á˱ê×Å¡°Backspace¡±µÄ¼ü£¬ÄÇôËüÓ¦¸Ã¾ÍÊÇ £»¼´±ãÄãÓÖÔÚ -¼üÅÌÆäËüµØ·½ÕÒµ½ÁËÒ»¸ö±êʾΪ¡°Del¡±µÄ¼ü£¬ÄÇôËüÒ²Ó¦¸Ã²»ÊÇ ¡£ +Èç¹ûÄãÕÒµ½ÁË¡°Backspace¡±¼ü£¬ÄÇôËüÓ¦¸Ã¾ÍÊÇ £»ÄÄÅÂÄãÓÖÔÚ±ðµÄµØ +·½ÕÒµ½ÁËÒ»¸ö¡°Del¡±¼ü£¬ÄÇôËüÒ²Ó¦¸Ã²»ÊÇ ¡£ -Ò»ÖÖ¸üͨÓõÄ˵·¨ÊÇ£¬ ½«Î»ÓÚ¹â±êÇ°µÄÒ»¸ö×Ö·ûɾ³ý¡£ +Ò»ÖÖ¸üͨÓõÄ˵·¨ÊÇ£¬ ½«É¾³ýλÓÚ¹â±êÇ°µÄÒ»¸ö×Ö·û¡£ >> ÏÖÔÚ¾ÍÊÔÊÔ¡ª¡ªÇõã×Ö£¬È»ºó°´¼¸Ï ɾ³ýËüÃÇ¡£ ²»Óõ£ÐÄÄã»áÐÞ¸ÄÎļþ£¬Äã¸Éʲô¶¼Ã»¹Øϵ£¬ÕâÀï¾ÍÊÇר¸øÄãÁ·Ï°Óõġ£ Èç¹ûÒ»ÐÐÎÄ×ֺܳ¤¡¢³¬³öÁË´°¸ñµÄ¿í¶È£¬ÏÔʾ²»ÏµIJ¿·Ö»áÔÚ½ôÁÚµÄÏÂÒ»ÐмÌÐø -ÏÔʾ¡£Õâʱ»áÓÐÒ»¸ö·´Ð±Ïߣ¨¿ØÖÆ̨ÏÂÊÇ·´Ð±Ïߣ¬Èç¹ûÄãÓÃͼÐδ°¿Úϵͳ£¬ÔòÓ¦ -¸ÃÊÇÒ»¸öССµÄתÍä¼ýÍ·£©ÏÔʾÔÚÓÒ±ßÑØ£¬±íÃ÷ÕâÊÇijһÐеĽÓÐøÏÔʾ¡£ +ÏÔʾ¡£Õâʱ»áÓÐÒ»¸ö·´Ð±Ïߣ¨ÔÚ¿ØÖÆ̨ÏÂÊÇ·´Ð±Ïߣ¬Èç¹ûÄãÓÃͼÐδ°¿Úϵͳ£¬Ôò +Ó¦¸ÃÊÇÒ»¸öССµÄתÍä¼ýÍ·£©ÏÔʾÔÚÓÒ±ßÑØ£¬±íÃ÷ÕâÊÇijһÐеĽÓÐøÏÔʾ¡£ >> ÊäÈëÎÄ×Ö£¬Ò»Ö±µ½ÆÁÄ»µÄÓұ߽磬Ȼºó¼ÌÐø£¬Äã»á¿´µ½Ò»¸ö½ÓÐøÐгöÏÖ¡£ >> Óà ɾµôһЩÎÄ×Ö£¬Ö±µ½´ËÐ㤶ÈСÓÚ´°¸ñ¿í¶È£¬½ÓÐøÐоÍÏûʧÁË¡£ -Äã¿ÉÒÔÏñɾ³ýÆäËû×Ö·ûÒ»Ñùɾ³ý»»Ðзû¡£É¾³ýÁ½ÐÐÖмäµÄ»»Ðзû»á½«Á½Ðкϲ¢³É -Ò»ÐС£Èç¹ûºÏ²¢µÄ½á¹ûʹÕâÒ»ÐÐÌ«³¤£¬³¬³öÁË´°¸ñµÄ¿í¶È£¬Ëü¾Í»áÒÔÒ»¸ö½ÓÐøÐÐ -À´ÏÔʾ¡£ +»»Ðзû¸úÆäËû×Ö·ûÒ»Ñù¿ÉÒÔ±»É¾³ý¡£Á½ÐÐÖмäµÄ»»Ðзû±»É¾³ýºó£¬ÕâÁ½Ðн«»áºÏ +²¢³ÉÒ»ÐС£Èç¹ûºÏ²¢ºóµÄÕâÒ»ÐÐÌ«³¤£¬³¬³öÁË´°¸ñ¿í¶È£¬Ëü¾Í»áÒÔÒ»¸ö½ÓÐøÐÐÀ´ +ÏÔʾ¡£ ->> Òƶ¯¹â±êµ½±¾ÐеĿªÍ·²¢ÊäÈë ¡£ - Õâʱ±¾ÐÐÓëÆäÇ°Ò»Ðн«±»ºÏ²¢ÎªÒ»ÐС£ +>> Òƶ¯¹â±êµ½Ä³ÐеĿªÍ·²¢ÊäÈë ¡£ + Õâʱ¸ÃÐн«ÓëÆäÇ°Ò»ÐÐÒ»Æ𱻺ϲ¢ÎªÒ»ÐС£ >> ÊäÈë ÖØвåÈëÄã¸Õ²Åɾ³ýµÄ»»Ðзû¡£ -Ç°Ãæ˵¹ý£¬´ó²¿·ÖµÄ Emacs ÃüÁ¿ÉÒÔÖ¸¶¨Öظ´´ÎÊý£¬ÕâÆäÖÐÒ²°üÀ¨ÊäÈë×Ö·ûµÄ -ÃüÁî¡£Öظ´Ö´ÐÐÊäÈë×Ö·ûµÄÃüÁîʵ¼ÊÉϾÍÊÇÊäÈë¶à¸öÒ»ÑùµÄ×Ö·û¡£ +Ç°Ãæ½²¹ý£¬´ó²¿·ÖµÄ Emacs ÃüÁ¿ÉÒÔÖ¸¶¨Öظ´´ÎÊý£¬ÕâÆäÖÐÒ²°üÀ¨ÊäÈë×Ö·ûµÄ +ÃüÁî¡£Öظ´Ö´ÐÐÊäÈë×Ö·ûµÄÃüÁîʵ¼ÊÉϾÍÊÇÊäÈë¶à¸öÏàͬµÄ×Ö·û¡£ >> ÊÔÊÔ C-u 8 *£¬Õ⽫»á²åÈë ********¡£ @@ -329,10 +329,10 @@ ×¢Òâ,¡°ÒƳý£¨kill£©¡±ºÍ¡°É¾³ý£¨delete£©¡±µÄ²»Í¬ÔÚÓÚ±»ÒƳýµÄ¶«Î÷¿ÉÒÔÕÒ»Ø À´£¬¶ø±»É¾³ýµÄ¾Í²»ÐÐÁË¡£¡¾Êµ¼ÊÉÏ£¬ÒƳýµôµÄ¶«Î÷ËäÈ»¿´ÆðÀ´¡°Ïûʧ¡±ÁË£¬µ« ʵ¼ÊÉϱ» Emacs ¼Ç¼ÁËÏÂÀ´£¬Òò´Ë»¹¿ÉÒÔÕÒ»ØÀ´£»¶øɾ³ýµôµÄ¶«Î÷ËäȻҲ¿ÉÄÜ»¹ -ÔÚÄÚ´æÀµ«ÊÇÒѾ­±»Emacs¡°Å×Æú¡±ÁË£¬ËùÒÔ¾ÍÕÒ²»»ØÀ´ÁË¡£¡¿ÖØвåÈë±»ÒƳý -µÄÎÄ×Ö³ÆΪ¡°Õٻأ¨yank£©¡±¡£Ò»°ã¶øÑÔ£¬ÄÇЩ»áÈ¥³ýºÜ¶àÎÄ×ÖµÄÃüÁî»á°ÑÈ¥³ý -µôµÄÎÄ×Ö´¢´æÆðÀ´£¨ËüÃDZ»É趨³ÉÁË¡°¿ÉÕٻء±£©£¬¶øÄÇЩֻÊÇÈ¥³ýÒ»¸ö×Ö·û»ò -ÕßÖ»ÊÇÈ¥³ý¿Õ°×µÄÃüÁî¾Í²»»á´¢´æÄÇЩ±»È¥³ýµôµÄ¶«Î÷£¨Òò´ËÄã¾ÍÎÞ·¨Õٻأ©¡£ +ÔÚÄÚ´æÀµ«ÊÇÒѾ­±» Emacs¡°Å×Æú¡±ÁË£¬ËùÒÔ¾ÍÕÒ²»»ØÀ´ÁË¡£¡¿ÖØвåÈë±»ÒÆ +³ýµÄÎÄ×Ö³ÆΪ¡°Õٻأ¨yank£©¡±¡£Ò»°ã¶øÑÔ£¬ÄÇЩ»áÈ¥³ýºÜ¶àÎÄ×ÖµÄÃüÁî»á°ÑÈ¥ +³ýµôµÄÎÄ×Ö´¢´æÆðÀ´£¨ËüÃDZ»É趨³ÉÁË¡°¿ÉÕٻء±£©£¬¶øÄÇЩֻÊÇÈ¥³ýÒ»¸ö×Ö·û +»òÕßÖ»ÊÇÈ¥³ý¿Õ°×µÄÃüÁî¾Í²»»á´¢´æ±»È¥³ýµôµÄ¶«Î÷£¨×ÔÈ»Äã¾ÍÎÞ·¨ÕÙ»ØÁË£©¡£ >> Òƶ¯¹â±êµ½Ò»·Ç¿Õ°×ÐеÄÐÐÍ·£¬È»ºóÊäÈë C-k ÒƳýÄÇÒ»ÐÐÉϵÄÎÄ×Ö¡£ @@ -409,9 +409,9 @@ ´æÅÌ£¬¾ÍÒªÔڱ༭ǰ¡°Ñ°ÕÒ¡±µ½Ò»¸ö´æÅÌÎļþ¡££¨Õâ¸ö¹ý³Ìͨ³£Ò²±»³ÆΪ¡°·ÃÎÊ¡± Îļþ¡££© -Ñ°ÕÒµ½Ò»¸öÎļþÒâζ×ÅÄã¿ÉÒÔÔÚ Emacs Àï²é¿´Õâ¸öÎļþµÄÄÚÈÝ¡£´ÓºÜ¶à½Ç¶È½²£¬ +Ñ°ÕÒµ½Ò»¸öÎļþÒâζ×ÅÄã¿ÉÒÔÔÚ Emacs Àï²é¿´Õâ¸öÎļþµÄÄÚÈÝ¡£´ÓºÜ¶à·½Ãæ½²£¬ Õâ¾ÍµÈÓÚÄãÔÚÖ±½Ó±à¼­Õâ¸öÎļþ¡£µ«ÊÇÄãËù×öµÄÐÞ¸ÄÖ»ÓÐÔÚ¡°´æÅÌ¡±µÄʱºò²Å»á -±»Ð´ÈëÎļþ¡£Ò²ÕýÒòΪÈç´Ë£¬Äã¿ÉÒÔ¶ªÆúÒ»¸ö¸Äµ½Ò»°ëµÄÎļþ¶ø²»±Ø°ÑÕâ¸ö²Ð·Ï +±»Ð´ÈëÎļþ¡£Ò²ÕýÒòΪÈç´Ë£¬Äã¿ÉÒÔ¶ªÆúÒ»¸ö¸Äµ½Ò»°ëµÄÎļþ¶ø²»±Ø°ÑÕâ¸ö²Ðȱ ÎļþÒ²±£´æµ½¼ÆËã»úÉÏ¡£×îºó¾ÍËãÄãÕæÕý´æÁËÅÌ£¬Emacs Ò²»á°Ñ´æÅÌÇ°µÄÎļþÖØ ÃüÃû±£´æ£¬ÒÔ·ÀÄã¸ÄÍêÖ®ºóÓÖÏë·´»Ú¡£ @@ -572,10 +572,10 @@ ×Ö·û´®Ìæ»»ÃüÁîÐèÒªÁ½¸ö²ÎÊý¡ª¡ª±»Ìæ»»µÄ×Ö·û´®ºÍÓÃÀ´Ìæ»»ËüµÄ×Ö·û´®¡£Ã¿¸ö ²ÎÊýµÄÊäÈëÓû»ÐзûÀ´½áÊø¡£ ->> ½«¹â±êÒƵ½±¾ÐеÄÏÂÁ½Ðпհף¬È»ºóÊäÈë +>> ½«¹â±êÒƵ½±¾ÐÐÏÂÃæµÚ¶þÐеĿհ״¦£¬È»ºóÊäÈë M-x repl schangedaltered¡£ - ¡¾ÎªÁ˼ÌÐøÁ·Ï°£¬±£ÁôÒ»ÐÐÔ­ÎÄÈçÏ£º + ¡¾ÒÔϱ£ÁôÒ»ÐÐÔ­ÎÄ£¬ÒÔÓ¦Á·Ï°Ö®Ð裺 Notice how this line has changed: you've replaced... ¡¿ Çë×¢ÒâÕâÒ»ÐÐÊÇÔõô¸Ä±äµÄ£ºÔÚ¹â±êÖ®ºóµÄ·¶Î§ÄÚ£¬ÄãÒѾ­½«¡°changed¡±Õâ¸ö @@ -617,7 +617,7 @@ ¹ûλÓÚÎļþµÄĩ⣬¾ÍÏÔʾ --Bot--¡£Èç¹ûÎļþºÜС£¬Ò»ÆÁ¾Í×ãÒÔÏÔʾȫ²¿ÄÚÈÝ£¬ ÄÇô״̬À¸»áÏÔʾ --All--¡£ -L ºÍÆäºóµÄÊý×Ö¸ø³öÁ˹â±êËùÔÚÐеÄÐкš£ +¡°L¡± ºÍÆäºóµÄÊý×Ö¸ø³öÁ˹â±êËùÔÚÐеÄÐкš£ ×ͷµÄÐǺţ¨*£©±íʾÄãÒѾ­¶ÔÎÄ×Ö×ö¹ý¸Ä¶¯¡£¸Õ¸Õ´ò¿ªµÄÎļþ¿Ï¶¨Ã»Óб»¸Ä¶¯ ¹ý£¬ËùÒÔ״̬À¸ÉÏÏÔʾµÄ²»ÊÇÐǺŶøÊǶÌÏߣ¨-£©¡£ @@ -690,14 +690,14 @@ ¹¦ºó£¬¹â±ê»áÍ£ÁôÔÚËÑË÷Ä¿±ê³öÏֵĵط½¡£ Emacs µÄËÑË÷ÃüÁîµÄ¶ÀÌØÖ®´¦ÔÚÓÚ£¬ËüÊÇ¡°½¥½øµÄ£¨incremental£©¡±£¬Òâ˼ÊÇËÑ -Ë÷ÓëÊäÈëͬʱ½øÐУºÄãÔÚÕâ±ßÒ»¸ö×ÖÒ»¸ö×ÖµØÊäÈëÄãÏëËÑË÷µÄ¶«Î÷£¬Í¬Ê± Emacs -ÔÚÄDZ߾ÍÌæÄãËÑË÷ÁË¡£ +Ë÷ÓëÊäÈëͬʱ½øÐУºÄãÔÚ¼üÅÌÉÏÒ»×ÖÒ»¾äµØÊäÈëËÑË÷´ÊµÄ¹ý³ÌÖУ¬Emacs ¾ÍÒѾ­ +¿ªÊ¼ÌæÄãËÑË÷ÁË¡£ C-s ÊÇÏòÇ°ËÑË÷£¬C-r ÊÇÏòºóËÑË÷¡£²»¹ýÊÖ±ðÕâô¿ì£¡Ïȵȵȱð׿±ÊÔ¡£ -ÔÚÄã°´Ï C-s Ö®ºó£¬Äã»á·¢ÏÖ»ØÏÔÇøÀïÓС°I-search¡±×ÖÑù³öÏÖ£¬ÕâÊÇÔÚÌáʾ -ÄãÄ¿Ç° Emacs Õý´¦ÓÚ¡°½¥½øËÑË÷¡±×´Ì¬£¬ÕýÔڵȴýÄãÊäÈëËÑË÷×Ö´®¡£ -»á½áÊøËÑË÷¡£ +ÔÚÄã°´Ï C-s Ö®ºó£¬Äã»á·¢ÏÖ»ØÏÔÇøÀïÓС°I-search¡±×ÖÑù³öÏÖ£¬ÌáʾÄãÄ¿Ç° +Emacs Õý´¦ÓÚ¡°½¥½øËÑË÷¡±×´Ì¬£¬ÕýÔڵȴýÄãÊäÈëËÑË÷×Ö´®¡£°´ »á½á +ÊøËÑË÷¡£ >> ÊäÈë C-s ¿ªÊ¼Ò»¸öËÑË÷¡£×¢ÒâÇÃÂýÒ»µã£¬Ò»´ÎÊäÈëÒ»¸ö×Ö·û¡£ ÂýÂýÊäÈë¡°cursor¡±Õû¸ö´Ê£¬Ã¿ÇÃÒ»¸ö×Ö¾ÍÔÝͣһϣ¬×¢Òâ¹Û²ì¹â±ê¡£ @@ -917,10 +917,10 @@ Emacs ¿ìËÙÖ¸ÄÏ£¨Tutorial£©ÔçÓÐÁ½¸öÁõÕѺêµÄÖÐÎÄÒë±¾£¬·±¼ò¸÷Ò»¡£Æä¼òÌå°æ±¾ £¨TUTORIAL.cn£©»ù±¾ÓÉ·±Ìå°æ±¾£¨TUTORIAL.zh£©¾­´ÊÓïÌæ»»¶øµÃ¡£È»¶ø·±¼òÖÐÎÄ -²»½öÔÚÓôÊÏ°¹ßÉÏÓÐËù²»Í¬£¬¸üÓÐÖî¶à±í´ï·½Ê½ºÍ¾ä·¨·½ÃæµÄ²îÒì¡£Òò´ËÒ»Ö±ÒÔÀ´ -ÔĶÁ TUTORIAL.cn ¶¼ÂÔ¾õ»ÞɬºÍÉúÓ²¡£Õâ´ÎÖØз­Òë TUTORIAL.cn µÄ¶¯»úÕýÊÇÔ´ -ÓÚÕâÖÖÌåÑ飬ϣÍûÎÒÃǵŤ×÷Äܹ»Èñ¾ÎĸüºÃµÄ·¢»ÓÆäÓ¦ÓеÄ×÷Óá£TUTORIAL.zh -µÄÒëÎÄÖÊÁ¿ºÜ¸ß£¬ÔÚ·­Òë¹ý³ÌÖиøÓè¹ýÎÒÃǺܶà½è¼øºÍ²Î¿¼£¬Ôڴ˶ÔÁõÕѺêµÄ¹¤×÷ +²»½öÔÚÓôÊÏ°¹ßÉÏÓÐËù²»Í¬£¬¸üÓÐÖî¶à±í´ï·½Ê½Óë¾ä·¨·½ÃæµÄ²îÒ죬Òò´ËÒ»Ö±ÒÔÀ´ +Óû§Ê¹Óà TUTORIAL.cn ¶¼»áÂÔ¾õÉúÓ²ºÍ»Þɬ¡£Õâ´ÎÖØз­Òë TUTORIAL.cn µÄ¶¯»ú +ÕýÊÇÔ´ÓÚÕâÖÖÌåÑ飬ϣÍûÎÒÃǵŤ×÷Äܹ»Èñ¾ÎĸüºÃµØ·¢»ÓÆä×÷Óá£TUTORIAL.zh +µÄÒëÎÄÖÊÁ¿ºÜ¸ß£¬ÔÚ·­Òë¹ý³ÌÖиøÓè¹ýÎÒÃÇÐí¶à½è¼øºÍ²Î¿¼£¬Ôڴ˶ÔÁõÕѺêµÄ¹¤×÷ ±íʾ¸Ðл¡£ ·­Òë¹ý³ÌÖÐ×î´óµÄÌôսĪ¹ýÓÚÊõÓïÒë´ÊµÄÑ¡ÔñÁË¡£¾­¹ýˮľÉçÇø Emacs °åÈÈÐÄÍø @@ -954,6 +954,10 @@ Öеġ°window¡±¾ÍÖ»ÄÜÒë³É¡°´°¸ñ¡±ÁË¡£ÎÒÃÇÈÏΪ Emacs ÖÐ window ºÍ frame µÄ¹ØϵÓô°¸ñºÍ´°¿ÚÀ´Àà±ÈÊÇÊ®·ÖÐÎÏóµÄ¡£ + ¡¶Ñ§Ï°GNU Emacs¡·£¨µÚ¶þ°æ£©Ò»Êé¶Ô¡°window¡±ºÍ¡°frame¡±µÄ·­ÒëÓë±¾½Ì³Ì + ¸ÕºÃÏà·´£¨·Ö±ðÒë×÷¡°´°¿Ú¡±ºÍ¡°´°¸ñ¡±£©¡£ÔÚ´ËÌرð×¢Ã÷£¬ÒÔÏû³ý¿ÉÄܲúÉú + µÄÒÉ»ó¡£ + [2] ¶ÔÓÚ¡°delete¡±ºÍ¡°kill¡±µÄÇø±ð£¬ÕýÎÄÒѾ­¸ø³öÁËÏêϸµÄ˵Ã÷¡£¡°É¾³ý¡±ºÍ ¡°ÒƳý¡±Ïà±È½ÏÆðÀ´£¬Ç°Õ߸ü¶àµØÒþº¬×Å¡°ÆÆ»µ¡±ºÍ¡°²»¿É»Ö¸´¡±µÄÒâ˼£¬¶ø ºóÕ߸ü¶àµØÒþº¬×Å¡°±»×ªÒÆ¡±ºÍ¡°¿É»Ö¸´¡±µÄÒâ˼¡£Òò´Ë·Ö±ðÑ¡ÔñËüÃÇ×÷ΪÉÏ diff -r 0c89a85addc3 -r 694bbb62a75d etc/TUTORIAL.de --- a/etc/TUTORIAL.de Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/TUTORIAL.de Sat Oct 14 16:56:21 2006 +0000 @@ -285,8 +285,8 @@ einem numerischen Argument ein. Wenn Sie eine graphische Oberfläche wie X oder MS-Windows verwenden, -dann befindet sich ein schmaler, langgezogener rechteckiger Bereich im -Regelfall auf der linken Seite des Emacs-Fensters. Dieser Bereich +dann befindet sich ein schmaler, langgezogener rechteckiger Bereich auf +der linken oder rechten Seite des Emacs-Fensters. Dieser Bereich wird Scrollbar genannt (`Verschiebungsbalken'). Sie können Text verschieben, indem Sie mit der Maus auf den Scrollbar klicken. diff -r 0c89a85addc3 -r 694bbb62a75d etc/TUTORIAL.it --- a/etc/TUTORIAL.it Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/TUTORIAL.it Sat Oct 14 16:56:21 2006 +0000 @@ -219,9 +219,9 @@ in basso puoi usare un argomento numerico con M-v. Quando si usa un sistema a finestre, come X11 o MS-Windows, ci dovrebbe -essere un'area rettangolare allungata chiamata barra di scorrimento sul -lato sinistro della finestra di Emacs. Si può far scorrere il testo con -un click del mouse nella barra di scorrimento. +essere un'area rettangolare allungata chiamata barra di scorrimento a +un lato della finestra di Emacs. Si può far scorrere il testo con un +click del mouse nella barra di scorrimento. >> Prova a premere il pulsante centrale del mouse sopra all'area evidenziata nella barra di scorrimento. Verrà visualizzata una parte diff -r 0c89a85addc3 -r 694bbb62a75d etc/TUTORIAL.sl --- a/etc/TUTORIAL.sl Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/TUTORIAL.sl Sat Oct 14 16:56:21 2006 +0000 @@ -222,7 +222,7 @@ premaknili nazaj, poskusite M-v z istim argumentom. Èe uporabljate grafièni vmesnik, denimo X11 ali MS Windows, imate -verjetno ob levem robu Emacsovega okna navpièno pravokotno ploskev, +verjetno ob robu Emacsovega okna navpièno pravokotno ploskev, imenovano drsnik. Pogled na besedilo lahko premikate tudi tako, da z mi¹ko kliknete na drsnik. diff -r 0c89a85addc3 -r 694bbb62a75d etc/TUTORIAL.sv --- a/etc/TUTORIAL.sv Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/TUTORIAL.sv Sat Oct 14 16:56:21 2006 +0000 @@ -224,7 +224,7 @@ tillbaka igen är det bara att ge samma argument till M-v. Om du använder Emacs under ett fönstersystem, som X11 eller -MS-Windows, finns det troligen ett rektangulärt område på vänster sida +MS-Windows, finns det troligen ett rektangulärt område på sidan av Emacs-fönstret, en så kallad rullningslist. Genom att klicka i den med musen kan du rulla texten. diff -r 0c89a85addc3 -r 694bbb62a75d etc/emacs.py --- a/etc/emacs.py Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/emacs.py Sat Oct 14 16:56:21 2006 +0000 @@ -1,7 +1,7 @@ """Definitions used by commands sent to inferior Python in python.el.""" -# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. -# Author: Dave Love +# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. +# Author: Dave Love # This file is part of GNU Emacs. @@ -20,17 +20,19 @@ # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, # Boston, MA 02110-1301, USA. -import os, sys, traceback, inspect, rlcompleter, __main__ +import os, sys, traceback, inspect, __main__ +from sets import Set -__all__ = ["eexecfile", "args", "complete", "ehelp", "eimport"] +__all__ = ["eexecfile", "eargs", "complete", "ehelp", "eimport", "modpath"] def eexecfile (file): """Execute FILE and then remove it. + Execute the file within the __main__ namespace. If we get an exception, print a traceback with the top frame - (oursleves) excluded.""" + (ourselves) excluded.""" try: - try: execfile (file, globals (), globals ()) - except: + try: execfile (file, __main__.__dict__) + except: (type, value, tb) = sys.exc_info () # Lose the stack frame for this location. tb = tb.tb_next @@ -40,9 +42,10 @@ finally: os.remove (file) -def eargs (name): +def eargs (name, imports): "Get arglist of NAME for Eldoc &c." try: + if imports: exec imports parts = name.split ('.') if len (parts) > 1: exec 'import ' + parts[0] # might fail @@ -56,8 +59,7 @@ return if inspect.ismethod (func): func = func.im_func - if not inspect.isfunction (func): - return + if not inspect.isfunction (func): return (args, varargs, varkw, defaults) = inspect.getargspec (func) # No space between name and arglist for consistency with builtins. print '_emacs_out', \ @@ -65,41 +67,109 @@ defaults) except: pass -def complete (text, namespace = None): +def all_names (object): + """Return (an approximation to) a list of all possible attribute + names reachable via the attributes of OBJECT, i.e. roughly the + leaves of the dictionary tree under it.""" + + def do_object (object, names): + if inspect.ismodule (object): + do_module (object, names) + elif inspect.isclass (object): + do_class (object, names) + # Might have an object without its class in scope. + elif hasattr (object, '__class__'): + names.add ('__class__') + do_class (object.__class__, names) + # Probably not a good idea to try to enumerate arbitrary + # dictionaries... + return names + + def do_module (module, names): + if hasattr (module, '__all__'): # limited export list + names.union_update (module.__all__) + for i in module.__all__: + do_object (getattr (module, i), names) + else: # use all names + names.union_update (dir (module)) + for i in dir (module): + do_object (getattr (module, i), names) + return names + + def do_class (object, names): + ns = dir (object) + names.union_update (ns) + if hasattr (object, '__bases__'): # superclasses + for i in object.__bases__: do_object (i, names) + return names + + return do_object (object, Set ([])) + +def complete (name, imports): """Complete TEXT in NAMESPACE and print a Lisp list of completions. - NAMESPACE is currently not used.""" - if namespace is None: namespace = __main__.__dict__ - c = rlcompleter.Completer (namespace) + Exec IMPORTS first.""" + import __main__, keyword + + def class_members(object): + names = dir (object) + if hasattr (object, '__bases__'): + for super in object.__bases__: + names = class_members (super) + return names + + names = Set ([]) + base = None try: - if '.' in text: - matches = c.attr_matches (text) - else: - matches = c.global_matches (text) - print '_emacs_out (', - for elt in matches: - print '"%s"' % elt, - print ')' - except: - print '_emacs_out ()' + dict = __main__.__dict__.copy() + if imports: exec imports in dict + l = len (name) + if not "." in name: + for list in [dir (__builtins__), keyword.kwlist, dict.keys()]: + for elt in list: + if elt[:l] == name: names.add(elt) + else: + base = name[:name.rfind ('.')] + name = name[name.rfind('.')+1:] + try: + object = eval (base, dict) + names = Set (dir (object)) + if hasattr (object, '__class__'): + names.add('__class__') + names.union_update (class_members (object)) + except: names = all_names (dict) + except: return [] + l = len(name) + print '_emacs_out (', + for n in names: + if name == n[:l]: + if base: print '"%s.%s"' % (base, n), + else: print '"%s"' % n, + print ')' -def ehelp (name, g, l): - """Get help on string NAME using globals G and locals L. +def ehelp (name, imports): + """Get help on string NAME. First try to eval name for, e.g. user definitions where we need the object. Otherwise try the string form.""" - try: help (eval (name, g, l)) + locls = {} + if imports: + try: exec imports in locls + except: pass + try: help (eval (name, globals(), locls)) except: help (name) def eimport (mod, dir): """Import module MOD with directory DIR at the head of the search path. NB doesn't load from DIR if MOD shadows a system module.""" + from __main__ import __dict__ + path0 = sys.path[0] sys.path[0] = dir try: try: - if globals().has_key(mod) and inspect.ismodule (eval (mod)): - reload(eval (mod)) + if __dict__.has_key(mod) and inspect.ismodule (__dict__[mod]): + reload (__dict__[mod]) else: - globals ()[mod] = __import__ (mod) + __dict__[mod] = __import__ (mod) except: (type, value, tb) = sys.exc_info () print "Traceback (most recent call last):" @@ -107,6 +177,17 @@ finally: sys.path[0] = path0 -print '_emacs_ok' # ready for input and can call continuation +def modpath (module): + """Return the source file for the given MODULE (or None). +Assumes that MODULE.py and MODULE.pyc are in the same directory.""" + try: + path = __import__ (module).__file__ + if path[-4:] == '.pyc' and os.path.exists (path[0:-1]): + path = path[:-1] + print "_emacs_out", path + except: + print "_emacs_out ()" + +# print '_emacs_ok' # ready for input and can call continuation # arch-tag: d90408f3-90e2-4de4-99c2-6eb9c7b9ca46 diff -r 0c89a85addc3 -r 694bbb62a75d etc/orgcard.tex --- a/etc/orgcard.tex Sun Jul 30 10:19:46 2006 +0000 +++ b/etc/orgcard.tex Sat Oct 14 16:56:21 2006 +0000 @@ -1,5 +1,5 @@ % Reference Card for Org Mode -\def\orgversionnumber{4.43} +\def\orgversionnumber{4.44} \def\year{2006} % %**start of header diff -r 0c89a85addc3 -r 694bbb62a75d lib-src/ChangeLog --- a/lib-src/ChangeLog Sun Jul 30 10:19:46 2006 +0000 +++ b/lib-src/ChangeLog Sat Oct 14 16:56:21 2006 +0000 @@ -1,3 +1,29 @@ +2006-08-09 Jan Dj,Ad(Brv + + * etags.c (readline): expect sscanf returns >= 1. + (readline): Change position on %n and \" in sscanf. + +2006-08-07 Masatake YAMATO + + * etags.c (readline): expect sscanf returns 2, + not 1. + +2006-08-07 Masatake YAMATO + + * etags.c (TEX_mode): Check getc retruns EOF. + File ended without newline causes infinite loop. + +2002-07-30 Adrian Aichner (tiny change) + + * etags.c: It's XEmacs, not Xemacs: change all the occurences. + +2006-07-30 Francesco Potort,Al(B + + * etags.c [ETAGS_REGEXPS]: Now is unconditionally defined. + [LONG_OPTIONS]: Changed to NO_LONG_OPTIONS, which is undefined. + (Objc_suffixes): Suggest using --lang=c for full help. + (C_entries): Initialise savetoken to 0 to shut up the compiler. + 2006-07-20 Andreas Schwab * fakemail.c (fatal): Drop second parameter and treat first diff -r 0c89a85addc3 -r 694bbb62a75d lib-src/etags.c --- a/lib-src/etags.c Sun Jul 30 10:19:46 2006 +0000 +++ b/lib-src/etags.c Sat Oct 14 16:56:21 2006 +0000 @@ -41,7 +41,7 @@ * configuration file containing regexp definitions for etags. */ -char pot_etags_version[] = "@(#) pot revision number is 17.18"; +char pot_etags_version[] = "@(#) pot revision number is 17.20"; #define TRUE 1 #define FALSE 0 @@ -59,12 +59,10 @@ /* On some systems, Emacs defines static as nothing for the sake of unexec. We don't want that here since we don't use unexec. */ # undef static -# define ETAGS_REGEXPS /* use the regexp features */ -# define LONG_OPTIONS /* accept long options */ -# ifndef PTR /* for Xemacs */ +# ifndef PTR /* for XEmacs */ # define PTR void * # endif -# ifndef __P /* for Xemacs */ +# ifndef __P /* for XEmacs */ # define __P(args) args # endif #else /* no config.h */ @@ -82,14 +80,7 @@ # define _GNU_SOURCE 1 /* enables some compiler checks on GNU */ #endif -#ifdef LONG_OPTIONS -# undef LONG_OPTIONS -# define LONG_OPTIONS TRUE -#else -# define LONG_OPTIONS FALSE -#endif - -/* WIN32_NATIVE is for Xemacs. +/* WIN32_NATIVE is for XEmacs. MSDOS, WINDOWSNT, DOS_NT are for Emacs. */ #ifdef WIN32_NATIVE # undef MSDOS @@ -167,25 +158,25 @@ # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #endif -#if LONG_OPTIONS -# include -#else +#ifdef NO_LONG_OPTIONS /* define this if you don't have GNU getopt */ +# define NO_LONG_OPTIONS TRUE # define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr) extern char *optarg; extern int optind, opterr; -#endif /* LONG_OPTIONS */ - -#ifdef ETAGS_REGEXPS -# ifndef HAVE_CONFIG_H /* this is a standalone compilation */ -# ifdef __CYGWIN__ /* compiling on Cygwin */ +#else +# define NO_LONG_OPTIONS FALSE +# include +#endif /* NO_LONG_OPTIONS */ + +#ifndef HAVE_CONFIG_H /* this is a standalone compilation */ +# ifdef __CYGWIN__ /* compiling on Cygwin */ !!! NOTICE !!! the regex.h distributed with Cygwin is not compatible with etags, alas! If you want regular expression support, you should delete this notice and arrange to use the GNU regex.h and regex.c. -# endif # endif -# include -#endif /* ETAGS_REGEXPS */ +#endif +#include /* Define CTAGS to make the program "ctags" compatible with the usual one. Leave it undefined to make the program "etags", which makes emacs-style @@ -312,7 +303,6 @@ char *what; /* the argument itself */ } argument; -#ifdef ETAGS_REGEXPS /* Structure defining a regular expression. */ typedef struct regexp { @@ -327,7 +317,6 @@ bool ignore_case; /* ignore case when matching */ bool multi_line; /* do a multi-line match on the whole file */ } regexp; -#endif /* ETAGS_REGEXPS */ /* Many compilers barf on this: @@ -375,11 +364,9 @@ static bool nocase_tail __P((char *)); static void get_tag __P((char *, char **)); -#ifdef ETAGS_REGEXPS static void analyse_regex __P((char *)); static void free_regexps __P((void)); static void regex_tag_multiline __P((void)); -#endif /* ETAGS_REGEXPS */ static void error __P((const char *, const char *)); static void suggest_asking_for_help __P((void)); void fatal __P((char *, char *)); @@ -485,14 +472,9 @@ #define STDIN 0x1001 /* returned by getopt_long on --parse-stdin */ static bool parsing_stdin; /* --parse-stdin used */ -#ifdef ETAGS_REGEXPS static regexp *p_head; /* list of all regexps */ static bool need_filebuf; /* some regexes are multi-line */ -#else -# define need_filebuf FALSE -#endif /* ETAGS_REGEXPS */ - -#if LONG_OPTIONS + static struct option longopts[] = { { "append", no_argument, NULL, 'a' }, @@ -507,11 +489,9 @@ { "members", no_argument, &members, TRUE }, { "no-members", no_argument, &members, FALSE }, { "output", required_argument, NULL, 'o' }, -#ifdef ETAGS_REGEXPS { "regex", required_argument, NULL, 'r' }, { "no-regex", no_argument, NULL, 'R' }, { "ignore-case-regex", required_argument, NULL, 'c' }, -#endif /* ETAGS_REGEXPS */ { "parse-stdin", required_argument, NULL, STDIN }, { "version", no_argument, NULL, 'V' }, @@ -533,7 +513,6 @@ #endif { NULL } }; -#endif /* LONG_OPTIONS */ static compressor compressors[] = { @@ -681,13 +660,15 @@ static char Objc_help [] = "In Objective C code, tags include Objective C definitions for classes,\n\ class categories, methods and protocols. Tags for variables and\n\ -functions in classes are named `CLASS::VARIABLE' and `CLASS::FUNCTION'."; +functions in classes are named `CLASS::VARIABLE' and `CLASS::FUNCTION'.\n\ +(Use --help --lang=c --lang=objc --lang=java for full help.)"; static char *Pascal_suffixes [] = { "p", "pas", NULL }; static char Pascal_help [] = "In Pascal code, the tags are the functions and procedures defined\n\ in the file."; +/* " // this is for working around an Emacs highlighting bug... */ static char *Perl_suffixes [] = { "pl", "pm", NULL }; @@ -885,11 +866,11 @@ printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\ \n\ These are the options accepted by %s.\n", progname, progname); - if (LONG_OPTIONS) - puts ("You may use unambiguous abbreviations for the long option names."); + if (NO_LONG_OPTIONS) + puts ("WARNING: long option names do not work with this executable,\n\ +as it is not linked with GNU getopt."); else - puts ("Long option names do not work with this executable, as it is not\n\ -linked with GNU getopt."); + puts ("You may use unambiguous abbreviations for the long option names."); puts (" A - as file name means read names from stdin (one per line).\n\ Absolute names are stored in the output file as they are.\n\ Relative ones are stored relative to the output file's directory.\n"); @@ -949,7 +930,6 @@ puts ("--members\n\ Create tag entries for members of structures in some languages."); -#ifdef ETAGS_REGEXPS puts ("-r REGEXP, --regex=REGEXP or --regex=@regexfile\n\ Make a tag for each line matching a regular expression pattern\n\ in the following files. {LANGUAGE}REGEXP uses REGEXP for LANGUAGE\n\ @@ -964,7 +944,6 @@ causes dot to match any character, including newline."); puts ("-R, --no-regex\n\ Don't create tags from regexps for the following files."); -#endif /* ETAGS_REGEXPS */ puts ("-I, --ignore-indentation\n\ In C and C++ do not assume that a closing brace in the first\n\ column is the final brace of a function or structure definition."); @@ -1194,14 +1173,8 @@ /* When the optstring begins with a '-' getopt_long does not rearrange the non-options arguments to be at the end, but leaves them alone. */ - optstring = "-"; -#ifdef ETAGS_REGEXPS - optstring = "-r:Rc:"; -#endif /* ETAGS_REGEXPS */ - if (!LONG_OPTIONS) - optstring += 1; /* remove the initial '-' */ - optstring = concat (optstring, - "aCf:Il:o:SVhH", + optstring = concat (NO_LONG_OPTIONS ? "" : "-", + "ac:Cf:Il:o:r:RSVhH", (CTAGS) ? "BxdtTuvw" : "Di:"); while ((opt = getopt_long (argc, argv, optstring, longopts, NULL)) != EOF) @@ -1375,11 +1348,9 @@ case at_language: lang = argbuffer[i].lang; break; -#ifdef ETAGS_REGEXPS case at_regexp: analyse_regex (argbuffer[i].what); break; -#endif case at_filename: #ifdef VMS while ((this_file = gfnames (argbuffer[i].what, &got_err)) != NULL) @@ -1419,9 +1390,7 @@ } } -#ifdef ETAGS_REGEXPS free_regexps (); -#endif /* ETAGS_REGEXPS */ free (lb.buffer); free (filebuf.buffer); free (token_name.buffer); @@ -1979,9 +1948,7 @@ parser (inf); -#ifdef ETAGS_REGEXPS regex_tag_multiline (); -#endif /* ETAGS_REGEXPS */ } @@ -3239,7 +3206,7 @@ int typdefbracelev; /* bracelev where a typedef struct body begun */ bool incomm, inquote, inchar, quotednl, midtoken; bool yacc_rules; /* in the rules part of a yacc file */ - struct tok savetoken; /* token saved during preprocessor handling */ + struct tok savetoken = {0}; /* token saved during preprocessor handling */ linebuffer_init (&lbs[0].lb); @@ -5198,7 +5165,7 @@ { /* Skip to next line if we hit the TeX comment char. */ if (c == '%') - while (c != '\n') + while (c != '\n' && c != EOF) c = getc (inf); else if (c == TEX_LESC || c == TEX_SESC ) break; @@ -5735,8 +5702,6 @@ } -#ifdef ETAGS_REGEXPS - static char *scan_separators __P((char *)); static void add_regex __P((char *, language *)); static char *substitute __P((char *, char *, struct re_registers *)); @@ -6141,8 +6106,6 @@ } } -#endif /* ETAGS_REGEXPS */ - static bool nocase_tail (cp) @@ -6296,9 +6259,10 @@ int start, lno; if (DEBUG) start = 0; /* shut up the compiler */ - if (sscanf (lbp->buffer, "#line %d \"%n", &lno, &start) == 1) + if (sscanf (lbp->buffer, "#line %d %n\"", &lno, &start) >= 1 + && lbp->buffer[start] == '"') { - char *endp = lbp->buffer + start; + char *endp = lbp->buffer + ++start; assert (start > 0); while ((endp = etags_strchr (endp, '"')) != NULL @@ -6405,7 +6369,6 @@ } } /* if #line directives should be considered */ -#ifdef ETAGS_REGEXPS { int match; regexp *rp; @@ -6462,7 +6425,6 @@ } } } -#endif /* ETAGS_REGEXPS */ } @@ -6623,7 +6585,7 @@ suggest_asking_for_help () { fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n", - progname, LONG_OPTIONS ? "--help" : "-h"); + progname, NO_LONG_OPTIONS ? "-h" : "--help"); exit (EXIT_FAILURE); } diff -r 0c89a85addc3 -r 694bbb62a75d lisp/ChangeLog --- a/lisp/ChangeLog Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/ChangeLog Sat Oct 14 16:56:21 2006 +0000 @@ -1,3 +1,707 @@ +2006-08-27 Michael Olson + + * emacs-lisp/tq.el: Small grammar fix in comments. + (tq-enqueue): Check for existence of queue rather than the + head queue item's question, which was a no-op. + (tq-filter, tq-process-buffer): Make sure the process buffer + exists before making it the current buffer. + +2006-08-27 YAMAMOTO Mitsuharu + + * term/mac-win.el (mac-apple-event-map): Rename hicommand to hi-command. + (mac-dnd-drop-data): Apply 2006-08-22 change for x-dnd-drop-data. + (special-event-map): Apply 2006-08-16 change for x-win.el. + +2006-08-26 Stefan Monnier + + * progmodes/python.el (python-send-receive): Wait in the + process's buffer so as to check the right buffer-local variables. + +2006-08-25 Stefan Monnier + + * emacs-lisp/checkdoc.el: Remove * in defcustoms. + (defgroup checkdoc): Move to beginning. + + * progmodes/python.el (python-preoutput-skip-next-prompt): New var. + (python-preoutput-continuation): Remove. + (python-preoutput-filter): Simplify correspondingly. + Remove handling of _emacs_ok. Make sure we skip _emacs_out's prompts. + Loop around to catch embedded _emacs_out output. + (run-python): Send the import&print command on a single line. + (python-send-command): Send command&print on a single line. + (python-send-string): Only add double \n if needed. + (python-send-receive): Loop until the result comes. + (python-mode-running): Defvar it. + (python-setup-brm): Remove unused var `menu'. + Only bind py-mode-map and `features' around brm-init. + (python-calculate-indentation): Remove unused var `point'. + (python-beginning-of-defun): Remove unused var `def-line'. + +2006-08-25 Richard Stallman + + * kmacro.el (kmacro-repeat-on-last-key): Doc fix. + +2006-08-25 Michael Kifer + + * viper.el (viper-set-hooks): Use frame bindings for + viper-vi-state-cursor-color. + (viper-non-hook-settings): Don't set default + mode-line-buffer-identification. + + * viper-util.el (viper-set-cursor-color-according-to-state): New fun. + (viper-set-cursor-color-according-to-state) + (viper-get-saved-cursor-color-in-replace-mode) + (viper-get-saved-cursor-color-in-insert-mode): Make conditional on + viper-emacs-state-cursor-color. + + * viper-cmd.el (viper-envelop-ESC-key): Bug fix. + (viper-undo): Use point if undo-beg-posn is nil. + (viper-insert-state-post-command-sentinel, viper-change-state-to-emacs) + (viper-after-change-undo-hook): Don't use + viper-emacs-state-cursor-color by default. + (viper-undo): More sensible positioning after undo. + + * viper-ex.el (ex-splice-args-in-1-letr-cmd): Get rid of caddr. + (viper-emacs-state-cursor-color): Default to nil, since this feature + doesn't work well yet. + + * ediff-mult.el (ediff-intersect-directories) + (ediff-get-directory-files-under-revision, ediff-dir-diff-copy-file): + always expand filenames. + +2006-08-24 Stefan Monnier + + * tumme.el: Remove * in defcustoms's docstrings. + +2006-08-24 Chong Yidong + + * emacs-lisp/timer.el (timer-set-idle-time, run-with-idle-timer): + Accept internal time format for SECS arg. + (timer-relative-time): Doc fix. + + * jit-lock.el: "Stealth fontification by requeuing timers" patch, + adapted from Martin Rudalics. + (jit-lock-stealth-repeat-timer, jit-lock-stealth-buffers): New vars. + (jit-lock-mode): Create jit-lock-stealth-repeat-timer. + (jit-lock-stealth-fontify): Reschedule as a idle timer instead of + using sit-for. + +2006-08-24 Francesc Rocher + + * cus-start.el (all): Add `overline-margin' and + `x-underline-at-descent-line'. + +2006-08-24 Kim F. Storm + + * progmodes/grep.el (grep-find-use-xargs): Use explicit value `exec' + to mean "use find -exec"; nil now unambiguously means auto-detect. + (grep-compute-defaults): Set grep-find-use-xargs to `exec' if not `gnu'. + Use shell-quote-argument to build grep-find-command and grep-find-template. + (rgrep): Use shell-quote-argument to properly quote arguments to find. + Reported by Tom Seddon. + +2006-08-23 Chong Yidong + + * startup.el (fancy-splash-head): Give instructions for dismissing + the splash screen for default startup too. + (display-startup-echo-area-message, fancy-splash-screens) + (use-fancy-splash-screens-p): New arg hide-on-input. If nil, show + all splash text at once and keep the splash buffer around. + (command-line-1): Give display-startup-echo-area-message a t arg. + +2006-08-23 Carsten Dominik + + * textmodes/org.el (org-follow-gnus-link): Make sure the dedicated + gnus frame is selected. + +2006-08-23 Nick Roberts + + * progmodes/gdb-ui.el (gdb-starting): Reset gdb-signalled to nil. + +2006-08-22 Kim F. Storm + + * ido.el (ido-set-matches-1): Fix full matching for subdirs. + Add suffix matching for subdirs. + +2006-08-22 Jorgen Schaefer (tiny change) + + * x-dnd.el (x-dnd-drop-data): Don't call goto-char if + mouse-yank-at-point is non-nil. + +2006-08-22 Nick Roberts + + * progmodes/gdb-ui.el (gdb-frame-memory-buffer): Make frame + a bit wider and remove fringes to fit initial output on line. + +2006-08-21 Stefan Monnier + + * frame.el (blink-cursor-end): Only ignore the error we care about. + (blink-cursor-mode): Use blink-cursor-end to simplify the code. + +2006-08-21 Richard Stallman + + * whitespace.el (whitespace-cleanup): Doc fix. + +2006-08-20 Ryan Yeske + + * net/rcirc.el (rcirc-show-maximum-output): New var. + (rcirc-buffer-process): If no buffer argument is supplied, use + current-buffer. + (rcirc-complete-nick): Complete to the last completed nick first. + (rcirc-mode): Preserve the value of `rcirc-urls' across + connections. Setup scroll function. + (rcirc-scroll-to-bottom): New function. + (rcirc-print): Use nick syntax around regexp work. + Notice dim-nicks speaking only if they say our nick. + (rcirc-update-activity-string): Do not show the modeline indicator + if there are no live rcirc processes. + (rcirc-cmd-ignore): Ignore case. + (rcirc-browse-url-at-point): Fix off-by-one error. + +2006-08-20 Stefan Monnier + + * progmodes/python.el: Remove * in defcustom docstrings. + (run-python, python-proc, python-try-complete): Use derived-mode-p. + (python-mode): Set tab-width and indent-tabs-mode. + +2006-08-20 Dave Love + + * progmodes/python.el: Update to Dave Love's latest version. + (python-font-lock-keywords, python-mode): Don't use + font-lock-syntax-table, but match symbol elements explicitly instead. + (python-mode-map): Add help, and a few more key bindings. + (python-skip-comments/blanks): Move out of comments as well. + (python-continuation-line-p): Behave better with unbalanced parens. + (python-blank-line-p): New fun. + (python-open-block-statement-p): Don't use a heuristic. + (python-outdent-p): Better handle blocks-in-the-same-line. + (python-calculate-indentation): Misc improvements. + (python-comment-indent): Remove. + (python-block-pairs): New var. + (python-first-word): New fun. + (python-indentation-levels): Handle more common cases. + (python-indent-line-1): Add `leave' argument. + (python-indent-region): New fun. + (python-skip-out): New fun. + (python-beginning-of-statement, python-end-of-statement): Use it. + (python-next-statement): Return correct count even at eob. + (python-end-of-block): Fix paren-typo. + (python-imenu-create-index): Add module variables. + (run-python): Add `new' arg. + Check we're at a prompt before returning. + (python-send-command): Move to end of buffer. + Wait for prompt to return. + (python-set-proc): New fun. + (python-imports): New var. + (python-describe-symbol): Use it. Adjust to new interface of `ehelp'. + (python-eldoc-function): Try to move out of arg list. + (python-outline-level): Offset by 1. + (python-find-imports): New fun. + (python-symbol-completions): Use python-imports. + (python-module-path, ffap-alist): Add support for ffap. + (python-skeletons, python-mode-abbrev-table, def-python-skeleton) + (pythin-insert-*, python-default-template, python-expand-template): + Add templates/skeletons. + (python-setup-brm): Support for Bicycle Repair Man. + (python-abbrev-syntax-table): New var. + (python-abbrev-pc-hook, python-pea-hook): New funs. + +2006-08-20 Chong Yidong + + * frame.el (blink-cursor-start): Set timer first. + (blink-cursor-end): Ignore timer cancelling errors. + Suggested by Ken Manheimer. + +2006-08-20 Juanma Barranquero + + * newcomment.el (comment-box): Call `comment-normalize-vars'. + Add autoload cookie. + +2006-08-20 Richard Stallman + + * simple.el (line-number-at-pos): Doc fix. + + * emacs-lisp/timer.el (run-with-idle-timer): Pass t to + timer-activate-when-idle, so timer can run before Emacs becomes + non-idle again. + +2006-08-18 Yoni Rabkin Katzenell (tiny change) + + * whitespace.el (whitespace-cleanup-internal): New optional arg + REGION-ONLY. If it's non-nil, modify the message to the user + accordingly. + (whitespace-cleanup-region): Call whitespace-cleanup-internal with + a non-nil argument. + +2006-08-18 Gustav H,Ae(Bllberg (tiny change) + + * rect.el (spaces-string): Simplify and add doc string. + +2006-08-17 Romain Francoise + + * progmodes/gdb-ui.el (gdb-edit-locals-value): Balance parens. + +2006-08-17 Richard Stallman + + * compare-w.el (compare-windows): lambda's take an arg and pass + it to compare-windows-skip-whitespace. + +2006-08-17 Martin Rudalics + + * jit-lock.el (jit-lock-fontify-now): Protect the modified status of + the right buffer. + +2006-08-17 Stefan Monnier + + * pcvs-parse.el (cvs-parse-table): Accept the new `...' format for + removed files. + +2006-08-17 Nick Roberts + + * progmodes/gdb-ui.el (gdb-locals-watch-map) + (gdb-locals-watch-map-1): Suppress keymap first. + (gdb-edit-locals-map-1): New variable. + (gdb-edit-locals-value): New function. + (gdb-stack-list-locals-handler): Use them. + +2006-08-16 Stefan Monnier + + * mouse.el (global-map): Allow yanking with mouse-2 at a spot whose + cursor would normally be drawn in the fringe. + + * font-lock.el (font-lock-extend-region-wholelines): Fix up typo. + Reported by Martin Rudalics . + +2006-08-16 Richard Stallman + + * term/x-win.el (x-clipboard-yank): Specify * in interactive spec. + (special-event-map): Process drag-n-drop events this way. + + * simple.el (move-beginning-of-line): Test whether fields + would prevent motion back to line's first visible character. + If so, stop where the fields would stop the motion. + + * newcomment.el (comment-indent): Fully update INDENT + before checking to see if it will change the text. + + * cus-edit.el (custom-newline): New function. + (custom-mode-map): Bind newline to custom-newline. + + * compare-w.el (compare-windows): Factor compare-ignore-whitespace + into ignore-whitespace. + Check each buffer for its skip-function. + Handle compare-windows-skip-whitespace special-case test + by returning t from default skip function. + +2006-08-15 Carsten Dominik + + * textmodes/org.el (org-clock-special-range) + (org-clock-update-time-maybe): New functions. + (org-stamp-time-of-day-regexp): Allow weekday to be of word chars, + not only a-z. + (org-agenda-get-blocks): Allow multiple blocks per headline. + (org-timestamp-change): Call `org-clock-update-time-maybe'. + (org-export-html-title-format) + (org-export-html-toplevel-hlevel): New options. + (org-export-language-setup): Add support for Czech. + (org-mode, org-insert-todo-heading, org-find-visible) + (org-find-invisible, org-invisible-p, org-invisible-p2) + (org-back-to-heading, org-on-heading-p, org-up-heading-all) + (org-show-subtree, org-show-entry, org-make-options-regexp): + Remove compatibility support for old outline-mode. + (org-check-occur-regexp): Funtion removed. + (org-on-heading-p, org-back-to-heading): Made defalias. + (org-set-local): New defsubst. + (org-set-regexps-and-options, org-mode) + (org-set-font-lock-defaults, org-edit-agenda-file-list) + (org-timeline, org-agenda-list, org-todo-list, org-tags-view) + (org-remember-apply-template, org-table-edit-field) + (org-table-edit-formulas, orgtbl-mode, org-export-as-ascii) + (org-set-autofill-regexps): Use `org-set-local'. + (org-table-eval-formula): Fix bug with parsing of display flags. + +2006-08-15 Nick Roberts + + * progmodes/gdb-ui.el (gdb-info-stack-custom): Indicate selected + frame with fringe arrow. Suggested by Simon Marshall + . + (gdb-stack-position): New variable. + (gdb-starting, gdb-exited): Reset gdb-stack-position to nil. + (gdb-frames-mode): Set gdb-stack-position to nil. + Add to overlay-arrow-variable-list + (gdb-reset): Delete gdb-stack-position from above list. + +2006-08-14 Jan Dj,Ad(Brv + + * term/x-win.el (menu-bar-edit-menu): Disable paste if buffer is + read only. + +2006-08-13 Romain Francoise + + * cus-theme.el (customize-create-theme) + (custom-theme-visit-theme): End `y-or-n-p' prompt with a space. + + * filesets.el (filesets-add-buffer): Ditto. + + * pcvs.el (cvs-change-cvsroot): Ditto. + +2006-08-13 Nick Roberts + + * progmodes/gdb-ui.el (gdb-frame-separate-io-buffer) + (gdb-use-separate-io-buffer, menu): Avoid using `inferior' in text. + (gdb-memory-mode, gdb-locals-watch-map): Don't quote lambda + expressions. + (gdb-info-breakpoints-custom): Use gdb-breakpoint-regexp. + Only search till end of line. + Add face to function names in case of no filename. + Add face to variable names of watchpoints. + +2006-08-12 Robert Thorpe (tiny change) + + * cus-start.el : Move to the `indent' + customization group. + +2006-08-12 Ken Manheimer + + * allout.el (allout-prior-bindings, allout-added-bindings): + Remove, after long deprecation. + (allout-beginning-of-line-cycles, allout-end-of-line-cycles): + Add customization vars controlling allout-beginning-of-line and + allout-end-of-line conveniences. + (allout-header-prefix, allout-use-mode-specific-leader) + (allout-use-mode-specific-leader, allout-mode-leaders): + Revise docstrings. + (allout-infer-header-lead): Change to be an alias for + allout-infer-header-lead-and-primary-bullet. + (allout-infer-header-lead-and-primary-bullet): New version of + allout-infer-header-lead which assigns the primary bullet to the + same as the header lead, when its being changed. + (allout-infer-body-reindent): Apply regexp-quote instead of + unconditionally prepending "\\", so that all literal + allout-header-prefix and allout-primary-bullet strings are + properly handled. + (allout-add-resumptions): Add optional qualifier for extending or + appending to existing values, rather than replacing them. + (allout-view-change-hook): Clarify docstring. + (allout-exposure-change-hook): Take explicit arguments, via + run-hook-with-args. + (allout-structure-added-hook) + (allout-structure-deleted-hook) + (allout-structure-shifted-hook): New hooks analogous to + allout-exposure-change-hook for other kinds of structural outline + edits. + (allout-encryption-plaintext-sanitization-regexps): New encryption + customization variable, by which cooperating modes can provde + massage of the plaintext without actually being passed it. + (allout-encryption-ciphertext-rejection-regexps) + (allout-encryption-ciphertext-rejection-ceiling): New encryption + customization variables, by which cooperating modes can prohibit + rare but possible ciphertext patterns from fouling their + operation, with actually being passed the ciphertext. + (allout-mode): Run activation and deactivation hooks after the + minor-mode variable has been toggled, to clarify the mode + disposition. The new encryption ciphertext rejection variable is + used to ensure that the ciphertext does not contain text that + would be recognized as outline structural elements by allout. + Substite allout-beginning-of-line and allout-end-of-line for + conventionall beginning-of-line and end-of-line bindings. + If allout-old-style-prefixes is non-nil, don't nullify it on mode + activation! + (allout-beginning-of-line): Respect `allout-beginning-of-line-cycles'. + (allout-end-of-line): Respect `allout-end-of-line-cycles'. + (allout-chart-subtree): Implement new mode, charting only the + visible items in the subtree, when new 'visible' parameter is non-nil. + (allout-end-of-subtree): Properly handle the last item in the buffer. + (allout-pre-command-business, allout-command-counter): + Increment an advertised counter so that cooperating enhancements can + track revisions of items. + (allout-open-topic): Run allout-structure-added-hook with suitable + arguments. + (allout-shift-in): Run allout-structure-shifted-hook with suitable + arguments. + (allout-shift-out): Fix doubling for negative args and ensure call + of allout-structure-shifted-hook by solely using allout-shift-in. + (allout-kill-line, allout-kill-topic): + Run allout-structure-deleted-hook with suitable arguments. + (allout-yank-processing): Run allout-structure-added-hook with + proper arguments. + (allout-yank): Enclose activity in allout-unprotected. + (allout-flag-region): Run allout-exposure-change-hook with + suitable arguments, instead of making the callee infer the arguments. + (allout-encrypt-string): + Support allout-encryption-plaintext-sanitization-regexps, + allout-encryption-ciphertext-rejection-regexps, and + allout-encryption-ciphertext-rejection-ceiling. Indicate correct + en/de cryption mode in symmetric encryption failure message. + (allout-obtain-passphrase): Use copy-sequence to get a distinct + copy of the passphrase, and don't zero it or we'll corrupt the + stashed copy. + (allout-create-encryption-passphrase-verifier) + (allout-verify-passphrase): Respect the new signature for + allout-encrypt-string. + (allout-get-configvar-values): Convenience for getting a + configuration variable value and handling its absence gracefully. + +2006-08-11 Romain Francoise + + * obsolete/zone-mode.el: Delete. + +2006-08-11 Stefan Monnier + + * textmodes/dns-mode.el (dns-mode): Use before-save-hook. + +2006-08-11 Thien-Thi Nguyen + + * emacs-lisp/bindat.el (bindat-ip-to-string): + Use `format-network-address' if possible. + +2006-08-11 Jan Dj,Ad(Brv + + * x-dnd.el (x-dnd-init-frame): Call x-register-dnd-atom. + +2006-08-10 Chong Yidong + + * emacs-lisp/edebug.el (edebug-recursive-edit): Don't save and + restore unread-command-events here. + (edebug-display): Do it here, to detect sit-for interruptions. + +2006-08-10 Romain Francoise + + * textmodes/dns-mode.el: Alias `zone-mode' to `dns-mode'. + (dns-mode-soa-auto-increment-serial): New user option. + (dns-mode-soa-maybe-increment-serial): New function. + (dns-mode): Add the latter to `write-contents-functions'. + + * obsolete/zone-mode.el: Move to obsolete/ from net/. + Delete autoload cookies. + +2006-08-10 John Wiegley + + * eshell/em-glob.el (eshell-glob-chars-list) + (eshell-glob-translate-alist): Add support for [^g] in character globs. + +2006-08-10 Richard Stallman + + * facemenu.el (facemenu-add-face): Pass frame to facemenu-active-faces. + (facemenu-set-face): Doc fix. + (facemenu-listed-faces): Doc fix. + +2006-08-09 Chong Yidong + + * avoid.el (mouse-avoidance-animating-pointer): New var. + (mouse-avoidance-nudge-mouse): Use it. + (mouse-avoidance-banish): Rename from mouse-avoidance-banish-hook. + (mouse-avoidance-exile): Rename from mouse-avoidance-exile-hook + (mouse-avoidance-fancy): Rename from mouse-avoidance-fancy-hook. + Don't activate if currently animating. All callers changed. + +2006-08-09 John Wiegley + + * calendar/timeclock.el (timeclock-use-elapsed): Added a new + variable, which causes timeclock to report elapsed time worked, + instead of just work remaining. + +2006-08-09 Kenichi Handa + + * international/latexenc.el (latexenc-find-file-coding-system): + Fix for the case that the 2nd element of arg-list is a cons. + +2006-08-08 Chong Yidong + + * info.el (Info-fontify-node): Handle preceding `in' for note + reference hiding rules. + +2006-08-08 Stefan Monnier + + * progmodes/sh-script.el (sh-quoted-subshell): Make sure we don't + mistake a closing " for an opening one. + +2006-08-07 Dan Nicolaescu + + * term/xterm.el (terminal-init-xterm): Add more key bindings. + +2006-08-07 Stefan Monnier + + * complete.el (PC-do-completion): Filter out completions matching + completion-ignored-extensions before checking whether there are + multiple completions. + Don't use `list' unnecessarily when building completion tables. + +2006-08-06 Richard Stallman + + * help.el (describe-mode): Make minor mode list more concise. + +2006-08-05 Chong Yidong + + * bindings.el: Give mode-line-format, mode-line-modes, and + mode-line-position `standard-value' properties. + +2006-08-05 Eli Zaretskii + + * buff-menu.el (list-buffers-noselect): For Info buffers, use + "(file)node" instead of the file name. + +2006-08-05 Richard Stallman + + * faces.el (escape-glyph): Doc fix. + +2006-08-04 Kenichi Handa + + * international/mule-diag.el (describe-font): Improve docstring + and error message. Use frame-parameter (not frame-parameters). + +2006-08-03 Stefan Monnier + + * progmodes/gud.el (gdb-script-font-lock-syntactic-keywords): + Correctly mark the end-of-docstring char. + +2006-08-03 Chong Yidong + + * simple.el (line-move-to-column): Constrain move-to-column to + current field. + +2006-08-03 Stefan Monnier + + * font-lock.el (font-lock-beg, font-lock-end) + (font-lock-extend-region-functions): New vars. + (font-lock-extend-region-multiline) + (font-lock-extend-region-wholelines): New functions. + (font-lock-default-fontify-region): Use them. + (font-lock-extend-jit-lock-region-after-change): Only round up + if font-lock-default-fontify-region will do it as well. + + * font-lock.el (font-lock-extend-after-change-region-function): + Rename from font-lock-extend-region-function. + (font-lock-extend-region): Remove by inlining at call sites. + (font-lock-after-change-function): Don't needlessly round up to a whole + number of lines. + (font-lock-extend-jit-lock-region-after-change): Be more careful about + the boundary conditions and the interactions between the various ways + to extend the region. + +2006-08-02 Stefan Monnier + + * jit-lock.el (jit-lock-fontify-now): Preserve the buffer's + modification status when forcing the second redisplay. + +2006-08-03 Kim F. Storm + + * edmacro.el (edmacro-fix-menu-commands): Ignore switch-frame. + +2006-08-02 Stefan Monnier + + * pcvs-util.el (cvs-get-buffer-create): Obey `noreuse' even if `name' + doesn't look like a file name. + + * complete.el (PC-expand-many-files): Avoid signalling an error when + the current directory doesn't exist. Reported by Micha,Ak(Bl Cadilhac. + +2006-08-02 Andreas Schwab + + * bindings.el (mode-line-format): Simplify reference to vc-mode. + +2006-08-02 Nick Roberts + + * bindings.el (map): Make mode-line-buffer-identification-keymap + before defining propertized-buffer-identification. + +2006-08-01 Richard Stallman + + * bindings.el (mode-line-format): Adjust spacing around vc-mode. + +2006-08-02 Nick Roberts + + * progmodes/gdb-ui.el (gdb-find-source-frame): Make nil the + default value. + (gdb-find-source-frame): New function. + (menu): Add to menu bar. + +2006-08-01 Stefan Monnier + + * font-core.el (font-lock-extend-region-function) + (font-lock-extend-region): Move to font-lock.el. + + * font-lock.el (font-lock-extend-region-function) + (font-lock-extend-region): Move from font-core.el. Simplify. + + * jit-lock.el (jit-lock-fontify-now): Cause a second redisplay + if needed. + (jit-lock-start, jit-lock-end): New dynamic scoped vars. + (jit-lock-after-change-extend-region-functions): New hook. + (jit-lock-after-change): Use it instead of hard-coding font-lock code. + + * font-lock.el (font-lock-extend-jit-lock-region-after-change): New fun. + (font-lock-turn-on-thing-lock): Use it. + + * longlines.el (longlines-show-region): Make it work on read-only + buffers as well. + +2006-08-01 Nick Roberts + + * progmodes/gdb-ui.el (gdb-set-hollow): Check for gud-last-last-frame. + +2006-07-31 Richard Stallman + + * progmodes/vhdl-mode.el (vhdl-speedbar-display-directory) + (vhdl-speedbar-display-projects): Update old obsolete + speedbar variable names. + +2006-07-31 Nick Roberts + + * progmodes/gdb-ui.el (gdb-find-source-frame): New option. + (gdb-stopped): Use it. + + * t-mouse.el (t-mouse-mode): Use set-process-query-on-exit-flag. + +2006-07-29 Chong Yidong + + * loadhist.el (unload-feature): Handle new `(t . SYMBOL)' format + for load-history elements. + +2006-07-29 Eli Zaretskii + + * files.el (convert-standard-filename): For Cygwin, replace + characters not allowed in Windows file names. + (make-auto-save-file-name): Add Cygwin to the list of systems + where the auto-save file name needs to be run through + convert-standard-filename. + +2006-07-29 Lennart Borgman + + * window.el (bw-get-tree): Don't integerp subtree if it's nil. + +2006-07-28 Richard Stallman + + * bindings.el (mode-line-frame-identification) + (propertized-buffer-identification): Centralize the code + to initialize the variable. + + * progmodes/grep.el (grep-default-command): Catch errors from + wildcard-to-regexp. + +2006-07-29 Kim F. Storm + + * progmodes/grep.el (grep-tag-default): New function. + (grep-default-command, grep-read-regexp): Use it. + (grep-read-files): Use car of grep-files-history or grep-files-aliases + as default if nothing else applies. + +2006-07-28 Bill Atkins (tiny change) + + * wdired.el (wdired-change-to-wdired-mode, wdired-change-to-dired-mode): + Throw error if buffer is not in Dired and Wdired mode, respectively. + +2006-07-28 Chong Yidong + + * cus-edit.el (custom-no-edit): Revert 2006-07-27 change, so that + self-insert-command keys don't activate buttons. + (custom-mode-map): Just don't bind "\C-m" to `custom-no-edit'. + +2006-07-29 Nick Roberts + + * progmodes/gdb-ui.el (gdb-info-breakpoints-custom): Use different + faces for enable character. + 2006-07-28 Nick Roberts * Makefile.in (recompile): Update comment to reflect change @@ -31,9 +735,9 @@ 2006-07-26 Mathias Dahl - * tumme.el (tumme-backward-image): Add prefix argument. Add error + * tumme.el (tumme-backward-image): Add prefix argument. Add error when at first image. - (tumme-forward-image): Add prefix argument. Add error when at last + (tumme-forward-image): Add prefix argument. Add error when at last image. 2006-07-25 Stefan Monnier @@ -45,10 +749,10 @@ * tumme.el (tumme-track-original-file): Add `buffer-live-p' check. (tumme-format-properties-string): Handle empty `buf'. - (tumme-get-comment): Change variable names inside `let'. Add - missing `let' variable that cause font-lock problems. - (tumme-write-comments): Change variable names inside `let'. Add - missing `let' variable that cause font-lock problems. + (tumme-get-comment): Change variable names inside `let'. + Add missing `let' variable that cause font-lock problems. + (tumme-write-comments): Change variable names inside `let'. + Add missing `let' variable that cause font-lock problems. (tumme-forward-image): Rename from `tumme-forward-char'. (tumme-backward-image): Rename from `tumme-backward-char'. @@ -97,8 +801,8 @@ 2006-07-24 Daiki Ueno * pgg-def.el (pgg-truncate-key-identifier): Truncate the key ID to 8 - letters from the end. Thanks to "David Smith" and - andreas@altroot.de (Andreas V,Av(Bgele) + letters from the end. Thanks to "David Smith" + and andreas@altroot.de (Andreas V,Av(Bgele). 2006-07-23 Thien-Thi Nguyen @@ -137,7 +841,7 @@ 2006-07-21 Dan Nicolaescu * term/xterm.el (terminal-init-xterm): Fix key bindings - syntax. Bind S-return, C-M-., C-TAB, S-TAB and C-S-TAB. + syntax. Bind S-return, C-M-., C-TAB, S-TAB and C-S-TAB. 2006-07-21 Eli Zaretskii @@ -173,7 +877,7 @@ * calc.el (calc-previous-alg-entry): Remove variable. - * calc-aent.el (calc-alg-entry-history, calc-quick-calc-history): + * calc-aent.el (calc-alg-entry-history, calc-quick-calc-history): New variables. (calc-alg-entry): Use `calc-alg-entry-history'. (calc-do-quick-calc): Use `calc-quick-calc-history'. @@ -497,8 +1201,8 @@ 2006-07-10 Chong Yidong - * progmodes/cc-awk.el (defconst): Use eval-and-compile to avoid - compilation error. + * progmodes/cc-awk.el (c-awk-escaped-nls*): Use eval-and-compile to + avoid compilation error. * subr.el (sit-for): New function. diff -r 0c89a85addc3 -r 694bbb62a75d lisp/allout.el --- a/lisp/allout.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/allout.el Sat Oct 14 16:56:21 2006 +0000 @@ -213,15 +213,73 @@ (put 'allout-show-bodies 'safe-local-variable (if (fboundp 'booleanp) 'booleanp '(lambda (x) (member x '(t nil))))) +;;;_ = allout-beginning-of-line-cycles +(defcustom allout-beginning-of-line-cycles t + "*If non-nil, \\[allout-beginning-of-line] will cycle through smart-placement options. + +Cycling only happens on when the command is repeated, not when it +follows a different command. + +Smart-placement means that repeated calls to this function will +advance as follows: + + - if the cursor is on a non-headline body line and not on the first column: + then it goes to the first column + - if the cursor is on the first column of a non-headline body line: + then it goes to the start of the headline within the item body + - if the cursor is on the headline and not the start of the headline: + then it goes to the start of the headline + - if the cursor is on the start of the headline: + then it goes to the bullet character \(for hotspot navigation\) + - if the cursor is on the bullet character: + then it goes to the first column of that line \(the headline\) + - if the cursor is on the first column of the headline: + then it goes to the start of the headline within the item body. + +In this fashion, you can use the beginning-of-line command to do +its normal job and then, when repeated, advance through the +entry, cycling back to start. + +If this configuration variable is nil, then the cursor is just +advanced to the beginning of the line and remains there on +repeated calls." + :type 'boolean :group 'allout) +;;;_ = allout-end-of-line-cycles +(defcustom allout-end-of-line-cycles t + "*If non-nil, \\[allout-end-of-line] will cycle through smart-placement options. + +Cycling only happens on when the command is repeated, not when it +follows a different command. + +Smart-placement means that repeated calls to this function will +advance as follows: + + - if the cursor is not on the end-of-line, + then it goes to the end-of-line + - if the cursor is on the end-of-line but not the end-of-entry, + then it goes to the end-of-entry, exposing it if necessary + - if the cursor is on the end-of-entry, + then it goes to the end of the head line + +In this fashion, you can use the end-of-line command to do its +normal job and then, when repeated, advance through the entry, +cycling back to start. + +If this configuration variable is nil, then the cursor is just +advanced to the end of the line and remains there on repeated +calls." + :type 'boolean :group 'allout) + ;;;_ = allout-header-prefix (defcustom allout-header-prefix "." +;; this string is treated as literal match. it will be `regexp-quote'd, so +;; one cannot use regular expressions to match varying header prefixes. "*Leading string which helps distinguish topic headers. Outline topic header lines are identified by a leading topic header prefix, which mostly have the value of this var at their front. -\(Level 1 topics are exceptions. They consist of only a single -character, which is typically set to the `allout-primary-bullet'. Many -outlines start at level 2 to avoid this discrepancy." +Level 1 topics are exceptions. They consist of only a single +character, which is typically set to the `allout-primary-bullet'." :type 'string :group 'allout) (make-variable-buffer-local 'allout-header-prefix) @@ -300,11 +358,13 @@ (defcustom allout-use-mode-specific-leader t "*When non-nil, use mode-specific topic-header prefixes. -Allout outline mode will use the mode-specific `allout-mode-leaders' -and/or comment-start string, if any, to lead the topic prefix string, -so topic headers look like comments in the programming language. - -String values are used as they stand. +Allout outline mode will use the mode-specific `allout-mode-leaders' or +comment-start string, if any, to lead the topic prefix string, so topic +headers look like comments in the programming language. It will also use +the comment-start string, with an '_' appended, for `allout-primary-bullet'. + +String values are used as literals, not regular expressions, so +do not escape any regulare-expression characters. Value t means to first check for assoc value in `allout-mode-leaders' alist, then use comment-start string, if any, then use default \(`.'). @@ -313,15 +373,17 @@ Set to the symbol for either of `allout-mode-leaders' or `comment-start' to use only one of them, respectively. -Value nil means to always use the default \(`.'). - -comment-start strings that do not end in spaces are tripled, and an -`_' underscore is tacked on the end, to distinguish them from regular -comment strings. comment-start strings that do end in spaces are not -tripled, but an underscore is substituted for the space. [This -presumes that the space is for appearance, not comment syntax. You -can use `allout-mode-leaders' to override this behavior, when -incorrect.]" +Value nil means to always use the default \(`.') and leave +`allout-primary-bullet' unaltered. + +comment-start strings that do not end in spaces are tripled in +the header-prefix, and an `_' underscore is tacked on the end, to +distinguish them from regular comment strings. comment-start +strings that do end in spaces are not tripled, but an underscore +is substituted for the space. [This presumes that the space is +for appearance, not comment syntax. You can use +`allout-mode-leaders' to override this behavior, when +undesired.]" :type '(choice (const t) (const nil) string (const allout-mode-leaders) (const comment-start)) @@ -334,13 +396,14 @@ (defvar allout-mode-leaders '() "Specific allout-prefix leading strings per major modes. -Entries will be used instead or in lieu of mode-specific -comment-start strings. See also `allout-use-mode-specific-leader'. +Use this if the mode's comment-start string isn't what you +prefer, or if the mode lacks a comment-start string. See +`allout-use-mode-specific-leader' for more details. If you're constructing a string that will comment-out outline structuring so it can be included in program code, append an extra character, like an \"_\" underscore, to distinguish the lead string -from regular comments that start at bol.") +from regular comments that start at the beginning-of-line.") ;;;_ = allout-old-style-prefixes (defcustom allout-old-style-prefixes nil @@ -828,9 +891,9 @@ (setq allout-reindent-bodies nil) (allout-reset-header-lead header-lead) header-lead) -;;;_ > allout-infer-header-lead () -(defun allout-infer-header-lead () - "Determine appropriate `allout-header-prefix'. +;;;_ > allout-infer-header-lead-and-primary-bullet () +(defun allout-infer-header-lead-and-primary-bullet () + "Determine appropriate `allout-header-prefix' and `allout-primary-bullet'. Works according to settings of: @@ -874,10 +937,14 @@ "_"))))))) (if (not leader) nil - (if (string= leader allout-header-prefix) - nil ; no change, nothing to do. - (setq allout-header-prefix leader) - allout-header-prefix)))) + (setq allout-header-prefix leader) + (if (not allout-old-style-prefixes) + ;; setting allout-primary-bullet makes the top level topics use - + ;; actually, be - the special prefix: + (setq allout-primary-bullet leader)) + allout-header-prefix))) +(defalias 'allout-infer-header-lead + 'allout-infer-header-lead-and-primary-bullet) ;;;_ > allout-infer-body-reindent () (defun allout-infer-body-reindent () "Determine proper setting for `allout-reindent-bodies'. @@ -930,13 +997,13 @@ (setq allout-plain-bullets-string-len (length allout-plain-bullets-string)) (setq allout-header-subtraction (1- (length allout-header-prefix))) ;; Produce the new allout-regexp: - (setq allout-regexp (concat "\\(\\" - allout-header-prefix - "[ \t]*[" - allout-bullets-string - "]\\)\\|\\" - allout-primary-bullet - "+\\|\^l")) + (setq allout-regexp (concat "\\(" + (regexp-quote allout-header-prefix) + "[ \t]*[" + allout-bullets-string + "]\\)\\|" + (regexp-quote allout-primary-bullet) + "+\\|\^l")) (setq allout-line-boundary-regexp (concat "\\(\n\\)\\(" allout-regexp "\\)")) (setq allout-bob-regexp @@ -965,16 +1032,6 @@ (car (cdr cell))))))) keymap-list) map)) -;;;_ = allout-prior-bindings - being deprecated. -(defvar allout-prior-bindings nil - "Variable for use in V18, with allout-added-bindings, for -resurrecting, on mode deactivation, bindings that existed before -activation. Being deprecated.") -;;;_ = allout-added-bindings - being deprecated -(defvar allout-added-bindings nil - "Variable for use in V18, with allout-prior-bindings, for -resurrecting, on mode deactivation, bindings that existed before -activation. Being deprecated.") ;;;_ : Menu bar (defvar allout-mode-exposure-menu) (defvar allout-mode-editing-menu) @@ -1050,43 +1107,65 @@ (make-variable-buffer-local 'allout-mode-prior-settings) ;;;_ > allout-add-resumptions (&rest pairs) (defun allout-add-resumptions (&rest pairs) - "Set name/value pairs. + "Set name/value PAIRS. Old settings are preserved for later resumption using `allout-do-resumptions'. +The new values are set as a buffer local. On resumption, the prior buffer +scope of the variable is restored along with its value. If it was a void +buffer-local value, then it is left as nil on resumption. + The pairs are lists whose car is the name of the variable and car of the -cdr is the new value: '(some-var some-value)'. - -The new value is set as a buffer local. - -If the variable was not previously buffer-local, then that is noted and the -`allout-do-resumptions' will just `kill-local-variable' of that binding. - -If it previously was buffer-local, the old value is noted and resurrected -by `allout-do-resumptions'. \(If the local value was previously void, then -it is left as nil on resumption.\) +cdr is the new value: '(some-var some-value)'. The pairs can actually be +triples, where the third element qualifies the disposition of the setting, +as described further below. + +If the optional third element is the symbol 'extend, then the new value +created by `cons'ing the second element of the pair onto the front of the +existing value. + +If the optional third element is the symbol 'append, then the new value is +extended from the existing one by `append'ing a list containing the second +element of the pair onto the end of the existing value. + +Extension, and resumptions in general, should not be used for hook +functions - use the 'local mode of `add-hook' for that, instead. The settings are stored on `allout-mode-prior-settings'." (while pairs (let* ((pair (pop pairs)) (name (car pair)) - (value (cadr pair))) + (value (cadr pair)) + (qualifier (if (> (length pair) 2) + (caddr pair))) + prior-value) (if (not (symbolp name)) (error "Pair's name, %S, must be a symbol, not %s" name (type-of name))) + (setq prior-value (condition-case err + (symbol-value name) + (void-variable nil))) (when (not (assoc name allout-mode-prior-settings)) ;; Not already added as a resumption, create the prior setting entry. (if (local-variable-p name) ;; is already local variable - preserve the prior value: - (push (list name (condition-case err - (symbol-value name) - (void-variable nil))) - allout-mode-prior-settings) + (push (list name prior-value) allout-mode-prior-settings) ;; wasn't local variable, indicate so for resumption by killing ;; local value, and make it local: (push (list name) allout-mode-prior-settings) (make-local-variable name))) - (set name value)))) + (if qualifier + (cond ((eq qualifier 'extend) + (if (not (listp prior-value)) + (error "extension of non-list prior value attempted") + (set name (cons value prior-value)))) + ((eq qualifier 'append) + (if (not (listp prior-value)) + (error "appending of non-list prior value attempted") + (set name (append prior-value (list value))))) + (t (error "unrecognized setting qualifier `%s' encountered" + qualifier))) + (set name value))))) ;;;_ > allout-do-resumptions () (defun allout-do-resumptions () "Resume all name/value settings registered by `allout-add-resumptions'. @@ -1121,18 +1200,67 @@ "Symbol for use as allout invisible-text overlay category.") ;;;_ x allout-view-change-hook (defvar allout-view-change-hook nil - "*\(Deprecated\) Hook that's run after allout outline exposure changes. - -Switch to using `allout-exposure-change-hook' instead. Both -variables are currently respected, but this one will be ignored -in a subsequent allout version.") + "*\(Deprecated\) A hook run after allout outline exposure changes. + +Switch to using `allout-exposure-change-hook' instead. Both hooks are +currently respected, but the other conveys the details of the exposure +change via explicit parameters, and this one will eventually be disabled in +a subsequent allout version.") ;;;_ = allout-exposure-change-hook (defvar allout-exposure-change-hook nil - "*Hook that's run after allout outline exposure changes. - -This variable will replace `allout-view-change-hook' in a subsequent allout -version, though both are currently respected.") - + "*Hook that's run after allout outline subtree exposure changes. + +It is run at the conclusion of `allout-flag-region'. + +Functions on the hook must take three arguments: + + - from - integer indicating the point at the start of the change. + - to - integer indicating the point of the end of the change. + - flag - change mode: nil for exposure, otherwise concealment. + +This hook might be invoked multiple times by a single command. + +This hook is replacing `allout-view-change-hook', which is being deprecated +and eventually will not be invoked.") +;;;_ = allout-structure-added-hook +(defvar allout-structure-added-hook nil + "*Hook that's run after addition of items to the outline. + +Functions on the hook should take two arguments: + + - new-start - integer indicating the point at the start of the first new item. + - new-end - integer indicating the point of the end of the last new item. + +Some edits that introduce new items may missed by this hook - +specifically edits that native allout routines do not control. + +This hook might be invoked multiple times by a single command.") +;;;_ = allout-structure-deleted-hook +(defvar allout-structure-deleted-hook nil + "*Hook that's run after disciplined deletion of subtrees from the outline. + +Functions on the hook must take two arguments: + + - depth - integer indicating the depth of the subtree that was deleted. + - removed-from - integer indicating the point where the subtree was removed. + +Some edits that remove or invalidate items may missed by this hook - +specifically edits that native allout routines do not control. + +This hook might be invoked multiple times by a single command.") +;;;_ = allout-structure-shifted-hook +(defvar allout-structure-shifted-hook nil + "*Hook that's run after shifting of items in the outline. + +Functions on the hook should take two arguments: + + - depth-change - integer indicating depth increase, negative for decrease + - start - integer indicating the start point of the shifted parent item. + +Some edits that shift items can be missed by this hook - specifically edits +that native allout routines do not control. + +This hook might be invoked multiple times by a single command.") ;;;_ = allout-outside-normal-auto-fill-function (defvar allout-outside-normal-auto-fill-function nil "Value of normal-auto-fill-function outside of allout mode. @@ -1186,6 +1314,42 @@ This is used to decrypt the topic that was currently being edited, if it was encrypted automatically as part of a file write or autosave.") (make-variable-buffer-local 'allout-after-save-decrypt) +;;;_ = allout-encryption-plaintext-sanitization-regexps +(defvar allout-encryption-plaintext-sanitization-regexps nil + "List of regexps whose matches are removed from plaintext before encryption. + +This is for the sake of removing artifacts, like escapes, that are added on +and not actually part of the original plaintext. The removal is done just +prior to encryption. + +Entries must be symbols that are bound to the desired values. + +Each value can be a regexp or a list with a regexp followed by a +substitution string. If it's just a regexp, all its matches are removed +before the text is encrypted. If it's a regexp and a substitution, the +substition is used against the regexp matches, a la `replace-match'.") +(make-variable-buffer-local 'allout-encryption-text-removal-regexps) +;;;_ = allout-encryption-ciphertext-rejection-regexps +(defvar allout-encryption-ciphertext-rejection-regexps nil + "Variable for regexps matching plaintext to remove before encryption. + +This is for the sake of redoing encryption in cases where the ciphertext +incidentally contains strings that would disrupt mode operation - +for example, a line that happens to look like an allout-mode topic prefix. + +Entries must be symbols that are bound to the desired regexp values. + +The encryption will be retried up to +`allout-encryption-ciphertext-rejection-limit' times, after which an error +is raised.") + +(make-variable-buffer-local 'allout-encryption-ciphertext-rejection-regexps) +;;;_ = allout-encryption-ciphertext-rejection-ceiling +(defvar allout-encryption-ciphertext-rejection-ceiling 5 + "Limit on number of times encryption ciphertext is rejected. + +See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.") +(make-variable-buffer-local 'allout-encryption-ciphertext-rejection-ceiling) ;;;_ > allout-mode-p () ;; Must define this macro above any uses, or byte compilation will lack ;; proper def, if file isn't loaded - eg, during emacs build! @@ -1637,16 +1801,15 @@ (remove-overlays (point-min) (point-max) 'category 'allout-exposure-category) - (run-hooks 'allout-mode-deactivate-hook) - (setq allout-mode nil)) + (setq allout-mode nil) + (run-hooks 'allout-mode-deactivate-hook)) ;; Activation: ((not active) (setq allout-explicitly-deactivated nil) (if allout-old-style-prefixes ;; Inhibit all the fancy formatting: - (allout-add-resumptions '((allout-primary-bullet "*") - (allout-old-style-prefixes ())))) + (allout-add-resumptions '(allout-primary-bullet "*"))) (allout-overlay-preparations) ; Doesn't hurt to redo this. @@ -1654,15 +1817,28 @@ (allout-infer-body-reindent) (set-allout-regexp) + (allout-add-resumptions + '(allout-encryption-ciphertext-rejection-regexps + allout-line-boundary-regexp + extend) + '(allout-encryption-ciphertext-rejection-regexps + allout-bob-regexp + extend)) ;; Produce map from current version of allout-keybindings-list: (setq allout-mode-map (produce-allout-mode-map allout-keybindings-list)) (substitute-key-definition 'beginning-of-line - 'move-beginning-of-line + 'allout-beginning-of-line + allout-mode-map global-map) + (substitute-key-definition 'move-beginning-of-line + 'allout-beginning-of-line allout-mode-map global-map) (substitute-key-definition 'end-of-line - 'move-end-of-line + 'allout-end-of-line + allout-mode-map global-map) + (substitute-key-definition 'move-end-of-line + 'allout-end-of-line allout-mode-map global-map) (produce-allout-mode-menubar-entries) (fset 'allout-mode-map allout-mode-map) @@ -1717,8 +1893,8 @@ (if allout-layout (setq do-layout t)) - (run-hooks 'allout-mode-hook) - (setq allout-mode t)) + (setq allout-mode t) + (run-hooks 'allout-mode-hook)) ;; Reactivation: ((setq do-layout t) @@ -2044,6 +2220,52 @@ (while (allout-hidden-p) (end-of-line) (if (allout-hidden-p) (forward-char 1))))) +;;;_ > allout-beginning-of-line () +(defun allout-beginning-of-line () + "Beginning-of-line with `allout-beginning-of-line-cycles' behavior, if set." + + (interactive) + + (if (or (not allout-beginning-of-line-cycles) + (not (equal last-command this-command))) + (move-beginning-of-line 1) + (let ((beginning-of-body (save-excursion + (allout-beginning-of-current-entry) + (point)))) + (cond ((= (current-column) 0) + (allout-beginning-of-current-entry)) + ((< (point) beginning-of-body) + (allout-beginning-of-current-line)) + ((= (point) beginning-of-body) + (goto-char (allout-current-bullet-pos))) + (t (allout-beginning-of-current-line) + (if (< (point) beginning-of-body) + ;; we were on the headline after its start: + (allout-beginning-of-current-entry))))))) +;;;_ > allout-end-of-line () +(defun allout-end-of-line () + "End-of-line with `allout-end-of-line-cycles' behavior, if set." + + (interactive) + + (if (or (not allout-end-of-line-cycles) + (not (equal last-command this-command))) + (allout-end-of-current-line) + (let ((end-of-entry (save-excursion + (allout-end-of-entry) + (point)))) + (cond ((not (eolp)) + (allout-end-of-current-line)) + ((or (allout-hidden-p) (save-excursion + (forward-char -1) + (allout-hidden-p))) + (allout-back-to-current-heading) + (allout-show-current-entry) + (allout-end-of-entry)) + ((>= (point) end-of-entry) + (allout-back-to-current-heading) + (allout-end-of-current-line)) + (t (allout-end-of-entry)))))) ;;;_ > allout-next-heading () (defsubst allout-next-heading () "Move to the heading for the topic \(possibly invisible) after this one. @@ -2108,13 +2330,17 @@ ;;; for assessment or adjustment of the subtree, without redundant ;;; traversal of the structure. -;;;_ > allout-chart-subtree (&optional levels orig-depth prev-depth) -(defun allout-chart-subtree (&optional levels orig-depth prev-depth) +;;;_ > allout-chart-subtree (&optional levels visible orig-depth prev-depth) +(defun allout-chart-subtree (&optional levels visible orig-depth prev-depth) "Produce a location \"chart\" of subtopics of the containing topic. Optional argument LEVELS specifies the depth \(relative to start -depth) for the chart. Subsequent optional args are not for public -use. +depth) for the chart. + +When optional argument VISIBLE is non-nil, the chart includes +only the visible subelements of the charted subjects. + +The remaining optional args are not for internal use by the function. Point is left at the end of the subtree. @@ -2141,7 +2367,9 @@ ; position to first offspring: (progn (setq orig-depth (allout-depth)) (or prev-depth (setq prev-depth (1+ orig-depth))) - (allout-next-heading))) + (if visible + (allout-next-visible-heading 1) + (allout-next-heading)))) ;; Loop over the current levels' siblings. Besides being more ;; efficient than tail-recursing over a level, it avoids exceeding @@ -2163,8 +2391,12 @@ ;; next heading at lesser depth: (while (and (<= curr-depth (allout-recent-depth)) - (allout-next-heading)))) - (allout-next-heading))) + (if visible + (allout-next-visible-heading 1) + (allout-next-heading))))) + (if visible + (allout-next-visible-heading 1) + (allout-next-heading)))) ((and (< prev-depth curr-depth) (or (not levels) @@ -2173,8 +2405,9 @@ (setq chart (cons (allout-chart-subtree (and levels (1- levels)) - orig-depth - curr-depth) + visible + orig-depth + curr-depth) chart)) ;; ... then continue with this one. ) @@ -2369,7 +2602,9 @@ (while (and (not (eobp)) (> (allout-recent-depth) level)) (allout-next-heading)) - (and (not (eobp)) (forward-char -1)) + (if (eobp) + (allout-end-of-entry) + (forward-char -1)) (if (and (not include-trailing-blank) (= ?\n (preceding-char))) (forward-char -1)) (setq allout-recent-end-of-subtree (point)))) @@ -2675,6 +2910,13 @@ are mapped to the command of the corresponding control-key on the `allout-mode-map'.") (make-variable-buffer-local 'allout-post-goto-bullet) +;;;_ = allout-command-counter +(defvar allout-command-counter 0 + "Counter that monotonically increases in allout-mode buffers. + +Set by `allout-pre-command-business', to support allout addons in +coordinating with allout activity.") +(make-variable-buffer-local 'allout-command-counter) ;;;_ > allout-post-command-business () (defun allout-post-command-business () "Outline `post-command-hook' function. @@ -2692,7 +2934,7 @@ allout-after-save-decrypt) (allout-after-saves-handler)) - ;; Implement -post-goto-bullet, if set: + ;; Implement allout-post-goto-bullet, if set: (if (and allout-post-goto-bullet (allout-current-bullet-pos)) (progn (goto-char (allout-current-bullet-pos)) @@ -2701,7 +2943,9 @@ ;;;_ > allout-pre-command-business () (defun allout-pre-command-business () "Outline `pre-command-hook' function for outline buffers. -Implements special behavior when cursor is on bullet character. + +Among other things, implements special behavior when the cursor is on the +topic bullet character. When the cursor is on the bullet character, self-insert characters are reinterpreted as the corresponding control-character in the @@ -2709,7 +2953,7 @@ the cursor which has moved as a result of such reinterpretation is positioned on the bullet character of the destination topic. -The upshot is that you can get easy, single (ie, unmodified) key +The upshot is that you can get easy, single \(ie, unmodified\) key outline maneuvering operations by positioning the cursor on the bullet char. When in this mode you can use regular cursor-positioning command/keystrokes to relocate the cursor off of a bullet character to @@ -2717,6 +2961,9 @@ (if (not (allout-mode-p)) nil + ;; Increment allout-command-counter + (setq allout-command-counter (1+ allout-command-counter)) + ;; Do hot-spot navigation. (if (and (eq this-command 'self-insert-command) (eq (point)(allout-current-bullet-pos))) (allout-hotspot-key-handler)))) @@ -2990,6 +3237,8 @@ If OFFER-RECENT-BULLET is true, offer to use the bullet of the prior sibling. +Runs + Nuances: - Creation of new topics is with respect to the visible topic @@ -3040,7 +3289,8 @@ allout-numbered-bullet)))) (point))) dbl-space - doing-beginning) + doing-beginning + start end) (if (not opening-on-blank) ; Positioning and vertical @@ -3141,8 +3391,10 @@ (not (bolp))) (forward-char 1)))) )) + (setq start (point)) (insert (concat (allout-make-topic-prefix opening-numbered t depth) " ")) + (setq end (1+ (point))) (allout-rebullet-heading (and offer-recent-bullet ref-bullet) depth nil nil t) @@ -3150,6 +3402,8 @@ (save-excursion (goto-char ref-topic) (allout-show-children))) (end-of-line) + + (run-hook-with-args 'allout-structure-added-hook start end) ) ) ;;;_ > allout-open-subtopic (arg) @@ -3548,6 +3802,7 @@ depth, however." (interactive "p") (if (> arg 0) + ;; refuse to create a containment discontinuity: (save-excursion (allout-back-to-current-heading) (if (not (bobp)) @@ -3564,7 +3819,20 @@ (1+ predecessor-depth))) (error (concat "Disallowed shift deeper than" " containing topic's children."))))))) - (allout-rebullet-topic arg)) + (let ((where (point)) + has-successor) + (if (and (< arg 0) + (allout-current-topic-collapsed-p) + (save-excursion (allout-next-sibling))) + (setq has-successor t)) + (allout-rebullet-topic arg) + (when (< arg 0) + (save-excursion + (if (allout-ascend) + (allout-show-children))) + (if has-successor + (allout-show-children))) + (run-hook-with-args 'allout-structure-shifted-hook arg where))) ;;;_ > allout-shift-out (arg) (defun allout-shift-out (arg) "Decrease depth of current heading and any topics collapsed within it. @@ -3574,9 +3842,7 @@ discontinuity. The first topic in the file can be adjusted to any positive depth, however." (interactive "p") - (if (< arg 0) - (allout-shift-in (* arg -1))) - (allout-rebullet-topic (* arg -1))) + (allout-shift-in (* arg -1))) ;;;_ : Surgery (kill-ring) functions with special provisions for outlines: ;;;_ > allout-kill-line (&optional arg) (defun allout-kill-line (&optional arg) @@ -3610,7 +3876,8 @@ (save-excursion ; Renumber subsequent topics if needed: (if (not (looking-at allout-regexp)) (allout-next-heading)) - (allout-renumber-to-depth depth)))))) + (allout-renumber-to-depth depth))) + (run-hook-with-args 'allout-structure-deleted-hook depth (point))))) ;;;_ > allout-kill-topic () (defun allout-kill-topic () "Kill topic together with subtopics. @@ -3656,7 +3923,8 @@ (allout-unprotected (kill-region beg (point))) (sit-for 0) (save-excursion - (allout-renumber-to-depth depth)))) + (allout-renumber-to-depth depth)) + (run-hook-with-args 'allout-structure-deleted-hook depth (point)))) ;;;_ > allout-yank-processing () (defun allout-yank-processing (&optional arg) @@ -3683,112 +3951,113 @@ ; region around subject: (if (< (allout-mark-marker t) (point)) (exchange-point-and-mark)) - (let* ((inhibit-field-text-motion t) - (subj-beg (point)) - (into-bol (bolp)) - (subj-end (allout-mark-marker t)) - (was-collapsed (get-text-property subj-beg 'allout-was-collapsed)) - ;; 'resituate' if yanking an entire topic into topic header: - (resituate (and (allout-e-o-prefix-p) - (looking-at (concat "\\(" allout-regexp "\\)")) - (allout-prefix-data (match-beginning 1) + (allout-unprotected + (let* ((subj-beg (point)) + (into-bol (bolp)) + (subj-end (allout-mark-marker t)) + (was-collapsed (get-text-property subj-beg 'allout-was-collapsed)) + ;; 'resituate' if yanking an entire topic into topic header: + (resituate (and (allout-e-o-prefix-p) + (looking-at (concat "\\(" allout-regexp "\\)")) + (allout-prefix-data (match-beginning 1) (match-end 1)))) - ;; `rectify-numbering' if resituating (where several topics may - ;; be resituating) or yanking a topic into a topic slot (bol): - (rectify-numbering (or resituate - (and into-bol (looking-at allout-regexp))))) - (if resituate + ;; `rectify-numbering' if resituating (where several topics may + ;; be resituating) or yanking a topic into a topic slot (bol): + (rectify-numbering (or resituate + (and into-bol (looking-at allout-regexp))))) + (if resituate ; The yanked stuff is a topic: - (let* ((prefix-len (- (match-end 1) subj-beg)) - (subj-depth (allout-recent-depth)) - (prefix-bullet (allout-recent-bullet)) - (adjust-to-depth - ;; Nil if adjustment unnecessary, otherwise depth to which - ;; adjustment should be made: - (save-excursion - (and (goto-char subj-end) - (eolp) - (goto-char subj-beg) - (and (looking-at allout-regexp) - (progn - (beginning-of-line) - (not (= (point) subj-beg))) - (looking-at allout-regexp) - (allout-prefix-data (match-beginning 0) + (let* ((prefix-len (- (match-end 1) subj-beg)) + (subj-depth (allout-recent-depth)) + (prefix-bullet (allout-recent-bullet)) + (adjust-to-depth + ;; Nil if adjustment unnecessary, otherwise depth to which + ;; adjustment should be made: + (save-excursion + (and (goto-char subj-end) + (eolp) + (goto-char subj-beg) + (and (looking-at allout-regexp) + (progn + (beginning-of-line) + (not (= (point) subj-beg))) + (looking-at allout-regexp) + (allout-prefix-data (match-beginning 0) (match-end 0))) - (allout-recent-depth)))) - (more t)) - (setq rectify-numbering allout-numbered-bullet) - (if adjust-to-depth + (allout-recent-depth)))) + (more t)) + (setq rectify-numbering allout-numbered-bullet) + (if adjust-to-depth ; Do the adjustment: - (progn - (message "... yanking") (sit-for 0) - (save-restriction - (narrow-to-region subj-beg subj-end) + (progn + (message "... yanking") (sit-for 0) + (save-restriction + (narrow-to-region subj-beg subj-end) ; Trim off excessive blank ; line at end, if any: - (goto-char (point-max)) - (if (looking-at "^$") - (allout-unprotected (delete-char -1))) + (goto-char (point-max)) + (if (looking-at "^$") + (allout-unprotected (delete-char -1))) ; Work backwards, with each ; shallowest level, ; successively excluding the ; last processed topic from ; the narrow region: - (while more - (allout-back-to-current-heading) + (while more + (allout-back-to-current-heading) ; go as high as we can in each bunch: - (while (allout-ascend-to-depth (1- (allout-depth)))) - (save-excursion - (allout-rebullet-topic-grunt (- adjust-to-depth + (while (allout-ascend-to-depth (1- (allout-depth)))) + (save-excursion + (allout-rebullet-topic-grunt (- adjust-to-depth subj-depth)) - (allout-depth)) - (if (setq more (not (bobp))) - (progn (widen) - (forward-char -1) - (narrow-to-region subj-beg (point)))))) - (message "") - ;; Preserve new bullet if it's a distinctive one, otherwise - ;; use old one: - (if (string-match (regexp-quote prefix-bullet) - allout-distinctive-bullets-string) + (allout-depth)) + (if (setq more (not (bobp))) + (progn (widen) + (forward-char -1) + (narrow-to-region subj-beg (point)))))) + (message "") + ;; Preserve new bullet if it's a distinctive one, otherwise + ;; use old one: + (if (string-match (regexp-quote prefix-bullet) + allout-distinctive-bullets-string) ; Delete from bullet of old to ; before bullet of new: - (progn - (beginning-of-line) - (delete-region (point) subj-beg) - (set-marker (allout-mark-marker t) subj-end) - (goto-char subj-beg) - (allout-end-of-prefix)) + (progn + (beginning-of-line) + (delete-region (point) subj-beg) + (set-marker (allout-mark-marker t) subj-end) + (goto-char subj-beg) + (allout-end-of-prefix)) ; Delete base subj prefix, ; leaving old one: - (delete-region (point) (+ (point) - prefix-len - (- adjust-to-depth subj-depth))) + (delete-region (point) (+ (point) + prefix-len + (- adjust-to-depth subj-depth))) ; and delete residual subj ; prefix digits and space: - (while (looking-at "[0-9]") (delete-char 1)) - (if (looking-at " ") (delete-char 1)))) - (exchange-point-and-mark)))) - (if rectify-numbering - (progn - (save-excursion + (while (looking-at "[0-9]") (delete-char 1)) + (if (looking-at " ") (delete-char 1)))) + (exchange-point-and-mark)))) + (if rectify-numbering + (progn + (save-excursion ; Give some preliminary feedback: - (message "... reconciling numbers") (sit-for 0) + (message "... reconciling numbers") (sit-for 0) ; ... and renumber, in case necessary: - (goto-char subj-beg) - (if (allout-goto-prefix) - (allout-rebullet-heading nil ;;; solicit + (goto-char subj-beg) + (if (allout-goto-prefix) + (allout-rebullet-heading nil ;;; solicit (allout-depth) ;;; depth - nil ;;; number-control - nil ;;; index + nil ;;; number-control + nil ;;; index t)) - (message "")))) - (when (and (or into-bol resituate) was-collapsed) - (remove-text-properties subj-beg (1+ subj-beg) '(allout-was-collapsed)) - (allout-hide-current-subtree)) - (if (not resituate) - (exchange-point-and-mark)))) + (message "")))) + (when (and (or into-bol resituate) was-collapsed) + (remove-text-properties subj-beg (1+ subj-beg) '(allout-was-collapsed)) + (allout-hide-current-subtree)) + (if (not resituate) + (exchange-point-and-mark)) + (run-hook-with-args 'allout-structure-added-hook subj-beg subj-end)))) ;;;_ > allout-yank (&optional arg) (defun allout-yank (&optional arg) "`allout-mode' yank, with depth and numbering adjustment of yanked topics. @@ -3820,10 +4089,10 @@ (interactive "*P") (setq this-command 'yank) - (yank arg) + (allout-unprotected + (yank arg)) (if (allout-mode-p) - (allout-yank-processing)) -) + (allout-yank-processing))) ;;;_ > allout-yank-pop (&optional arg) (defun allout-yank-pop (&optional arg) "Yank-pop like `allout-yank' when popping to bare outline prefixes. @@ -3882,9 +4151,13 @@ ;;;_ - Fundamental ;;;_ > allout-flag-region (from to flag) (defun allout-flag-region (from to flag) - "Conceal text from FROM to TO if FLAG is non-nil, else reveal it. - -Text is shown if flag is nil and hidden otherwise." + "Conceal text between FROM and TO if FLAG is non-nil, else reveal it. + +Exposure-change hook `allout-exposure-change-hook' is run with the same +arguments as this function, after the exposure changes are made. \(The old +`allout-view-change-hook' is being deprecated, and eventually will not be +invoked.\)" + ;; We use outline invisibility spec. (remove-overlays from to 'category 'allout-exposure-category) (when flag @@ -3895,7 +4168,7 @@ (while props (overlay-put o (pop props) (pop props))))))) (run-hooks 'allout-view-change-hook) - (run-hooks 'allout-exposure-change-hook)) + (run-hook-with-args 'allout-exposure-change-hook from to flag)) ;;;_ > allout-flag-current-subtree (flag) (defun allout-flag-current-subtree (flag) "Conceal currently-visible topic's subtree if FLAG non-nil, else reveal it." @@ -4071,10 +4344,12 @@ default, they are treated as being uncollapsed." (save-excursion (and - (= (progn (allout-back-to-current-heading) - (move-end-of-line 1) - (point)) - (allout-end-of-current-subtree (not (looking-at "\n\n")))) + ;; Is the topic all on one line (allowing for trailing blank line)? + (>= (progn (allout-back-to-current-heading) + (move-end-of-line 1) + (point)) + (allout-end-of-current-subtree (not (looking-at "\n\n")))) + (or include-single-liners (progn (backward-char 1) (allout-hidden-p)))))) ;;;_ > allout-hide-current-subtree (&optional just-close) @@ -5097,8 +5372,8 @@ ;;; fetch-pass &optional retried verifying ;;; passphrase) (defun allout-encrypt-string (text decrypt allout-buffer key-type for-key - fetch-pass &optional retried verifying - passphrase) + fetch-pass &optional retried rejected + verifying passphrase) "Encrypt or decrypt message TEXT. If DECRYPT is true (default false), then decrypt instead of encrypt. @@ -5116,6 +5391,11 @@ Optional PASSPHRASE enables explicit delivery of the decryption passphrase, for verification purposes. +Optional REJECTED is for internal use - conveys the number of +rejections due to matches against +`allout-encryption-ciphertext-rejection-regexps', as limited by +`allout-encryption-ciphertext-rejection-ceiling'. + Returns the resulting string, or nil if the transformation fails." (require 'pgg) @@ -5141,6 +5421,17 @@ target-prompt-id (or (buffer-file-name allout-buffer) target-prompt-id)))) + (strip-plaintext-regexps + (if (not decrypt) + (allout-get-configvar-values + 'allout-encryption-plaintext-sanitization-regexps))) + (reject-ciphertext-regexps + (if (not decrypt) + (allout-get-configvar-values + 'allout-encryption-ciphertext-rejection-regexps))) + (rejected (or rejected 0)) + (rejections-left (- allout-encryption-ciphertext-rejection-ceiling + rejected)) result-text status) (if (and fetch-pass (not passphrase)) @@ -5161,10 +5452,19 @@ key-type allout-buffer retried fetch-pass))) + (with-temp-buffer (insert text) + (when (and strip-plaintext-regexps (not decrypt)) + (dolist (re strip-plaintext-regexps) + (let ((re (if (listp re) (car re) re)) + (replacement (if (listp re) (cadr re) ""))) + (goto-char (point-min)) + (while (re-search-forward re nil t) + (replace-match replacement nil nil))))) + (cond ;; symmetric: @@ -5183,7 +5483,8 @@ (if verifying (throw 'encryption-failed nil) (pgg-remove-passphrase-from-cache target-cache-id t) - (error "Symmetric-cipher encryption failed - %s" + (error "Symmetric-cipher %scryption failed - %s" + (if decrypt "de" "en") "try again with different passphrase.")))) ;; encrypt 'keypair: @@ -5208,48 +5509,68 @@ (if status (pgg-situate-output (point-min) (point-max)) (error (pgg-remove-passphrase-from-cache target-cache-id t) - (error "decryption failed")))) - ) + (error "decryption failed"))))) (setq result-text (buffer-substring 1 (- (point-max) (if decrypt 0 1)))) - - ;; validate result - non-empty - (cond ((not result-text) - (if verifying - nil - ;; transform was fruitless, retry w/new passphrase. - (pgg-remove-passphrase-from-cache target-cache-id t) - (allout-encrypt-string text allout-buffer decrypt nil - (if retried (1+ retried) 1) - passphrase))) - - ;; Barf if encryption yields extraordinary control chars: - ((and (not decrypt) - (string-match "[\C-a\C-k\C-o-\C-z\C-@]" - result-text)) - (error (concat "encryption produced unusable" - " non-armored text - reconfigure!"))) - - ;; valid result and just verifying or non-symmetric: - ((or verifying (not (equal key-type 'symmetric))) - (if (or verifying decrypt) - (pgg-add-passphrase-to-cache target-cache-id - passphrase t)) - result-text) - - ;; valid result and regular symmetric - "register" - ;; passphrase with mnemonic aids/cache. - (t - (set-buffer allout-buffer) - (if passphrase - (pgg-add-passphrase-to-cache target-cache-id - passphrase t)) - (allout-update-passphrase-mnemonic-aids for-key passphrase - allout-buffer) - result-text) - ) ) + + ;; validate result - non-empty + (cond ((not result-text) + (if verifying + nil + ;; transform was fruitless, retry w/new passphrase. + (pgg-remove-passphrase-from-cache target-cache-id t) + (allout-encrypt-string text decrypt allout-buffer + key-type for-key nil + (if retried (1+ retried) 1) + rejected verifying nil))) + + ;; Retry (within limit) if ciphertext contains rejections: + ((and (not decrypt) + ;; Check for disqualification of this ciphertext: + (let ((regexps reject-ciphertext-regexps) + reject-it) + (while (and regexps (not reject-it)) + (setq reject-it (string-match (car regexps) + result-text)) + (pop regexps)) + reject-it)) + (setq rejections-left (1- rejections-left)) + (if (<= rejections-left 0) + (error (concat "Ciphertext rejected too many times" + " (%s), per `%s'") + allout-encryption-ciphertext-rejection-ceiling + 'allout-encryption-ciphertext-rejection-regexps) + (allout-encrypt-string text decrypt allout-buffer + key-type for-key nil + retried (1+ rejected) + verifying passphrase))) + ;; Barf if encryption yields extraordinary control chars: + ((and (not decrypt) + (string-match "[\C-a\C-k\C-o-\C-z\C-@]" + result-text)) + (error (concat "Encryption produced non-armored text, which" + "conflicts with allout mode - reconfigure!"))) + + ;; valid result and just verifying or non-symmetric: + ((or verifying (not (equal key-type 'symmetric))) + (if (or verifying decrypt) + (pgg-add-passphrase-to-cache target-cache-id + passphrase t)) + result-text) + + ;; valid result and regular symmetric - "register" + ;; passphrase with mnemonic aids/cache. + (t + (set-buffer allout-buffer) + (if passphrase + (pgg-add-passphrase-to-cache target-cache-id + passphrase t)) + (allout-update-passphrase-mnemonic-aids for-key passphrase + allout-buffer) + result-text) + ) ) ) ) @@ -5313,7 +5634,6 @@ (pgg-read-passphrase-from-cache cache-id t))) (got-pass (or cached (pgg-read-passphrase full-prompt cache-id t))) - confirmation) (if (not got-pass) @@ -5321,14 +5641,14 @@ ;; Duplicate our handle on the passphrase so it's not clobbered by ;; deactivate-passwd memory clearing: - (setq got-pass (format "%s" got-pass)) + (setq got-pass (copy-sequence got-pass)) (cond (verifier-string (save-window-excursion (if (allout-encrypt-string verifier-string 'decrypt allout-buffer 'symmetric - for-key nil 0 'verifying - got-pass) + for-key nil 0 0 'verifying + (copy-sequence got-pass)) (setq confirmation (format "%s" got-pass)))) (if (and (not confirmation) @@ -5365,15 +5685,7 @@ ;; recurse to this routine: (pgg-read-passphrase prompt-sans-hint cache-id t)) (pgg-remove-passphrase-from-cache cache-id t) - (error "Confirmation failed."))) - ;; reduce opportunity for memory cherry-picking by zeroing duplicate: - (dotimes (i (length got-pass)) - (aset got-pass i 0)) - ) - ) - ) - ) - ) + (error "Confirmation failed.")))))))) ;;;_ > allout-encrypted-topic-p () (defun allout-encrypted-topic-p () "True if the current topic is encryptable and encrypted." @@ -5426,7 +5738,7 @@ (dotimes (i (length spew)) (aset spew i (1+ (random 254)))) (allout-encrypt-string spew nil (current-buffer) 'symmetric - nil nil 0 passphrase)) + nil nil 0 0 passphrase)) ) ;;;_ > allout-update-passphrase-mnemonic-aids (for-key passphrase ;;; outline-buffer) @@ -5505,7 +5817,7 @@ allout-passphrase-verifier-string (allout-encrypt-string (allout-get-encryption-passphrase-verifier) 'decrypt allout-buffer 'symmetric - key nil 0 'verifying passphrase) + key nil 0 0 'verifying passphrase) t))) ;;;_ > allout-next-topic-pending-encryption (&optional except-mark) (defun allout-next-topic-pending-encryption (&optional except-mark) @@ -5808,6 +6120,25 @@ (goto-char (1+ (match-beginning 0))) (setq count (1+ count))) count)))) +;;;_ > allout-get-configvar-values (varname) +(defun allout-get-configvar-values (configvar-name) + "Return a list of values of the symbols in list bound to CONFIGVAR-NAME. + +The user is prompted for removal of symbols that are unbound, and they +otherwise are ignored. + +CONFIGVAR-NAME should be the name of the configuration variable, +not its value." + + (let ((configvar-value (symbol-value configvar-name)) + got) + (dolist (sym configvar-value) + (if (not (boundp sym)) + (if (yes-or-no-p (format "%s entry `%s' is unbound - remove it? " + configvar-name sym)) + (delq sym (symbol-value configvar-name))) + (push (symbol-value sym) got))) + (reverse got))) ;;;_ > allout-mark-marker to accommodate divergent emacsen: (defun allout-mark-marker (&optional force buffer) "Accommodate the different signature for `mark-marker' across Emacsen. diff -r 0c89a85addc3 -r 694bbb62a75d lisp/avoid.el --- a/lisp/avoid.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/avoid.el Sat Oct 14 16:56:21 2006 +0000 @@ -124,6 +124,7 @@ (defvar mouse-avoidance-pointer-shapes nil) (defvar mouse-avoidance-n-pointer-shapes 0) (defvar mouse-avoidance-old-pointer-shape nil) +(defvar mouse-avoidance-animating-pointer nil) ;; This timer is used to run something when Emacs is idle. (defvar mouse-avoidance-timer nil) @@ -243,16 +244,19 @@ (+ (cdr mouse-avoidance-state) deltay))) (if (or (eq mouse-avoidance-mode 'animate) (eq mouse-avoidance-mode 'proteus)) - (let ((i 0.0)) + (let ((i 0.0) + (incr (max .1 (/ 1.0 mouse-avoidance-nudge-dist)))) + (setq mouse-avoidance-animating-pointer t) (while (<= i 1) (mouse-avoidance-set-mouse-position (cons (+ (car cur-pos) (round (* i deltax))) (+ (cdr cur-pos) (round (* i deltay))))) - (setq i (+ i (max .1 (/ 1.0 mouse-avoidance-nudge-dist)))) + (setq i (+ i incr)) (if (eq mouse-avoidance-mode 'proteus) (mouse-avoidance-set-pointer-shape (mouse-avoidance-random-shape))) - (sit-for mouse-avoidance-animation-delay))) + (sit-for mouse-avoidance-animation-delay)) + (setq mouse-avoidance-animating-pointer nil)) (mouse-avoidance-set-mouse-position (cons (+ (car (cdr cur)) deltax) (+ (cdr (cdr cur)) deltay)))))) @@ -294,11 +298,11 @@ (memq 'drag modifiers) (memq 'down modifiers))))))) -(defun mouse-avoidance-banish-hook () +(defun mouse-avoidance-banish () (if (not (mouse-avoidance-ignore-p)) (mouse-avoidance-banish-mouse))) -(defun mouse-avoidance-exile-hook () +(defun mouse-avoidance-exile () ;; For exile mode, the state is nil when the mouse is in its normal ;; position, and set to the old mouse-position when the mouse is in exile. (if (not (mouse-avoidance-ignore-p)) @@ -317,9 +321,10 @@ ;; but clear state anyway, to be ready for another move (setq mouse-avoidance-state nil)))))) -(defun mouse-avoidance-fancy-hook () +(defun mouse-avoidance-fancy () ;; Used for the "fancy" modes, ie jump et al. - (if (and (not (mouse-avoidance-ignore-p)) + (if (and (not mouse-avoidance-animating-pointer) + (not (mouse-avoidance-ignore-p)) (mouse-avoidance-too-close-p (mouse-position))) (let ((old-pos (mouse-position))) (mouse-avoidance-nudge-mouse) @@ -375,14 +380,14 @@ (eq mode 'animate) (eq mode 'proteus)) (setq mouse-avoidance-timer - (run-with-idle-timer 0.1 t 'mouse-avoidance-fancy-hook)) + (run-with-idle-timer 0.1 t 'mouse-avoidance-fancy)) (setq mouse-avoidance-mode mode mouse-avoidance-state (cons 0 0) mouse-avoidance-old-pointer-shape (and (boundp 'x-pointer-shape) x-pointer-shape))) ((eq mode 'exile) (setq mouse-avoidance-timer - (run-with-idle-timer 0.1 t 'mouse-avoidance-exile-hook)) + (run-with-idle-timer 0.1 t 'mouse-avoidance-exile)) (setq mouse-avoidance-mode mode mouse-avoidance-state nil)) ((or (eq mode 'banish) @@ -390,7 +395,7 @@ (and (null mode) (null mouse-avoidance-mode)) (and mode (> (prefix-numeric-value mode) 0))) (setq mouse-avoidance-timer - (run-with-idle-timer 0.1 t 'mouse-avoidance-banish-hook)) + (run-with-idle-timer 0.1 t 'mouse-avoidance-banish)) (setq mouse-avoidance-mode 'banish)) (t (setq mouse-avoidance-mode nil))) (force-mode-line-update)) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/bindings.el --- a/lisp/bindings.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/bindings.el Sat Oct 14 16:56:21 2006 +0000 @@ -215,14 +215,6 @@ (make-variable-buffer-local 'mode-line-mule-info) -(defvar mode-line-buffer-identification (purecopy '("%12b")) "\ -Mode-line control for identifying the buffer being displayed. -Its default value is (\"%12b\"). -Major modes that edit things other than ordinary files may change this -\(e.g. Info, Dired,...)") - -(make-variable-buffer-local 'mode-line-buffer-identification) - (defvar mode-line-frame-identification '(window-system " " "-%F ") "Mode-line control to describe the current frame.") @@ -294,56 +286,102 @@ ;; mouse-1: select window, mouse-2: delete others, mouse-3: delete, ;; drag-mouse-1: resize, C-mouse-2: split horizontally" "mouse-1: select (drag to resize), mouse-2: delete others, mouse-3: delete this") - (dashes (propertize "--" 'help-echo help-echo))) - (setq-default mode-line-format - (list - "%e" - (propertize "-" 'help-echo help-echo) - 'mode-line-mule-info - 'mode-line-client - 'mode-line-modified - 'mode-line-frame-identification - 'mode-line-buffer-identification - (propertize " " 'help-echo help-echo) - 'mode-line-position - `(vc-mode ("" vc-mode ,(propertize " " 'help-echo help-echo))) - 'mode-line-modes - `(which-func-mode ("" which-func-format ,dashes)) - `(global-mode-string (,dashes global-mode-string)) - (propertize "-%-" 'help-echo help-echo))) + (dashes (propertize "--" 'help-echo help-echo)) + (standard-mode-line-format + (list + "%e" + (propertize "-" 'help-echo help-echo) + 'mode-line-mule-info + 'mode-line-client + 'mode-line-modified + 'mode-line-frame-identification + 'mode-line-buffer-identification + (propertize " " 'help-echo help-echo) + 'mode-line-position + '(vc-mode vc-mode) + (propertize " " 'help-echo help-echo) + 'mode-line-modes + `(which-func-mode ("" which-func-format ,dashes)) + `(global-mode-string (,dashes global-mode-string)) + (propertize "-%-" 'help-echo help-echo))) + (standard-mode-line-modes + (list + (propertize "%[(" 'help-echo help-echo) + `(:propertize ("" mode-name) + help-echo "mouse-1: major mode, mouse-2: major mode help, mouse-3: toggle minor modes" + mouse-face mode-line-highlight + local-map ,mode-line-major-mode-keymap) + '("" mode-line-process) + `(:propertize ("" minor-mode-alist) + mouse-face mode-line-highlight + help-echo "mouse-2: minor mode help, mouse-3: toggle minor modes" + local-map ,mode-line-minor-mode-keymap) + (propertize "%n" 'help-echo "mouse-2: widen" + 'mouse-face 'mode-line-highlight + 'local-map (make-mode-line-mouse-map + 'mouse-2 #'mode-line-widen)) + (propertize ")%]--" 'help-echo help-echo))) - (setq-default mode-line-modes - (list - (propertize "%[(" 'help-echo help-echo) - `(:propertize ("" mode-name) - help-echo "mouse-1: major mode, mouse-2: major mode help, mouse-3: toggle minor modes" - mouse-face mode-line-highlight - local-map ,mode-line-major-mode-keymap) - '("" mode-line-process) - `(:propertize ("" minor-mode-alist) - mouse-face mode-line-highlight - help-echo "mouse-2: minor mode help, mouse-3: toggle minor modes" - local-map ,mode-line-minor-mode-keymap) - (propertize "%n" 'help-echo "mouse-2: widen" - 'mouse-face 'mode-line-highlight - 'local-map (make-mode-line-mouse-map - 'mouse-2 #'mode-line-widen)) - (propertize ")%]--" 'help-echo help-echo))) + (standard-mode-line-position + `((-3 ,(propertize "%p" 'help-echo help-echo)) + (size-indication-mode + (8 ,(propertize " of %I" 'help-echo help-echo))) + (line-number-mode + ((column-number-mode + (10 ,(propertize " (%l,%c)" 'help-echo help-echo)) + (6 ,(propertize " L%l" 'help-echo help-echo)))) + ((column-number-mode + (5 ,(propertize " C%c" 'help-echo help-echo)))))))) - (setq-default mode-line-position - `((-3 ,(propertize "%p" 'help-echo help-echo)) - (size-indication-mode - (8 ,(propertize " of %I" 'help-echo help-echo))) - (line-number-mode - ((column-number-mode - (10 ,(propertize " (%l,%c)" 'help-echo help-echo)) - (6 ,(propertize " L%l" 'help-echo help-echo)))) - ((column-number-mode - (5 ,(propertize " C%c" 'help-echo help-echo)))))))) + (setq-default mode-line-format standard-mode-line-format) + (put 'mode-line-format 'standard-value + (list `(quote ,standard-mode-line-format))) + + (setq-default mode-line-modes standard-mode-line-modes) + (put 'mode-line-modes 'standard-value + (list `(quote ,standard-mode-line-modes))) + + (setq-default mode-line-position standard-mode-line-position) + (put 'mode-line-position 'standard-value + (list `(quote ,standard-mode-line-position)))) (defvar mode-line-buffer-identification-keymap nil "\ Keymap for what is displayed by `mode-line-buffer-identification'.") +;; Add menu of buffer operations to the buffer identification part +;; of the mode line.or header line. +; +(let ((map (make-sparse-keymap))) + ;; Bind down- events so that the global keymap won't ``shine + ;; through''. + (define-key map [mode-line mouse-1] 'mode-line-previous-buffer) + (define-key map [header-line down-mouse-1] 'ignore) + (define-key map [header-line mouse-1] 'mode-line-previous-buffer) + (define-key map [header-line down-mouse-3] 'ignore) + (define-key map [mode-line mouse-3] 'mode-line-next-buffer) + (define-key map [header-line down-mouse-3] 'ignore) + (define-key map [header-line mouse-3] 'mode-line-next-buffer) + (setq mode-line-buffer-identification-keymap map)) + +(defun propertized-buffer-identification (fmt) + "Return a list suitable for `mode-line-buffer-identification'. +FMT is a format specifier such as \"%12b\". This function adds +text properties for face, help-echo, and local-map to it." + (list (propertize fmt + 'face 'mode-line-buffer-id + 'help-echo + (purecopy "mouse-1: previous buffer, mouse-3: next buffer") + 'mouse-face 'mode-line-highlight + 'local-map mode-line-buffer-identification-keymap))) + +(defvar mode-line-buffer-identification (propertized-buffer-identification "%12b") "\ +Mode-line control for identifying the buffer being displayed. +Its default value is (\"%12b\") with some text properties added. +Major modes that edit things other than ordinary files may change this +\(e.g. Info, Dired,...)") + +(make-variable-buffer-local 'mode-line-buffer-identification) + (defun unbury-buffer () "\ Switch to the last buffer in the buffer list." (interactive) @@ -449,35 +487,6 @@ (let ((indicator (car (nth 4 (car (cdr event)))))) (describe-minor-mode-from-indicator indicator))) -;; Add menu of buffer operations to the buffer identification part -;; of the mode line.or header line. -; -(let ((map (make-sparse-keymap))) - ;; Bind down- events so that the global keymap won't ``shine - ;; through''. - (define-key map [mode-line mouse-1] 'mode-line-previous-buffer) - (define-key map [header-line down-mouse-1] 'ignore) - (define-key map [header-line mouse-1] 'mode-line-previous-buffer) - (define-key map [header-line down-mouse-3] 'ignore) - (define-key map [mode-line mouse-3] 'mode-line-next-buffer) - (define-key map [header-line down-mouse-3] 'ignore) - (define-key map [header-line mouse-3] 'mode-line-next-buffer) - (setq mode-line-buffer-identification-keymap map)) - -(defun propertized-buffer-identification (fmt) - "Return a list suitable for `mode-line-buffer-identification'. -FMT is a format specifier such as \"%12b\". This function adds -text properties for face, help-echo, and local-map to it." - (list (propertize fmt - 'face 'mode-line-buffer-id - 'help-echo - (purecopy "mouse-1: previous buffer, mouse-3: next buffer") - 'mouse-face 'mode-line-highlight - 'local-map mode-line-buffer-identification-keymap))) - -(setq-default mode-line-buffer-identification - (propertized-buffer-identification "%12b")) - (defvar minor-mode-alist nil "\ Alist saying how to show minor modes in the mode line. Each element looks like (VARIABLE STRING); diff -r 0c89a85addc3 -r 694bbb62a75d lisp/buff-menu.el --- a/lisp/buff-menu.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/buff-menu.el Sat Oct 14 16:56:21 2006 +0000 @@ -117,6 +117,7 @@ Auto Revert Mode.") (defvar Info-current-file) ;; from info.el +(defvar Info-current-node) ;; from info.el (make-variable-buffer-local 'Buffer-menu-files-only) @@ -786,7 +787,12 @@ ((eq file 'toc) (setq file "*Info TOC*")) ((not (stringp file)) ;; avoid errors - (setq file nil)))))) + (setq file nil)) + (t + (setq file (concat "(" + (file-name-nondirectory file) + ")" + Info-current-node))))))) (push (list buffer bits name (buffer-size) mode file) list)))))) ;; Preserve the original buffer-list ordering, just in case. diff -r 0c89a85addc3 -r 694bbb62a75d lisp/calendar/timeclock.el --- a/lisp/calendar/timeclock.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/calendar/timeclock.el Sat Oct 14 16:56:21 2006 +0000 @@ -95,7 +95,7 @@ :group 'timeclock) (defcustom timeclock-relative t - "*Whether to maken reported time relative to `timeclock-workday'. + "*Whether to make reported time relative to `timeclock-workday'. For example, if the length of a normal workday is eight hours, and you work four hours on Monday, then the amount of time \"remaining\" on Tuesday is twelve hours -- relative to an averaged work period of @@ -251,7 +251,10 @@ This value is not accurate enough to be useful by itself. Rather, call `timeclock-workday-elapsed', to determine how much time has been worked so far today. Also, if `timeclock-relative' is nil, this value -will be the same as `timeclock-discrepancy'.") ; ? gm +will be the same as `timeclock-discrepancy'.") + +(defvar timeclock-use-elapsed nil + "Non-nil if the modeline should display time elapsed, not remaining.") (defvar timeclock-last-period nil "Integer representing the number of seconds in the last period. @@ -424,7 +427,9 @@ If TODAY-ONLY is non-nil, the display will be relative only to time worked today, ignoring the time worked on previous days." (interactive "P") - (let ((remainder (timeclock-workday-remaining)) ; today-only? + (let ((remainder (timeclock-workday-remaining + (or today-only + (not timeclock-relative)))) (last-in (equal (car timeclock-last-event) "i")) status) (setq status @@ -619,7 +624,10 @@ The value of `timeclock-relative' affects the display as described in that variable's documentation." (interactive) - (let ((remainder (timeclock-workday-remaining (not timeclock-relative))) + (let ((remainder + (if timeclock-use-elapsed + (timeclock-workday-elapsed) + (timeclock-workday-remaining (not timeclock-relative)))) (last-in (equal (car timeclock-last-event) "i"))) (when (and (< remainder 0) (not (and timeclock-day-over diff -r 0c89a85addc3 -r 694bbb62a75d lisp/compare-w.el --- a/lisp/compare-w.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/compare-w.el Sat Oct 14 16:56:21 2006 +0000 @@ -167,16 +167,14 @@ on second call it synchronizes points by skipping the difference, on third call it again advances points to the next difference and so on." (interactive "P") + (if compare-ignore-whitespace + (setq ignore-whitespace (not ignore-whitespace))) (let* (p1 p2 maxp1 maxp2 b1 b2 w2 (progress 1) (opoint1 (point)) opoint2 - (skip-func (if (if ignore-whitespace ; XOR - (not compare-ignore-whitespace) - compare-ignore-whitespace) - (if (stringp compare-windows-whitespace) - 'compare-windows-skip-whitespace - compare-windows-whitespace))) + skip-func-1 + skip-func-2 (sync-func (if (stringp compare-windows-sync) 'compare-windows-sync-regexp compare-windows-sync))) @@ -190,8 +188,21 @@ b2 (window-buffer w2)) (setq opoint2 p2) (setq maxp1 (point-max)) - (save-excursion - (set-buffer b2) + + (setq skip-func-1 (if ignore-whitespace + (if (stringp compare-windows-whitespace) + (lambda (pos) + (compare-windows-skip-whitespace pos) + t) + compare-windows-whitespace))) + + (with-current-buffer b2 + (setq skip-func-2 (if ignore-whitespace + (if (stringp compare-windows-whitespace) + (lambda (pos) + (compare-windows-skip-whitespace pos) + t) + compare-windows-whitespace))) (push-mark p2 t) (setq maxp2 (point-max))) (push-mark) @@ -199,17 +210,16 @@ (while (> progress 0) ;; If both windows have whitespace next to point, ;; optionally skip over it. - (and skip-func + (and skip-func-1 (save-excursion (let (p1a p2a w1 w2 result1 result2) - (setq result1 (funcall skip-func opoint1)) + (setq result1 (funcall skip-func-1 opoint1)) (setq p1a (point)) (set-buffer b2) (goto-char p2) - (setq result2 (funcall skip-func opoint2)) + (setq result2 (funcall skip-func-2 opoint2)) (setq p2a (point)) - (if (or (stringp compare-windows-whitespace) - (and result1 result2 (eq result1 result2))) + (if (and result1 result2 (eq result1 result2)) (setq p1 p1a p2 p2a))))) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/complete.el --- a/lisp/complete.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/complete.el Sat Oct 14 16:56:21 2006 +0000 @@ -543,8 +543,8 @@ (let ((compl (all-completions (if env-on (file-name-nondirectory (substring str 0 p)) (substring str 0 p)) - table - pred))) + table + pred))) (setq p compl) (while p (and (string-match regex (car p)) @@ -553,6 +553,34 @@ (setq poss (cons (car p) poss)))) (setq p (cdr p))))) + ;; Handle completion-ignored-extensions + (and filename + (not (eq mode 'help)) + (let ((p2 poss)) + + ;; Build a regular expression representing the extensions list + (or (equal completion-ignored-extensions PC-ignored-extensions) + (setq PC-ignored-regexp + (concat "\\(" + (mapconcat + 'regexp-quote + (setq PC-ignored-extensions + completion-ignored-extensions) + "\\|") + "\\)\\'"))) + + ;; Check if there are any without an ignored extension. + ;; Also ignore `.' and `..'. + (setq p nil) + (while p2 + (or (string-match PC-ignored-regexp (car p2)) + (string-match "\\(\\`\\|/\\)[.][.]?/?\\'" (car p2)) + (setq p (cons (car p2) p))) + (setq p2 (cdr p2))) + + ;; If there are "good" names, use them + (and p (setq poss p)))) + ;; Now we have a list of possible completions (cond @@ -575,34 +603,6 @@ ((or (cdr (setq helpposs poss)) (memq mode '(help word))) - ;; Handle completion-ignored-extensions - (and filename - (not (eq mode 'help)) - (let ((p2 poss)) - - ;; Build a regular expression representing the extensions list - (or (equal completion-ignored-extensions PC-ignored-extensions) - (setq PC-ignored-regexp - (concat "\\(" - (mapconcat - 'regexp-quote - (setq PC-ignored-extensions - completion-ignored-extensions) - "\\|") - "\\)\\'"))) - - ;; Check if there are any without an ignored extension. - ;; Also ignore `.' and `..'. - (setq p nil) - (while p2 - (or (string-match PC-ignored-regexp (car p2)) - (string-match "\\(\\`\\|/\\)[.][.]?/?\\'" (car p2)) - (setq p (cons (car p2) p))) - (setq p2 (cdr p2))) - - ;; If there are "good" names, use them - (and p (setq poss p)))) - ;; Is the actual string one of the possible completions? (setq p (and (not (eq mode 'help)) poss)) (while (and p @@ -623,7 +623,8 @@ ;; Check if next few letters are the same in all cases (if (and (not (eq mode 'help)) - (setq prefix (try-completion (PC-chunk-after basestr skip) (mapcar 'list poss)))) + (setq prefix (try-completion (PC-chunk-after basestr skip) + poss))) (let ((first t) i) ;; Retain capitalization of user input even if ;; completion-ignore-case is set. @@ -669,13 +670,9 @@ (+ beg (length dirname)) end) skip) (mapcar - (function - (lambda (x) - (list - (and (string-match skip x) - (substring - x - (match-end 0)))))) + (lambda (x) + (when (string-match skip x) + (substring x (match-end 0)))) poss))) (or (> i 0) (> (length prefix) 0)) (or (not (eq mode 'word)) @@ -811,6 +808,12 @@ (defun PC-expand-many-files (name) (with-current-buffer (generate-new-buffer " *Glob Output*") (erase-buffer) + (when (and (file-name-absolute-p name) + (not (file-directory-p default-directory))) + ;; If the current working directory doesn't exist `shell-command' + ;; signals an error. So if the file names we're looking for don't + ;; depend on the working directory, switch to a valid directory first. + (setq default-directory "/")) (shell-command (concat "echo " name) t) (goto-char (point-min)) ;; CSH-style shells were known to output "No match", whereas diff -r 0c89a85addc3 -r 694bbb62a75d lisp/cus-edit.el --- a/lisp/cus-edit.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/cus-edit.el Sat Oct 14 16:56:21 2006 +0000 @@ -4435,9 +4435,8 @@ ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. (let ((map (make-keymap))) (set-keymap-parent map widget-keymap) - (define-key map [remap self-insert-command] - 'custom-no-edit) - (define-key map "\^m" 'custom-no-edit) + (define-key map [remap self-insert-command] 'custom-no-edit) + (define-key map "\^m" 'custom-newline) (define-key map " " 'scroll-up) (define-key map "\177" 'scroll-down) (define-key map "\C-c\C-c" 'Custom-set) @@ -4452,6 +4451,11 @@ (defun custom-no-edit (pos &optional event) "Invoke button at POS, or refuse to allow editing of Custom buffer." (interactive "@d") + (error "You can't edit this part of the Custom buffer")) + +(defun custom-newline (pos &optional event) + "Invoke button at POS, or refuse to allow editing of Custom buffer." + (interactive "@d") (let ((button (get-char-property pos 'button))) (if button (widget-apply-action button event) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/cus-start.el --- a/lisp/cus-start.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/cus-start.el Sat Oct 14 16:56:21 2006 +0000 @@ -175,7 +175,7 @@ ;; fringe.c (overflow-newline-into-fringe fringe boolean) ;; indent.c - (indent-tabs-mode fill boolean) + (indent-tabs-mode indent boolean) ;; keyboard.c (meta-prefix-char keyboard character) (auto-save-interval auto-save integer) @@ -360,6 +360,7 @@ (other :tag "Unlimited" t))) (unibyte-display-via-language-environment mule boolean) (blink-cursor-alist cursor alist "22.1") + (overline-margin display integer "22.1") ;; xfaces.c (scalable-fonts-allowed display boolean) ;; xfns.c @@ -371,6 +372,7 @@ ;; xterm.c (mouse-autoselect-window display boolean "21.3") (x-use-underline-position-properties display boolean "21.3") + (x-underline-at-descent-line display boolean "22.1") (x-stretch-cursor display boolean "21.1"))) this symbol group type standard version native-p ;; This function turns a value diff -r 0c89a85addc3 -r 694bbb62a75d lisp/cus-theme.el --- a/lisp/cus-theme.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/cus-theme.el Sat Oct 14 16:56:21 2006 +0000 @@ -99,7 +99,7 @@ (widget-insert " ") (widget-create 'push-button :notify (lambda (&rest ignore) - (when (y-or-n-p "Discard current changes?") + (when (y-or-n-p "Discard current changes? ") (kill-buffer (current-buffer)) (customize-create-theme))) "Reset Buffer") @@ -137,7 +137,7 @@ (widget-insert "\n") (widget-create 'push-button :notify (lambda (&rest ignore) - (when (y-or-n-p "Discard current changes?") + (when (y-or-n-p "Discard current changes? ") (kill-buffer (current-buffer)) (customize-create-theme))) "Reset Buffer") @@ -290,7 +290,7 @@ (defun custom-theme-visit-theme () (interactive) (when (or (null custom-theme-variables) - (if (y-or-n-p "Discard current changes?") + (if (y-or-n-p "Discard current changes? ") (progn (customize-create-theme) t))) (let ((theme (call-interactively 'custom-theme-merge-theme))) (unless (eq theme 'user) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/ediff-mult.el --- a/lisp/ediff-mult.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/ediff-mult.el Sat Oct 14 16:56:21 2006 +0000 @@ -648,8 +648,8 @@ (mapcar (lambda (elt) (ediff-make-new-meta-list-element - (concat auxdir1 elt) - (concat auxdir2 elt) + (expand-file-name (concat auxdir1 elt)) + (expand-file-name (concat auxdir2 elt)) (if lis3 (progn ;; The following is done because: In merging with @@ -660,7 +660,7 @@ ;; the second case, we insert nil. (setq elt (ediff-add-slash-if-directory auxdir3 elt)) (if (file-exists-p (concat auxdir3 elt)) - (concat auxdir3 elt)))))) + (expand-file-name (concat auxdir3 elt))))))) common))) ;; return result (cons common-part difflist) @@ -716,7 +716,7 @@ auxdir1 nil nil merge-autostore-dir nil) (mapcar (lambda (elt) (ediff-make-new-meta-list-element - (concat auxdir1 elt) nil nil)) + (expand-file-name (concat auxdir1 elt)) nil nil)) common)) )) @@ -1338,7 +1338,10 @@ ;; update ediff-meta-list by direct modification (nconc meta-list (list (ediff-make-new-meta-list-element - otherfile1 otherfile2 otherfile3))) + (expand-file-name otherfile1) + (expand-file-name otherfile2) + (if otherfile3 + (expand-file-name otherfile3))))) ) (ediff-update-meta-buffer meta-buf 'must-redraw) )) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/edmacro.el --- a/lisp/edmacro.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/edmacro.el Sat Oct 14 16:56:21 2006 +0000 @@ -670,6 +670,7 @@ (cond ((atom ev) (push ev result)) ((eq (car ev) 'help-echo)) + ((eq (car ev) 'switch-frame)) ((equal ev '(menu-bar)) (push 'menu-bar result)) ((equal (cadadr ev) '(menu-bar)) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emacs-lisp/bindat.el --- a/lisp/emacs-lisp/bindat.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emacs-lisp/bindat.el Sat Oct 14 16:56:21 2006 +0000 @@ -619,9 +619,12 @@ (bindat-format-vector vect "%02x" (if (stringp sep) sep ":"))) (defun bindat-ip-to-string (ip) - "Format vector IP as an ip address in dotted notation." - (format "%d.%d.%d.%d" - (aref ip 0) (aref ip 1) (aref ip 2) (aref ip 3))) + "Format vector IP as an ip address in dotted notation. +The port (if any) is omitted. IP can be a string, as well." + (if (vectorp ip) + (format-network-address ip t) + (format "%d.%d.%d.%d" + (aref ip 0) (aref ip 1) (aref ip 2) (aref ip 3)))) (provide 'bindat) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emacs-lisp/checkdoc.el --- a/lisp/emacs-lisp/checkdoc.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emacs-lisp/checkdoc.el Sat Oct 14 16:56:21 2006 +0000 @@ -193,8 +193,14 @@ (defvar compilation-error-regexp-alist) (defvar compilation-mode-font-lock-keywords) +(defgroup checkdoc nil + "Support for doc string checking in Emacs Lisp." + :prefix "checkdoc" + :group 'lisp + :version "20.3") + (defcustom checkdoc-autofix-flag 'semiautomatic - "*Non-nil means attempt auto-fixing of doc strings. + "Non-nil means attempt auto-fixing of doc strings. If this value is the symbol `query', then the user is queried before any change is made. If the value is `automatic', then all changes are made without asking unless the change is very-complex. If the value @@ -208,37 +214,39 @@ (other :tag "semiautomatic" semiautomatic))) (defcustom checkdoc-bouncy-flag t - "*Non-nil means to \"bounce\" to auto-fix locations. + "Non-nil means to \"bounce\" to auto-fix locations. Setting this to nil will silently make fixes that require no user interaction. See `checkdoc-autofix-flag' for auto-fixing details." :group 'checkdoc :type 'boolean) (defcustom checkdoc-force-docstrings-flag t - "*Non-nil means that all checkable definitions should have documentation. + "Non-nil means that all checkable definitions should have documentation. Style guide dictates that interactive functions MUST have documentation, and that it's good but not required practice to make non user visible items have doc strings." :group 'checkdoc :type 'boolean) +(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp) (defcustom checkdoc-force-history-flag t - "*Non-nil means that files should have a History section or ChangeLog file. + "Non-nil means that files should have a History section or ChangeLog file. This helps document the evolution of, and recent changes to, the package." :group 'checkdoc :type 'boolean) (defcustom checkdoc-permit-comma-termination-flag nil - "*Non-nil means the first line of a docstring may end with a comma. + "Non-nil means the first line of a docstring may end with a comma. Ordinarily, a full sentence is required. This may be misleading when there is a substantial caveat to the one-line description -- the comma should be used when the first part could stand alone as a sentence, but it indicates that a modifying clause follows." :group 'checkdoc :type 'boolean) +(put 'checkdoc-permit-comma-termination-flag 'safe-local-variable 'booleanp) (defcustom checkdoc-spellcheck-documentation-flag nil - "*Non-nil means run Ispell on text based on value. + "Non-nil means run Ispell on text based on value. This is automatically set to nil if Ispell does not exist on your system. Possible values are: @@ -259,14 +267,14 @@ "List of words that are correct when spell-checking Lisp documentation.") (defcustom checkdoc-max-keyref-before-warn 10 - "*The number of \\ [command-to-keystroke] tokens allowed in a doc string. + "The number of \\ [command-to-keystroke] tokens allowed in a doc string. Any more than this and a warning is generated suggesting that the construct \\ {keymap} be used instead." :group 'checkdoc :type 'integer) (defcustom checkdoc-arguments-in-order-flag t - "*Non-nil means warn if arguments appear out of order. + "Non-nil means warn if arguments appear out of order. Setting this to nil will mean only checking that all the arguments appear in the proper form in the documentation, not that they are in the same order as they appear in the argument list. No mention is @@ -298,7 +306,7 @@ A search leaves the cursor in front of the parameter list.") (defcustom checkdoc-verb-check-experimental-flag t - "*Non-nil means to attempt to check the voice of the doc string. + "Non-nil means to attempt to check the voice of the doc string. This check keys off some words which are commonly misused. See the variable `checkdoc-common-verbs-wrong-voice' if you wish to add your own." :group 'checkdoc @@ -2633,12 +2641,6 @@ (setq checkdoc-pending-errors nil) nil))) -(defgroup checkdoc nil - "Support for doc string checking in Emacs Lisp." - :prefix "checkdoc" - :group 'lisp - :version "20.3") - (custom-add-option 'emacs-lisp-mode-hook (lambda () (checkdoc-minor-mode 1))) @@ -2650,5 +2652,5 @@ (provide 'checkdoc) -;;; arch-tag: c49a7ec8-3bb7-46f2-bfbc-d5f26e033b26 +;; arch-tag: c49a7ec8-3bb7-46f2-bfbc-d5f26e033b26 ;;; checkdoc.el ends here diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emacs-lisp/edebug.el --- a/lisp/emacs-lisp/edebug.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emacs-lisp/edebug.el Sat Oct 14 16:56:21 2006 +0000 @@ -2556,6 +2556,7 @@ (edebug-outside-buffer (current-buffer)) (edebug-outside-point (point)) (edebug-outside-mark (edebug-mark)) + (edebug-outside-unread-command-events unread-command-events) edebug-outside-windows ; window or screen configuration edebug-buffer-points @@ -2574,6 +2575,7 @@ (overlay-arrow-string overlay-arrow-string) (cursor-in-echo-area nil) (default-cursor-in-non-selected-windows t) + (unread-command-events unread-command-events) ;; any others?? ) (if (not (buffer-name edebug-buffer)) @@ -2662,6 +2664,7 @@ (t (message ""))) + (setq unread-command-events nil) (if (eq 'after edebug-arg-mode) (progn ;; Display result of previous evaluation. @@ -2681,8 +2684,7 @@ ((eq edebug-execution-mode 'trace) (edebug-sit-for edebug-sit-for-seconds)) ; Force update and pause. ((eq edebug-execution-mode 'Trace-fast) - (edebug-sit-for 0)) ; Force update and continue. - ) + (edebug-sit-for 0))) ; Force update and continue. (unwind-protect (if (or edebug-stop @@ -2778,6 +2780,7 @@ (with-timeout-unsuspend edebug-with-timeout-suspend) ;; Reset global variables to outside values in case they were changed. (setq + unread-command-events edebug-outside-unread-command-events overlay-arrow-position edebug-outside-o-a-p overlay-arrow-string edebug-outside-o-a-s cursor-in-echo-area edebug-outside-c-i-e-a @@ -2868,7 +2871,6 @@ (edebug-outside-last-input-event last-input-event) (edebug-outside-last-command-event last-command-event) - (edebug-outside-unread-command-events unread-command-events) (edebug-outside-last-event-frame last-event-frame) (edebug-outside-last-nonmenu-event last-nonmenu-event) (edebug-outside-track-mouse track-mouse) @@ -2890,7 +2892,6 @@ ;; More for Emacs 19 (last-input-event nil) (last-command-event nil) - (unread-command-events nil) (last-event-frame nil) (last-nonmenu-event nil) (track-mouse nil) @@ -2950,7 +2951,6 @@ last-command edebug-outside-last-command this-command edebug-outside-this-command unread-command-char edebug-outside-unread-command-char - unread-command-events edebug-outside-unread-command-events current-prefix-arg edebug-outside-current-prefix-arg last-input-char edebug-outside-last-input-char last-input-event edebug-outside-last-input-event diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emacs-lisp/timer.el --- a/lisp/emacs-lisp/timer.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emacs-lisp/timer.el Sat Oct 14 16:56:21 2006 +0000 @@ -60,14 +60,22 @@ (defun timer-set-idle-time (timer secs &optional repeat) "Set the trigger idle time of TIMER to SECS. +SECS may be an integer, floating point number, or the internal +time format (HIGH LOW USECS) returned by, e.g., `current-idle-time'. If optional third argument REPEAT is non-nil, make the timer fire each time Emacs is idle for that many seconds." (or (timerp timer) (error "Invalid timer")) - (aset timer 1 0) - (aset timer 2 0) - (aset timer 3 0) - (timer-inc-time timer secs) + (if (consp secs) + (progn (aset timer 1 (car secs)) + (aset timer 2 (if (consp (cdr secs)) (car (cdr secs)) (cdr secs))) + (aset timer 3 (or (and (consp (cdr secs)) (consp (cdr (cdr secs))) + (nth 2 secs)) + 0))) + (aset timer 1 0) + (aset timer 2 0) + (aset timer 3 0) + (timer-inc-time timer secs)) (aset timer 4 repeat) timer) @@ -104,7 +112,7 @@ (defun timer-relative-time (time secs &optional usecs) "Advance TIME by SECS seconds and optionally USECS microseconds. -SECS may be a fraction." +SECS may be either an integer or a floating point number." (let ((high (car time)) (low (if (consp (cdr time)) (nth 1 time) (cdr time))) (micro (if (numberp (car-safe (cdr-safe (cdr time)))) @@ -412,7 +420,10 @@ (defun run-with-idle-timer (secs repeat function &rest args) "Perform an action the next time Emacs is idle for SECS seconds. The action is to call FUNCTION with arguments ARGS. -SECS may be an integer or a floating point number. +SECS may be an integer, a floating point number, or the internal +time format (HIGH LOW USECS) returned by, e.g., `current-idle-time'. +If Emacs is currently idle, and has been idle for N seconds (N < SECS), +then it will call FUNCTION in SECS - N seconds from now. If REPEAT is non-nil, do the action each time Emacs has been idle for exactly SECS seconds (that is, only once for each time Emacs becomes idle). @@ -425,7 +436,7 @@ (let ((timer (timer-create))) (timer-set-function timer function args) (timer-set-idle-time timer secs repeat) - (timer-activate-when-idle timer) + (timer-activate-when-idle timer t) timer)) (defun with-timeout-handler (tag) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emacs-lisp/tq.el --- a/lisp/emacs-lisp/tq.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emacs-lisp/tq.el Sat Oct 14 16:56:21 2006 +0000 @@ -66,7 +66,7 @@ ;; regexp: regular expression that matches the end of a response from ;; the process (defun tq-queue-head-regexp (tq) (car (cdr (car (tq-queue tq))))) -;; closure: additional data to pass to function +;; closure: additional data to pass to the function (defun tq-queue-head-closure (tq) (car (cdr (cdr (car (tq-queue tq)))))) ;; fn: function to call upon receiving a complete response from the ;; process @@ -119,7 +119,7 @@ the process has finished replying to any previous questions. This produces more reliable results with some processes." (let ((sendp (or (not delay-question) - (not (tq-queue-head-question tq))))) + (not (tq-queue tq))))) (tq-queue-add tq (unless sendp question) regexp closure fn) (when sendp (process-send-string (tq-process tq) question)))) @@ -131,35 +131,39 @@ (defun tq-filter (tq string) "Append STRING to the TQ's buffer; then process the new data." - (with-current-buffer (tq-buffer tq) - (goto-char (point-max)) - (insert string) - (tq-process-buffer tq))) + (let ((buffer (tq-buffer tq))) + (when (buffer-live-p buffer) + (with-current-buffer buffer + (goto-char (point-max)) + (insert string) + (tq-process-buffer tq))))) (defun tq-process-buffer (tq) "Check TQ's buffer for the regexp at the head of the queue." - (set-buffer (tq-buffer tq)) - (if (= 0 (buffer-size)) () - (if (tq-queue-empty tq) - (let ((buf (generate-new-buffer "*spurious*"))) - (copy-to-buffer buf (point-min) (point-max)) - (delete-region (point-min) (point)) - (pop-to-buffer buf nil) - (error "Spurious communication from process %s, see buffer %s" - (process-name (tq-process tq)) - (buffer-name buf))) - (goto-char (point-min)) - (if (re-search-forward (tq-queue-head-regexp tq) nil t) - (let ((answer (buffer-substring (point-min) (point)))) - (delete-region (point-min) (point)) - (unwind-protect - (condition-case nil - (funcall (tq-queue-head-fn tq) - (tq-queue-head-closure tq) - answer) - (error nil)) - (tq-queue-pop tq)) - (tq-process-buffer tq)))))) + (let ((buffer (tq-buffer tq))) + (when (buffer-live-p buffer) + (set-buffer buffer) + (if (= 0 (buffer-size)) () + (if (tq-queue-empty tq) + (let ((buf (generate-new-buffer "*spurious*"))) + (copy-to-buffer buf (point-min) (point-max)) + (delete-region (point-min) (point)) + (pop-to-buffer buf nil) + (error "Spurious communication from process %s, see buffer %s" + (process-name (tq-process tq)) + (buffer-name buf))) + (goto-char (point-min)) + (if (re-search-forward (tq-queue-head-regexp tq) nil t) + (let ((answer (buffer-substring (point-min) (point)))) + (delete-region (point-min) (point)) + (unwind-protect + (condition-case nil + (funcall (tq-queue-head-fn tq) + (tq-queue-head-closure tq) + answer) + (error nil)) + (tq-queue-pop tq)) + (tq-process-buffer tq)))))))) (provide 'tq) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emulation/viper-cmd.el --- a/lisp/emulation/viper-cmd.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emulation/viper-cmd.el Sat Oct 14 16:56:21 2006 +0000 @@ -46,6 +46,8 @@ (defvar mark-even-if-inactive) (defvar init-message) (defvar initial) +(defvar undo-beg-posn) +(defvar undo-end-posn) ;; loading happens only in non-interactive compilation ;; in order to spare non-viperized emacs from being viperized @@ -196,7 +198,7 @@ (viper-save-cursor-color 'before-insert-mode)) ;; set insert mode cursor color (viper-change-cursor-color viper-insert-state-cursor-color))) - (if (eq viper-current-state 'emacs-state) + (if (and viper-emacs-state-cursor-color (eq viper-current-state 'emacs-state)) (let ((has-saved-cursor-color-in-emacs-mode (stringp (viper-get-saved-cursor-color-in-emacs-mode)))) (or has-saved-cursor-color-in-emacs-mode @@ -722,12 +724,13 @@ (viper-set-replace-overlay (point-min) (point-min))) (viper-hide-replace-overlay) - (let ((has-saved-cursor-color-in-emacs-mode - (stringp (viper-get-saved-cursor-color-in-emacs-mode)))) - (or has-saved-cursor-color-in-emacs-mode - (string= (viper-get-cursor-color) viper-emacs-state-cursor-color) - (viper-save-cursor-color 'before-emacs-mode)) - (viper-change-cursor-color viper-emacs-state-cursor-color)) + (if viper-emacs-state-cursor-color + (let ((has-saved-cursor-color-in-emacs-mode + (stringp (viper-get-saved-cursor-color-in-emacs-mode)))) + (or has-saved-cursor-color-in-emacs-mode + (string= (viper-get-cursor-color) viper-emacs-state-cursor-color) + (viper-save-cursor-color 'before-emacs-mode)) + (viper-change-cursor-color viper-emacs-state-cursor-color))) (viper-change-state 'emacs-state) @@ -1030,10 +1033,13 @@ (inhibit-quit t)) (if (viper-ESC-event-p event) (progn - ;; Emacs 22.50.8 introduced a bug, which makes even a single ESC into - ;; a fast keyseq. To guard against this, we added a check if there - ;; are other events as well - (if (and (viper-fast-keysequence-p) unread-command-events) + ;; Some versions of Emacs (eg., 22.50.8 have a bug, which makes even + ;; a single ESC into ;; a fast keyseq. To guard against this, we + ;; added a check if there are other events as well. Keep the next + ;; line for the next time the bug reappears, so that will remember to + ;; report it. + ;;(if (and (viper-fast-keysequence-p) unread-command-events) + (if (viper-fast-keysequence-p) ;; for Emacsen without the above bug (progn (let (minor-mode-map-alist emulation-mode-map-alists) (viper-set-unread-command-events event) @@ -1744,12 +1750,14 @@ ;; Hook used in viper-undo (defun viper-after-change-undo-hook (beg end len) - (setq undo-beg-posn beg - undo-end-posn (or end beg)) - ;; some other hooks may be changing various text properties in - ;; the buffer in response to 'undo'; so remove this hook to avoid - ;; its repeated invocation - (remove-hook 'viper-undo-functions 'viper-after-change-undo-hook 'local)) + (if undo-in-progress + (setq undo-beg-posn beg + undo-end-posn (or end beg)) + ;; some other hooks may be changing various text properties in + ;; the buffer in response to 'undo'; so remove this hook to avoid + ;; its repeated invocation + (remove-hook 'viper-undo-functions 'viper-after-change-undo-hook 'local) + )) (defun viper-undo () "Undo previous change." @@ -1764,25 +1772,29 @@ (undo-start) (undo-more 2) - (setq undo-beg-posn (or undo-beg-posn before-undo-pt) - undo-end-posn (or undo-end-posn undo-beg-posn)) - - (goto-char undo-beg-posn) - (sit-for 0) - (if (and viper-keep-point-on-undo - (pos-visible-in-window-p before-undo-pt)) + ;;(setq undo-beg-posn (or undo-beg-posn (point)) + ;; undo-end-posn (or undo-end-posn (point))) + ;;(setq undo-beg-posn (or undo-beg-posn before-undo-pt) + ;; undo-end-posn (or undo-end-posn undo-beg-posn)) + + (if (and undo-beg-posn undo-end-posn) (progn - (push-mark (point-marker) t) - (viper-sit-for-short 300) - (goto-char undo-end-posn) - (viper-sit-for-short 300) - (if (and (> (viper-chars-in-region undo-beg-posn before-undo-pt) 1) - (> (viper-chars-in-region undo-end-posn before-undo-pt) 1)) - (goto-char before-undo-pt) - (goto-char undo-beg-posn))) - (push-mark before-undo-pt t)) + (goto-char undo-beg-posn) + (sit-for 0) + (if (and viper-keep-point-on-undo + (pos-visible-in-window-p before-undo-pt)) + (progn + (push-mark (point-marker) t) + (viper-sit-for-short 300) + (goto-char undo-end-posn) + (viper-sit-for-short 300) + (if (pos-visible-in-window-p undo-beg-posn) + (goto-char before-undo-pt) + (goto-char undo-beg-posn))) + (push-mark before-undo-pt t)) + )) + (if (and (eolp) (not (bolp))) (backward-char 1)) - ;;(if (not modified) (set-buffer-modified-p t)) ) (setq this-command 'viper-undo)) @@ -3952,7 +3964,8 @@ (let ((val (viper-p-val arg)) (com (viper-getcom arg)) debug-on-error) - (if (null viper-s-string) (error viper-NoPrevSearch)) + (if (or (null viper-s-string) (string= viper-s-string "")) + (error viper-NoPrevSearch)) (viper-search viper-s-string viper-s-forward arg) (if com (progn diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emulation/viper-ex.el --- a/lisp/emulation/viper-ex.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emulation/viper-ex.el Sat Oct 14 16:56:21 2006 +0000 @@ -208,12 +208,12 @@ ;; If this is a one-letter magic command, splice in args. (defun ex-splice-args-in-1-letr-cmd (key list) - (let ((onelet (ex-cmd-is-one-letter (assoc (substring key 0 1) list)))) - (if onelet + (let ((oneletter (ex-cmd-is-one-letter (assoc (substring key 0 1) list)))) + (if oneletter (list key - (append (cadr onelet) + (append (cadr oneletter) (if (< 1 (length key)) (list (substring key 1)))) - (caddr onelet))) + (car (cdr (cdr oneletter))) )) )) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emulation/viper-init.el --- a/lisp/emulation/viper-init.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emulation/viper-init.el Sat Oct 14 16:56:21 2006 +0000 @@ -434,7 +434,10 @@ (if (fboundp 'make-variable-frame-local) (make-variable-frame-local 'viper-insert-state-cursor-color)) -(defcustom viper-emacs-state-cursor-color "Magenta" +;; viper-emacs-state-cursor-color doesn't work well. Causes cursor colors to be +;; confused in some cases. So, this var is nulled for now. +;; (defcustom viper-emacs-state-cursor-color "Magenta" +(defcustom viper-emacs-state-cursor-color nil "Cursor color when Viper is in emacs state." :type 'string :group 'viper) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emulation/viper-util.el --- a/lisp/emulation/viper-util.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emulation/viper-util.el Sat Oct 14 16:56:21 2006 +0000 @@ -137,10 +137,10 @@ (x-display-color-p) ; emacs )) -(defsubst viper-get-cursor-color () +(defun viper-get-cursor-color (&optional frame) (viper-cond-compile-for-xemacs-or-emacs (color-instance-name - (frame-property (selected-frame) 'cursor-color)) ; xemacs + (frame-property (or frame (selected-frame)) 'cursor-color)) ; xemacs (cdr (assoc 'cursor-color (frame-parameters))) ; emacs )) @@ -152,18 +152,31 @@ ;; cursor colors -(defun viper-change-cursor-color (new-color) +(defun viper-change-cursor-color (new-color &optional frame) (if (and (viper-window-display-p) (viper-color-display-p) (stringp new-color) (viper-color-defined-p new-color) (not (string= new-color (viper-get-cursor-color)))) (viper-cond-compile-for-xemacs-or-emacs (set-frame-property - (selected-frame) 'cursor-color (make-color-instance new-color)) + (or frame (selected-frame)) + 'cursor-color (make-color-instance new-color)) (modify-frame-parameters - (selected-frame) (list (cons 'cursor-color new-color))) + (or frame (selected-frame)) + (list (cons 'cursor-color new-color))) ) )) +(defun viper-set-cursor-color-according-to-state (&optional frame) + (cond ((eq viper-current-state 'replace-state) + (viper-change-cursor-color viper-replace-state-cursor-color frame)) + ((and (eq viper-current-state 'emacs-state) + viper-emacs-state-cursor-color) + (viper-change-cursor-color viper-emacs-state-cursor-color frame)) + ((eq viper-current-state 'insert-state) + (viper-change-cursor-color viper-insert-state-cursor-color frame)) + (t + (viper-change-cursor-color viper-vi-state-cursor-color frame)))) + ;; By default, saves current frame cursor color in the ;; viper-saved-cursor-color-in-replace-mode property of viper-replace-overlay (defun viper-save-cursor-color (before-which-mode) @@ -191,7 +204,7 @@ (if viper-emacs-p 'frame-parameter 'frame-property) (selected-frame) 'viper-saved-cursor-color-in-replace-mode) - (if (eq viper-current-state 'emacs-mode) + (if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color) viper-emacs-state-cursor-color viper-vi-state-cursor-color))) @@ -201,7 +214,7 @@ (if viper-emacs-p 'frame-parameter 'frame-property) (selected-frame) 'viper-saved-cursor-color-in-insert-mode) - (if (eq viper-current-state 'emacs-mode) + (if (and (eq viper-current-state 'emacs-mode) viper-emacs-state-cursor-color) viper-emacs-state-cursor-color viper-vi-state-cursor-color))) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/emulation/viper.el --- a/lisp/emulation/viper.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/emulation/viper.el Sat Oct 14 16:56:21 2006 +0000 @@ -534,10 +534,6 @@ (defun viper-mode () "Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Viper'." (interactive) - (if (null viper-vi-state-cursor-color) - (modify-frame-parameters - (selected-frame) - (list (cons 'viper-vi-state-cursor-color (viper-get-cursor-color))))) (if (not noninteractive) (progn ;; if the user requested viper-mode explicitly @@ -618,7 +614,8 @@ (or (memq major-mode viper-emacs-state-mode-list) ; don't switch to Vi (memq major-mode viper-insert-state-mode-list) ; don't switch - (viper-change-state-to-vi))))) + (viper-change-state-to-vi)) + ))) ;; Apply a little heuristic to invoke vi state on major-modes @@ -862,8 +859,11 @@ ;; info about the display and windows until emacs initialization is complete ;; So do it via the window-setup-hook (add-hook 'window-setup-hook - '(lambda () - (setq viper-vi-state-cursor-color (viper-get-cursor-color)))) + '(lambda () + (modify-frame-parameters + (selected-frame) + (list (cons 'viper-vi-state-cursor-color + (viper-get-cursor-color)))))) ;; Tell vc-diff to put *vc* in Vi mode (if (featurep 'vc) @@ -903,7 +903,6 @@ (defadvice set-cursor-color (after viper-set-cursor-color-ad activate) "Change cursor color in VI state." - ;;(setq viper-vi-state-cursor-color (ad-get-arg 0)) (modify-frame-parameters (selected-frame) (list (cons 'viper-vi-state-cursor-color (ad-get-arg 0)))) @@ -1008,8 +1007,8 @@ ;; these are primarily advices and Vi-ish variable settings (defun viper-non-hook-settings () - ;; Viper changes the default mode-line-buffer-identification - (setq-default mode-line-buffer-identification '(" %b")) + ;;;; Viper changes the default mode-line-buffer-identification + ;;(setq-default mode-line-buffer-identification '(" %b")) ;; setup emacs-supported vi-style feel (setq next-line-add-newlines nil diff -r 0c89a85addc3 -r 694bbb62a75d lisp/erc/ChangeLog --- a/lisp/erc/ChangeLog Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/erc/ChangeLog Sat Oct 14 16:56:21 2006 +0000 @@ -1,3 +1,78 @@ +2006-08-13 Romain Francoise + + * erc-match.el (erc-log-matches-make-buffer): End `y-or-n-p' + prompt with a space. + +2006-08-07 Michael Olson + + * erc-backend.el (erc-process-sentinel-1): Use erc-display-message + in several places instead of inserting text. + (erc-process-sentinel): Move to the input-marker before removing + the prompt. + + * erc.el (erc-port): Fix customization options. + (erc-display-message): Handle null type explicitly. Previously, + this was relying on a chance side-effect. Cosmetic indentation + tweak. + (english): Add 'finished and 'terminated entries to the catalog. + Add initial and terminal newlines to 'disconnected and + 'disconnected-noreconnect entries. Avoid long lines. + +2006-08-06 Michael Olson + + * erc.el (erc-arrange-session-in-multiple-windows): Fix bug with + multi-tty Emacs. + (erc-select-startup-file): Fix bug introduced by recent change. + +2006-08-05 Michael Olson + + * erc-log.el (erc-log-standardize-name): New function that returns + a filename that is safe for use for a log file. + (erc-current-logfile): Use it. + + * erc.el (erc-startup-file-list): Search in ~/.emacs.d first, + since that is a fairly standard directory. + (erc-select-startup-file): Re-write to use + convert-standard-filename, which will ensure that MS-DOS systems + look for the _ercrc.el file. + +2006-08-02 Michael Olson + + * erc.el (erc-version-string): Release ERC 5.1.4. + + * Makefile, NEWS, erc.texi: Update for the 5.1.4 release. + + * erc.el (erc-active-buffer): Fix bug that caused messages to go + to the wrong buffer. Thanks to offby1 for the report. + + * erc-backend.el (erc-coding-system-for-target): Handle case where + target is nil. Thanks to Kai Fan for the patch. + +2006-07-29 Michael Olson + + * erc-log.el (erc-log-setup-logging): Don't offer to save the + buffer. It will be saved automatically killed. Thanks to Johan + BockgÃ¥rd and Tassilo Horn for pointing this out. + +2006-07-27 Johan BockgÃ¥rd + + * erc.el (define-erc-module): Make find-function and find-variable + find the names constructed by `define-erc-module' in Emacs 22. + +2006-07-14 Michael Olson + + * erc-log.el (log): Make sure that we enable logging on + already-opened buffers as well, in case the user toggles this + module after loading ERC. Also be sure to remove logging ability + from all ERC buffers when the module is disabled. + (erc-log-setup-logging): Set buffer-file-name to nil rather than + the empty string. This should fix some errors that occur when + quitting Emacs without first killing all ERC buffers. + (erc-log-disable-logging): New function that removes the logging + ability from the current buffer. + + * erc-spelling.el (spelling): Use dolist and buffer-live-p. + 2006-07-12 Michael Olson * erc-match.el (erc-log-matches): Bind inhibit-read-only rather diff -r 0c89a85addc3 -r 694bbb62a75d lisp/erc/erc-backend.el --- a/lisp/erc/erc-backend.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/erc/erc-backend.el Sat Oct 14 16:56:21 2006 +0000 @@ -493,11 +493,7 @@ (if erc-server-quitting ;; normal quit (progn - (let ((string "\n\n*** ERC finished ***\n") - (inhibit-read-only t)) - (erc-put-text-property 0 (length string) - 'face 'erc-error-face string) - (insert string)) + (erc-display-message nil 'error (current-buffer) 'finished) (when erc-kill-server-buffer-on-quit (set-buffer-modified-p nil) (kill-buffer (current-buffer)))) @@ -519,12 +515,8 @@ (erc erc-session-server erc-session-port erc-server-current-nick erc-session-user-full-name t erc-session-password) ;; terminate, do not reconnect - (let ((string (concat "\n\n*** ERC terminated: " event - "\n")) - (inhibit-read-only t)) - (erc-put-text-property 0 (length string) - 'face 'erc-error-face string) - (insert string))))) + (erc-display-message nil 'error (current-buffer) + 'terminated ?e event)))) (defun erc-process-sentinel (cproc event) "Sentinel function for ERC process." @@ -545,6 +537,7 @@ (run-hook-with-args 'erc-disconnected-hook (erc-current-nick) (system-name) "") ;; Remove the prompt + (goto-char (or (marker-position erc-input-marker) (point-max))) (forward-line 0) (erc-remove-text-properties-region (point) (point-max)) (delete-region (point) (point-max)) @@ -563,11 +556,12 @@ "Return the coding system or cons cell appropriate for TARGET. This is determined via `erc-encoding-coding-alist' or `erc-server-coding-system'." - (or (let ((case-fold-search t)) - (catch 'match - (dolist (pat erc-encoding-coding-alist) - (when (string-match (car pat) target) - (throw 'match (cdr pat)))))) + (or (when target + (let ((case-fold-search t)) + (catch 'match + (dolist (pat erc-encoding-coding-alist) + (when (string-match (car pat) target) + (throw 'match (cdr pat))))))) (and (functionp erc-server-coding-system) (funcall erc-server-coding-system)) erc-server-coding-system)) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/erc/erc-log.el --- a/lisp/erc/erc-log.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/erc/erc-log.el Sat Oct 14 16:56:21 2006 +0000 @@ -71,8 +71,6 @@ ;; markers. ;;; TODO: -;; * Erc needs a generalised make-safe-file-name function, so that -;; generated file names don't contain any invalid file characters. ;; ;; * Really, we need to lock the logfiles somehow, so that if a user ;; is running multiple emacsen and/or on the same channel as more @@ -218,7 +216,10 @@ (add-hook 'erc-quit-hook 'erc-conditional-save-queries) (add-hook 'erc-part-hook 'erc-conditional-save-buffer) ;; append, so that 'erc-initialize-log-marker runs first - (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)) + (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append) + (dolist (buffer (erc-buffer-list)) + (when (buffer-live-p buffer) + (with-current-buffer buffer (erc-log-setup-logging))))) ;; disable ((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs) (remove-hook 'erc-send-post-hook 'erc-save-buffer-in-logs) @@ -226,7 +227,10 @@ (remove-hook 'erc-kill-channel-hook 'erc-save-buffer-in-logs) (remove-hook 'erc-quit-hook 'erc-conditional-save-queries) (remove-hook 'erc-part-hook 'erc-conditional-save-buffer) - (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging))) + (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging) + (dolist (buffer (erc-buffer-list)) + (when (buffer-live-p buffer) + (with-current-buffer buffer (erc-log-disable-logging)))))) (define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs) @@ -236,8 +240,7 @@ This function is destined to be run from `erc-connect-pre-hook'." (when (erc-logging-enabled) (auto-save-mode -1) - (setq buffer-offer-save t - buffer-file-name "") + (setq buffer-file-name nil) (set (make-local-variable 'write-file-functions) '(erc-save-buffer-in-logs)) (when erc-log-insert-log-on-open @@ -245,6 +248,12 @@ (move-marker erc-last-saved-position (1- (point-max))))))) +(defun erc-log-disable-logging () + "Disable logging in the current buffer." + (when (erc-logging-enabled) + (setq buffer-offer-save nil + erc-enable-logging nil))) + (defun erc-log-all-but-server-buffers (buffer) "Returns t if logging should be enabled in BUFFER. Returns nil iff `erc-server-buffer-p' returns t." @@ -282,17 +291,27 @@ (funcall erc-enable-logging (or buffer (current-buffer))) erc-enable-logging))) +(defun erc-log-standardize-name (filename) + "Make FILENAME safe to use as the name of an ERC log. +This will not work with full paths, only names. + +Any unsafe characters in the name are replaced with \"!\". The +filename is downcased." + (downcase (erc-replace-regexp-in-string + "[/\\]" "!" (convert-standard-filename filename)))) + (defun erc-current-logfile (&optional buffer) "Return the logfile to use for BUFFER. If BUFFER is nil, the value of `current-buffer' is used. This is determined by `erc-generate-log-file-name-function'. The result is converted to lowercase, as IRC is case-insensitive" (expand-file-name - (downcase (funcall erc-generate-log-file-name-function - (or buffer (current-buffer)) - (or (erc-default-target) (buffer-name buffer)) - (erc-current-nick) - erc-session-server erc-session-port)) + (erc-log-standardize-name + (funcall erc-generate-log-file-name-function + (or buffer (current-buffer)) + (or (erc-default-target) (buffer-name buffer)) + (erc-current-nick) + erc-session-server erc-session-port)) erc-log-channels-directory)) (defun erc-generate-log-file-name-with-date (buffer &rest ignore) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/erc/erc-match.el --- a/lisp/erc/erc-match.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/erc/erc-match.el Sat Oct 14 16:56:21 2006 +0000 @@ -566,7 +566,7 @@ (unless buffer-already (insert " == Type \"q\" to dismiss messages ==\n") (erc-view-mode-enter nil (lambda (buffer) - (when (y-or-n-p "Discard messages?") + (when (y-or-n-p "Discard messages? ") (kill-buffer buffer))))) buffer))) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/erc/erc-spelling.el --- a/lisp/erc/erc-spelling.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/erc/erc-spelling.el Sat Oct 14 16:56:21 2006 +0000 @@ -40,15 +40,13 @@ ;; Use erc-connect-pre-hook instead of erc-mode-hook as pre-hook is ;; called AFTER the server buffer is initialized. ((add-hook 'erc-connect-pre-hook 'erc-spelling-init) - (mapc (lambda (buffer) - (when buffer - (with-current-buffer buffer (erc-spelling-init)))) - (erc-buffer-list))) + (dolist (buffer (erc-buffer-list)) + (when (buffer-live-p buffer) + (with-current-buffer buffer (erc-spelling-init))))) ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init) - (mapc (lambda (buffer) - (when buffer - (with-current-buffer buffer (flyspell-mode 0)))) - (erc-buffer-list)))) + (dolist (buffer (erc-buffer-list)) + (when (buffer-live-p buffer) + (with-current-buffer buffer (flyspell-mode 0)))))) (defcustom erc-spelling-dictionaries nil "An alist mapping buffer names to dictionaries. diff -r 0c89a85addc3 -r 694bbb62a75d lisp/erc/erc.el --- a/lisp/erc/erc.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/erc/erc.el Sat Oct 14 16:56:21 2006 +0000 @@ -67,7 +67,7 @@ ;;; Code: -(defconst erc-version-string "Version 5.1.3" +(defconst erc-version-string "Version 5.1.4" "ERC version. This is used by function `erc-version'.") (eval-when-compile (require 'cl)) @@ -157,8 +157,8 @@ This can be either a string or a number." :group 'erc :type '(choice (const :tag "None" nil) - (const :tag "Port number" number) - (const :tag "Port string" string))) + (integer :tag "Port number") + (string :tag "Port string"))) (defcustom erc-nick nil "Nickname to use if one is not provided. @@ -822,7 +822,8 @@ ;; Script parameters (defcustom erc-startup-file-list - '("~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc") + '("~/.emacs.d/.ercrc.el" "~/.emacs.d/.ercrc" + "~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc") "List of files to try for a startup script. The first existent and readable one will get executed. @@ -1243,7 +1244,11 @@ (format "erc-%s-mode" (downcase (symbol-name alias))))) (quote - ,mode)))))) + ,mode))) + ;; For find-function and find-variable. + (put ',mode 'definition-name ',name) + (put ',enable 'definition-name ',name) + (put ',disable 'definition-name ',name)))) (put 'define-erc-module 'doc-string-elt 3) @@ -1388,8 +1393,8 @@ Defaults to the server buffer." (with-current-buffer (erc-server-buffer) (if (buffer-live-p erc-active-buffer) - erc-active-buffer) - (setq erc-active-buffer (current-buffer)))) + erc-active-buffer + (setq erc-active-buffer (current-buffer))))) (defun erc-set-active-buffer (buffer) "Set the value of `erc-active-buffer' to BUFFER." @@ -2358,6 +2363,8 @@ msg))) (setq string (cond + ((null type) + string) ((listp type) (mapc (lambda (type) (setq string @@ -2370,7 +2377,7 @@ (if (not (erc-response-p parsed)) (erc-display-line string buffer) (unless (member (erc-response.command parsed) erc-hide-list) - (erc-put-text-property 0 (length string) 'erc-parsed parsed string) + (erc-put-text-property 0 (length string) 'erc-parsed parsed string) (erc-put-text-property 0 (length string) 'rear-sticky t string) (erc-display-line string buffer))))) @@ -5237,13 +5244,11 @@ (defun erc-select-startup-file () "Select an ERC startup file. See also `erc-startup-file-list'." - (let ((l erc-startup-file-list) - (f nil)) - (while (and (not f) l) - (if (file-readable-p (car l)) - (setq f (car l))) - (setq l (cdr l))) - f)) + (catch 'found + (dolist (f erc-startup-file-list) + (setq f (convert-standard-filename f)) + (when (file-readable-p f) + (throw 'found f))))) (defun erc-find-script-file (file) "Search for FILE in `default-directory', and any in `erc-script-path'." @@ -5890,7 +5895,8 @@ (setq bufs (cdr bufs)) (while bufs (split-window) - (switch-to-buffer-other-window (car bufs)) + (other-window 1) + (switch-to-buffer (car bufs)) (setq bufs (cdr bufs)) (balance-windows))))) @@ -5942,12 +5948,17 @@ (ctcp-request-to . "==> CTCP request from %n (%u@%h) to %t: %r") (ctcp-too-many . "Too many CTCP queries in single message. Ignoring") (flood-ctcp-off . "FLOOD PROTECTION: Automatic CTCP responses turned off.") - (flood-strict-mode . "FLOOD PROTECTION: Switched to Strict Flood Control mode.") - (disconnected . "Connection failed! Re-establishing connection...") - (disconnected-noreconnect . "Connection failed! Not re-establishing connection.") + (flood-strict-mode + . "FLOOD PROTECTION: Switched to Strict Flood Control mode.") + (disconnected . "\n\nConnection failed! Re-establishing connection...\n") + (disconnected-noreconnect + . "\n\nConnection failed! Not re-establishing connection.\n") + (finished . "\n\n*** ERC finished ***\n") + (terminated . "\n\n*** ERC terminated: %e\n") (login . "Logging in as \'%n\'...") (nick-in-use . "%n is in use. Choose new nickname: ") - (nick-too-long . "WARNING: Nick length (%i) exceeds max NICKLEN(%l) defined by server") + (nick-too-long + . "WARNING: Nick length (%i) exceeds max NICKLEN(%l) defined by server") (no-default-channel . "No default channel") (no-invitation . "You've got no invitation") (no-target . "No target") diff -r 0c89a85addc3 -r 694bbb62a75d lisp/eshell/em-glob.el --- a/lisp/eshell/em-glob.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/eshell/em-glob.el Sat Oct 14 16:56:21 2006 +0000 @@ -97,7 +97,7 @@ :type 'boolean :group 'eshell-glob) -(defcustom eshell-glob-chars-list '(?\] ?\[ ?* ?? ?~ ?\( ?\) ?| ?#) +(defcustom eshell-glob-chars-list '(?\] ?\[ ?* ?? ?~ ?\( ?\) ?| ?# ?^) "*List of additional characters used in extended globbing." :type '(repeat character) :group 'eshell-glob) @@ -105,6 +105,7 @@ (defcustom eshell-glob-translate-alist '((?\] . "]") (?\[ . "[") + (?^ . "^") (?? . ".") (?* . ".*") (?~ . "~") diff -r 0c89a85addc3 -r 694bbb62a75d lisp/facemenu.el --- a/lisp/facemenu.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/facemenu.el Sat Oct 14 16:56:21 2006 +0000 @@ -134,18 +134,24 @@ (defcustom facemenu-listed-faces nil "*List of faces to include in the Face menu. -Each element should be a symbol, which is the name of a face. +Each element should be a symbol, the name of a face. The \"basic \" faces in `facemenu-keybindings' are automatically -added to the Face menu, and are not included in this list. +added to the Face menu, and need not be in this list. -You can set this list before loading facemenu.el, or add a face to it before -creating that face if you want it to be listed. If you change the -variable so as to eliminate faces that have already been added to the menu, -call `facemenu-update' to recalculate the menu contents. +This value takes effect when you load facemenu.el. If the +list includes symbols which are not defined as faces, they +are ignored; however, subsequently defining or creating +those faces adds them to the menu then. You can call +`facemenu-update' to recalculate the menu contents, such as +if you change the value of this variable, -If this variable is t, all faces will be added to the menu. This -is useful for setting temporarily if you want to add faces to the -menu when they are created." +If this variable is t, all faces that you apply to text +using the face menu commands (even by name), and all faces +that you define or create, are added to the menu. You may +find it useful to set this variable to t temporarily while +you define some faces, so that they will be added. However, +if the value is no longer t and you call `facemenu-update', +it will remove any faces not explicitly in the list." :type '(choice (const :tag "List all faces" t) (const :tag "None" nil) (repeat symbol)) @@ -320,19 +326,24 @@ ;;;###autoload (defun facemenu-set-face (face &optional start end) - "Add FACE to the region or next character typed. -This adds FACE to the top of the face list; any faces lower on the list that -will not show through at all will be removed. + "Apply FACE to the region or next character typed. -Interactively, reads the face name with the minibuffer. +If the region is active (normally true except in Transient +Mark mode) and nonempty, and there is no prefix argument, +this command applies FACE to the region. Otherwise, it applies FACE +to the faces to use for the next character +inserted. (Moving point or switching buffers before typing +a character to insert cancels the specification.) -If the region is active (normally true except in Transient Mark mode) -and there is no prefix argument, this command sets the region to the -requested face. +If FACE is `default', to \"apply\" it means clearing +the list of faces to be used. For any other value of FACE, +to \"apply\" it means putting FACE at the front of the list +of faces to be used, and removing any faces further +along in the list that would be completely overridden by +preceding faces (including FACE). -Otherwise, this command specifies the face for the next character -inserted. Moving point or switching buffers before -typing a character to insert cancels the specification." +This command can also add FACE to the menu of faces, +if `facemenu-listed-faces' says to do that." (interactive (list (progn (barf-if-buffer-read-only) (read-face-name "Use face")) @@ -612,7 +623,12 @@ (cons face (if (listp prev) prev - (list prev))))))) + (list prev))) + ;; Specify the selected frame + ;; because nil would mean to use + ;; the new-frame default settings, + ;; and those are usually nil. + (selected-frame))))) (setq part-start part-end))) (setq self-insert-face (if (eq last-command self-insert-face-command) (cons face (if (listp self-insert-face) @@ -655,9 +671,8 @@ (nreverse active-list))) (defun facemenu-add-new-face (face) - "Add FACE (a face) to the Face menu. - -This is called whenever you create a new face." + "Add FACE (a face) to the Face menu if `facemenu-listed-faces' says so. +This is called whenever you create a new face, and at other times." (let* (name symbol menu docstring diff -r 0c89a85addc3 -r 694bbb62a75d lisp/faces.el --- a/lisp/faces.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/faces.el Sat Oct 14 16:56:21 2006 +0000 @@ -2075,7 +2075,7 @@ ;; red4 is too dark, but some say blue is too loud. ;; brown seems to work ok. -- rms. (t :foreground "brown")) - "Face for characters displayed as ^-sequences or \-sequences." + "Face for characters displayed as sequences using `^' or `\\'." :group 'basic-faces :version "22.1") diff -r 0c89a85addc3 -r 694bbb62a75d lisp/files.el --- a/lisp/files.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/files.el Sat Oct 14 16:56:21 2006 +0000 @@ -540,13 +540,21 @@ This function's standard definition is trivial; it just returns the argument. However, on Windows and DOS, replace invalid -characters. On DOS, make sure to obey the 8.3 limitations. On -Windows, turn Cygwin names into native names, and also turn -slashes into backslashes if the shell requires it (see +characters. On DOS, make sure to obey the 8.3 limitations. +In the native Windows build, turn Cygwin names into native names, +and also turn slashes into backslashes if the shell requires it (see `w32-shell-dos-semantics'). See Info node `(elisp)Standard File Names' for more details." - filename) + (if (eq system-type 'cygwin) + (let ((name (copy-sequence filename)) + (start 0)) + ;; Replace invalid filename characters with ! + (while (string-match "[?*:<>|\"\000-\037]" name start) + (aset name (match-beginning 0) ?!) + (setq start (match-end 0))) + name) + filename)) (defun read-directory-name (prompt &optional dir default-dirname mustmatch initial) "Read directory name, prompting with PROMPT and completing in directory DIR. @@ -4369,7 +4377,7 @@ "#"))) ;; Make sure auto-save file names don't contain characters ;; invalid for the underlying filesystem. - (if (and (memq system-type '(ms-dos windows-nt)) + (if (and (memq system-type '(ms-dos windows-nt cygwin)) ;; Don't modify remote (ange-ftp) filenames (not (string-match "^/\\w+@[-A-Za-z0-9._]+:" result))) (convert-standard-filename result) @@ -4404,7 +4412,7 @@ ((file-writable-p default-directory) default-directory) ((file-writable-p "/var/tmp/") "/var/tmp/") ("~/"))))) - (if (and (memq system-type '(ms-dos windows-nt)) + (if (and (memq system-type '(ms-dos windows-nt cygwin)) ;; Don't modify remote (ange-ftp) filenames (not (string-match "^/\\w+@[-A-Za-z0-9._]+:" fname))) ;; The call to convert-standard-filename is in case diff -r 0c89a85addc3 -r 694bbb62a75d lisp/filesets.el --- a/lisp/filesets.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/filesets.el Sat Oct 14 16:56:21 2006 +0000 @@ -1798,7 +1798,7 @@ filesets-data nil))) (entry (or (assoc name filesets-data) (when (y-or-n-p - (format "Fileset %s does not exist. Create it?" + (format "Fileset %s does not exist. Create it? " name)) (progn (add-to-list 'filesets-data (list name '(:files))) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/font-core.el --- a/lisp/font-core.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/font-core.el Sat Oct 14 16:56:21 2006 +0000 @@ -83,34 +83,6 @@ settings. See the variable `font-lock-defaults', which takes precedence.") (make-obsolete-variable 'font-lock-defaults-alist 'font-lock-defaults) -(defvar font-lock-extend-region-function nil - "A function that determines the region to fontify after a change. - -This buffer-local variable is either nil, or is a function that determines the -region to fontify. It is usually set by the major mode. The currently active -font-lock after-change function calls this function after each buffer change. - -The function is given three parameters, the standard BEG, END, and OLD-LEN -from after-change-functions. It should return either a cons of the beginning -and end buffer positions \(in that order) of the region to fontify, or nil -\(which directs the caller to fontify a default region). This function need -not preserve point or the match-data, but must preserve the current -restriction. The region it returns may start or end in the middle of a -line.") -(make-variable-buffer-local 'font-lock-extend-region-function) - -(defun font-lock-extend-region (beg end old-len) - "Determine the region to fontify after a buffer change. - -BEG END and OLD-LEN are the standard parameters from after-change-functions. -The return value is either nil \(which directs the caller to chose the region -itself), or a cons of the beginning and end \(in that order) of the region. -The region returned may start or end in the middle of a line." - (if font-lock-extend-region-function - (save-match-data - (save-excursion - (funcall font-lock-extend-region-function beg end old-len))))) - (defvar font-lock-function 'font-lock-default-function "A function which is called when `font-lock-mode' is toggled. It will be passed one argument, which is the current value of diff -r 0c89a85addc3 -r 694bbb62a75d lisp/font-lock.el --- a/lisp/font-lock.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/font-lock.el Sat Oct 14 16:56:21 2006 +0000 @@ -893,7 +893,11 @@ (set (make-local-variable 'font-lock-fontified) t) ;; Use jit-lock. (jit-lock-register 'font-lock-fontify-region - (not font-lock-keywords-only)))))) + (not font-lock-keywords-only)) + ;; Tell jit-lock how we extend the region to refontify. + (add-hook 'jit-lock-after-change-extend-region-functions + 'font-lock-extend-jit-lock-region-after-change + nil t))))) (defun font-lock-turn-off-thing-lock () (cond ((and (boundp 'fast-lock-mode) fast-lock-mode) @@ -971,6 +975,21 @@ ;; directives correctly and cleanly. (It is the same problem as fontifying ;; multi-line strings and comments; regexps are not appropriate for the job.) +(defvar font-lock-extend-after-change-region-function nil + "A function that determines the region to refontify after a change. + +This variable is either nil, or is a function that determines the +region to refontify after a change. +It is usually set by the major mode via `font-lock-defaults'. +Font-lock calls this function after each buffer change. + +The function is given three parameters, the standard BEG, END, and OLD-LEN +from `after-change-functions'. It should return either a cons of the beginning +and end buffer positions \(in that order) of the region to refontify, or nil +\(which directs the caller to fontify a default region). +This function should preserve the match-data. +The region it returns may start or end in the middle of a line.") + (defun font-lock-fontify-buffer () "Fontify the current buffer the way the function `font-lock-mode' would." (interactive) @@ -1021,6 +1040,59 @@ Useful for things like RMAIL and Info where the whole buffer is not a very meaningful entity to highlight.") + +(defvar font-lock-beg) (defvar font-lock-end) +(defvar font-lock-extend-region-functions + '(font-lock-extend-region-wholelines + ;; This use of font-lock-multiline property is unreliable but is just + ;; a handy heuristic: in case you don't have a function that does + ;; /identification/ of multiline elements, you may still occasionally + ;; discover them by accident (or you may /identify/ them but not in all + ;; cases), in which case the font-lock-multiline property can help make + ;; sure you will properly *re*identify them during refontification. + font-lock-extend-region-multiline) + "Special hook run just before proceeding to fontify a region. +This is used to allow major modes to help font-lock find safe buffer positions +as beginning and end of the fontified region. Its most common use is to solve +the problem of /identification/ of multiline elements by providing a function +that tries to find such elements and move the boundaries such that they do +not fall in the middle of one. +Each function is called with no argument; it is expected to adjust the +dynamically bound variables `font-lock-beg' and `font-lock-end'; and return +non-nil iff it did make such an adjustment. +These functions are run in turn repeatedly until they all return nil. +Put first the functions more likely to cause a change and cheaper to compute.") +;; Mark it as a special hook which doesn't use any global setting +;; (i.e. doesn't obey the element t in the buffer-local value). +(make-variable-buffer-local 'font-lock-extend-region-functions) + +(defun font-lock-extend-region-multiline () + "Move fontification boundaries away from any `font-lock-multiline' property." + (let ((changed nil)) + (when (and (> font-lock-beg (point-min)) + (get-text-property (1- font-lock-beg) 'font-lock-multiline)) + (setq changed t) + (setq font-lock-beg (or (previous-single-property-change + font-lock-beg 'font-lock-multiline) + (point-min)))) + ;; + (when (get-text-property font-lock-end 'font-lock-multiline) + (setq changed t) + (setq font-lock-end (or (text-property-any font-lock-end (point-max) + 'font-lock-multiline nil) + (point-max)))) + changed)) + + +(defun font-lock-extend-region-wholelines () + "Move fontification boundaries to beginning of lines." + (let ((changed nil)) + (goto-char font-lock-beg) + (unless (bolp) (setq changed t font-lock-beg (line-beginning-position))) + (goto-char font-lock-end) + (unless (bolp) (setq changed t font-lock-end (line-beginning-position 2))) + changed)) + (defun font-lock-default-fontify-region (beg end loudly) (save-buffer-state ((parse-sexp-lookup-properties @@ -1032,24 +1104,21 @@ ;; Use the fontification syntax table, if any. (when font-lock-syntax-table (set-syntax-table font-lock-syntax-table)) - (goto-char beg) - (setq beg (line-beginning-position)) - ;; check to see if we should expand the beg/end area for - ;; proper multiline matches - (when (and (> beg (point-min)) - (get-text-property (1- beg) 'font-lock-multiline)) - ;; We are just after or in a multiline match. - (setq beg (or (previous-single-property-change - beg 'font-lock-multiline) - (point-min))) - (goto-char beg) - (setq beg (line-beginning-position))) - (setq end (or (text-property-any end (point-max) - 'font-lock-multiline nil) - (point-max))) - (goto-char end) - ;; Round up to a whole line. - (unless (bolp) (setq end (line-beginning-position 2))) + ;; Extend the region to fontify so that it starts and ends at + ;; safe places. + (let ((funs font-lock-extend-region-functions) + (font-lock-beg beg) + (font-lock-end end)) + (while funs + (setq funs (if (or (not (funcall (car funs))) + (eq funs font-lock-extend-region-functions)) + (cdr funs) + ;; If there's been a change, we should go through + ;; the list again since this new position may + ;; warrant a different answer from one of the fun + ;; we've already seen. + font-lock-extend-region-functions))) + (setq beg font-lock-beg end font-lock-end)) ;; Now do the fontification. (font-lock-unfontify-region beg end) (when font-lock-syntactic-keywords @@ -1083,19 +1152,77 @@ ;; Called when any modification is made to buffer text. (defun font-lock-after-change-function (beg end old-len) - (let ((inhibit-point-motion-hooks t) - (inhibit-quit t) - (region (font-lock-extend-region beg end old-len))) - (save-excursion + (save-excursion + (let ((inhibit-point-motion-hooks t) + (inhibit-quit t) + (region (if font-lock-extend-after-change-region-function + (funcall font-lock-extend-after-change-region-function + beg end old-len)))) (save-match-data (if region ;; Fontify the region the major mode has specified. (setq beg (car region) end (cdr region)) ;; Fontify the whole lines which enclose the region. - (setq beg (progn (goto-char beg) (line-beginning-position)) - end (progn (goto-char end) (line-beginning-position 2)))) + ;; Actually, this is not needed because + ;; font-lock-default-fontify-region already rounds up to a whole + ;; number of lines. + ;; (setq beg (progn (goto-char beg) (line-beginning-position)) + ;; end (progn (goto-char end) (line-beginning-position 2))) + ) (font-lock-fontify-region beg end))))) +(defvar jit-lock-start) (defvar jit-lock-end) +(defun font-lock-extend-jit-lock-region-after-change (beg end old-len) + "Function meant for `jit-lock-after-change-extend-region-functions'. +This function does 2 things: +- extend the region so that it not only includes the part that was modified + but also the surrounding text whose highlighting may change as a consequence. +- anticipate (part of) the region extension that will happen later in + `font-lock-default-fontify-region', in order to avoid the need for + double-redisplay in `jit-lock-fontify-now'." + (save-excursion + ;; First extend the region as font-lock-after-change-function would. + (let ((region (if font-lock-extend-after-change-region-function + (funcall font-lock-extend-after-change-region-function + beg end old-len)))) + (if region + (setq beg (min jit-lock-start (car region)) + end (max jit-lock-end (cdr region)))) + ;; Then extend the region obeying font-lock-multiline properties, + ;; indicating which part of the buffer needs to be refontified. + ;; !!! This is the *main* user of font-lock-multiline property !!! + ;; font-lock-after-change-function could/should also do that, but it + ;; doesn't need to because font-lock-default-fontify-region does + ;; it anyway. Here OTOH we have no guarantee that + ;; font-lock-default-fontify-region will be executed on this region + ;; any time soon. + ;; Note: contrary to font-lock-default-fontify-region, we do not do + ;; any loop here because we are not looking for a safe spot: we just + ;; mark the text whose appearance may need to change as a result of + ;; the buffer modification. + (when (and (> beg (point-min)) + (get-text-property (1- beg) 'font-lock-multiline)) + (setq beg (or (previous-single-property-change + beg 'font-lock-multiline) + (point-min)))) + (setq end (or (text-property-any end (point-max) + 'font-lock-multiline nil) + (point-max))) + ;; Finally, pre-enlarge the region to a whole number of lines, to try + ;; and anticipate what font-lock-default-fontify-region will do, so as to + ;; avoid double-redisplay. + ;; We could just run `font-lock-extend-region-functions', but since + ;; the only purpose is to avoid the double-redisplay, we prefer to + ;; do here only the part that is cheap and most likely to be useful. + (when (memq 'font-lock-extend-region-wholelines + font-lock-extend-region-functions) + (goto-char beg) + (forward-line 0) + (setq jit-lock-start (min jit-lock-start (point))) + (goto-char end) + (forward-line 1) + (setq jit-lock-end (max jit-lock-end (point))))))) + (defun font-lock-fontify-block (&optional arg) "Fontify some lines the way `font-lock-fontify-buffer' would. The lines could be a function or paragraph, or a specified number of lines. diff -r 0c89a85addc3 -r 694bbb62a75d lisp/format.el --- a/lisp/format.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/format.el Sat Oct 14 16:56:21 2006 +0000 @@ -117,17 +117,17 @@ REGEXP is a regular expression to match against the beginning of the file; it should match only files in that format. Use nil to avoid - matching at all for formats for which this isn't appropriate to + matching at all for formats for which it isn't appropriate to require explicit encoding/decoding. -FROM-FN is called to decode files in that format; it gets two args, BEGIN +FROM-FN is called to decode files in that format; it takes two args, BEGIN and END, and can make any modifications it likes, returning the new end. It must make sure that the beginning of the file no longer matches REGEXP, or else it will get called again. Alternatively, FROM-FN can be a string, which specifies a shell command (including options) to be used as a filter to perform the conversion. -TO-FN is called to encode a region into that format; it is passed three +TO-FN is called to encode a region into that format; it takes three arguments: BEGIN, END, and BUFFER. BUFFER is the original buffer that the data being written came from, which the function could use, for example, to find the values of local variables. TO-FN should either @@ -142,7 +142,7 @@ MODE-FN, if specified, is called when visiting a file with that format. It is called with a single positive argument, on the assumption - that it turns on some Emacs mode. + that this would turn on some minor mode. PRESERVE, if non-nil, means that `format-write-file' should not remove this format from `buffer-file-formats'.") @@ -150,8 +150,8 @@ ;;; Basic Functions (called from Lisp) (defun format-encode-run-method (method from to &optional buffer) - "Translate using function or shell script METHOD the text from FROM to TO. -If METHOD is a string, it is a shell command; + "Translate using METHOD the text from FROM to TO. +If METHOD is a string, it is a shell command (including options); otherwise, it should be a Lisp function. BUFFER should be the buffer that the output originally came from." (if (stringp method) @@ -173,9 +173,9 @@ (funcall method from to buffer))) (defun format-decode-run-method (method from to &optional buffer) - "Decode using function or shell script METHOD the text from FROM to TO. -If METHOD is a string, it is a shell command; otherwise, it should be -a Lisp function. Decoding is done for the given BUFFER." + "Decode using METHOD the text from FROM to TO. +If METHOD is a string, it is a shell command (including options); otherwise, +it should be a Lisp function. Decoding is done for the given BUFFER." (if (stringp method) (let ((error-buff (get-buffer-create "*Format Errors*")) (coding-system-for-write 'no-conversion) @@ -200,15 +200,15 @@ (defun format-annotate-function (format from to orig-buf format-count) "Return annotations for writing region as FORMAT. -FORMAT is a symbol naming one of the formats defined in `format-alist', -it must be a single symbol, not a list like `buffer-file-format'. +FORMAT is a symbol naming one of the formats defined in `format-alist'. +It must be a single symbol, not a list like `buffer-file-format'. FROM and TO delimit the region to be operated on in the current buffer. ORIG-BUF is the original buffer that the data came from. FORMAT-COUNT is an integer specifying how many times this function has been called in the process of decoding ORIG-BUF. -This function works like a function on `write-region-annotate-functions': +This function works like a function in `write-region-annotate-functions': it either returns a list of annotations, or returns with a different buffer current, which contains the modified text to write. In the latter case, this function's value is nil. @@ -253,7 +253,7 @@ to the reverted list of formats used, and call any mode functions defined for those formats. -Returns the new length of the decoded region. +Return the new length of the decoded region. For most purposes, consider using `format-decode-region' instead." (let ((mod (buffer-modified-p)) @@ -312,9 +312,9 @@ (defun format-decode-buffer (&optional format) "Translate the buffer from some FORMAT. -If the format is not specified, this function attempts to guess. -`buffer-file-format' is set to the format used, and any mode-functions -for the format are called." +If the format is not specified, attempt a regexp-based guess. +Set `buffer-file-format' to the format used, and call any +format-specific mode functions." (interactive (list (format-read "Translate buffer from format (default guess): "))) (save-excursion @@ -343,7 +343,7 @@ (defun format-encode-region (beg end &optional format) "Translate the region into some FORMAT. -FORMAT defaults to `buffer-file-format', it is a symbol naming +FORMAT defaults to `buffer-file-format'. It is a symbol naming one of the formats defined in `format-alist', or a list of such symbols." (interactive (list (region-beginning) (region-end) @@ -374,9 +374,9 @@ saves. If the buffer is already visiting a file, you can specify a directory name as FILENAME, to write a file of the same old name in that directory. -If optional third arg CONFIRM is non-nil, this function asks for -confirmation before overwriting an existing file. Interactively, -confirmation is required unless you supply a prefix argument." +If optional third arg CONFIRM is non-nil, ask for confirmation before +overwriting an existing file. Interactively, confirmation is required +unless you supply a prefix argument." (interactive ;; Same interactive spec as write-file, plus format question. (let* ((file (if buffer-file-name @@ -419,7 +419,7 @@ "Insert the contents of file FILENAME using data format FORMAT. If FORMAT is nil then do not do any format conversion. The optional third and fourth arguments BEG and END specify -the part of the file to read. +the part (in bytes) of the file to read. The return value is like the value of `insert-file-contents': a list (ABSOLUTE-FILE-NAME SIZE)." @@ -456,10 +456,10 @@ (defun format-replace-strings (alist &optional reverse beg end) "Do multiple replacements on the buffer. ALIST is a list of (FROM . TO) pairs, which should be proper arguments to -`search-forward' and `replace-match' respectively. -Optional 2nd arg REVERSE, if non-nil, means the pairs are (TO . FROM), so that -you can use the same list in both directions if it contains only literal -strings. +`search-forward' and `replace-match', respectively. +Optional second arg REVERSE, if non-nil, means the pairs are (TO . FROM), +so that you can use the same list in both directions if it contains only +literal strings. Optional args BEG and END specify a region of the buffer on which to operate." (save-excursion (save-restriction @@ -497,7 +497,7 @@ (defun format-make-relatively-unique (a b) "Delete common elements of lists A and B, return as pair. -Compares using `equal'." +Compare using `equal'." (let* ((acopy (copy-sequence a)) (bcopy (copy-sequence b)) (tail acopy)) @@ -511,9 +511,9 @@ (defun format-common-tail (a b) "Given two lists that have a common tail, return it. -Compares with `equal', and returns the part of A that is equal to the +Compare with `equal', and return the part of A that is equal to the equivalent part of B. If even the last items of the two are not equal, -returns nil." +return nil." (let ((la (length a)) (lb (length b))) ;; Make sure they are the same length @@ -534,9 +534,9 @@ (null list))) (defun format-reorder (items order) - "Arrange ITEMS to following partial ORDER. -Elements of ITEMS equal to elements of ORDER will be rearranged to follow the -ORDER. Unmatched items will go last." + "Arrange ITEMS to follow partial ORDER. +Elements of ITEMS equal to elements of ORDER will be rearranged +to follow the ORDER. Unmatched items will go last." (if order (let ((item (member (car order) items))) (if item @@ -793,7 +793,7 @@ ;; next-single-property-change instead of text-property-not-all, but then ;; we have to see if we passed TO. (defun format-property-increment-region (from to prop delta default) - "Over the region between FROM and TO increment property PROP by amount DELTA. + "In the region from FROM to TO increment property PROP by amount DELTA. DELTA may be negative. If property PROP is nil anywhere in the region, it is treated as though it were DEFAULT." (let ((cur from) val newval next) @@ -810,7 +810,7 @@ (defun format-insert-annotations (list &optional offset) "Apply list of annotations to buffer as `write-region' would. -Inserts each element of the given LIST of buffer annotations at its +Insert each element of the given LIST of buffer annotations at its appropriate place. Use second arg OFFSET if the annotations' locations are not relative to the beginning of the buffer: annotations will be inserted at their location-OFFSET+1 \(ie, the offset is treated as the position of @@ -834,7 +834,7 @@ (defun format-annotate-region (from to translations format-fn ignore) "Generate annotations for text properties in the region. -Searches for changes between FROM and TO, and describes them with a list of +Search for changes between FROM and TO, and describe them with a list of annotations as defined by alist TRANSLATIONS and FORMAT-FN. IGNORE lists text properties not to consider; any text properties that are neither ignored nor listed in TRANSLATIONS are warned about. @@ -975,9 +975,9 @@ "Return annotations for property PROP changing from OLD to NEW. These are searched for in the translations alist TRANSLATIONS (see `format-annotate-region' for the format). -If NEW does not appear in the list, but there is a default function, then that -function is called. -Returns a cons of the form (CLOSE . OPEN) +If NEW does not appear in the list, but there is a default function, +then call that function. +Return a cons of the form (CLOSE . OPEN) where CLOSE is a list of annotations to close and OPEN is a list of annotations to open. @@ -1016,7 +1016,7 @@ (format-annotate-atomic-property-change prop-alist old new))))) (defun format-annotate-atomic-property-change (prop-alist old new) - "Internal function annotate a single property change. + "Internal function to annotate a single property change. PROP-ALIST is the relevant element of a TRANSLATIONS list. OLD and NEW are the values." (let (num-ann) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/frame.el --- a/lisp/frame.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/frame.el Sat Oct 14 16:56:21 2006 +0000 @@ -1362,6 +1362,35 @@ This timer calls `blink-cursor-timer-function' every `blink-cursor-interval' seconds.") +(defun blink-cursor-start () + "Timer function called from the timer `blink-cursor-idle-timer'. +This starts the timer `blink-cursor-timer', which makes the cursor blink +if appropriate. It also arranges to cancel that timer when the next +command starts, by installing a pre-command hook." + (when (null blink-cursor-timer) + ;; Set up the timer first, so that if this signals an error, + ;; blink-cursor-end is not added to pre-command-hook. + (setq blink-cursor-timer + (run-with-timer blink-cursor-interval blink-cursor-interval + 'blink-cursor-timer-function)) + (add-hook 'pre-command-hook 'blink-cursor-end) + (internal-show-cursor nil nil))) + +(defun blink-cursor-timer-function () + "Timer function of timer `blink-cursor-timer'." + (internal-show-cursor nil (not (internal-show-cursor-p)))) + +(defun blink-cursor-end () + "Stop cursor blinking. +This is installed as a pre-command hook by `blink-cursor-start'. +When run, it cancels the timer `blink-cursor-timer' and removes +itself as a pre-command hook." + (remove-hook 'pre-command-hook 'blink-cursor-end) + (internal-show-cursor nil t) + (when blink-cursor-timer + (cancel-timer blink-cursor-timer) + (setq blink-cursor-timer nil))) + (define-minor-mode blink-cursor-mode "Toggle blinking cursor mode. With a numeric argument, turn blinking cursor mode on iff ARG is positive. @@ -1374,53 +1403,22 @@ :init-value (not (or noninteractive no-blinking-cursor (eq system-type 'ms-dos) - (not (memq initial-window-system '(x w32 mac))))) + (not (memq window-system '(x w32 mac))))) :initialize 'custom-initialize-safe-default :group 'cursor :global t (if blink-cursor-idle-timer (cancel-timer blink-cursor-idle-timer)) - (if blink-cursor-timer (cancel-timer blink-cursor-timer)) - (setq blink-cursor-idle-timer nil - blink-cursor-timer nil) - (if blink-cursor-mode - (progn - ;; Hide the cursor. - ;;(internal-show-cursor nil nil) - (setq blink-cursor-idle-timer - (run-with-idle-timer blink-cursor-delay - blink-cursor-delay - 'blink-cursor-start))) - (internal-show-cursor nil t))) + (setq blink-cursor-idle-timer nil) + (blink-cursor-end) + (when blink-cursor-mode + ;; Hide the cursor. + ;;(internal-show-cursor nil nil) + (setq blink-cursor-idle-timer + (run-with-idle-timer blink-cursor-delay + blink-cursor-delay + 'blink-cursor-start)))) (define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1") - -(defun blink-cursor-start () - "Timer function called from the timer `blink-cursor-idle-timer'. -This starts the timer `blink-cursor-timer', which makes the cursor blink -if appropriate. It also arranges to cancel that timer when the next -command starts, by installing a pre-command hook." - (when (null blink-cursor-timer) - (add-hook 'pre-command-hook 'blink-cursor-end) - (internal-show-cursor nil nil) - (setq blink-cursor-timer - (run-with-timer blink-cursor-interval blink-cursor-interval - 'blink-cursor-timer-function)))) - -(defun blink-cursor-timer-function () - "Timer function of timer `blink-cursor-timer'." - (internal-show-cursor nil (not (internal-show-cursor-p)))) - -(defun blink-cursor-end () - "Stop cursor blinking. -This is installed as a pre-command hook by `blink-cursor-start'. -When run, it cancels the timer `blink-cursor-timer' and removes -itself as a pre-command hook." - (remove-hook 'pre-command-hook 'blink-cursor-end) - (internal-show-cursor nil t) - (cancel-timer blink-cursor-timer) - (setq blink-cursor-timer nil)) - - ;; Hourglass pointer diff -r 0c89a85addc3 -r 694bbb62a75d lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/gnus/ChangeLog Sat Oct 14 16:56:21 2006 +0000 @@ -1,3 +1,47 @@ +2006-08-23 Andreas Seltenreich + + [ Backported bug fix from No Gnus. ] + + * gnus.el (gnus-find-method-for-group): On killed/unknown groups, try + looking up the method using GROUP's prefix before inventing a new one. + It is used on killed/unknown groups in various places where returning + an all-new method isn't expected by the caller. + + * gnus-util.el (gnus-group-server): Copy required macro from No Gnus. + +2006-08-13 Romain Francoise + + * mm-extern.el (mm-extern-mail-server): End `y-or-n-p' prompt with a + space. + +2006-08-09 Katsumi Yamaoka + + * compface.el (uncompface): Use binary rather than raw-text-unix. + +2006-08-09 Katsumi Yamaoka + + * compface.el (uncompface): Make sure the eol conversion doesn't take + place when communicating with the external programs. Reported by + ARISAWA Akihiro . + +2006-07-31 Katsumi Yamaoka + + * nnheader.el (nnheader-insert-head): Fix typo in comment. + +2006-07-31 Andreas Seltenreich + + * nnweb.el (nnweb-google-parse-1): Update regexp for author and date. + Make it more robust by parsing author and date independently. + +2006-07-28 Katsumi Yamaoka + + * nnheader.el (nnheader-insert-head): Make it work with Mac as well. + +2006-07-27 Katsumi Yamaoka + + * nnheader.el (nnheader-insert-head): Make it work even if the file + uses CRLF for the line-break code. + 2006-07-19 Andreas Seltenreich * mm-url.el (mm-url-insert-file-contents): Inhibit Connection: close diff -r 0c89a85addc3 -r 694bbb62a75d lisp/gnus/compface.el --- a/lisp/gnus/compface.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/gnus/compface.el Sat Oct 14 16:56:21 2006 +0000 @@ -34,24 +34,28 @@ or `faces-xface' and `netpbm' or `libgr-progs', for instance." (with-temp-buffer (insert face) - (and (eq 0 (apply 'call-process-region (point-min) (point-max) - "uncompface" - 'delete '(t nil) nil)) - (progn - (goto-char (point-min)) - (insert "/* Width=48, Height=48 */\n") - ;; I just can't get "icontopbm" to work correctly on its - ;; own in XEmacs. And Emacs doesn't understand un-raw pbm - ;; files. - (if (not (featurep 'xemacs)) - (eq 0 (call-process-region (point-min) (point-max) - "icontopbm" - 'delete '(t nil))) - (shell-command-on-region (point-min) (point-max) - "icontopbm | pnmnoraw" - (current-buffer) t) - t)) - (buffer-string)))) + (let ((coding-system-for-read 'raw-text) + ;; At least "icontopbm" doesn't work with Windows because + ;; the line-break code is converted into CRLF by default. + (coding-system-for-write 'binary)) + (and (eq 0 (apply 'call-process-region (point-min) (point-max) + "uncompface" + 'delete '(t nil) nil)) + (progn + (goto-char (point-min)) + (insert "/* Width=48, Height=48 */\n") + ;; I just can't get "icontopbm" to work correctly on its + ;; own in XEmacs. And Emacs doesn't understand un-raw pbm + ;; files. + (if (not (featurep 'xemacs)) + (eq 0 (call-process-region (point-min) (point-max) + "icontopbm" + 'delete '(t nil))) + (shell-command-on-region (point-min) (point-max) + "icontopbm | pnmnoraw" + (current-buffer) t) + t)) + (buffer-string))))) (provide 'compface) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/gnus/gnus-util.el --- a/lisp/gnus/gnus-util.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/gnus/gnus-util.el Sat Oct 14 16:56:21 2006 +0000 @@ -607,6 +607,17 @@ (substring gname (match-end 0)) gname))) +(defmacro gnus-group-server (group) + "Find the server name of a foreign newsgroup. +For example, (gnus-group-server \"nnimap+yxa:INBOX.foo\") would +yield \"nnimap:yxa\"." + `(let ((gname ,group)) + (if (string-match "^\\([^:+]+\\)\\(?:\\+\\([^:]*\\)\\)?:" gname) + (format "%s:%s" (match-string 1 gname) (or + (match-string 2 gname) + "")) + (format "%s:%s" (car gnus-select-method) (cadr gnus-select-method))))) + (defun gnus-make-sort-function (funs) "Return a composite sort condition based on the functions in FUNS." (cond diff -r 0c89a85addc3 -r 694bbb62a75d lisp/gnus/gnus.el --- a/lisp/gnus/gnus.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/gnus/gnus.el Sat Oct 14 16:56:21 2006 +0000 @@ -4079,8 +4079,13 @@ (or gnus-override-method (and (not group) gnus-select-method) - (and (not (gnus-group-entry group)) ;; a new group - (gnus-group-name-to-method group)) + (and (not (gnus-group-entry group)) + ;; Killed or otherwise unknown group. + (or + ;; If we know a virtual server by that name, return its method. + (gnus-server-to-method (gnus-group-server group)) + ;; Guess a new method as last resort. + (gnus-group-name-to-method group))) (let ((info (or info (gnus-get-info group))) method) (if (or (not info) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/gnus/mm-extern.el --- a/lisp/gnus/mm-extern.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/gnus/mm-extern.el Sat Oct 14 16:56:21 2006 +0000 @@ -97,7 +97,7 @@ (subject (or (cdr (assq 'subject params)) "none")) (buf (current-buffer)) info) - (if (y-or-n-p (format "Send a request message to %s?" server)) + (if (y-or-n-p (format "Send a request message to %s? " server)) (save-window-excursion (message-mail server subject) (message-goto-body) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/gnus/nnheader.el --- a/lisp/gnus/nnheader.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/gnus/nnheader.el Sat Oct 14 16:56:21 2006 +0000 @@ -586,17 +586,27 @@ (if (eq nnheader-max-head-length t) ;; Just read the entire file. (nnheader-insert-file-contents file) - ;; Read 1K blocks until we find a separator. + ;; Read blocks of the size specified by `nnheader-head-chop-length' + ;; until we find a separator. (let ((beg 0) - format-alist) + (start (point)) + ;; Use `binary' to prevent the contents from being decoded, + ;; or it will change the number of characters that + ;; `insert-file-contents' returns. + (coding-system-for-read 'binary)) (while (and (eq nnheader-head-chop-length - (nth 1 (nnheader-insert-file-contents + (nth 1 (mm-insert-file-contents file nil beg (incf beg nnheader-head-chop-length)))) - (prog1 (not (search-forward "\n\n" nil t)) + ;; CRLF or CR might be used for the line-break code. + (prog1 (not (re-search-forward "\n\r?\n\\|\r\r" nil t)) (goto-char (point-max))) (or (null nnheader-max-head-length) - (< beg nnheader-max-head-length)))))) + (< beg nnheader-max-head-length)))) + ;; Finally decode the contents. + (when (mm-coding-system-p nnheader-file-coding-system) + (mm-decode-coding-region start (point-max) + nnheader-file-coding-system)))) t)) (defun nnheader-article-p () diff -r 0c89a85addc3 -r 694bbb62a75d lisp/gnus/nnweb.el --- a/lisp/gnus/nnweb.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/gnus/nnweb.el Sat Oct 14 16:56:21 2006 +0000 @@ -366,14 +366,15 @@ (mm-url-decode-entities) (search-backward " - ") (when (looking-at - " - \\([a-zA-Z]+\\) \\([0-9]+\\)\\(?: \\([0-9]\\{4\\}\\)\\)?[^\n]+by ?\n?\\([^<\n]+\\)\n") - (setq From (match-string 4) - Date (format "%s %s 00:00:00 %s" + "\\W+\\(\\w+\\) \\([0-9]+\\)\\(?: \\([0-9]\\{4\\}\\)\\)?") + (setq Date (format "%s %s 00:00:00 %s" (match-string 1) (match-string 2) (or (match-string 3) - (substring (current-time-string) -4))))) - + (substring (current-time-string) -4)))) + (goto-char (match-end 0))) + (when (looking-at "[^b]+by\\W+\\([^<\n]+\\)") + (setq From (match-string 1))) (widen) (forward-line 1) (incf i) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/help.el --- a/lisp/help.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/help.el Sat Oct 14 16:56:21 2006 +0000 @@ -822,16 +822,13 @@ (sort minor-modes (lambda (a b) (string-lessp (cadr a) (cadr b))))) (when minor-modes - (princ "Summary of minor modes:\n") + (princ "Enabled minor modes:\n") (make-local-variable 'help-button-cache) (with-current-buffer standard-output (dolist (mode minor-modes) (let ((mode-function (nth 0 mode)) (pretty-minor-mode (nth 1 mode)) (indicator (nth 2 mode))) - (setq indicator (if (zerop (length indicator)) - "no indicator" - (format "indicator%s" indicator))) (add-text-properties 0 (length pretty-minor-mode) '(face bold) pretty-minor-mode) (save-excursion @@ -840,16 +837,22 @@ (push (point-marker) help-button-cache) ;; Document the minor modes fully. (insert pretty-minor-mode) - (princ (format " minor mode (%s):\n" indicator)) + (princ (format " minor mode (%s):\n" + (if (zerop (length indicator)) + "no indicator" + (format "indicator%s" + indicator)))) (princ (documentation mode-function))) - (princ " ") (insert-button pretty-minor-mode 'action (car help-button-cache) 'follow-link t 'help-echo "mouse-2, RET: show full information") - (princ (format " minor mode (%s):\n" indicator))))) - (princ "\n(Full information about these minor modes -follows the description of the major mode.)\n\n")) + (newline))) + (forward-line -1) + (fill-paragraph nil) + (forward-line 1)) + + (princ "\n(Information about these minor modes follows the major mode info.)\n\n")) ;; Document the major mode. (let ((mode mode-name)) (with-current-buffer standard-output diff -r 0c89a85addc3 -r 694bbb62a75d lisp/ido.el --- a/lisp/ido.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/ido.el Sat Oct 14 16:56:21 2006 +0000 @@ -1840,6 +1840,7 @@ (and d (cdr d))))))) (if (member ido-default-item ido-ignore-item-temp-list) (setq ido-default-item nil)) + (ido-trace "new default" ido-default-item) (setq ido-set-default-item nil)) (if ido-process-ignore-lists-inhibit @@ -3528,37 +3529,40 @@ (let* ((case-fold-search ido-case-fold) (slash (and (not ido-enable-prefix) (ido-final-slash ido-text))) (text (if slash (substring ido-text 0 -1) ido-text)) - (rexq (concat (if ido-enable-regexp text (regexp-quote text)) (if slash ".*/" ""))) + (rex0 (if ido-enable-regexp text (regexp-quote text))) + (rexq (concat rex0 (if slash ".*/" ""))) (re (if ido-enable-prefix (concat "\\`" rexq) rexq)) - (full-re (and do-full (not ido-enable-regexp) (not (string-match "\$\\'" re)) - (concat "\\`" re "\\'"))) + (full-re (and do-full (not ido-enable-regexp) (not (string-match "\$\\'" rex0)) + (concat "\\`" rex0 (if slash "/" "") "\\'"))) + (suffix-re (and do-full slash + (not ido-enable-regexp) (not (string-match "\$\\'" rex0)) + (concat rex0 "/\\'"))) (prefix-re (and full-re (not ido-enable-prefix) (concat "\\`" rexq))) (non-prefix-dot (or (not ido-enable-dot-prefix) (not ido-process-ignore-lists) ido-enable-prefix (= (length ido-text) 0))) - - full-matches - prefix-matches - matches) + full-matches suffix-matches prefix-matches matches) (setq ido-incomplete-regexp nil) (condition-case error (mapcar (lambda (item) (let ((name (ido-name item))) - (if (and (or non-prefix-dot - (if (= (aref ido-text 0) ?.) - (= (aref name 0) ?.) - (/= (aref name 0) ?.))) - (string-match re name)) - (cond - ((and full-re (string-match full-re name)) - (setq full-matches (cons item full-matches))) - ((and prefix-re (string-match prefix-re name)) - (setq prefix-matches (cons item prefix-matches))) - (t (setq matches (cons item matches)))))) - t) + (if (and (or non-prefix-dot + (if (= (aref ido-text 0) ?.) + (= (aref name 0) ?.) + (/= (aref name 0) ?.))) + (string-match re name)) + (cond + ((and full-re (string-match full-re name)) + (setq full-matches (cons item full-matches))) + ((and suffix-re (string-match suffix-re name)) + (setq suffix-matches (cons item suffix-matches))) + ((and prefix-re (string-match prefix-re name)) + (setq prefix-matches (cons item prefix-matches))) + (t (setq matches (cons item matches)))))) + t) items) (invalid-regexp (setq ido-incomplete-regexp t @@ -3566,10 +3570,15 @@ ;; special-case single match, and handle appropriately ;; elsewhere. matches (cdr error)))) - (if prefix-matches - (setq matches (nconc prefix-matches matches))) - (if full-matches - (setq matches (nconc full-matches matches))) + (when prefix-matches + (ido-trace "prefix match" prefix-matches) + (setq matches (nconc prefix-matches matches))) + (when suffix-matches + (ido-trace "suffix match" (list text suffix-re suffix-matches)) + (setq matches (nconc suffix-matches matches))) + (when full-matches + (ido-trace "full match" (list text full-re full-matches)) + (setq matches (nconc full-matches matches))) (when (and (null matches) ido-enable-flex-matching (> (length ido-text) 1) @@ -4096,12 +4105,13 @@ try-single-dir-match refresh) - (ido-trace "\nexhibit" this-command) - (ido-trace "dir" ido-current-directory) - (ido-trace "contents" contents) - (ido-trace "list" ido-cur-list) - (ido-trace "matches" ido-matches) - (ido-trace "rescan" ido-rescan) + (when ido-trace-enable + (ido-trace "\nexhibit" this-command) + (ido-trace "dir" ido-current-directory) + (ido-trace "contents" contents) + (ido-trace "list" ido-cur-list) + (ido-trace "matches" ido-matches) + (ido-trace "rescan" ido-rescan)) (save-excursion (goto-char (point-max)) diff -r 0c89a85addc3 -r 694bbb62a75d lisp/info.el --- a/lisp/info.el Sun Jul 30 10:19:46 2006 +0000 +++ b/lisp/info.el Sat Oct 14 16:56:21 2006 +0000 @@ -3805,6 +3805,8 @@ (setq other-tag (cond ((save-match-data (looking-back "\\