Mercurial > emacs
changeset 83306:8b66fddd72c5
Merged from miles@gnu.org--gnu-2005 (patch 307-312)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-307
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-308
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-309
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-310
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-311
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-312
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-346
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Mon, 16 May 2005 15:49:27 +0000 |
parents | 80cb3fe96145 (current diff) 87fca255126a (diff) |
children | 21eea50897a7 |
files | admin/FOR-RELEASE lisp/ChangeLog lisp/emacs-lisp/bytecomp.el lisp/emacs-lisp/eldoc.el lisp/faces.el lisp/files.el lisp/font-lock.el lisp/subr.el lispref/ChangeLog man/ChangeLog man/frames.texi src/alloc.c src/emacs.c src/fileio.c src/process.c src/xdisp.c |
diffstat | 85 files changed, 2664 insertions(+), 1828 deletions(-) [+] |
line wrap: on
line diff
--- a/admin/FOR-RELEASE Sat May 14 01:56:59 2005 +0000 +++ b/admin/FOR-RELEASE Mon May 16 15:49:27 2005 +0000 @@ -93,9 +93,10 @@ DIRECTORY STATUS IN CHARGE --------- ------ --------- +leim working Kenichi Handa lisp/emulation working Thien-Thi Nguyen lisp/international done Kenichi Handa -lisp/languages working Kenichi Handa +lisp/languages done Kenichi Handa lisp/net working Thien-Thi Nguyen lisp/play done Thien-Thi Nguyen lisp/term done Thien-Thi Nguyen
--- a/etc/ChangeLog Sat May 14 01:56:59 2005 +0000 +++ b/etc/ChangeLog Mon May 16 15:49:27 2005 +0000 @@ -1,3 +1,13 @@ +2005-05-15 Richard M. Stallman <rms@gnu.org> + + * GNU: Correct/improve previous change. + +2005-05-14 Richard M. Stallman <rms@gnu.org> + + * GNU: Update footnotes. + + * NEWS: Lots of clarifications and cleanups. + 2005-05-05 Slawomir Nowaczyk <slawek@cs.lth.se> (tiny change) * TUTORIAL.pl: Updated header.
--- a/etc/GNU Sat May 14 01:56:59 2005 +0000 +++ b/etc/GNU Mon May 16 15:49:27 2005 +0000 @@ -1,4 +1,4 @@ -Copyright (C) 1985, 1993, 2003 Free Software Foundation, Inc. +Copyright (C) 1985, 1993, 2003, 2005 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document, in any medium, provided that the copyright notice and @@ -446,7 +446,7 @@ The sale of teaching, hand-holding and maintenance services could also employ programmers. - People with new ideas could distribute programs as freeware, asking + People with new ideas could distribute programs as freeware(7), asking for donations from satisfied users, or selling hand-holding services. I have met people who are already working this way successfully. @@ -518,23 +518,26 @@ (3) Several such companies now exist. - (4) The Free Software Foundation raises most of its funds from a -distribution service, although it is a charity rather than a company. -If *no one* chooses to obtain copies by ordering from the FSF, it -will be unable to do its work. But this does not mean that proprietary -restrictions are justified to force every user to pay. If a small -fraction of all the users order copies from the FSF, that is sufficient -to keep the FSF afloat. So we ask users to choose to support us in -this way. Have you done your part? + (4) The Free Software Foundation raised most of its funds for 10 +years from a distribution service, although it is a charity rather +than a company. - (5) A group of computer companies recently pooled funds to support -maintenance of the GNU C Compiler. + (5) A group of computer companies pooled funds around 1991 to +support maintenance of the GNU C Compiler. (6) In the 80s I had not yet realized how confusing it was to speak of "the issue" of "intellectual property". That term is obviously biased; more subtle is the fact that it lumps together various disparate laws which raise very different issues. Nowadays I urge people to reject the term "intellectual property" entirely, lest it -lead others to suppose this is one coherent issue. The way to be +lead others to suppose that those laws form one coherent issue. The way to be clear is to to discuss patents, copyrights, and trademarks separately. -See http://www.gnu.org/philosophy/words-to-avoid.html. \ No newline at end of file +See http://www.gnu.org/philosophy/not-ipr.xhtml for more explanation +of how this term spreads confusion and bias. + + (7) In 1985 I had not yet recognized the importance of distinguishing +between "free software" and "freeware". The term "freeware" means +software you are free to redistribute, but usually you are not free to study +and change the source code, so most of it is not free software. +See http://www.gnu.org/philosophy/words-to-avoid.html for more +explanation.
--- a/etc/NEWS Sat May 14 01:56:59 2005 +0000 +++ b/etc/NEWS Mon May 16 15:49:27 2005 +0000 @@ -31,7 +31,7 @@ provides a way to display multilingual text in menus (with some caveats). --- -** The `emacsserver' program has been removed, replaced with elisp code. +** The `emacsserver' program has been removed, replaced with Lisp code. --- ** By default, Emacs now uses a setgid helper program to update game @@ -677,14 +677,8 @@ When the file is maintained under version control, that information appears between the position information and the major mode. -*** Easy to overlook single character negation is now font-locked. -You can use the new variable `font-lock-negation-char-face' and the face of -the same name to customize this. Currently the cc-modes, sh-script-mode, -cperl-mode and make-mode support this. - -+++ -*** Control characters and escape glyphs are now shown in the new -escape-glyph face. ++++ +*** New face `escape-glyph' highlights control characters and escape glyphs. +++ *** Non-breaking space and hyphens are now prefixed with an escape @@ -820,6 +814,16 @@ if it is inside a string or a comment, to indicate that it can cause trouble with fontification and/or indentation. ++++ +*** New standard font-lock face `font-lock-preprocessor-face'. + +*** New standard font-lock face `font-lock-comment-delimiter-face'. + +*** Easy to overlook single character negation is now font-locked. +You can use the new variable `font-lock-negation-char-face' and the face of +the same name to customize this. Currently the cc-modes, sh-script-mode, +cperl-mode and make-mode support this. + --- *** The default settings for JIT stealth lock parameters are changed. The default value for the user option jit-lock-stealth-time is now 16 @@ -952,9 +956,11 @@ (rather than a fixed number of lines) and the scrolling is `progressive'. --- -*** Unexpected yanking of text due to accidental clicking on the mouse -wheel button (typically mouse-2) during wheel scrolling is now avoided. -This behavior can be customized via the mouse-wheel-click-event and +*** Emacs ignores mouse-2 clicks while the mouse wheel is being moved. + +People tend to push the mouse wheel (which counts as a mouse-2 click) +unintentionally while turning the wheel, so these clicks are now +ignored. You can customize this with the mouse-wheel-click-event and mouse-wheel-inhibit-click-time variables. +++ @@ -1277,6 +1283,15 @@ matches, compilation errors, etc. This minor mode can be toggled with C-c C-f. +*** When the left fringe is displayed, an arrow points to current message in +the compilation buffer. + +*** The new variable `compilation-context-lines' controls lines of leading +context before the current message. If nil and the left fringe is displayed, +it doesn't scroll the compilation output window. If there is no left fringe, +no arrow is displayed and a value of nil means display the message at the top +of the window. + ** Occur mode changes: +++ @@ -1424,10 +1439,6 @@ * New Modes and Packages in Emacs 22.1 +++ -** New package benchmark.el contains simple support for convenient -timing measurements of code (including the garbage collection component). - -+++ ** Filesets are collections of files. You can define a fileset in various ways, such as based on a directory tree or based on program files that include other program files. @@ -1445,16 +1456,20 @@ available in `etc/calccard.tex' and `etc/calccard.ps'. --- -** `cfengine-mode' is a major mode for editing GNU Cfengine -configuration files. - -+++ -** The new package conf-mode.el handles thousands of configuration files, with -varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value, -var : value, var value or keyword var value) and sections ([section] or -section { }). Many files under /etc/, or with suffixes like .cf through -.config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are -recognized. +** The new package ibuffer provides a powerful, completely +customizable replacement for buff-menu.el. + +--- +** Ido mode is now part of the Emacs distribution. + +The ido (interactively do) package is an extension of the iswitchb +package to do interactive opening of files and directories in addition +to interactive buffer switching. Ido is a superset of iswitchb (with +a few exceptions), so don't enable both packages. + ++++ +** Image files are normally visited in Image mode, which lets you toggle +between viewing the image and viewing the text using C-c C-c. --- ** CUA mode is now part of the Emacs distribution. @@ -1518,28 +1533,6 @@ ** The new package flymake.el does on-the-fly syntax checking of program source files. See the Flymake's Info manual for more details. ---- -** The new Lisp library fringe.el controls the appearance of fringes. - ---- -** GDB-Script-mode is used for files like .gdbinit. - ---- -** The new package ibuffer provides a powerful, completely -customizable replacement for buff-menu.el. - ---- -** Ido mode is now part of the Emacs distribution. - -The ido (interactively do) package is an extension of the iswitchb -package to do interactive opening of files and directories in addition -to interactive buffer switching. Ido is a superset of iswitchb (with -a few exceptions), so don't enable both packages. - -+++ -** Image files are normally visited in Image mode, which lets you toggle -between viewing the image and viewing the text using C-c C-c. - +++ ** The new keypad setup package provides several common bindings for the numeric keypad which is available on most keyboards. The numeric @@ -1599,6 +1592,15 @@ C-x C-k SPC steps through the last keyboard macro one key sequence at a time, prompting for the actions to take. +--- +** New minor mode, Visible mode, toggles invisibility in the current buffer. +When enabled, it makes all invisible text visible. When disabled, it +restores the previous value of `buffer-invisibility-spec'. + ++++ +** The wdired.el package allows you to use normal editing commands on Dired +buffers to change filenames, permissions, etc... + +++ ** The new package longlines.el provides a minor mode for editing text files composed of long lines, based on the `use-hard-newlines' @@ -1619,9 +1621,6 @@ printer) or send directly to printer a PostScript code generated by `ps-print' package. Use M-x pr-help for more information. -+++ -** The new python.el package is used to edit Python and Jython programs. - --- ** The minor mode Reveal mode makes text visible on the fly as you move your cursor into hidden regions of the buffer. @@ -1679,119 +1678,72 @@ (setq tramp-default-method "ftp") --- -** The library tree-widget.el provides a new widget to display a set -of hierarchical data as an outline. For example, the tree-widget is -well suited to display a hierarchy of directories and files. - ---- ** The URL package (which had been part of W3) is now part of Emacs. --- -** New minor mode, Visible mode, toggles invisibility in the current buffer. -When enabled, it makes all invisible text visible. When disabled, it -restores the previous value of `buffer-invisibility-spec'. - -+++ -** The wdired.el package allows you to use normal editing commands on Dired -buffers to change filenames, permissions, etc... +** `cfengine-mode' is a major mode for editing GNU Cfengine +configuration files. + ++++ +** The new package conf-mode.el handles thousands of configuration files, with +varying syntaxes for comments (;, #, //, /* */ or !), assignment (var = value, +var : value, var value or keyword var value) and sections ([section] or +section { }). Many files under /etc/, or with suffixes like .cf through +.config, .properties (Java), .desktop (KDE/Gnome), .ini and many others are +recognized. + +--- +** GDB-Script-mode is used for files like .gdbinit. + ++++ +** The new python.el package is used to edit Python and Jython programs. --- ** The TCL package tcl-mode.el was replaced by tcl.el. This was actually done in Emacs-21.1, and was not documented. - -** The new package bindat.el provides functions to unpack and pack -binary data structures, such as network packets, to and from Lisp -data structures. - -+++ -** The new package button.el implements simple and fast `clickable buttons' -in emacs buffers. `buttons' are much lighter-weight than the `widgets' -implemented by widget.el, and can be used by lisp code that doesn't -require the full power of widgets. Emacs uses buttons for such things -as help and apropos buffers. - ---- -** master-mode.el implements a minor mode for scrolling a slave -buffer without leaving your current buffer, the master buffer. - -It can be used by sql.el, for example: the SQL buffer is the master -and its SQLi buffer is the slave. This allows you to scroll the SQLi -buffer containing the output from the SQL buffer containing the -commands. - -This is how to use sql.el and master.el together: the variable -sql-buffer contains the slave buffer. It is a local variable in the -SQL buffer. - -(add-hook 'sql-mode-hook - (function (lambda () - (master-mode t) - (master-set-slave sql-buffer)))) -(add-hook 'sql-set-sqli-hook - (function (lambda () - (master-set-slave sql-buffer)))) - -+++ -** New Lisp library testcover.el works with edebug to help you determine -whether you've tested all your Lisp code. Function testcover-start -instruments all functions in a given file. Then test your code. Function -testcover-mark-all adds overlay "splotches" to the Lisp file's buffer to -show where coverage is lacking. Command testcover-next-mark (bind it to -a key!) will move point forward to the next spot that has a splotch. - -Normally, a red splotch indicates the form was never completely -evaluated; a brown splotch means it always evaluated to the same -value. The red splotches are skipped for forms that can't possibly -complete their evaluation, such as `error'. The brown splotches are -skipped for forms that are expected to always evaluate to the same -value, such as (setq x 14). - -For difficult cases, you can add do-nothing macros to your code to -help out the test coverage tool. The macro `noreturn' suppresses a -red splotch. It is an error if the argument to `noreturn' does -return. The macro 1value suppresses a brown splotch for its argument. -This macro is a no-op except during test-coverage -- then it signals -an error if the argument actually returns differing values. * Changes in Specialized Modes and Packages in Emacs 22.1: -** Makefile mode has now been split up into specialized modes for automake, -gmake, makepp and BSD make. The former two couldn't be differentiated before, -and the latter two are new. Font-locking is robust now and offers new -customizable faces. - -+++ -** In Outline mode, hide-body no longer hides lines at the top +** Makefile mode has submodes for automake, gmake, makepp and BSD make. + +The former two couldn't be differentiated before, and the latter two +are new. Font-locking is robust now and offers new customizable +faces. + ++++ +** In Outline mode, `hide-body' no longer hides lines at the top of the file that precede the first header line. +++ ** Telnet now prompts you for a port number with C-u M-x telnet. --- -** The terminal emulation code in term.el has been improved, it can +** The terminal emulation code in term.el has been improved; it can run most curses applications now. +++ -** M-x diff uses diff-mode instead of compilation-mode. - -+++ -** You can now customize fill-nobreak-predicate to control where +** M-x diff uses Diff mode instead of Compilation mode. + ++++ +** You can now customize `fill-nobreak-predicate' to control where filling can break lines. The value is now normally a list of functions, but it can also be a single function, for compatibility. -We provide two sample predicates, fill-single-word-nobreak-p and -fill-french-nobreak-p, for use in the value of fill-nobreak-predicate. +Emacs provide two predicates, `fill-single-word-nobreak-p' and +`fill-french-nobreak-p', for use as the value of +`fill-nobreak-predicate'. --- ** M-x view-file and commands that use it now avoid interfering with special modes such as Tar mode. --- -** Commands winner-redo and winner-undo, from winner.el, are now bound to -C-c <left> and C-c <right>, respectively. This is an incompatible change. - ---- -** global-whitespace-mode is a new alias for whitespace-global-mode. +** Commands `winner-redo' and `winner-undo', from winner.el, are now +bound to C-c <left> and C-c <right>, respectively. This is an +incompatible change. + +--- +** `global-whitespace-mode' is a new alias for `whitespace-global-mode'. +++ ** M-x compare-windows now can automatically skip non-matching text to @@ -1799,6 +1751,7 @@ +++ ** New user option `add-log-always-start-new-record'. + When this option is enabled, M-x add-change-log-entry always starts a new record regardless of when the last record is. @@ -1810,10 +1763,11 @@ +++ *** A numeric prefix argument of `info' selects an Info buffer -with the number appended to the *info* buffer name (e.g. "*info*<2>"). +with the number appended to the `*info*' buffer name (e.g. "*info*<2>"). --- *** isearch in Info uses Info-search and searches through multiple nodes. + Before leaving the initial Info node isearch fails once with the error message [initial node], and with subsequent C-s/C-r continues through other nodes. When isearch fails for the rest of the manual, it wraps @@ -1852,11 +1806,13 @@ +++ *** Info now hides node names in menus and cross references by default. + If you prefer the old behavior, you can set the new user option `Info-hide-note-references' to nil. --- *** Images in Info pages are supported. + Info pages show embedded images, in Emacs frames with image support. Info documentation that includes images, processed with makeinfo version 4.7 or newer, compiles to Info pages with embedded images. @@ -1865,25 +1821,24 @@ *** The default value for `Info-scroll-prefer-subnodes' is now nil. --- -*** Info-index offers completion. +*** `Info-index' offers completion. ** Lisp mode changes: --- -*** Lisp mode now uses font-lock-doc-face for the docstrings. - -+++ -*** A prefix argument of C-M-q in Emacs Lisp mode pretty-printifies the -list starting after point. +*** Lisp mode now uses `font-lock-doc-face' for doc strings. + ++++ +*** C-u C-M-q in Emacs Lisp mode pretty-prints the list after point. *** New features in evaluation commands +++ -*** The function `eval-defun' (C-M-x) called on defface reinitializes +**** The function `eval-defun' (C-M-x) called on defface reinitializes the face to the value specified in the defface expression. +++ -*** Typing C-x C-e twice prints the value of the integer result +**** Typing C-x C-e twice prints the value of the integer result in additional formats (octal, hexadecimal, character) specified by the new function `eval-expression-print-format'. The same function also defines the result format for `eval-expression' (M-:), @@ -2009,23 +1964,23 @@ composition-close, and incomposition. *** New functions to do hungry delete without enabling hungry delete mode. -The functions c-hungry-backspace and c-hungry-delete-forward can be +The functions `c-hungry-backspace' and `c-hungry-delete-forward' can be bound to keys to get this feature without toggling a mode. -Contributed by Kevin Ryde. - -*** Better control over require-final-newline. The variable that -controls how to handle a final newline when the buffer is saved, -require-final-newline, is now customizable on a per-mode basis through -c-require-final-newline. That is a list of modes, and only those -modes set require-final-newline. By default that's C, C++ and -Objective-C. - -The specified modes set require-final-newline based on -mode-require-final-newline, as usual. + +*** Better control over `require-final-newline'. + +The variable `c-require-final-newline' specifies which of the modes +implemented by CC mode should insert final newlines. Its value is a +list of modes, and only those modes should do it. By default the list +includes C, C++ and Objective-C modes. + +Whichever modes are in this list will set `require-final-newline' +based on `mode-require-final-newline'. *** Format change for syntactic context elements. -The elements in the syntactic context returned by c-guess-basic-syntax -and stored in c-syntactic-context has been changed somewhat to allow + +The elements in the syntactic context returned by `c-guess-basic-syntax' +and stored in `c-syntactic-context' has been changed somewhat to allow attaching more information. They are now lists instead of single cons cells. E.g. a line that previously had the syntactic analysis @@ -2038,12 +1993,13 @@ In some cases there are more than one position given for a syntactic symbol. -This change might affect code that call c-guess-basic-syntax directly, -and custom lineup functions if they use c-syntactic-context. However, +This change might affect code that call `c-guess-basic-syntax' directly, +and custom lineup functions if they use `c-syntactic-context'. However, the argument given to lineup functions is still a single cons cell with nil or an integer in the cdr. *** API changes for derived modes. + There have been extensive changes "under the hood" which can affect derived mode writers. Some of these changes are likely to cause incompatibilities with existing derived modes, but on the other hand @@ -2055,8 +2011,8 @@ **** New initialization functions. The initialization procedure has been split up into more functions to -give better control: c-basic-common-init, c-font-lock-init, and -c-init-language-vars. +give better control: `c-basic-common-init', `c-font-lock-init', and +`c-init-language-vars'. *** Changes in analysis of nested syntactic constructs. The syntactic analysis engine has better handling of cases where @@ -2082,33 +2038,34 @@ **** Syntactic indentation inside macros. The contents of multiline #define's are now analyzed and indented syntactically just like other code. This can be disabled by the new -variable c-syntactic-indentation-in-macros. A new syntactic symbol -cpp-define-intro has been added to control the initial indentation -inside #define's. - -**** New lineup function c-lineup-cpp-define. +variable `c-syntactic-indentation-in-macros'. A new syntactic symbol +`cpp-define-intro' has been added to control the initial indentation +inside `#define's. + +**** New lineup function `c-lineup-cpp-define'. + Now used by default to line up macro continuation lines. The behavior of this function closely mimics the indentation one gets if the macro is indented while the line continuation backslashes are temporarily removed. If syntactic indentation in macros is turned off, it works -much line c-lineup-dont-change, which was used earlier, but handles +much line `c-lineup-dont-change', which was used earlier, but handles empty lines within the macro better. **** Automatically inserted newlines continues the macro if used within one. This applies to the newlines inserted by the auto-newline mode, and to -c-context-line-break and c-context-open-line. +`c-context-line-break' and `c-context-open-line'. **** Better alignment of line continuation backslashes. -c-backslash-region tries to adapt to surrounding backslashes. New -variable c-backslash-max-column which put a limit on how far out +`c-backslash-region' tries to adapt to surrounding backslashes. New +variable `c-backslash-max-column' which put a limit on how far out backslashes can be moved. **** Automatic alignment of line continuation backslashes. -This is controlled by the new variable c-auto-align-backslashes. It -affects c-context-line-break, c-context-open-line and newlines -inserted in auto-newline mode. - +This is controlled by the new variable `c-auto-align-backslashes'. It +affects `c-context-line-break', `c-context-open-line' and newlines +inserted in Auto-Newline mode. **** Line indentation works better inside macros. + Regardless whether syntactic indentation and syntactic indentation inside macros are enabled or not, line indentation now ignores the line continuation backslashes. This is most noticeable when syntactic @@ -2117,37 +2074,35 @@ *** indent-for-comment is more customizable. The behavior of M-; (indent-for-comment) is now configurable through -the variable c-indent-comment-alist. The indentation behavior based +the variable `c-indent-comment-alist'. The indentation behavior based on the preceding code on the line, e.g. to get two spaces after #else -and #endif but indentation to comment-column in most other cases +and #endif but indentation to `comment-column' in most other cases (something which was hardcoded earlier). -*** New function c-context-open-line. -It's the open-line equivalent of c-context-line-break. +*** New function `c-context-open-line'. +It's the open-line equivalent of `c-context-line-break'. *** New lineup functions -**** c-lineup-string-cont +**** `c-lineup-string-cont' This lineup function lines up a continued string under the one it continues. E.g: result = prefix + "A message " "string."; <- c-lineup-string-cont -**** c-lineup-cascaded-calls +**** `c-lineup-cascaded-calls' Lines up series of calls separated by "->" or ".". -**** c-lineup-knr-region-comment +**** `c-lineup-knr-region-comment' Gives (what most people think is) better indentation of comments in the "K&R region" between the function header and its body. -**** c-lineup-gcc-asm-reg -Provides better indentation inside asm blocks. Contributed by Kevin -Ryde. - -**** c-lineup-argcont +**** `c-lineup-gcc-asm-reg' +Provides better indentation inside asm blocks. + +**** `c-lineup-argcont' Lines up continued function arguments after the preceding comma. -Contributed by Kevin Ryde. *** Better caching of the syntactic context. CC Mode caches the positions of the opening parentheses (of any kind) @@ -2167,7 +2122,7 @@ "invalid" context, e.g. in a function argument. In practice that can happen when macros are involved. -*** Improved the way c-indent-exp chooses the block to indent. +*** Improved the way `c-indent-exp' chooses the block to indent. It now indents the block for the closest sexp following the point whose closing paren ends on a different line. This means that the point doesn't have to be immediately before the block to indent. @@ -2175,7 +2130,7 @@ line is left untouched. *** Added toggle for syntactic indentation. -The function c-toggle-syntactic-indentation can be used to toggle +The function `c-toggle-syntactic-indentation' can be used to toggle syntactic indentation. --- @@ -2205,7 +2160,7 @@ `fortran-beginning-of-block'. --- -*** F90 mode and Fortran mode have support for hs-minor-mode (hideshow). +*** F90 mode and Fortran mode have support for `hs-minor-mode' (hideshow). It cannot deal with every code format, but ought to handle a sizeable majority. @@ -2250,50 +2205,51 @@ and super/sub-scripts are made into super/sub-scripts. +++ -*** New major mode doctex-mode for *.dtx files. +*** New major mode Doctex mode, for *.dtx files. ** BibTeX mode: -*** The new command bibtex-url browses a URL for the BibTeX entry at + +*** The new command `bibtex-url' browses a URL for the BibTeX entry at point (bound to C-c C-l and mouse-2, RET on clickable fields). -*** The new command bibtex-entry-update (bound to C-c C-u) updates +*** The new command `bibtex-entry-update' (bound to C-c C-u) updates an existing BibTeX entry. *** New `bibtex-entry-format' option `required-fields', enabled by default. -*** bibtex-maintain-sorted-entries can take values `plain', +*** `bibtex-maintain-sorted-entries' can take values `plain', `crossref', and `entry-class' which control the sorting scheme used for BibTeX entries. `bibtex-sort-entry-class' controls the sorting scheme `entry-class'. TAB completion for reference keys and automatic detection of duplicates does not require anymore that -bibtex-maintain-sorted-entries is non-nil. - -*** If the new variable bibtex-parse-keys-fast is non-nil, +`bibtex-maintain-sorted-entries' is non-nil. + +*** If the new variable `bibtex-parse-keys-fast' is non-nil, use fast but simplified algorithm for parsing BibTeX keys. -*** If the new variable bibtex-autoadd-commas is non-nil, +*** If the new variable `bibtex-autoadd-commas' is non-nil, automatically add missing commas at end of BibTeX fields. -*** The new variable bibtex-autofill-types contains a list of entry +*** The new variable `bibtex-autofill-types' contains a list of entry types for which fields are filled automatically (if possible). -*** The new command bibtex-complete completes word fragment before +*** The new command `bibtex-complete' completes word fragment before point according to context (bound to M-tab). -*** The new commands bibtex-find-entry and bibtex-find-crossref +*** The new commands `bibtex-find-entry' and `bibtex-find-crossref' locate entries and crossref'd entries (bound to C-c C-s and C-c C-x). Crossref fields are clickable (bound to mouse-2, RET). -*** In BibTeX mode the command fill-paragraph (bound to M-q) fills +*** In BibTeX mode the command `fill-paragraph' (M-q) fills individual fields of a BibTeX entry. -*** The new variables bibtex-files and bibtex-file-path define a set +*** The new variables `bibtex-files' and `bibtex-file-path' define a set of BibTeX files that are searched for entry keys. -*** The new command bibtex-validate-globally checks for duplicate keys +*** The new command `bibtex-validate-globally' checks for duplicate keys in multiple BibTeX files. -*** The new command bibtex-copy-summary-as-kill pushes summary +*** The new command `bibtex-copy-summary-as-kill' pushes summary of BibTeX entry to kill ring (bound to C-c C-t). +++ @@ -2315,14 +2271,15 @@ *** The new package gdb-ui.el provides an enhanced graphical interface to GDB. You can interact with GDB through the GUD buffer in the usual way, but there are also further buffers which control the execution and describe the -state of your program. It separates the input/output of your program from +state of your program. It can separate the input/output of your program from that of GDB and watches expressions in the speedbar. It also uses features of -Emacs 21 such as the display margin for breakpoints, and the toolbar. - -Use M-x gdba to start GDB-UI. +Emacs 21/22 such as the the toolbar, and bitmaps in the fringe to indicate +breakpoints. + +Use M-x gdb to start GDB-UI. *** GUD tooltips can be toggled independently of normal tooltips -with the minor mode, gud-tooltip-mode. +with the minor mode `gud-tooltip-mode'. +++ *** In graphical mode, with a C program, GUD Tooltips have been extended to @@ -2348,27 +2305,27 @@ *** The previous method of searching for source files has been preserved in case someone still wants/needs to use it. - Set gud-jdb-use-classpath to nil. + Set `gud-jdb-use-classpath' to nil. Added Customization Variables -*** gud-jdb-command-name. What command line to use to invoke jdb. - -*** gud-jdb-use-classpath. Allows selection of java source file searching - method: set to t for new method, nil to scan gud-jdb-directories for +*** `gud-jdb-command-name'. What command line to use to invoke jdb. + +*** `gud-jdb-use-classpath'. Allows selection of java source file searching + method: set to t for new method, nil to scan `gud-jdb-directories' for java sources (previous method). -*** gud-jdb-directories. List of directories to scan and search for java - classes using the original gud-jdb method (if gud-jdb-use-classpath +*** `gud-jdb-directories'. List of directories to scan and search for java + classes using the original gud-jdb method (if `gud-jdb-use-classpath' is nil). Minor Improvements -*** The STARTTLS elisp wrapper (starttls.el) can now use GNUTLS -instead of the OpenSSL based "starttls" tool. For backwards -compatibility, it prefers "starttls", but you can toggle +*** The STARTTLS wrapper (starttls.el) can now use GNUTLS +instead of the OpenSSL based `starttls' tool. For backwards +compatibility, it prefers `starttls', but you can toggle `starttls-use-gnutls' to switch to GNUTLS (or simply remove the -"starttls" tool). +`starttls' tool). *** Do not allow debugger output history variable to grow without bounds. @@ -2376,6 +2333,7 @@ +++ *** You can now use Auto Revert mode to `tail' a file. + If point is at the end of a file buffer before reverting, Auto Revert mode keeps it at the end after reverting. Similarly if point is displayed at the end of a file buffer in any window, it stays at @@ -2431,17 +2389,20 @@ ** Desktop package +++ -*** Desktop saving is now a minor mode, desktop-save-mode. Variable -desktop-enable is obsolete. Customize desktop-save-mode to enable desktop -saving. +*** Desktop saving is now a minor mode, `desktop-save-mode'. + +*** The variable `desktop-enable' is obsolete. + +Customize `desktop-save-mode' to enable desktop saving. --- *** Buffers are saved in the desktop file in the same order as that in the buffer list. +++ -*** The desktop package can be customized to restore only some buffers immediately, -remaining buffers are restored lazily (when Emacs is idle). +*** The desktop package can be customized to restore only some buffers +immediately, remaining buffers are restored lazily (when Emacs is +idle). +++ *** New commands: @@ -2477,6 +2438,7 @@ --- ** The saveplace.el package now filters out unreadable files. + When you exit Emacs, the saved positions in visited files no longer include files that aren't readable, e.g. files that don't exist. Customize the new option `save-place-forget-unreadable-files' to nil @@ -2509,6 +2471,7 @@ *** New regular expressions features **** New syntax for regular expressions, multi-line regular expressions. + The syntax --ignore-case-regexp=/regex/ is now undocumented and retained only for backward compatibility. The new equivalent syntax is --regex=/regex/i. More generally, it is --regex=/TAGREGEX/TAGNAME/MODS, @@ -2520,39 +2483,47 @@ span newlines allows writing of much more powerful regular expressions and rapid prototyping for tagging new languages. -**** Regular expressions can use char escape sequences as in Gcc. +**** Regular expressions can use char escape sequences as in GCC. + The escaped character sequence \a, \b, \d, \e, \f, \n, \r, \t, \v, respectively, stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL, CR, TAB, VT, **** Regular expressions can be bound to a given language. + The syntax --regex={LANGUAGE}REGEX means that REGEX is used to make tags only for files of language LANGUAGE, and ignored otherwise. This is particularly useful when storing regexps in a file. **** Regular expressions can be read from a file. + The --regex=@regexfile option means read the regexps from a file, one per line. Lines beginning with space or tab are ignored. *** New language parsing features **** The `::' qualifier triggers C++ parsing in C file. + Previously, only the `template' and `class' keywords had this effect. -**** The gnucc __attribute__ keyword is now recognised and ignored. +**** The GCC __attribute__ keyword is now recognised and ignored. **** New language HTML. -Title and h1, h2, h3 are tagged. Also, tags are generated when name= is -used inside an anchor and whenever id= is used. + +Tags are generated for `title' as well as `h1', `h2', and `h3'. Also, +when `name=' is used inside an anchor and whenever `id=' is used. **** In Makefiles, constants are tagged. + If you want the old behavior instead, thus avoiding to increase the size of the tags file, use the --no-globals option. **** New language Lua. + All functions are tagged. **** In Perl, packages are tags. + Subroutine tags are named from their package. You can jump to sub tags as you did before, by the sub name, or additionally by looking for package::sub. @@ -2560,14 +2531,17 @@ **** In Prolog, etags creates tags for rules in addition to predicates. **** New language PHP. -Tags are functions, classes and defines. -If the --members option is specified to etags, tags are variables also. + +Functions, classes and defines are tags. If the --members option is +specified to etags, variables are tags also. **** New default keywords for TeX. + The new keywords are def, newcommand, renewcommand, newenvironment and renewenvironment. *** Honour #line directives. + When Etags parses an input file that contains C preprocessor's #line directives, it creates tags using the file name and line number specified in those directives. This is useful when dealing with code @@ -2575,6 +2549,7 @@ writes tags pointing to the source file. *** New option --parse-stdin=FILE. + This option is mostly useful when calling etags from programs. It can be used (only once) in place of a file name on the command line. Etags reads from standard input and marks the produced tags as belonging to @@ -2583,31 +2558,33 @@ ** VC Changes +++ -*** The key C-x C-q no longer checks files in or out, it only changes -the read-only state of the buffer (toggle-read-only). We made this -change because we held a poll and found that many users were unhappy -with the previous behavior. If you do prefer this behavior, you -can bind `vc-toggle-read-only' to C-x C-q in your .emacs: +*** The key C-x C-q only changes the read-only state of the buffer +(toggle-read-only). It no longer checks files in or out. + +We made this change because we held a poll and found that many users +were unhappy with the previous behavior. If you do prefer this +behavior, you can bind `vc-toggle-read-only' to C-x C-q in your +`.emacs' file: (global-set-key "\C-x\C-q" 'vc-toggle-read-only) The function `vc-toggle-read-only' will continue to exist. +++ -*** There is a new user option `vc-cvs-global-switches' that allows -you to specify switches that are passed to any CVS command invoked -by VC. These switches are used as "global options" for CVS, which -means they are inserted before the command name. For example, this -allows you to specify a compression level using the "-z#" option for -CVS. +*** The new variable `vc-cvs-global-switches' specifies switches that +are passed to any CVS command invoked by VC. + +These switches are used as "global options" for CVS, which means they +are inserted before the command name. For example, this allows you to +specify a compression level using the `-z#' option for CVS. +++ *** New backends for Subversion and Meta-CVS. +++ -*** vc-annotate-mode enhancements - -In vc-annotate mode, you can now use the following key bindings for +*** VC-Annotate mode enhancements + +In VC-Annotate mode, you can now use the following key bindings for enhanced functionality to browse the annotations of past revisions, or to view diffs or log entries directly from vc-annotate-mode: @@ -2629,18 +2606,18 @@ +++ *** In pcl-cvs mode, there is a new `d r' command to view the changes anyone has committed to the repository since you last executed -"checkout", "update" or "commit". That means using cvs diff options +`checkout', `update' or `commit'. That means using cvs diff options -rBASE -rHEAD. +++ -** There is a new user option `mail-default-directory' that allows you -to specify the value of `default-directory' for mail buffers. This -directory is used for auto-save files of mail buffers. It defaults to -"~/". - -+++ -** Emacs can now indicate in the mode-line the presence of new e-mail -in a directory or in a file. See the documentation of the user option +** The new variable `mail-default-directory' specifies +`default-directory' for mail buffers. This directory is used for +auto-save files of mail buffers. It defaults to "~/". + ++++ +** The mode line can indicate new mail in a directory or file. + +See the documentation of the user option `display-time-mail-directory'. ** Rmail changes: @@ -2650,6 +2627,7 @@ +++ *** Support for `movemail' from GNU mailutils was added to Rmail. + This version of `movemail' allows to read mail from a wide range of mailbox formats, including remote POP3 and IMAP4 mailboxes with or without TLS encryption. If GNU mailutils is installed on the system @@ -2660,11 +2638,13 @@ --- *** Gnus now includes Sieve and PGG + Sieve is a library for managing Sieve scripts. PGG is a library to handle PGP/MIME. --- *** There are many news features, bug fixes and improvements. + See the file GNUS-NEWS or the node "Oort Gnus" in the Gnus manual for details. --- @@ -2716,10 +2696,10 @@ and `diary-header-line-format'. +++ -*** The procedure for activating appointment reminders has changed: use -the new function `appt-activate'. The new variable +*** The procedure for activating appointment reminders has changed: +use the new function `appt-activate'. The new variable `appt-display-format' controls how reminders are displayed, replacing -appt-issue-message, appt-visible, and appt-msg-window. +`appt-issue-message', `appt-visible', and `appt-msg-window'. +++ *** The new functions `diary-from-outlook', `diary-from-outlook-gnus', @@ -2757,24 +2737,26 @@ SQL mode indicator. The technique of setting `sql-mode-font-lock-defaults' directly in -your .emacs will no longer establish the default highlighting -- Use +your `.emacs' will no longer establish the default highlighting -- Use `sql-product' to accomplish this. ANSI keywords are always highlighted. *** The function `sql-add-product-keywords' can be used to add font-lock rules to the product specific rules. For example, to have -all identifiers ending in "_t" under MS SQLServer treated as a type, +all identifiers ending in `_t' under MS SQLServer treated as a type, you would use the following line in your .emacs file: (sql-add-product-keywords 'ms '(("\\<\\w+_t\\>" . font-lock-type-face))) -*** Oracle support includes keyword highlighting for Oracle 9i. Most -SQL and PL/SQL keywords are implemented. SQL*Plus commands are +*** Oracle support includes keyword highlighting for Oracle 9i. + +Most SQL and PL/SQL keywords are implemented. SQL*Plus commands are highlighted in `font-lock-doc-face'. *** Microsoft SQLServer support has been significantly improved. + Keyword highlighting for SqlServer 2000 is implemented. sql-interactive-mode defaults to use osql, rather than isql, because osql flushes its error stream more frequently. Thus error messages @@ -2782,7 +2764,7 @@ terminated. If the username and password are not provided to `sql-ms', osql is -called with the -E command line argument to use the operating system +called with the `-E' command line argument to use the operating system credentials to authenticate the user. *** Postgres support is enhanced. @@ -2797,33 +2779,36 @@ defaults. *** Added SQL->Start SQLi Session menu entry which calls the -appropriate sql-interactive-mode wrapper for the current setting of +appropriate `sql-interactive-mode' wrapper for the current setting of `sql-product'. --- -*** Support for the SQLite interpreter has been added to sql.el by calling -'sql-sqlite'. +*** sql.el supports the SQLite interpreter--call 'sql-sqlite'. ** FFAP changes: +++ -*** New ffap commands and keybindings: C-x C-r (`ffap-read-only'), +*** New ffap commands and keybindings: + +C-x C-r (`ffap-read-only'), C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'), C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'), C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame'). --- -*** FFAP accepts wildcards in a file name by default. C-x C-f passes -it to `find-file' with non-nil WILDCARDS argument, which visits -multiple files, and C-x d passes it to `dired'. - ---- -** skeleton.el now supports using - to mark the skeleton-point without - interregion interaction. @ has reverted to only setting - skeleton-positions and no longer sets skeleton-point. Skeletons - which used @ to mark skeleton-point independent of _ should now use - - instead. The updated skeleton-insert docstring explains these new - features along with other details of skeleton construction. +*** FFAP accepts wildcards in a file name by default. + +C-x C-f passes the file name to `find-file' with non-nil WILDCARDS +argument, which visits multiple files, and C-x d passes it to `dired'. + +--- +** In skeleton.el, `-' marks the `skeleton-point' without interregion interaction. + +`@' has reverted to only setting `skeleton-positions' and no longer +sets `skeleton-point'. Skeletons which used @ to mark +`skeleton-point' independent of `_' should now use `-' instead. The +updated `skeleton-insert' docstring explains these new features along +with other details of skeleton construction. --- ** New variable `hs-set-up-overlay' allows customization of the overlay @@ -2832,25 +2817,25 @@ temporary overlay showing in the course of an isearch operation. +++ -** hide-ifdef-mode now uses overlays rather than selective-display +** `hide-ifdef-mode' now uses overlays rather than selective-display to hide its text. This should be mostly transparent but slightly changes the behavior of motion commands like C-e and C-p. --- -** partial-completion-mode now does partial completion on directory names. +** `partial-completion-mode' now handles partial completion on directory names. --- ** The type-break package now allows `type-break-file-name' to be nil and if so, doesn't store any data across sessions. This is handy if -you don't want the .type-break file in your home directory or are +you don't want the `.type-break' file in your home directory or are annoyed by the need for interaction when you kill Emacs. --- ** `ps-print' can now print characters from the mule-unicode charsets. Printing text with characters from the mule-unicode-* sets works with -ps-print, provided that you have installed the appropriate BDF fonts. -See the file INSTALL for URLs where you can find these fonts. +`ps-print', provided that you have installed the appropriate BDF +fonts. See the file INSTALL for URLs where you can find these fonts. --- ** New command `strokes-global-set-stroke-string'. @@ -2870,7 +2855,7 @@ +++ *** The `emacsclient' command understands the options `--eval' and -`--display' which tell Emacs respectively to evaluate the given elisp +`--display' which tell Emacs respectively to evaluate the given Lisp expression and to use the given display when visiting files. +++ @@ -2881,11 +2866,10 @@ +++ ** You can now disable pc-selection-mode after enabling it. + M-x pc-selection-mode behaves like a proper minor mode, and with no -argument it toggles the mode. - -Turning off PC-Selection mode restores the global key bindings -that were replaced by turning on the mode. +argument it toggles the mode. Turning off PC-Selection mode restores +the global key bindings that were replaced by turning on the mode. --- ** `uniquify-strip-common-suffix' tells uniquify to prefer @@ -2893,9 +2877,10 @@ --- ** Support for `magic cookie' standout modes has been removed. -Emacs will still work on terminals that require magic cookies in order -to use standout mode, however they will not be able to display -mode-lines in inverse-video. + +Emacs still works on terminals that require magic cookies in order to +use standout mode, but they can no longer display mode-lines in +inverse-video. --- ** The game `mpuz' is enhanced. @@ -2905,14 +2890,15 @@ automatically. The game uses faces for better visual feedback. --- -** display-battery has been replaced by display-battery-mode. - ---- -** calculator.el now has radix grouping mode, which is available when -`calculator-output-radix' is non-nil. In this mode a separator -character is used every few digits, making it easier to see byte -boundries etc. For more info, see the documentation of the variable -`calculator-radix-grouping-mode'. +** display-battery-mode replaces display-battery. + +--- +** calculator.el now has radix grouping mode. + +To enable this, set `calculator-output-radix' non-nil. In this mode a +separator character is used every few digits, making it easier to see +byte boundries etc. For more info, see the documentation of the +variable `calculator-radix-grouping-mode'. --- ** fast-lock.el and lazy-lock.el are obsolete. Use jit-lock.el instead. @@ -2921,12 +2907,13 @@ ** iso-acc.el is now obsolete. Use one of the latin input methods instead. --- -** cplus-md.el has been removed to avoid problems with Custom. +** cplus-md.el has been deleted. * Changes in Emacs 22.1 on non-free operating systems +++ ** Passing resources on the command line now works on MS Windows. + You can use --xrm to pass resource settings to Emacs, overriding any existing values. For example: @@ -2937,15 +2924,18 @@ --- ** On MS Windows, the "system caret" now follows the cursor. + This enables Emacs to work better with programs that need to track the cursor, for example screen magnifiers and text to speech programs. --- ** Tooltips now work on MS Windows. + See the Emacs 21.1 NEWS entry for tooltips for details. --- ** Images are now supported on MS Windows. + PBM and XBM images are supported out of the box. Other image formats depend on external libraries. All of these libraries have been ported to Windows, and can be found in both source and binary form at @@ -2955,6 +2945,7 @@ --- ** Sound is now supported on MS Windows. + WAV format is supported on all versions of Windows, other formats such as AU, AIFF and MP3 may be supported in the more recent versions of Windows, or when other software provides hooks into the system level @@ -2962,16 +2953,19 @@ --- ** Different shaped mouse pointers are supported on MS Windows. + The mouse pointer changes shape depending on what is under the pointer. --- ** Pointing devices with more than 3 buttons are now supported on MS Windows. + The new variable `w32-pass-extra-mouse-buttons-to-system' controls whether Emacs should handle the extra buttons itself (the default), or pass them to Windows to be handled with system-wide functions. --- ** Emacs takes note of colors defined in Control Panel on MS-Windows. + The Control Panel defines some default colors for applications in much the same way as wildcard X Resources do on X. Emacs now adds these colors to the colormap prefixed by System (eg SystemMenu for the @@ -2982,6 +2976,7 @@ --- ** On MS Windows NT/W2K/XP, Emacs uses Unicode for clipboard operations. + Those systems use Unicode internally, so this allows Emacs to share multilingual text with other applications. On other versions of MS Windows, Emacs now uses the appropriate locale coding-system, so @@ -2989,9 +2984,10 @@ any customizations. --- -** On Mac OS, the value of the variable `keyboard-coding-system' is -now dynamically changed according to the current keyboard script. The -variable `mac-keyboard-text-encoding' and the constants +** On Mac OS, `keyboard-coding-system' changes based on the keyboard script. + +--- +** The variable `mac-keyboard-text-encoding' and the constants `kTextEncodingMacRoman', `kTextEncodingISOLatin1', and `kTextEncodingISOLatin2' are obsolete. @@ -3022,57 +3018,67 @@ *** `makehash' is now obsolete. Use `make-hash-table' instead. +++ -*** If optional third argument APPEND to `add-to-list' is non-nil, a -new element gets added at the end of the list instead of at the -beginning. This change actually occurred in Emacs-21.1, but was not -documented. - -+++ -*** New function `copy-tree' makes a copy of a tree, recursively copying -both cars and cdrs. - -+++ -*** New function `delete-dups' destructively removes `equal' -duplicates from a list. Of several `equal' occurrences of an element -in the list, the first one is kept. - -+++ -*** `declare' is now a macro. This change was made mostly for -documentation purposes and should have no real effect on Lisp code. - -+++ -*** The new function `rassq-delete-all' deletes all elements from an -alist whose cdr is `eq' to a specified value. - -+++ -*** The function `number-sequence' returns a list of equally-separated -numbers. For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). -By default, the separation is 1, but you can specify a different separation -as the third argument. (number-sequence 1.5 6 2) returns (1.5 3.5 5.5). - -+++ -*** The variables `most-positive-fixnum' and `most-negative-fixnum' -hold the largest and smallest possible integer values. - -+++ -*** The flags, width, and precision options for %-specifications in function -`format' are now documented. Some flags that were accepted but not -implemented (such as "*") are no longer accepted. - -+++ -*** Functions `get' and `plist-get' no longer signals an error for -a malformed property list. They also detect cyclic lists. - -+++ -*** The new functions `lax-plist-get' and `lax-plist-put' are like -`plist-get' and `plist-put', except that they compare the property -name using `equal' rather than `eq'. - -+++ -*** The new variable `print-continuous-numbering', when non-nil, says -that successive calls to print functions should use the same -numberings for circular structure references. This is only relevant -when `print-circle' is non-nil. +*** `add-to-list' takes an optional third argument, APPEND. + +If APPEND is non-nil, the new element gets added at the end of the +list instead of at the beginning. This change actually occurred in +Emacs 21.1, but was not documented then. + ++++ +*** New function `copy-tree' makes a copy of a tree. + +It recursively copyies through both CARs and CDRs. + ++++ +*** New function `delete-dups' deletes `equal' duplicate elements from a list. + +It modifies the list destructively, like `delete'. Of several `equal' +occurrences of an element in the list, the one that's kept is the +first one. + ++++ +*** New function `rassq-delete-all'. + +(rassq-delete-all VALUE ALIST) deletes, from ALIST, each element whose +CDR is `eq' to the specified value. + ++++ +*** The function `number-sequence' makes a list of equally-separated numbers. + +For instance, (number-sequence 4 9) returns (4 5 6 7 8 9). By +default, the separation is 1, but you can specify a different +separation as the third argument. (number-sequence 1.5 6 2) returns +(1.5 3.5 5.5). + ++++ +*** New variables `most-positive-fixnum' and `most-negative-fixnum'. + +They hold the largest and smallest possible integer values. + ++++ +*** Minor change in the function `format'. + +Some flags that were accepted but not implemented (such as "*") are no +longer accepted. + ++++ +*** Functions `get' and `plist-get' no longer give errors for bad plists. + +They return nil for a malformed property list or if the list is +cyclic. + ++++ +*** New functions `lax-plist-get' and `lax-plist-put'. + +They are like `plist-get' and `plist-put', except that they compare +the property name using `equal' rather than `eq'. + ++++ +*** New variable `print-continuous-numbering'. + +When this is non-nil, successive calls to print functions use a single +numbering scheme for circular structure references. This is only +relevant when `print-circle' is non-nil. When you bind `print-continuous-numbering' to t, you should also bind `print-number-table' to nil. @@ -3092,44 +3098,55 @@ equivalent to the standard C library function `atan2'.) +++ -*** A function's doc string can now specify the calling pattern. - -You put this in the doc string's last line, which should match the -regexp "\n\n(fn.*)\\'". - -+++ -*** New macro `with-local-quit' temporarily sets `inhibit-quit' to nil. - -This is for use around potentially blocking or long-running code in -timers and `post-command-hook' functions. - -*** `define-obsolete-function-alias' -combines `defalias' and `make-obsolete'. - -+++ -*** New function `unsafep' returns nil if the given Lisp form can't -possibly do anything dangerous; otherwise it returns a reason why the -form might be unsafe (calls unknown function, alters global variable, -etc). +*** A function or macro's doc string can now specify the calling pattern. + +You put this info in the doc string's last line. It should be +formatted so as to match the regexp "\n\n(fn .*)\\'". If you don't +specify this explicitly, Emacs determines it from the actual argument +names. Usually that default is right, but not always. + ++++ +*** New macro `with-local-quit' temporarily allows quitting. + +A quit inside the body of `with-local-quit' is caught by the +`with-local-quit' form itself, but another quit will happen later once +the code that has inhibitted quitting exits. + +This is for use around potentially blocking or long-running code +inside timer functions and `post-command-hook' functions. + ++++ +*** New macro `define-obsolete-function-alias'. + +This combines `defalias' and `make-obsolete'. + ++++ +*** New function `unsafep' determines whether a Lisp form is safe. + +It returns nil if the given Lisp form can't possibly do anything +dangerous; otherwise it returns a reason why the form might be unsafe +(calls unknown function, alters global variable, etc). ** Lisp code indentation features: +++ -*** The `defmacro' form can contain declarations specifying how to -indent the macro in Lisp mode and how to debug it with Edebug. The -syntax of defmacro has been extended to +*** The `defmacro' form can contain indentation and edebug declarations. + +These declarations specify how to indent the macro calls in Lisp mode +and how to debug them with Edebug. You write them like this: (defmacro NAME LAMBDA-LIST [DOC-STRING] [DECLARATION ...] ...) DECLARATION is a list `(declare DECLARATION-SPECIFIER ...)'. The -declaration specifiers supported are: +possible declaration specifiers are: (indent INDENT) Set NAME's `lisp-indent-function' property to INDENT. (edebug DEBUG) Set NAME's `edebug-form-spec' property to DEBUG. (This is - equivalent to writing a `def-edebug-spec' for the macro. + equivalent to writing a `def-edebug-spec' for the macro, + but this is cleaner.) --- *** cl-indent now allows customization of Indentation of backquoted forms. @@ -3147,7 +3164,7 @@ +++ ** Variable aliases: -*** defvaralias ALIAS-VAR BASE-VAR [DOCSTRING] +*** New function: defvaralias ALIAS-VAR BASE-VAR [DOCSTRING] This function defines the symbol ALIAS-VAR as a variable alias for symbol BASE-VAR. This means that retrieving the value of ALIAS-VAR @@ -3157,7 +3174,7 @@ DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has the same documentation as BASE-VAR. -*** indirect-variable VARIABLE +*** New function: indirect-variable VARIABLE This function returns the variable at the end of the chain of aliases of VARIABLE. If VARIABLE is not a symbol, or if VARIABLE is not @@ -3173,24 +3190,22 @@ ** defcustom changes: +++ -*** defcustom and other custom declarations now use a default group -(the last prior group defined in the same file) when no :group was given. - ---- -*** The new customization type `float' specifies numbers with floating -point (no integers are allowed). +*** The new customization type `float' requires a floating point number. ** String changes: +++ -*** The escape sequence \s is now interpreted as a SPACE character, -unless it is followed by a `-' in a character constant (e.g. ?\s-A), -in which case it is still interpreted as the super modifier. -In strings, \s is always interpreted as a space. - -+++ -*** A hex escape in a string forces the string to be multibyte. -An octal escape makes it unibyte. +*** The escape sequence \s is now interpreted as a SPACE character. + +Exception: In a character constant, if it is followed by a `-' in a +character constant (e.g. ?\s-A), it is still interpreted as the super +modifier. In strings, \s is always interpreted as a space. + ++++ +*** A hex escape in a string constant forces the string to be multibyte. + ++++ +*** An octal escape in a string constant forces the string to be unibyte. +++ *** `split-string' now includes null substrings in the returned list if @@ -3204,7 +3219,7 @@ multibyte string with the same individual character codes. +++ -*** New function `substring-no-properties returns a substring without +*** New function `substring-no-properties' returns a substring without text properties. +++ @@ -3212,18 +3227,13 @@ `assoc-ignore-representation', which are still available, but have been declared obsolete. -** Buffer/variable changes: - -+++ -*** The new function `buffer-local-value' returns the buffer-local -binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not -have a buffer-local binding in buffer BUFFER, it returns the default -value of VARIABLE instead. - -+++ -** There is a new facility for displaying warnings to the user. - -See the functions `warn' and `display-warning' . ++++ +** Displaying warnings to the user. + +See the functions `warn' and `display-warning', or the Lisp Manual. +If you want to be sure the warning will not be overlooked, this +facility is much better than using `message', since it displays +warnings in a separate window. +++ ** Progress reporters. @@ -3245,28 +3255,36 @@ +++ *** The `line-move', `scroll-up', and `scroll-down' functions will now modify the window vscroll to scroll through display rows that are -taller that the height of the window, for example in the presense of -large images. To disable this feature, Lisp code can bind the new -variable `auto-window-vscroll' to nil. - -+++ -*** The argument to `forward-word', `backward-word', -`forward-to-indentation' and `backward-to-indentation' is now -optional, and defaults to 1. - -+++ -*** Lisp code can now test if a given buffer position is inside a -clickable link with the new function `mouse-on-link-p'. This is the -function used by the new `mouse-1-click-follows-link' functionality. - -+++ -*** New function `line-number-at-pos' returns the line number of the -current line in the current buffer, or if optional buffer position is -given, line number of corresponding line in current buffer. - -+++ -*** `field-beginning' and `field-end' now accept an additional optional -argument, LIMIT. +taller that the height of the window, for example in the presence of +large images. To disable this feature, bind the new variable +`auto-window-vscroll' to nil. + ++++ +*** The argument to `forward-word', `backward-word' is optional. + +It defaults to 1. + ++++ +*** Argument to `forward-to-indentation' and `backward-to-indentation' is optional. + +It defaults to 1. + ++++ +*** New function `mouse-on-link-p' test if a position is in a clickable link. + +This is the function used by the new `mouse-1-click-follows-link' +functionality. + ++++ +*** New function `line-number-at-pos' returns the line number of a position. + +It an optional buffer position argument that defaults to point. + ++++ +*** `field-beginning' and `field-end' take new optional argument, LIMIT. + +This argument tells them not to search beyond LIMIT. Instead they +give up and return LIMIT. +++ *** Function `pos-visible-in-window-p' now returns the pixel coordinates @@ -3281,23 +3299,29 @@ ** Text modification: +++ -*** The new function `insert-buffer-substring-as-yank' works like -`insert-buffer-substring', but removes the text properties in the -`yank-excluded-properties' list. +*** The new function `insert-for-yank' normally works like `insert', but +removes the text properties in the `yank-excluded-properties' list +and handles the `yank-handler' text property. + ++++ +*** The new function `insert-buffer-substring-as-yank' is like +`insert-for-yank' except that it gets the text from another buffer as +in `insert-buffer-substring'. +++ *** The new function `insert-buffer-substring-no-properties' is like -insert-buffer-substring, but removes all text properties from the +`insert-buffer-substring', but removes all text properties from the inserted substring. +++ *** The new function `filter-buffer-substring' extracts a buffer substring, passes it through a set of filter functions, and returns -the filtered substring. It is used instead of `buffer-substring' or +the filtered substring. Use it instead of `buffer-substring' or `delete-and-extract-region' when copying text into a user-accessible -data structure, like the kill-ring, X clipboard, or a register. The -list of filter function is specified by the new variable -`buffer-substring-filters'. For example, Longlines mode uses +data structure, such as the kill-ring, X clipboard, or a register. + +The list of filter function is specified by the new variable +`buffer-substring-filters'. For example, Longlines mode adds to `buffer-substring-filters' to remove soft newlines from the copied text. @@ -3320,437 +3344,6 @@ --- *** The function `insert-string' is now obsolete. -** Syntax table changes: - -+++ -*** The macro `with-syntax-table' does not copy the table any more. - -+++ -*** The new function `syntax-after' returns the syntax code -of the character after a specified buffer position, taking account -of text properties as well as the character code. - -+++ -*** `syntax-class' extracts the class of a syntax code (as returned -by syntax-after). - -*** The new package `syntax.el' provides an efficient way to find the -current syntactic context (as returned by `parse-partial-sexp'). - -** GC changes: - -+++ -*** New variables `gc-elapsed' and `gcs-done' provide extra information -on garbage collection. - -+++ -*** Functions from `post-gc-hook' are run at the end of garbage -collection. The hook is run with GC inhibited, so use it with care. - -** Buffer-related changes: - ---- -*** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST. -If it is non-nil, it specifies which buffers to list. - -+++ -*** `kill-buffer-hook' is now a permanent local. - -** Local variables lists: - -+++ -*** Text properties in local variables. - -A file local variables list cannot specify a string with text -properties--any specified text properties are discarded. - -+++ -*** The variable `safe-local-eval-forms' specifies a list of forms that -are ok to evaluate when they appear in an `eval' local variables -specification. Normally Emacs asks for confirmation before evaluating -such a form, but if the form appears in this list, no confirmation is -needed. - ---- -*** If a function has a non-nil `safe-local-eval-function' property, -that means it is ok to evaluate some calls to that function when it -appears in an `eval' local variables specification. If the property -is t, then any form calling that function with constant arguments is -ok. If the property is a function or list of functions, they are called -with the form as argument, and if any returns t, the form is ok to call. - -If the form is not "ok to call", that means Emacs asks for -confirmation as before. - -** Abbrev changes: - -*** The new function copy-abbrev-table returns a new abbrev table that -is a copy of a given abbrev table. - -+++ -*** define-abbrev now accepts an optional argument SYSTEM-FLAG. If -non-nil, this marks the abbrev as a "system" abbrev, which means that -it won't be stored in the user's abbrevs file if he saves the abbrevs. -Major modes that predefine some abbrevs should always specify this -flag. - -** Undo changes: - -+++ -*** An element of buffer-undo-list can now have the form (apply FUNNAME -. ARGS), where FUNNAME is a symbol other than t or nil. That stands -for a high-level change that should be undone by evaluating (apply -FUNNAME ARGS). - -These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS) -which indicates that the change which took place was limited to the -range BEG...END and increased the buffer size by DELTA. - -+++ -*** If the buffer's undo list for the current command gets longer than -undo-outer-limit, garbage collection empties it. This is to prevent -it from using up the available memory and choking Emacs. - -+++ -** New `yank-handler' text property can be used to control how -previously killed text on the kill-ring is reinserted. - -The value of the yank-handler property must be a list with one to four -elements with the following format: - (FUNCTION PARAM NOEXCLUDE UNDO). - -The `insert-for-yank' function looks for a yank-handler property on -the first character on its string argument (typically the first -element on the kill-ring). If a yank-handler property is found, -the normal behavior of `insert-for-yank' is modified in various ways: - - When FUNCTION is present and non-nil, it is called instead of `insert' -to insert the string. FUNCTION takes one argument--the object to insert. - If PARAM is present and non-nil, it replaces STRING as the object -passed to FUNCTION (or `insert'); for example, if FUNCTION is -`yank-rectangle', PARAM should be a list of strings to insert as a -rectangle. - If NOEXCLUDE is present and non-nil, the normal removal of the -yank-excluded-properties is not performed; instead FUNCTION is -responsible for removing those properties. This may be necessary -if FUNCTION adjusts point before or after inserting the object. - If UNDO is present and non-nil, it is a function that will be called -by `yank-pop' to undo the insertion of the current object. It is -called with two arguments, the start and end of the current region. -FUNCTION can set `yank-undo-function' to override the UNDO value. - -*** The functions kill-new, kill-append, and kill-region now have an -optional argument to specify the yank-handler text property to put on -the killed text. - -*** The function yank-pop will now use a non-nil value of the variable -`yank-undo-function' (instead of delete-region) to undo the previous -yank or yank-pop command (or a call to insert-for-yank). The function -insert-for-yank automatically sets that variable according to the UNDO -element of the string argument's yank-handler text property if present. - -*** The function `insert-for-yank' now supports strings where the -`yank-handler' property does not span the first character of the -string. The old behavior is available if you call -`insert-for-yank-1' instead. - -*** The new function insert-for-yank normally works like `insert', but -removes the text properties in the `yank-excluded-properties' list. -However, the insertion of the text can be modified by a `yank-handler' -text property. - -** File operation changes: - -+++ -*** New vars `exec-suffixes' and `load-suffixes' used when -searching for an executable resp. an elisp file. - -+++ -*** The new primitive `set-file-times' sets a file's access and -modification times. Magic file name handlers can handle this -operation. - -+++ -*** The new function `file-remote-p' tests a file name and returns -non-nil if it specifies a remote file (one that Emacs accesses using -its own special methods and not directly through the file system). -The value in that case is an identifier for the remote file system. - -+++ -*** `auto-save-file-format' has been renamed to -`buffer-auto-save-file-format' and made into a permanent local. - -+++ -*** Functions `file-name-sans-extension' and `file-name-extension' now -ignore the leading dots in file names, so that file names such as -`.emacs' are treated as extensionless. - -+++ -*** copy-file now takes an additional option arg MUSTBENEW. - -This argument works like the MUSTBENEW argument of write-file. - -+++ -*** If the second argument to `copy-file' is the name of a directory, -the file is copied to that directory instead of signaling an error. - -+++ -*** `visited-file-modtime' and `calendar-time-from-absolute' now return -a list of two integers, instead of a cons. - -+++ -*** `file-chase-links' now takes an optional second argument LIMIT which -specifies the maximum number of links to chase through. If after that -many iterations the file name obtained is still a symbolic link, -`file-chase-links' returns it anyway. - -+++ -*** The new hook `before-save-hook' is invoked by `basic-save-buffer' -before saving buffers. This allows packages to perform various final -tasks, for example; it can be used by the copyright package to make -sure saved files have the current year in any copyright headers. - -+++ -*** If a buffer sets buffer-save-without-query to non-nil, -save-some-buffers will always save that buffer without asking -(if it's modified). - -*** New function `locate-file' searches for a file in a list of directories. -`locate-file' accepts a name of a file to search (a string), and two -lists: a list of directories to search in and a list of suffixes to -try; typical usage might use `exec-path' and `load-path' for the list -of directories, and `exec-suffixes' and `load-suffixes' for the list -of suffixes. The function also accepts a predicate argument to -further filter candidate files. - -One advantage of using this function is that the list of suffixes in -`exec-suffixes' is OS-dependant, so this function will find -executables without polluting Lisp code with OS dependancies. - ---- -*** The precedence of file-name-handlers has been changed. -Instead of blindly choosing the first handler that matches, -find-file-name-handler now gives precedence to a file-name handler -that matches near the end of the file name. More specifically, the -handler whose (match-beginning 0) is the largest is chosen. -In case of ties, the old "first matched" rule applies. - -+++ -*** A file name handler can declare which operations it handles. - -You do this by putting an `operation' property on the handler name -symbol. The property value should be a list of the operations that -the handler really handles. It won't be called for any other -operations. - -This is useful for autoloaded handlers, to prevent them from being -autoloaded when not really necessary. - -** Input changes: - -+++ -*** An interactive specification can now use the code letter 'U' to get -the up-event that was discarded in case the last key sequence read for a -previous 'k' or 'K' argument was a down-event; otherwise nil is used. - -+++ -*** The new interactive-specification `G' reads a file name -much like `F', but if the input is a directory name (even defaulted), -it returns just the directory name. - ---- -*** Functions y-or-n-p, read-char, read-key-sequence and the like, that -display a prompt but don't use the minibuffer, now display the prompt -using the text properties (esp. the face) of the prompt string. - -+++ -*** (while-no-input BODY...) runs BODY, but only so long as no input -arrives. If the user types or clicks anything, BODY stops as if a -quit had occurred. while-no-input returns the value of BODY, if BODY -finishes. It returns nil if BODY was aborted. - -** Minibuffer changes: - -*** The new function `minibufferp' returns non-nil if its optional -buffer argument is a minibuffer. If the argument is omitted, it -defaults to the current buffer. - -+++ -*** New function minibuffer-selected-window returns the window which -was selected when entering the minibuffer. - -+++ -*** read-from-minibuffer now accepts an additional argument KEEP-ALL -saying to put all inputs in the history list, even empty ones. - -+++ -*** The `read-file-name' function now takes an additional argument which -specifies a predicate which the file name read must satify. The -new variable `read-file-name-predicate' contains the predicate argument -while reading the file name from the minibuffer; the predicate in this -variable is used by read-file-name-internal to filter the completion list. - ---- -*** The new variable `read-file-name-function' can be used by lisp code -to override the internal read-file-name function. - -+++ -*** The new variable `read-file-name-completion-ignore-case' specifies -whether completion ignores case when reading a file name with the -`read-file-name' function. - -+++ -*** The new function `read-directory-name' can be used instead of -`read-file-name' to read a directory name; when used, completion -will only show directories. - -** Searching and matching changes: - -+++ -*** New function `looking-back' checks whether a regular expression matches -the text before point. Specifying the LIMIT argument bounds how far -back the match can start; this is a way to keep it from taking too long. - -+++ -*** The new variable search-spaces-regexp controls how to search -for spaces in a regular expression. If it is non-nil, it should be a -regular expression, and any series of spaces stands for that regular -expression. If it is nil, spaces stand for themselves. - -Spaces inside of constructs such as [..] and *, +, ? are never -replaced with search-spaces-regexp. - -+++ -*** There are now two new regular expression operators, \_< and \_>, -for matching the beginning and end of a symbol. A symbol is a -non-empty sequence of either word or symbol constituent characters, as -specified by the syntax table. - -+++ -*** skip-chars-forward and skip-chars-backward now handle -character classes such as [:alpha:], along with individual characters -and ranges. - ---- -*** In `replace-match', the replacement text no longer inherits -properties from surrounding text. - -+++ -*** The list returned by `(match-data t)' now has the buffer as a final -element, if the last match was on a buffer. `set-match-data' -accepts such a list for restoring the match state. - ---- -*** rx.el has new corresponding `symbol-end' and `symbol-start' elements. - -+++ -*** The default value of `sentence-end' is now defined using the new -variable `sentence-end-without-space', which contains such characters -that end a sentence without following spaces. - -The function `sentence-end' should be used to obtain the value of the -variable `sentence-end'. If the variable `sentence-end' is nil, then -this function returns the regexp constructed from the variables -`sentence-end-without-period', `sentence-end-double-space' and -`sentence-end-without-space'. - -+++ -** Enhancements to keymaps. - -*** Cleaner way to enter key sequences. - -You can enter a constant key sequence in a more natural format, the -same one used for saving keyboard macros, using the macro `kbd'. For -example, - -(kbd "C-x C-f") => "\^x\^f" - -*** Interactive commands can be remapped through keymaps. - -This is an alternative to using defadvice or substitute-key-definition -to modify the behavior of a key binding using the normal keymap -binding and lookup functionality. - -When a key sequence is bound to a command, and that command is -remapped to another command, that command is run instead of the -original command. - -Example: -Suppose that minor mode my-mode has defined the commands -my-kill-line and my-kill-word, and it wants C-k (and any other key -bound to kill-line) to run the command my-kill-line instead of -kill-line, and likewise it wants to run my-kill-word instead of -kill-word. - -Instead of rebinding C-k and the other keys in the minor mode map, -command remapping allows you to directly map kill-line into -my-kill-line and kill-word into my-kill-word through the minor mode -map using define-key: - - (define-key my-mode-map [remap kill-line] 'my-kill-line) - (define-key my-mode-map [remap kill-word] 'my-kill-word) - -Now, when my-mode is enabled, and the user enters C-k or M-d, -the commands my-kill-line and my-kill-word are run. - -Notice that only one level of remapping is supported. In the above -example, this means that if my-kill-line is remapped to other-kill, -then C-k still runs my-kill-line. - -The following changes have been made to provide command remapping: - -- Command remappings are defined using `define-key' with a prefix-key - `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD - to definition DEF in keymap MAP. The definition is not limited to - another command; it can be anything accepted for a normal binding. - -- The new function `command-remapping' returns the binding for a - remapped command in the current keymaps, or nil if not remapped. - -- key-binding now remaps interactive commands unless the optional - third argument NO-REMAP is non-nil. - -- where-is-internal now returns nil for a remapped command (e.g. - kill-line if my-mode is enabled), and the actual key binding for - the command it is remapped to (e.g. C-k for my-kill-line). - It also has a new optional fifth argument, NO-REMAP, which inhibits - remapping if non-nil (e.g. it returns C-k for kill-line and - <kill-line> for my-kill-line). - -- The new variable `this-original-command' contains the original - command before remapping. It is equal to `this-command' when the - command was not remapped. - -*** If text has a `keymap' property, that keymap takes precedence -over minor mode keymaps. - -*** The `keymap' property now also works at the ends of overlays and -text-properties, according to their stickiness. This also means that it -works with empty overlays. The same hold for the `local-map' property. - -*** Dense keymaps now handle inheritance correctly. -Previously a dense keymap would hide all of the simple-char key -bindings of the parent keymap. - -*** `define-key-after' now accepts keys longer than 1. - -*** New function `current-active-maps' returns a list of currently -active keymaps. - -*** New function `describe-buffer-bindings' inserts the list of all -defined keys and their definitions. - -*** New function `keymap-prompt' returns the prompt-string of a keymap - -*** (map-keymap FUNCTION KEYMAP) applies the function to each binding -in the keymap. - -*** New variable emulation-mode-map-alists. - -Lisp packages using many minor mode keymaps can now maintain their own -keymap alist separate from minor-mode-map-alist by adding their keymap -alist to this list. - +++ ** Atomic change groups. @@ -3809,30 +3402,493 @@ change group you start for any given buffer should be the last one finished. +** Buffer-related changes: + +--- +*** `list-buffers-noselect' now takes an additional argument, BUFFER-LIST. + +If it is non-nil, it specifies which buffers to list. + ++++ +*** `kill-buffer-hook' is now a permanent local. + ++++ +*** The new function `buffer-local-value' returns the buffer-local +binding of VARIABLE (a symbol) in buffer BUFFER. If VARIABLE does not +have a buffer-local binding in buffer BUFFER, it returns the default +value of VARIABLE instead. + +** Local variables lists: + ++++ +*** Text properties in local variables. + +A file local variables list cannot specify a string with text +properties--any specified text properties are discarded. + ++++ +*** The variable `safe-local-eval-forms' specifies a list of forms that +are ok to evaluate when they appear in an `eval' local variables +specification. Normally Emacs asks for confirmation before evaluating +such a form, but if the form appears in this list, no confirmation is +needed. + +--- +*** If a function has a non-nil `safe-local-eval-function' property, +that means it is ok to evaluate some calls to that function when it +appears in an `eval' local variables specification. If the property +is t, then any form calling that function with constant arguments is +ok. If the property is a function or list of functions, they are called +with the form as argument, and if any returns t, the form is ok to call. + +If the form is not "ok to call", that means Emacs asks for +confirmation as before. + +** Searching and matching changes: + ++++ +*** New function `looking-back' checks whether a regular expression matches +the text before point. Specifying the LIMIT argument bounds how far +back the match can start; this is a way to keep it from taking too long. + ++++ +*** The new variable `search-spaces-regexp' controls how to search +for spaces in a regular expression. If it is non-nil, it should be a +regular expression, and any series of spaces stands for that regular +expression. If it is nil, spaces stand for themselves. + +Spaces inside of constructs such as `[..]' and inside loops such as +`*', `+', and `?' are never replaced with `search-spaces-regexp'. + ++++ +*** New regular expression operators, `\_<' and `\_>'. + +These match the beginning and end of a symbol. A symbol is a +non-empty sequence of either word or symbol constituent characters, as +specified by the syntax table. + +--- +*** rx.el has new corresponding `symbol-end' and `symbol-start' elements. + ++++ +*** `skip-chars-forward' and `skip-chars-backward' now handle +character classes such as `[:alpha:]', along with individual +characters and ranges. + +--- +*** In `replace-match', the replacement text no longer inherits +properties from surrounding text. + ++++ +*** The list returned by `(match-data t)' now has the buffer as a final +element, if the last match was on a buffer. `set-match-data' +accepts such a list for restoring the match state. + ++++ +*** The default value of `sentence-end' is now defined using the new +variable `sentence-end-without-space', which contains such characters +that end a sentence without following spaces. + +The function `sentence-end' should be used to obtain the value of the +variable `sentence-end'. If the variable `sentence-end' is nil, then +this function returns the regexp constructed from the variables +`sentence-end-without-period', `sentence-end-double-space' and +`sentence-end-without-space'. + +** Undo changes: + ++++ +*** `buffer-undo-list' can allows programmable elements. + +These elements have the form (apply FUNNAME . ARGS), where FUNNAME is +a symbol other than t or nil. That stands for a high-level change +that should be undone by evaluating (apply FUNNAME ARGS). + +These entries can also have the form (apply DELTA BEG END FUNNAME . ARGS) +which indicates that the change which took place was limited to the +range BEG...END and increased the buffer size by DELTA. + ++++ +*** If the buffer's undo list for the current command gets longer than +`undo-outer-limit', garbage collection empties it. This is to prevent +it from using up the available memory and choking Emacs. + ++++ +** New `yank-handler' text property can be used to control how +previously killed text on the kill ring is reinserted. + +The value of the `yank-handler' property must be a list with one to four +elements with the following format: + (FUNCTION PARAM NOEXCLUDE UNDO). + +The `insert-for-yank' function looks for a yank-handler property on +the first character on its string argument (typically the first +element on the kill-ring). If a `yank-handler' property is found, +the normal behavior of `insert-for-yank' is modified in various ways: + + When FUNCTION is present and non-nil, it is called instead of `insert' +to insert the string. FUNCTION takes one argument--the object to insert. + If PARAM is present and non-nil, it replaces STRING as the object +passed to FUNCTION (or `insert'); for example, if FUNCTION is +`yank-rectangle', PARAM should be a list of strings to insert as a +rectangle. + If NOEXCLUDE is present and non-nil, the normal removal of the +`yank-excluded-properties' is not performed; instead FUNCTION is +responsible for removing those properties. This may be necessary +if FUNCTION adjusts point before or after inserting the object. + If UNDO is present and non-nil, it is a function that will be called +by `yank-pop' to undo the insertion of the current object. It is +called with two arguments, the start and end of the current region. +FUNCTION can set `yank-undo-function' to override the UNDO value. + +*** The functions `kill-new', `kill-append', and `kill-region' now have an +optional argument to specify the `yank-handler' text property to put on +the killed text. + +*** The function `yank-pop' will now use a non-nil value of the variable +`yank-undo-function' (instead of `delete-region') to undo the previous +`yank' or `yank-pop' command (or a call to `insert-for-yank'). The function +`insert-for-yank' automatically sets that variable according to the UNDO +element of the string argument's `yank-handler' text property if present. + +*** The function `insert-for-yank' now supports strings where the +`yank-handler' property does not span the first character of the +string. The old behavior is available if you call +`insert-for-yank-1' instead. + +** Syntax table changes: + ++++ +*** The macro `with-syntax-table' no longer copies the syntax table. + ++++ +*** The new function `syntax-after' returns the syntax code +of the character after a specified buffer position, taking account +of text properties as well as the character code. + ++++ +*** `syntax-class' extracts the class of a syntax code (as returned +by `syntax-after'). + +*** The new function `syntax-ppss' rovides an efficient way to find the +current syntactic context at point. + +** File operation changes: + ++++ +*** New vars `exec-suffixes' and `load-suffixes' used when +searching for an executable or an Emacs Lisp file. + ++++ +*** The new primitive `set-file-times' sets a file's access and +modification times. Magic file name handlers can handle this +operation. + ++++ +*** The new function `file-remote-p' tests a file name and returns +non-nil if it specifies a remote file (one that Emacs accesses using +its own special methods and not directly through the file system). +The value in that case is an identifier for the remote file system. + ++++ +*** `buffer-auto-save-file-format' is the new name for what was +formerly called `auto-save-file-format'. It is now a permanent local. + ++++ +*** Functions `file-name-sans-extension' and `file-name-extension' now +ignore the leading dots in file names, so that file names such as +`.emacs' are treated as extensionless. + ++++ +*** `copy-file' now takes an additional option arg MUSTBENEW. + +This argument works like the MUSTBENEW argument of write-file. + ++++ +*** `visited-file-modtime' and `calendar-time-from-absolute' now return +a list of two integers, instead of a cons. + ++++ +*** `file-chase-links' now takes an optional second argument LIMIT which +specifies the maximum number of links to chase through. If after that +many iterations the file name obtained is still a symbolic link, +`file-chase-links' returns it anyway. + ++++ +*** The new hook `before-save-hook' is invoked by `basic-save-buffer' +before saving buffers. This allows packages to perform various final +tasks, for example; it can be used by the copyright package to make +sure saved files have the current year in any copyright headers. + ++++ +*** If `buffer-save-without-query' is non-nil in some buffer, +`save-some-buffers' will always save that buffer without asking (if +it's modified). + +*** New function `locate-file' searches for a file in a list of directories. +`locate-file' accepts a name of a file to search (a string), and two +lists: a list of directories to search in and a list of suffixes to +try; typical usage might use `exec-path' and `load-path' for the list +of directories, and `exec-suffixes' and `load-suffixes' for the list +of suffixes. The function also accepts a predicate argument to +further filter candidate files. + +One advantage of using this function is that the list of suffixes in +`exec-suffixes' is OS-dependant, so this function will find +executables without polluting Lisp code with OS dependancies. + +--- +*** The precedence of file name handlers has been changed. + +Instead of choosing the first handler that matches, +`find-file-name-handler' now gives precedence to a file name handler +that matches nearest the end of the file name. More precisely, the +handler whose (match-beginning 0) is the largest is chosen. In case +of ties, the old "first matched" rule applies. + ++++ +*** A file name handler can declare which operations it handles. + +You do this by putting an `operation' property on the handler name +symbol. The property value should be a list of the operations that +the handler really handles. It won't be called for any other +operations. + +This is useful for autoloaded handlers, to prevent them from being +autoloaded when not really necessary. + +** Input changes: + ++++ +*** An interactive specification can now use the code letter 'U' to get +the up-event that was discarded in case the last key sequence read for a +previous `k' or `K' argument was a down-event; otherwise nil is used. + ++++ +*** The new interactive-specification `G' reads a file name +much like `F', but if the input is a directory name (even defaulted), +it returns just the directory name. + +--- +*** Functions `y-or-n-p', `read-char', `read-key-sequence' and the like, that +display a prompt but don't use the minibuffer, now display the prompt +using the text properties (esp. the face) of the prompt string. + ++++ +*** (while-no-input BODY...) runs BODY, but only so long as no input +arrives. If the user types or clicks anything, BODY stops as if a +quit had occurred. `while-no-input' returns the value of BODY, if BODY +finishes. It returns nil if BODY was aborted. + +** Minibuffer changes: + ++++ +*** The new function `minibufferp' returns non-nil if its optional +buffer argument is a minibuffer. If the argument is omitted, it +defaults to the current buffer. + ++++ +*** New function `minibuffer-selected-window' returns the window which +was selected when entering the minibuffer. + ++++ +*** `read-from-minibuffer' now accepts an additional argument KEEP-ALL +saying to put all inputs in the history list, even empty ones. + ++++ +*** The `read-file-name' function now takes an additional argument which +specifies a predicate which the file name read must satify. The +new variable `read-file-name-predicate' contains the predicate argument +while reading the file name from the minibuffer; the predicate in this +variable is used by read-file-name-internal to filter the completion list. + +--- +*** The new variable `read-file-name-function' can be used by Lisp code +to override the built-in `read-file-name' function. + ++++ +*** The new variable `read-file-name-completion-ignore-case' specifies +whether completion ignores case when reading a file name with the +`read-file-name' function. + ++++ +*** The new function `read-directory-name' for reading a directory name. + +It is like `read-file-name' except that the defaulting works better +for directories, and completion inside it shows only directories. + +** Completion changes: + ++++ +*** The functions `all-completions' and `try-completion' now accept lists +of strings as well as hash-tables additionally to alists, obarrays +and functions. Furthermore, the function `test-completion' is now +exported to Lisp. The keys in alists and hash tables can be either +strings or symbols, which are automatically converted with to strings. + ++++ +*** The new macro `dynamic-completion-table' supports using functions +as a dynamic completion table. + + (dynamic-completion-table FUN) + +FUN is called with one argument, the string for which completion is required, +and it should return an alist containing all the intended possible +completions. This alist can be a full list of possible completions so that FUN +can ignore the value of its argument. If completion is performed in the +minibuffer, FUN will be called in the buffer from which the minibuffer was +entered. `dynamic-completion-table' then computes the completion. + ++++ +*** The new macro `lazy-completion-table' initializes a variable +as a lazy completion table. + + (lazy-completion-table VAR FUN &rest ARGS) + +If the completion table VAR is used for the first time (e.g., by passing VAR +as an argument to `try-completion'), the function FUN is called with arguments +ARGS. FUN must return the completion table that will be stored in VAR. If +completion is requested in the minibuffer, FUN will be called in the buffer +from which the minibuffer was entered. The return value of +`lazy-completion-table' must be used to initialize the value of VAR. + ++++ +** Enhancements to keymaps. + +*** Cleaner way to enter key sequences. + +You can enter a constant key sequence in a more natural format, the +same one used for saving keyboard macros, using the macro `kbd'. For +example, + +(kbd "C-x C-f") => "\^x\^f" + +*** Interactive commands can be remapped through keymaps. + +This is an alternative to using `defadvice' or `substitute-key-definition' +to modify the behavior of a key binding using the normal keymap +binding and lookup functionality. + +When a key sequence is bound to a command, and that command is +remapped to another command, that command is run instead of the +original command. + +Example: +Suppose that minor mode `my-mode' has defined the commands +`my-kill-line' and `my-kill-word', and it wants C-k (and any other key +bound to `kill-line') to run the command `my-kill-line' instead of +`kill-line', and likewise it wants to run `my-kill-word' instead of +`kill-word'. + +Instead of rebinding C-k and the other keys in the minor mode map, +command remapping allows you to directly map `kill-line' into +`my-kill-line' and `kill-word' into `my-kill-word' using `define-key': + + (define-key my-mode-map [remap kill-line] 'my-kill-line) + (define-key my-mode-map [remap kill-word] 'my-kill-word) + +When `my-mode' is enabled, its minor mode keymap is enabled too. So +when the user types C-k, that runs the command `my-kill-line'. + +Only one level of remapping is supported. In the above example, this +means that if `my-kill-line' is remapped to `other-kill', then C-k still +runs `my-kill-line'. + +The following changes have been made to provide command remapping: + +- Command remappings are defined using `define-key' with a prefix-key + `remap', i.e. `(define-key MAP [remap CMD] DEF)' remaps command CMD + to definition DEF in keymap MAP. The definition is not limited to + another command; it can be anything accepted for a normal binding. + +- The new function `command-remapping' returns the binding for a + remapped command in the current keymaps, or nil if not remapped. + +- `key-binding' now remaps interactive commands unless the optional + third argument NO-REMAP is non-nil. + +- `where-is-internal' now returns nil for a remapped command (e.g. + `kill-line', when `my-mode' is enabled), and the actual key binding for + the command it is remapped to (e.g. C-k for my-kill-line). + It also has a new optional fifth argument, NO-REMAP, which inhibits + remapping if non-nil (e.g. it returns "C-k" for `kill-line', and + "<kill-line>" for `my-kill-line'). + +- The new variable `this-original-command' contains the original + command before remapping. It is equal to `this-command' when the + command was not remapped. + +*** If text has a `keymap' property, that keymap takes precedence +over minor mode keymaps. + +*** The `keymap' property now also works at the ends of overlays and +text properties, according to their stickiness. This also means that it +works with empty overlays. The same hold for the `local-map' property. + +*** Dense keymaps now handle inheritance correctly. + +Previously a dense keymap would hide all of the simple-char key +bindings of the parent keymap. + +*** `define-key-after' now accepts keys longer than 1. + +*** New function `current-active-maps' returns a list of currently +active keymaps. + +*** New function `describe-buffer-bindings' inserts the list of all +defined keys and their definitions. + +*** New function `keymap-prompt' returns the prompt string of a keymap. + +*** (map-keymap FUNCTION KEYMAP) applies the function to each binding +in the keymap. + +*** New variable `emulation-mode-map-alists'. + +Lisp packages using many minor mode keymaps can now maintain their own +keymap alist separate from `minor-mode-map-alist' by adding their +keymap alist to this list. + +** Abbrev changes: + ++++ +*** The new function `copy-abbrev-table' copies an abbrev table. + +It returns a new abbrev table that is a copy of a given abbrev table. + ++++ +*** `define-abbrev' now accepts an optional argument SYSTEM-FLAG. + +If non-nil, this marks the abbrev as a "system" abbrev, which means +that it won't be stored in the user's abbrevs file if he saves the +abbrevs. Major modes that predefine some abbrevs should always +specify this flag. + +++ ** Enhancements to process support -*** Function list-processes now has an optional argument; if non-nil, -only the processes whose query-on-exit flag is set are listed. - -*** New set-process-query-on-exit-flag and process-query-on-exit-flag -functions. The existing process-kill-without-query function is still -supported, but new code should use the new functions. - -*** Function signal-process now accepts a process object or process +*** Function `list-processes' now has an optional argument; if non-nil, +it lists only the processes whose query-on-exit flag is set. + +*** New fns `set-process-query-on-exit-flag' and `process-query-on-exit-flag'. + +These replace the old function `process-kill-without-query'. That +function is still supported, but new code should use the new +functions. + +*** Function `signal-process' now accepts a process object or process name in addition to a process id to identify the signalled process. *** Processes now have an associated property list where programs can maintain process state and other per-process related information. -The new functions process-get and process-put are used to access, add, -and modify elements on this property list. - -The new low-level functions process-plist and set-process-plist are -used to access and replace the entire property list of a process. - -*** Function accept-process-output now has an optional fourth arg -`just-this-one'. If non-nil, only output from the specified process +Use the new functions `process-get' and `process-put' to access, add, +and modify elements on this property list. Use the new functions +`process-plist' and `set-process-plist' to access and replace the +entire property list of a process. + +*** Function `accept-process-output' has a new optional fourth arg +JUST-THIS-ONE. If non-nil, only output from the specified process is handled, suspending output from other processes. If value is an integer, also inhibit running timers. This feature is generally not recommended, but may be necessary for specific applications, such as @@ -3843,7 +3899,7 @@ On some systems, when emacs reads the output from a subprocess, the output data is read in very small blocks, potentially resulting in very poor performance. This behavior can be remedied to some extent -by setting the new variable process-adaptive-read-buffering to a +by setting the new variable `process-adaptive-read-buffering' to a non-nil value (the default), as it will automatically delay reading from such processes, to allowing them to produce more output before emacs tries to read it. @@ -3857,10 +3913,12 @@ obeys file handlers. The file handler is chosen based on `default-directory'. -*** A filter function of a process is called with a multibyte string -if the filter's multibyteness is t. That multibyteness is decided by -the value of `default-enable-multibyte-characters' when the process is -created and can be changed later by `set-process-filter-multibyte'. +*** A process filter function gets the output as multibyte string +if the process specifies t for its filter's multibyteness. + +That multibyteness is decided by the value of +`default-enable-multibyte-characters' when the process is created, and +you can change it later with `set-process-filter-multibyte'. *** The new function `set-process-filter-multibyte' sets the multibyteness of the strings passed to the process's filter. @@ -3877,8 +3935,8 @@ +++ ** Enhanced networking support. -*** There is a new `make-network-process' function which supports -opening of stream and datagram connections to a server, as well as +*** The new `make-network-process' function makes network connections. +It allows opening of stream and datagram connections to a server, as well as create a stream or datagram server inside emacs. - A server is started using :server t arg. @@ -3893,9 +3951,9 @@ To test for the availability of a given feature, use featurep like this: (featurep 'make-network-process '(:type datagram)) -*** Original open-network-stream is now emulated using make-network-process. - -*** New function open-network-stream-nowait. +*** The old `open-network-stream' now uses `make-network-process'. + +*** New function `open-network-stream-nowait'. This function initiates a non-blocking connect and returns immediately without waiting for the connection to be established. It takes the @@ -3903,55 +3961,58 @@ connect completes, the sentinel is called with a status string matching "open" or "failed". -*** New function open-network-stream-server. +*** New function `open-network-stream-server'. This function creates a network server process for a TCP service. When a client connects to the specified service, a new subprocess is created to handle the new connection, and the sentinel function is called for the new process. -*** New functions process-datagram-address and set-process-datagram-address. +*** New functions `process-datagram-address', `set-process-datagram-address'. These functions are used with datagram-based network processes to get and set the current address of the remote partner. -*** New function format-network-address. - -This function reformats the lisp representation of a network address +*** New function `format-network-address'. + +This function reformats the Lisp representation of a network address to a printable string. For example, an IP address A.B.C.D and port number P is represented as a five element vector [A B C D P], and the printable string returned for this vector is "A.B.C.D:P". See the doc string for other formatting options. -*** By default, the function process-contact still returns (HOST SERVICE) -for a network process. Using the new optional KEY arg, the complete list -of network process properties or a specific property can be selected. - -Using :local and :remote as the KEY, the address of the local or -remote end-point is returned. An Inet address is represented as a 5 -element vector, where the first 4 elements contain the IP address and -the fifth is the port number. - -*** Network processes can now be stopped and restarted with -`stop-process' and `continue-process'. For a server process, no -connections are accepted in the stopped state. For a client process, -no input is received in the stopped state. - -*** New function network-interface-list. +*** `process-contact' has an optional KEY argument. + +Depending on this argument, you can get the complete list of network +process properties or a specific property. Using :local or :remote as +the KEY, you get the address of the local or remote end-point. + +An Inet address is represented as a 5 element vector, where the first +4 elements contain the IP address and the fifth is the port number. + +*** New functions `stop-process' and `continue-process'. + +These functions stop and restart communication through a network +connection. For a server process, no connections are accepted in the +stopped state. For a client process, no input is received in the +stopped state. + +*** New function `network-interface-list'. This function returns a list of network interface names and their current network addresses. -*** New function network-interface-info. +*** New function `network-interface-info'. This function returns the network address, hardware address, current status, and other information about a specific network interface. -*** The sentinel is now called when a network process is deleted with -delete-process. The status message passed to the sentinel for a -deleted network process is "deleted". The message passed to the -sentinel when the connection is closed by the remote peer has been -changed to "connection broken by remote peer". +*** Deleting a network process with `delete-process' calls the sentinel. + +The status message passed to the sentinel for a deleted network +process is "deleted". The message passed to the sentinel when the +connection is closed by the remote peer has been changed to +"connection broken by remote peer". ** Using window objects: @@ -3964,7 +4025,7 @@ +++ *** New function `window-body-height'. -This is like window-height but does not count the mode line +This is like `window-height' but does not count the mode line or the header line. +++ @@ -3991,7 +4052,7 @@ selected window without impacting the order of `buffer-list'. +++ -*** `select-window' takes an optional second argument `norecord'. +*** `select-window' takes an optional second argument NORECORD. This is like `switch-to-buffer'. @@ -4018,12 +4079,12 @@ *** New function `destroy-fringe-bitmap' deletes a fringe bitmap or restores a built-in one to its default value. -*** New function `set-fringe-bitmap-face' can now be used to set a -specific face to be used for a specific fringe bitmap. The face is -automatically merged with the `fringe' face, so normally, the face -should only specify the foreground color of the bitmap. - -*** There are new display properties, `left-fringe; and `right-fringe', +*** New function `set-fringe-bitmap-face' specifies the face to be +used for a specific fringe bitmap. The face is automatically merged +with the `fringe' face, so normally, the face should only specify the +foreground color of the bitmap. + +*** There are new display properties, `left-fringe' and `right-fringe', that can be used to show a specific bitmap in the left or right fringe bitmap of the display line. @@ -4166,7 +4227,7 @@ is calculated as specified above for the `line-height' property. +++ -*** The buffer local line-spacing variable can now have a float value, +*** The buffer local `line-spacing' variable can now have a float value, which is used as a height relative to the default frame line height. +++ @@ -4216,7 +4277,7 @@ If no specific base offset is set for alignment, it is always relative to the left edge of the text area. For example, :align-to 0 in a -header-line aligns with the first text column in the text area. +header line aligns with the first text column in the text area. The value of the form `(NUM . EXPR)' is the value of NUM multiplied by the value of the expression EXPR. For example, (2 . in) specifies a @@ -4242,10 +4303,10 @@ **** New display property (slice X Y WIDTH HEIGHT) can be used with an image property to display only a specific slice of the image. -**** Function insert-image has new optional fourth arg to +**** Function `insert-image' has new optional fourth arg to specify image slice (X Y WIDTH HEIGHT). -**** New function insert-sliced-image inserts a given image as a +**** New function `insert-sliced-image' inserts a given image as a specified number of evenly sized slices (rows x columns). +++ @@ -4264,7 +4325,7 @@ PLIST of that hot-spot is consulted; if it contains a `help-echo' property it defines a tool-tip for the hot-spot, and if it contains a `pointer' property, it defines the shape of the mouse cursor when -it is over the hot-spot. See the variable 'void-area-text-pointer' +it is over the hot-spot. See the variable `void-area-text-pointer' for possible pointer shapes. When you click the mouse when the mouse pointer is over a hot-spot, @@ -4292,38 +4353,37 @@ ** Mouse event enhancements: +++ -*** Mouse clicks on fringes now generates left-fringe or right-fringes -events, rather than a text area click event. - -+++ -*** Mouse clicks in the left and right marginal areas now includes a -sensible buffer position corresponding to the first character in the -corresponding text row. +*** Mouse events for clicks on window fringes now specify `left-fringe' +or `right-fringe' as the area. + ++++ +*** All mouse events now include a buffer position regardless of where +you clicked. For mouse clicks in window margins and fringes, this is +a sensible buffer position corresponding to the surrounding text. + ++++ +*** `posn-point' now returns buffer position for non-text area events. +++ *** Function `mouse-set-point' now works for events outside text area. +++ -*** Mouse events now includes buffer position for all event types. - -+++ -*** `posn-point' now returns buffer position for non-text area events. - -+++ *** New function `posn-area' returns window area clicked on (nil means text area). +++ -*** Mouse events include actual glyph column and row for all event types. - -+++ -*** New function `posn-actual-col-row' returns actual glyph coordinates. - -+++ -*** Mouse events can now include image object in addition to string object. - -+++ -*** Mouse events include relative x and y pixel coordinates relative to +*** Mouse events include actual glyph column and row for all event types +and all areas. + ++++ +*** New function `posn-actual-col-row' returns the actual glyph coordinates +of the mouse event position. + ++++ +*** Mouse events can now indicate an image object clicked on. + ++++ +*** Mouse events include relative X and Y pixel coordinates relative to the top left corner of the object (image or character) clicked on. +++ @@ -4331,19 +4391,20 @@ (image or character) clicked on. +++ -*** New functions 'posn-object', 'posn-object-x-y', and -'posn-object-width-height' return the image or string object of a mouse -click, the x and y pixel coordinates relative to the top left corner -of that object, and the total width and height of that object. +*** New functions 'posn-object', 'posn-object-x-y', 'posn-object-width-height'. + +These return the image or string object of a mouse click, the X and Y +pixel coordinates relative to the top left corner of that object, and +the total width and height of that object. ** Text property and overlay changes: +++ -*** Arguments for remove-overlays are now optional, so that you can -remove all overlays in the buffer by just calling (remove-overlays). - -+++ -*** New variable char-property-alias-alist. +*** Arguments for `remove-overlays' are now optional, so that you can +remove all overlays in the buffer with just (remove-overlays). + ++++ +*** New variable `char-property-alias-alist'. This variable allows you to create alternative names for text properties. It works at the same level as `default-text-properties', @@ -4358,9 +4419,10 @@ it was found as a text property or not found at all. +++ -*** The new function remove-list-of-text-properties is almost the same -as `remove-text-properties'. The only difference is that it takes a -list of property names as argument rather than a property list. +*** The new function `remove-list-of-text-properties'. + +It is like `remove-text-properties' except that it takes a list of +property names as argument rather than a property list. ** Face changes @@ -4373,12 +4435,12 @@ makes a good use of the capabilities of the display. +++ -*** New function display-supports-face-attributes-p can be used to test +*** New function `display-supports-face-attributes-p' can be used to test whether a given set of face attributes is actually displayable. A new predicate `supports' has also been added to the `defface' face specification language, which can be used to do this test for faces -defined with defface. +defined with `defface'. --- *** The special treatment of faces whose names are of the form `fg:COLOR' @@ -4406,10 +4468,11 @@ not (previously it did only a very cursory check). +++ -*** `face-attribute', `face-foreground', `face-background', and -`face-stipple' now accept a new optional argument, INHERIT, which -controls how face inheritance is used when determining the value of a -face attribute. +*** `face-attribute', `face-foreground', `face-background', `face-stipple'. + +These now accept a new optional argument, INHERIT, which controls how +face inheritance is used when determining the value of a face +attribute. +++ *** New functions `face-attribute-relative-p' and `merge-face-attribute' @@ -4424,9 +4487,6 @@ so that :inherit face lists operate identically to face lists in text `face' properties. -+++ -*** New standard font-lock face `font-lock-preprocessor-face'. - --- *** `set-fontset-font', `fontset-info', `fontset-font' now operate on the default fontset if the argument NAME is nil.. @@ -4444,11 +4504,11 @@ +++ *** font-lock can manage arbitrary text-properties beside `face'. -*** the FACENAME returned in `font-lock-keywords' can be a list of the +**** the FACENAME returned in `font-lock-keywords' can be a list of the form (face FACE PROP1 VAL1 PROP2 VAL2 ...) so you can set other properties than `face'. -*** `font-lock-extra-managed-props' can be set to make sure those +**** `font-lock-extra-managed-props' can be set to make sure those extra properties are automatically cleaned up by font-lock. --- @@ -4480,8 +4540,12 @@ var `magic-mode-alist'. +++ -*** Major mode functions now run the new normal hook -`after-change-major-mode-hook', at their very end, after the mode hooks. +*** Use the new function `run-mode-hooks' to run the major mode's mode hook. + ++++ +*** All major mode functions should now run the new normal hook +`after-change-major-mode-hook', at their very end, after the mode +hooks. `run-mode-hooks' does this automatically. --- *** If a major mode function has a non-nil `no-clone-indirect' @@ -4511,7 +4575,7 @@ +++ *** `minor-mode-list' now holds a list of minor mode commands. ---- ++++ *** `define-global-minor-mode'. This is a new name for what was formerly called @@ -4521,9 +4585,10 @@ +++ *** The new function `called-interactively-p' does what many people -have mistakenly believed `interactive-p' did: it returns t if the -calling function was called through `call-interactively'. This should -only be used when you cannot solve the problem by adding a new +have mistakenly believed `interactive-p' to do: it returns t if the +calling function was called through `call-interactively'. + +Only use this when you cannot solve the problem by adding a new INTERACTIVE argument to the command. +++ @@ -4560,41 +4625,6 @@ *** `emacsserver' now runs `pre-command-hook' and `post-command-hook' when it receives a request from emacsclient. -** Minibuffer changes: - -+++ -*** The functions all-completions and try-completion now accept lists -of strings as well as hash-tables additionally to alists, obarrays -and functions. Furthermore, the function `test-completion' is now -exported to Lisp. The keys in alists and hash tables can be either -strings or symbols, which are automatically converted with to strings. - -+++ -*** The new macro `dynamic-completion-table' supports using functions -as a dynamic completion table. - - (dynamic-completion-table FUN) - -FUN is called with one argument, the string for which completion is required, -and it should return an alist containing all the intended possible -completions. This alist can be a full list of possible completions so that FUN -can ignore the value of its argument. If completion is performed in the -minibuffer, FUN will be called in the buffer from which the minibuffer was -entered. `dynamic-completion-table' then computes the completion. - -+++ -*** The new macro `lazy-completion-table' initializes a variable -as a lazy completion table. - - (lazy-completion-table VAR FUN &rest ARGS) - -If the completion table VAR is used for the first time (e.g., by passing VAR -as an argument to `try-completion'), the function FUN is called with arguments -ARGS. FUN must return the completion table that will be stored in VAR. If -completion is requested in the minibuffer, FUN will be called in the buffer -from which the minibuffer was entered. The return value of -`lazy-completion-table' must be used to initialize the value of VAR. - ** Lisp file loading changes: +++ @@ -4607,8 +4637,8 @@ defined. For a variable, it records just the variable name. +++ -*** The function symbol-file can now search specifically for function or -variable definitions. +*** The function `symbol-file' can now search specifically for function, +variable or face definitions. +++ *** `provide' and `featurep' now accept an optional second argument @@ -4623,10 +4653,11 @@ +++ ** Byte compiler changes: -*** The byte-compiler now displays the actual line and character +*** The byte compiler now displays the actual line and character position of errors, where possible. Additionally, the form of its -warning and error messages have been brought more in line with the -output of other GNU tools. +warning and error messages have been brought into line with GNU standards +for these. As a result, you can use next-error and friends on the +compilation output buffer. *** The new macro `with-no-warnings' suppresses all compiler warnings inside its body. In terms of execution, it is equivalent to `progn'. @@ -4654,7 +4685,7 @@ generally run in Emacs and vice versa, this optimization doesn't lose you anything. -*** The local variable `no-byte-compile' in elisp files is now obeyed. +*** The local variable `no-byte-compile' in Lisp files is now obeyed. --- *** When a Lisp file uses CL functions at run-time, compiling the file @@ -4702,7 +4733,7 @@ wasteful. --- -*** set-buffer-file-coding-system now takes an additional argument, +*** `set-buffer-file-coding-system' now takes an additional argument, NOMODIFY. If it is non-nil, it means don't mark the buffer modified. +++ @@ -4729,7 +4760,7 @@ hash tables defined by the Lisp function `define-translation-hash-table'. --- -*** New function quail-find-key returns a list of keys to type in the +*** New function `quail-find-key' returns a list of keys to type in the current input method to input a character. ** Mode line changes: @@ -4737,7 +4768,7 @@ +++ *** New function `format-mode-line'. -This returns the mode-line or header-line of the selected (or a +This returns the mode line or header line of the selected (or a specified) window as a string with or without text properties. +++ @@ -4799,13 +4830,13 @@ +++ *** A number of hooks have been renamed to better follow the conventions: -find-file-hooks to find-file-hook, -find-file-not-found-hooks to find-file-not-found-functions, -write-file-hooks to write-file-functions, -write-contents-hooks to write-contents-functions, -x-lost-selection-hooks to x-lost-selection-functions, -x-sent-selection-hooks to x-sent-selection-functions, -delete-frame-hook to delete-frame-functions. +`find-file-hooks' to `find-file-hook', +`find-file-not-found-hooks' to `find-file-not-found-functions', +`write-file-hooks' to `write-file-functions', +`write-contents-hooks' to `write-contents-functions', +`x-lost-selection-hooks' to `x-lost-selection-functions', +`x-sent-selection-hooks' to `x-sent-selection-functions', +`delete-frame-hook' to `delete-frame-functions'. In each case the old name remains as an alias for the moment. @@ -4817,6 +4848,87 @@ --- *** New function `x-send-client-message' sends a client message when running under X. + +** GC changes: + ++++ +*** New variables `gc-elapsed' and `gcs-done' provide extra information +on garbage collection. + ++++ +*** The normal hook `post-gc-hook' is run at the end of garbage collection. + +The hook is run with GC inhibited, so use it with care. + +* New Packages for Lisp Programming in Emacs 22.1 + ++++ +** The new library button.el implements simple and fast `clickable +buttons' in emacs buffers. Buttons are much lighter-weight than the +`widgets' implemented by widget.el, and can be used by lisp code that +doesn't require the full power of widgets. Emacs uses buttons for +such things as help and apropos buffers. + +--- +** The new library tree-widget.el provides a widget to display a set +of hierarchical data as an outline. For example, the tree-widget is +well suited to display a hierarchy of directories and files. + +** The new library bindat.el provides functions to unpack and pack +binary data structures, such as network packets, to and from Lisp +data structures. + +--- +** master-mode.el implements a minor mode for scrolling a slave +buffer without leaving your current buffer, the master buffer. + +It can be used by sql.el, for example: the SQL buffer is the master +and its SQLi buffer is the slave. This allows you to scroll the SQLi +buffer containing the output from the SQL buffer containing the +commands. + +This is how to use sql.el and master.el together: the variable +sql-buffer contains the slave buffer. It is a local variable in the +SQL buffer. + +(add-hook 'sql-mode-hook + (function (lambda () + (master-mode t) + (master-set-slave sql-buffer)))) +(add-hook 'sql-set-sqli-hook + (function (lambda () + (master-set-slave sql-buffer)))) + ++++ +** The new library benchmark.el does timing measurements on Lisp code. + +This includes measuring garbage collection time. + ++++ +** The new library testcover.el does test coverage checking. + +This is so you can tell whether you've tested all paths in your Lisp +code. It works with edebug. + +The function `testcover-start' instruments all functions in a given +file. Then test your code. The function `testcover-mark-all' adds +overlay "splotches" to the Lisp file's buffer to show where coverage +is lacking. The command `testcover-next-mark' (bind it to a key!) +will move point forward to the next spot that has a splotch. + +Normally, a red splotch indicates the form was never completely +evaluated; a brown splotch means it always evaluated to the same +value. The red splotches are skipped for forms that can't possibly +complete their evaluation, such as `error'. The brown splotches are +skipped for forms that are expected to always evaluate to the same +value, such as (setq x 14). + +For difficult cases, you can add do-nothing macros to your code to +help out the test coverage tool. The macro `noreturn' suppresses a +red splotch. It is an error if the argument to `noreturn' does +return. The macro `1value' suppresses a brown splotch for its argument. +This macro is a no-op except during test-coverage -- then it signals +an error if the argument actually returns differing values. * Installation changes in Emacs 21.3 @@ -10645,8 +10757,8 @@ **** you can specify an arbitrary function for actually transmitting the message; included in feedmail are interfaces for /bin/[r]mail, -/usr/lib/sendmail, and elisp smtpmail; it's easy to write a new -function for something else (10-20 lines of elisp) +/usr/lib/sendmail, and Emacs Lisp smtpmail; it's easy to write a new +function for something else (10-20 lines of Lisp code). ** Dired changes
--- a/lisp/ChangeLog Sat May 14 01:56:59 2005 +0000 +++ b/lisp/ChangeLog Mon May 16 15:49:27 2005 +0000 @@ -1,3 +1,189 @@ +2005-05-16 Juanma Barranquero <lekktu@gmail.com> + + * international/latexenc.el: Add page marker to force the "Local + Variables:" string out of the last page. + +2005-05-16 Nick Roberts <nickrob@snap.net.nz> + + * progmodes/gud.el (gud-tooltip-mode): Add gud prefix to + tooltip-change-major-mode. + (gud-tooltip-print-command): Remove case where gud-minor-mode + is gdb ("--fullname"). + (gud-tooltip-tips): Turn GUD tooltips off for this case and + explain to user. + +2005-05-16 Jay Belanger <belanger@truman.edu> + + * calc/calc-store.el (calc-copy-special-constant): New function. + + * calc/calc-ext.el (calc-init-extensions): Add binding for + `calc-copy-special-constant'. + + * calc/calc-prog.el (calc-edit-format-macro-buffer): Add a case + for the `calc-copy-special-constant' command. + +2005-05-16 Nick Roberts <nickrob@snap.net.nz> + + * subr.el (left-fringe-p): New function. + + * progmodes/compile.el (compilation-setup): Set local value of + overlay-arrow-string to "" always. + (compilation-set-window): Left fringe then don't scroll. No left + fringe then no arrow and scroll message to top. + (compilation-context-lines): Adjust doc string accordingly. + +2005-05-16 Kim F. Storm <storm@cua.dk> + + * ido.el (ido-magic-forward-char, ido-magic-backward-char) + (ido-magic-delete-char): New commands for C-f, C-b, C-d. + (ido-wide-find-dir-or-delete-dir): New command for M-d. + (ido-define-mode-map): Bind them. Add C-x prefix to fallback commands. + (ido-read-file-name): Handle commands with ido property value + equal to find-file as reading a file name, to allow C-d to enter dired. + (ibuffer-find-file): Add ido property with value find-file. + +2005-05-15 Kim F. Storm <storm@cua.dk> + + * subr.el (open-network-stream-nowait): Remove. + (open-network-stream-server): Remove. + +2005-05-15 Richard M. Stallman <rms@gnu.org> + + * faces.el (describe-face): Output a definition link button. + + * help-mode.el (help-face-def): New button type. + + * emacs-lisp/copyright.el (copyright-fix-years): + Match properly if the first year is 2-digit. + Don't mess up the whitespace after the years by filling. + + * dired-aux.el (dired-mark-confirm): + Pass t to dired-get-marked-files for DISTINGUISH-ONE-MARKED. + + * dired.el (dired-map-over-marks): New arg DISTINGUISH-ONE-MARKED. + (dired-get-marked-files): New arg DISTINGUISH-ONE-MARKED. + (dired-mark-pop-up): Handle FILES = (t FILE) specially. + + * emacs-lisp/lisp-mode.el (lisp-mode-variables): + Set font-lock-comment-start-skip. + + * font-lock.el (font-lock-comment-start-skip): New variable. + (font-lock-comment-end-skip): New variable. + (font-lock-fontify-syntactically-region): Use them if non-nil. + +2005-05-15 Jay Belanger <belanger@truman.edu> + + * calc/calc-store.el (calc-store-value): Return a string rather + than display it as a message. + Use calc-var-name for variable name. + (calc-store-into): Add the result of calc-store-value to message. + (calc-copy-variable): Add a message. + (calc-store-exchange): Improve error messages. + (calc-store-binary, calc-store-map): Don't reset the values of + special constants. + +2005-05-14 Luc Teirlinck <teirllm@auburn.edu> + + * emacs-lisp/derived.el (define-derived-mode): Add link to Elisp + manual to docstring. + + * files.el (hack-local-variables-confirm): Add STRING argument. + Make the function handle non file visiting buffers correctly. + (hack-local-variables-prop-line, hack-local-variables) + (hack-one-local-variable): Use STRING arg of + `hack-local-variables-confirm'. + +2005-05-14 Michael Albinus <michael.albinus@gmx.de> + + Sync with Tramp 2.0.49. + + * tramp.el (tramp-handle-dired-call-process) + (tramp-handle-insert-directory):`insert-buffer' cannot be used + because the contents of the Tramp buffer is changed before + insertion (`expand-file' and alike). + (tramp-handle-insert-directory): If `localname' has an empty + nondirectory name, it must not be quoted. + (tramp-pre-connection): Add parameter CHUNKSIZE. Make local + variable `tramp-chunksize'. Change callees. + (tramp-open-connection-setup-interactive-shell): Check remote host + for buggy `send-process-string' implementation. Set + `tramp-chunksize' if found. Reported by Michael Kifer + <kifer@cs.sunysb.edu> (and a lot of other people all the years). + (tramp-handle-shell-command): `insert-buffer' cannot be used + because the contents of the Tramp buffer is changed before + insertion (`expand-file' and alike). Reported by Fr,Ai(Bd,Ai(Bric Bothamy + <frederic.bothamy@free.fr>. + (tramp-set-auto-save): Actions should be done for Tramp file name + handler only. Ange-FTP has its own auto-save mechanism. Reported + by Richard G. Bielawski <Richard.G.Bielawski@wellsfargo.com>. + (tramp-set-auto-save-file-modes): Set file modes of + `buffer-auto-save-file-name' to ?\600 as fallback solution. + Reported by Ferenc Wagner <wferi@tba.elte.hu>. + (tramp-bug): Remove obsolete variable. + (tramp-append-tramp-buffers): Rewrite partly. More suitable check + for presence of `mml-mode'. Make it running for older Emacsen as + well. + +2005-05-14 John Paul Wallington <jpw@pobox.com> + + * ibuf-ext.el (define-ibuffer-filter filename): + If `dired-directory' is a list, use its car. + +2005-05-14 Daniel Brockman <daniel@brockman.se> (tiny change) + + * ibuffer.el (define-ibuffer-column filename): + If `dired-directory' is a list, use its car. + +2005-05-14 Richard M. Stallman <rms@gnu.org> + + * subr.el (symbol-file): Doc fix. + + * emacs-lisp/bytecomp.el (byte-compile-nogroup-warn): New function. + (byte-compile-form): Call byte-compile-nogroup-warn. + (byte-compile-warning-types): Doc fix. + + * eshell/esh-mode.el (eshell-find-tag): Use with-no-warnings. + + * progmodes/cc-engine.el (c-literal-faces): + Add font-lock-comment-delimiter-face. + + * net/net-utils.el (dig): Use with-no-warnings. + + * mail/supercite.el (sc-cite-frame-alist, sc-uncite-frame-alist) + (sc-recite-frame-alist, sc-default-cite-frame) + (sc-default-uncite-frame, sc-default-recite-frame) + (sc-attrib-selection-list, sc-rewrite-header-list): + Mark as risky-local-variable. + + * international/ogonek.el (ogonek-jak, ogonek-how): + Don't use beginning-of-buffer. + + * emacs-lisp/eldoc.el (eldoc-documentation-function): Add autoload. + + * calendar/solar.el (solar-data-list): Move definition up. + + * dnd.el (dnd-protocol-alist): Add autoload. + + * progmodes/sh-script.el: Many doc usage fixes. + (sh-indent-after-do): Change default to match common styles. + +2005-05-13 Luc Teirlinck <teirllm@auburn.edu> + + * files.el (interpreter-mode-alist) + (auto-mode-interpreter-regexp): Doc fixes. + +2005-05-13 Matt Hodges <MPHodges@member.fsf.org> + + * tmm.el (tmm-get-keymap): Include only active menus and menu + items. + + * emacs-lisp/easymenu.el (easy-menu-define): Doc fixes. + +2005-05-13 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * dired.el (dired-mode): make-variable-buffer-local => + make-local-variable + 2005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * term/mac-win.el (mac-select-convert-to-string): Try coding @@ -141,6 +327,9 @@ * cus-edit.el (custom-file): Call file-chase-links. * files.el (read-directory-name): Fix previous change. + (hack-local-variables-confirm): New function. + (hack-local-variables-prop-line, hack-local-variables) + (hack-one-local-variable): Use it. 2005-05-10 Lute Kamstra <lute@gnu.org>
--- a/lisp/calc/calc-ext.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/calc/calc-ext.el Mon May 16 15:49:27 2005 +0000 @@ -416,6 +416,7 @@ (define-key calc-mode-map "sd" 'calc-declare-variable) (define-key calc-mode-map "se" 'calc-edit-variable) (define-key calc-mode-map "si" 'calc-insert-variables) + (define-key calc-mode-map "sk" 'calc-copy-special-constant) (define-key calc-mode-map "sl" 'calc-let) (define-key calc-mode-map "sm" 'calc-store-map) (define-key calc-mode-map "sn" 'calc-store-neg) @@ -1075,7 +1076,8 @@ calc-vector-pop-variance calc-vector-product calc-vector-sdev calc-vector-sum calc-vector-variance) - ("calc-store" calc-assign calc-copy-variable calc-declare-variable + ("calc-store" calc-assign calc-copy-special-constant +calc-copy-variable calc-declare-variable calc-edit-AlgSimpRules calc-edit-Decls calc-edit-EvalRules calc-edit-ExtSimpRules calc-edit-FitRules calc-edit-GenCount calc-edit-Holidays calc-edit-IntegLimit calc-edit-LineStyles
--- a/lisp/calc/calc-prog.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/calc/calc-prog.el Mon May 16 15:49:27 2005 +0000 @@ -902,6 +902,7 @@ (calc-edit-macro-combine-var-name)) ((or (string-equal type "calc-copy-variable") + (string-equal type "calc-copy-special-constant") (string-equal type "calc-declare-variable")) (forward-line 1) (calc-edit-macro-combine-var-name)
--- a/lisp/calc/calc-store.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/calc/calc-store.el Mon May 16 15:49:27 2005 +0000 @@ -57,15 +57,20 @@ ( | . calc-store-concat ) )))) (if found (funcall (cdr found)) - (calc-store-value var (or calc-given-value (calc-top 1)) - "" calc-given-value-flag) - (message "Stored to variable \"%s\"" (calc-var-name var)))) + (let ((msg + (calc-store-value var (or calc-given-value (calc-top 1)) + "" calc-given-value-flag))) + (message (concat "Stored to variable \"%s\"" msg) + (calc-var-name var))))) (setq var (calc-is-assignments (calc-top 1))) (if var (while var - (calc-store-value (car (car var)) (cdr (car var)) - (if (not (cdr var)) "") - (if (not (cdr var)) 1)) + (let ((msg + (calc-store-value (car (car var)) (cdr (car var)) + (if (not (cdr var)) "") + (if (not (cdr var)) 1)))) + (message (concat "Stored to variable \"%s\"" msg) + (calc-var-name var))) (setq var (cdr var)))))))) (defun calc-store-plus (&optional var) @@ -109,22 +114,26 @@ (calc-store-binary var "n" '- n)) (defun calc-store-value (var value tag &optional pop) - (if var - (let ((old (calc-var-value var))) - (set var value) - (if pop (or calc-store-keep (calc-pop-stack pop))) - (calc-record-undo (list 'store (symbol-name var) old)) - (if tag - (let ((calc-full-trail-vectors nil)) - (calc-record value (format ">%s%s" tag (calc-var-name var))))) - (and (memq var '(var-e var-i var-pi var-phi var-gamma)) - (eq (car-safe old) 'special-const) - (message "(Note: Built-in definition of %s has been lost)" var)) - (and (memq var '(var-inf var-uinf var-nan)) - (null old) - (message "(Note: %s has built-in meanings which may interfere)" - var)) - (calc-refresh-evaltos var)))) + (let ((msg "")) + (if var + (let ((old (calc-var-value var))) + (set var value) + (if pop (or calc-store-keep (calc-pop-stack pop))) + (calc-record-undo (list 'store (symbol-name var) old)) + (if tag + (let ((calc-full-trail-vectors nil)) + (calc-record value (format ">%s%s" tag (calc-var-name var))))) + (cond + ((and (memq var '(var-e var-i var-pi var-phi var-gamma)) + (eq (car-safe old) 'special-const)) + (setq msg (format " (Note: Built-in definition of %s has been lost)" + (calc-var-name var)))) + ((and (memq var '(var-inf var-uinf var-nan)) + (null old)) + (setq msg (format " (Note: %s has built-in meanings which may interfere)" + (calc-var-name var))))) + (calc-refresh-evaltos var))) + msg)) (defun calc-var-name (var) (if (symbolp var) (setq var (symbol-name var))) @@ -140,8 +149,12 @@ (or var (setq var (calc-read-var-name (format "Store %s: " tag)))) (if var (let ((old (calc-var-value var))) - (or old - (error "No such variable: \"%s\"" (calc-var-name var))) + (if (eq (car-safe old) 'special-const) + (error "\"%s\" is a special constant" (calc-var-name var))) + (if (not old) + (if (memq var '(var-inf var-uinf var-nan)) + (error "\"%s\" is a special variable" (calc-var-name var)) + (error "No such variable: \"%s\"" (calc-var-name var)))) (if (stringp old) (setq old (math-read-expr old))) (if (eq (car-safe old) 'error) @@ -151,7 +164,7 @@ (list func value old) (list func old value))) tag (and (not val) 1)) - (message "Stored to variable \"%s\"" (calc-var-name var))))))) + (message "Variable \"%s\" changed" (calc-var-name var))))))) (defvar calc-var-name-map nil "Keymap for reading Calc variable names.") (if calc-var-name-map @@ -228,26 +241,32 @@ (or var (setq var (calc-read-var-name (format "Store Mapping %s: " (nth 2 oper))))) (if var - (let ((old (or (calc-var-value var) - (error "No such variable: \"%s\"" - (calc-var-name var)))) - (calc-simplify-mode (if (eq calc-simplify-mode 'none) - 'num calc-simplify-mode)) - (values (and (> nargs 1) - (calc-top-list (1- nargs) (1+ calc-dollar-used))))) - (message "Working...") - (calc-set-command-flag 'clear-message) - (if (stringp old) - (setq old (math-read-expr old))) - (if (eq (car-safe old) 'error) - (error "Bad format in variable contents: %s" (nth 2 old))) - (setq values (if (calc-is-inverse) - (append values (list old)) - (append (list old) values))) - (calc-store-value var - (calc-normalize (cons (nth 1 oper) values)) - (nth 2 oper) - (+ calc-dollar-used (1- nargs)))))))) + (let ((old (calc-var-value var))) + (if (eq (car-safe old) 'special-const) + (error "\"%s\" is a special constant" (calc-var-name var))) + (if (not old) + (if (memq var '(var-inf var-uinf var-nan)) + (error "\"%s\" is a special variable" (calc-var-name var)) + (error "No such variable: \"%s\"" (calc-var-name var)))) + (let ((calc-simplify-mode (if (eq calc-simplify-mode 'none) + 'num calc-simplify-mode)) + (values (and (> nargs 1) + (calc-top-list (1- nargs) (1+ calc-dollar-used))))) + (message "Working...") + (calc-set-command-flag 'clear-message) + (if (stringp old) + (setq old (math-read-expr old))) + (if (eq (car-safe old) 'error) + (error "Bad format in variable contents: %s" (nth 2 old))) + (setq values (if (calc-is-inverse) + (append values (list old)) + (append (list old) values))) + (calc-store-value var + (calc-normalize (cons (nth 1 oper) values)) + (nth 2 oper) + (+ calc-dollar-used (1- nargs))) + (message "Variable \"%s\" changed" (calc-var-name var)))))))) + (defun calc-store-exchange (&optional var) (interactive) @@ -258,10 +277,12 @@ (or var (setq var (calc-read-var-name "Exchange with: "))) (if var (let ((value (calc-var-value var))) - (or value - (error "No such variable: \"%s\"" (calc-var-name var))) (if (eq (car-safe value) 'special-const) - (error "%s is a special constant" var)) + (error "\"%s\" is a special constant" (calc-var-name var))) + (if (not value) + (if (memq var '(var-inf var-uinf var-nan)) + (error "\"%s\" is a special variable" (calc-var-name var)) + (error "No such variable: \"%s\"" (calc-var-name var)))) (setq top (or calc-given-value (calc-top 1))) (calc-store-value var top nil) (calc-pop-push-record calc-given-value-flag @@ -366,6 +387,26 @@ (interactive) (calc-recall (intern (format "var-q%c" last-command-char)))) +(defun calc-copy-special-constant (&optional sconst var) + (interactive) + (let ((sc '(("") + ("e" . (special-const (math-e))) + ("pi" . (special-const (math-pi))) + ("i" . (special-const (math-imaginary 1))) + ("phi" . (special-const (math-phi))) + ("gamma" . (special-const (math-gamma-const)))))) + (calc-wrapper + (or sconst (setq sconst (completing-read "Special constant: " sc nil t))) + (unless (string= sconst "") + (let ((value (cdr (assoc sconst sc)))) + (or var (setq var (calc-read-var-name + (format "Copy special constant %s, to: " + sconst)))) + (if var + (let ((msg (calc-store-value var value ""))) + (message (concat "Special constant \"%s\" copied to \"%s\"" msg) + sconst (calc-var-name var))))))))) + (defun calc-copy-variable (&optional var1 var2) (interactive) (calc-wrapper @@ -378,7 +419,9 @@ (format "Copy variable: %s, to: " (calc-var-name var1))))) (if var2 - (calc-store-value var2 value "")))))) + (let ((msg (calc-store-value var2 value ""))) + (message (concat "Variable \"%s\" copied to \"%s\"" msg) + (calc-var-name var1) (calc-var-name var2)))))))) (defvar calc-last-edited-variable nil) (defun calc-edit-variable (&optional var)
--- a/lisp/calendar/solar.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/calendar/solar.el Mon May 16 15:49:27 2005 +0000 @@ -643,48 +643,6 @@ ; equation of time, in hours (list app i time-eq nut))) -(defun solar-longitude (d) - "Longitude of sun on astronomical (Julian) day number D. -Accurary is about 0.0006 degree (about 365.25*24*60*0.0006/360 = 1 minutes). - -The values of calendar-daylight-savings-starts, -calendar-daylight-savings-starts-time, calendar-daylight-savings-ends, -calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and -calendar-time-zone are used to interpret local time." - (let* ((a-d (calendar-absolute-from-astro d)) - ;; get Universal Time - (date (calendar-astro-from-absolute - (- a-d - (if (dst-in-effect a-d) - (/ calendar-daylight-time-offset 24.0 60.0) 0) - (/ calendar-time-zone 60.0 24.0)))) - ;; get Ephemeris Time - (date (+ date (solar-ephemeris-correction - (extract-calendar-year - (calendar-gregorian-from-absolute - (floor - (calendar-absolute-from-astro - date))))))) - (U (/ (- date 2451545) 3652500)) - (longitude - (+ 4.9353929 - (* 62833.1961680 U) - (* 0.0000001 - (apply '+ - (mapcar '(lambda (x) - (* (car x) - (sin (mod - (+ (car (cdr x)) - (* (car (cdr (cdr x))) U)) - (* 2 pi))))) - solar-data-list))))) - (aberration - (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973))) - (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi))) - (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi))) - (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2)))))) - (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0))) - (defconst solar-data-list '((403406 4.721964 1.621043) (195207 5.937458 62830.348067) @@ -737,6 +695,48 @@ (10 1.50 21463.25) (10 2.55 157208.40))) +(defun solar-longitude (d) + "Longitude of sun on astronomical (Julian) day number D. +Accurary is about 0.0006 degree (about 365.25*24*60*0.0006/360 = 1 minutes). + +The values of calendar-daylight-savings-starts, +calendar-daylight-savings-starts-time, calendar-daylight-savings-ends, +calendar-daylight-savings-ends-time, calendar-daylight-time-offset, and +calendar-time-zone are used to interpret local time." + (let* ((a-d (calendar-absolute-from-astro d)) + ;; get Universal Time + (date (calendar-astro-from-absolute + (- a-d + (if (dst-in-effect a-d) + (/ calendar-daylight-time-offset 24.0 60.0) 0) + (/ calendar-time-zone 60.0 24.0)))) + ;; get Ephemeris Time + (date (+ date (solar-ephemeris-correction + (extract-calendar-year + (calendar-gregorian-from-absolute + (floor + (calendar-absolute-from-astro + date))))))) + (U (/ (- date 2451545) 3652500)) + (longitude + (+ 4.9353929 + (* 62833.1961680 U) + (* 0.0000001 + (apply '+ + (mapcar '(lambda (x) + (* (car x) + (sin (mod + (+ (car (cdr x)) + (* (car (cdr (cdr x))) U)) + (* 2 pi))))) + solar-data-list))))) + (aberration + (* 0.0000001 (- (* 17 (cos (+ 3.10 (* 62830.14 U)))) 973))) + (A1 (mod (+ 2.18 (* U (+ -3375.70 (* 0.36 U)))) (* 2 pi))) + (A2 (mod (+ 3.51 (* U (+ 125666.39 (* 0.10 U)))) (* 2 pi))) + (nutation (* -0.0000001 (+ (* 834 (sin A1)) (* 64 (sin A2)))))) + (mod (radians-to-degrees (+ longitude aberration nutation)) 360.0))) + (defun solar-ephemeris-correction (year) "Ephemeris time minus Universal Time during Gregorian year. Result is in days.
--- a/lisp/dired-aux.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/dired-aux.el Mon May 16 15:49:27 2005 +0000 @@ -760,7 +760,10 @@ ;; The files used are determined by ARG (as in dired-get-marked-files). (or (eq dired-no-confirm t) (memq op-symbol dired-no-confirm) - (let ((files (dired-get-marked-files t arg)) + ;; Pass t for DISTINGUISH-ONE-MARKED so that a single file which + ;; is marked pops up a window. That will help the user see + ;; it isn't the current line file. + (let ((files (dired-get-marked-files t arg nil t)) (string (if (eq op-symbol 'compress) "Compress or uncompress" (capitalize (symbol-name op-symbol))))) (dired-mark-pop-up nil op-symbol files (function y-or-n-p)
--- a/lisp/dired.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/dired.el Mon May 16 15:49:27 2005 +0000 @@ -450,7 +450,8 @@ "flagged" "marked")))) (and (> count 0) count))) -(defmacro dired-map-over-marks (body arg &optional show-progress) +(defmacro dired-map-over-marks (body arg &optional show-progress + distinguish-one-marked) "Eval BODY with point on each marked line. Return a list of BODY's results. If no marked file could be found, execute BODY on the current line. If ARG is an integer, use the next ARG (or previous -ARG, if ARG<0) @@ -465,7 +466,10 @@ Search starts at the beginning of the buffer, thus the car of the list corresponds to the line nearest to the buffer's bottom. This is also true for (positive and negative) integer values of ARG. -BODY should not be too long as it is expanded four times." +BODY should not be too long as it is expanded four times. + +If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file, +return (t FILENAME) instead of (FILENAME)." ;; ;;Warning: BODY must not add new lines before point - this may cause an ;;endless loop. @@ -505,13 +509,15 @@ (set-marker next-position nil) (setq next-position (and (re-search-forward regexp nil t) (point-marker))))) + (if (and ,distinguish-one-marked (= (length results) 1)) + (setq results (cons t results))) (if found results (list ,body))))) ;; save-excursion loses, again (dired-move-to-filename))) -(defun dired-get-marked-files (&optional localp arg filter) +(defun dired-get-marked-files (&optional localp arg filter distinguish-one-marked) "Return the marked files' names as list of strings. The list is in the same order as the buffer, that is, the car is the first marked file. @@ -522,13 +528,21 @@ If ARG is otherwise non-nil, use file. Usually ARG comes from the command's prefix arg. Optional third argument FILTER, if non-nil, is a function to select - some of the files--those for which (funcall FILTER FILENAME) is non-nil." - (let ((all-of-them - (save-excursion - (dired-map-over-marks (dired-get-filename localp) arg))) - result) + some of the files--those for which (funcall FILTER FILENAME) is non-nil. + +If DISTINGUISH-ONE-MARKED is non-nil, then if we find just one marked file, +return (t FILENAME) instead of (FILENAME). +Don't use that together with FILTER." + (let* ((all-of-them + (save-excursion + (dired-map-over-marks + (dired-get-filename localp) + arg nil distinguish-one-marked))) + result) (if (not filter) - (nreverse all-of-them) + (if (and distinguish-one-marked (eq (car all-of-them) t)) + all-of-them + (nreverse all-of-them)) (dolist (file all-of-them) (if (funcall filter file) (push file result))) @@ -1535,7 +1549,7 @@ (setq dired-switches-alist nil) (dired-sort-other dired-actual-switches t) (when (featurep 'dnd) - (make-variable-buffer-local 'dnd-protocol-alist) + (make-local-variable 'dnd-protocol-alist) (setq dnd-protocol-alist (append dired-dnd-protocol-alist dnd-protocol-alist))) (run-mode-hooks 'dired-mode-hook)) @@ -2537,15 +2551,21 @@ (an argument or confirmation). The window is not shown if there is just one file or OP-SYMBOL is a member of the list in `dired-no-confirm'. -FILES is the list of marked files." +FILES is the list of marked files. It can also be (t FILENAME) +in the case of one marked file, to distinguish that from using +just the current file." (or bufname (setq bufname " *Marked Files*")) (if (or (eq dired-no-confirm t) (memq op-symbol dired-no-confirm) + ;; If FILES defaulted to the current line's file. (= (length files) 1)) (apply function args) (with-current-buffer (get-buffer-create bufname) (erase-buffer) - (dired-format-columns-of-files files) + ;; Handle (t FILE) just like (FILE), here. + ;; That value is used (only in some cases), to mean + ;; just one file that was marked, rather than the current line file. + (dired-format-columns-of-files (if (eq (car files) t) (cdr files) files)) (remove-text-properties (point-min) (point-max) '(mouse-face nil help-echo nil))) (save-window-excursion
--- a/lisp/dnd.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/dnd.el Mon May 16 15:49:27 2005 +0000 @@ -36,6 +36,7 @@ ;;; Customizable variables +;;;###autoload (defcustom dnd-protocol-alist '( ("^file:///" . dnd-open-local-file) ; XDND format.
--- a/lisp/emacs-lisp/bytecomp.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Mon May 16 15:49:27 2005 +0000 @@ -338,8 +338,8 @@ free-vars references to variables not in the current lexical scope. unresolved calls to unknown functions. - callargs lambda calls with args that don't match the definition. - redefine function cell redefined from a macro to a lambda or vice + callargs function calls with args that don't match the definition. + redefine function name redefined from a macro to ordinary function or vice versa, or redefined to take a different number of arguments. obsolete obsolete variables and functions. noruntime functions that may not be defined at runtime (typically @@ -1244,6 +1244,20 @@ (dolist (elt '(format message error)) (put elt 'byte-compile-format-like t)) +;; Warn if a custom definition fails to specify :group. +(defun byte-compile-nogroup-warn (form) + (let ((keyword-args (cdr (cdr (cdr (cdr form))))) + (name (cadr form))) + (unless (plist-get keyword-args :group) + (byte-compile-warn + "%s for `%s' fails to specify containing group" + (cdr (assq (car form) + '((custom-declare-group . defgroup) + (custom-declare-face . defface) + (custom-declare-variable . defcustom)))) + (if (and (consp name) (eq (car name) 'quote)) + (cadr name) name))))) + ;; Warn if the function or macro is being redefined with a different ;; number of arguments. (defun byte-compile-arglist-warn (form macrop) @@ -2729,7 +2743,7 @@ (when (byte-compile-const-symbol-p fn) (byte-compile-warn "`%s' called as a function" fn)) (and (memq 'interactive-only byte-compile-warnings) - (memq (car form) byte-compile-interactive-only-functions) + (memq fn byte-compile-interactive-only-functions) (byte-compile-warn "`%s' used from Lisp code\n\ That command is designed for interactive use only" fn)) (if (and handler @@ -2739,8 +2753,10 @@ (progn (byte-compile-set-symbol-position fn) (funcall handler form)) - (if (memq 'callargs byte-compile-warnings) - (byte-compile-callargs-warn form)) + (when (memq 'callargs byte-compile-warnings) + (if (memq fn '(custom-declare-group custom-declare-variable custom-declare-face)) + (byte-compile-nogroup-warn form)) + (byte-compile-callargs-warn form)) (byte-compile-normal-call form)) (if (memq 'cl-functions byte-compile-warnings) (byte-compile-cl-warn form))))
--- a/lisp/emacs-lisp/copyright.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/emacs-lisp/copyright.el Mon May 16 15:49:27 2005 +0000 @@ -189,6 +189,8 @@ last) (set-marker e (1+ (match-end 2))) (goto-char s) + ;; Back up one character so that our search can match the first year. + (backward-char 1) (while (and (< (point) (marker-position e)) (re-search-forward "\\([^0-9]\\)\\([0-9]+\\)[^0-9]" (marker-position e) t)) @@ -204,8 +206,12 @@ (setq last p))) (when last (goto-char last) - (let ((fill-prefix " ")) - (fill-region s last)) + ;; Don't mess up whitespace after the years. + (skip-chars-backward " \t") + (save-restriction + (narrow-to-region (point-min) (point)) + (let ((fill-prefix " ")) + (fill-region s last))) ) (set-marker e nil) (copyright-update nil t))
--- a/lisp/emacs-lisp/derived.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/emacs-lisp/derived.el Mon May 16 15:49:27 2005 +0000 @@ -158,7 +158,9 @@ been generated automatically, with a reference to the keymap. The new mode runs the hook constructed by the function -`derived-mode-hook-name'." +`derived-mode-hook-name'. + +See Info node `(elisp)Derived Modes' for more details." (declare (debug (&define name symbolp sexp [&optional stringp] [&rest keywordp sexp] def-body)))
--- a/lisp/emacs-lisp/easymenu.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/emacs-lisp/easymenu.el Mon May 16 15:49:27 2005 +0000 @@ -65,7 +65,7 @@ :visible INCLUDE INCLUDE is an expression; this menu is only visible if this -expression has a non-nil value. `:include' is an alias for `:visible'. +expression has a non-nil value. `:included' is an alias for `:visible'. :active ENABLE @@ -110,10 +110,10 @@ ENABLE is an expression; the item is enabled for selection whenever this expression's value is non-nil. - :included INCLUDE + :visible INCLUDE INCLUDE is an expression; this item is only visible if this -expression has a non-nil value. +expression has a non-nil value. `:included' is an alias for `:visible'. :suffix FORM
--- a/lisp/emacs-lisp/eldoc.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/emacs-lisp/eldoc.el Mon May 16 15:49:27 2005 +0000 @@ -229,6 +229,7 @@ (not (eq (selected-window) (minibuffer-window))))) +;;;###autoload (defvar eldoc-documentation-function nil "If non-nil, function to call to return doc string. The function of no args should return a one-line string for displaying
--- a/lisp/emacs-lisp/lisp-mode.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/emacs-lisp/lisp-mode.el Mon May 16 15:49:27 2005 +0000 @@ -192,6 +192,9 @@ ;; Look within the line for a ; following an even number of backslashes ;; after either a non-backslash or the line beginning. (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *") + (make-local-variable 'font-lock-comment-start-skip) + ;; Font lock mode uses this only when it KNOWS a comment is starting. + (setq font-lock-comment-start-skip ";+ *") (make-local-variable 'comment-add) (setq comment-add 1) ;default to `;;' in comment-region (make-local-variable 'comment-column)
--- a/lisp/eshell/esh-mode.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/eshell/esh-mode.el Mon May 16 15:49:27 2005 +0000 @@ -517,7 +517,8 @@ (let ((inhibit-read-only t) (no-default (eobp)) (find-tag-default-function 'ignore)) - (setq tagname (car (find-tag-interactive "Find tag: "))) + (with-no-warnings + (setq tagname (car (find-tag-interactive "Find tag: ")))) (find-tag tagname next-p regexp-p))) (defun eshell-move-argument (limit func property arg)
--- a/lisp/faces.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/faces.el Mon May 16 15:49:27 2005 +0000 @@ -1257,17 +1257,32 @@ (insert "Face: " (symbol-name f)) (if (not (facep f)) (insert " undefined face.\n") - (let ((customize-label "customize this face")) + (let ((customize-label "customize this face") + file-name) (princ (concat " (" customize-label ")\n")) (insert "Documentation: " (or (face-documentation f) "Not documented as a face.") - "\n\n") + "\n") (with-current-buffer standard-output (save-excursion (re-search-backward (concat "\\(" customize-label "\\)") nil t) (help-xref-button 1 'help-customize-face f))) + ;; The next 4 sexps are copied from describe-function-1 + ;; and simplified. + (setq file-name (symbol-file f 'defface)) + (when file-name + (princ "Defined in `") + (princ file-name) + (princ "'") + ;; Make a hyperlink to the library. + (save-excursion + (re-search-backward "`\\([^`']+\\)'" nil t) + (help-xref-button 1 'help-face-def f file-name)) + (princ ".") + (terpri) + (terpri)) (dolist (a attrs) (let ((attr (face-attribute f (car a) frame))) (insert (make-string (- max-width (length (cdr a))) ?\ ) @@ -2078,7 +2093,7 @@ (t :inverse-video t)) "Basic face for highlighting trailing whitespace." :version "21.1" - :group 'font-lock ; like `show-trailing-whitespace' + :group 'whitespace ; like `show-trailing-whitespace' :group 'basic-faces) (defface escape-glyph '((((background dark)) :foreground "cyan")
--- a/lisp/files.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/files.el Mon May 16 15:49:27 2005 +0000 @@ -541,7 +541,7 @@ the value of `default-directory'." (unless dir (setq dir default-directory)) - (read-file-name prompt dir (or default-dirname + (read-file-name prompt dir (or default-dirname (if initial (expand-file-name initial dir) dir)) mustmatch initial @@ -1944,7 +1944,7 @@ "Alist mapping interpreter names to major modes. This is used for files whose first lines match `auto-mode-interpreter-regexp'. Each element looks like (INTERPRETER . MODE). -The car of each element is compared with +The car of each element, a regular expression, is compared with the name of the interpreter specified in the first line. If it matches, mode MODE is selected. @@ -1961,13 +1961,12 @@ (defvar auto-mode-interpreter-regexp "#![ \t]?\\([^ \t\n]*\ /bin/env[ \t]\\)?\\([^ \t\n]+\\)" - "Regular expression matching interpreters, for file mode determination. + "Regexp matching interpreters, for file mode determination. This regular expression is matched against the first line of a file -to determine the file's mode in `set-auto-mode' when Emacs can't deduce -a mode from the file's name. If it matches, the file is assumed to -be interpreted by the interpreter matched by the second group of the -regular expression. The mode is then determined as the mode associated -with that interpreter in `interpreter-mode-alist'.") +to determine the file's mode in `set-auto-mode'. If it matches, the file +is assumed to be interpreted by the interpreter matched by the second group +of the regular expression. The mode is then determined as the mode +associated with that interpreter in `interpreter-mode-alist'.") (defvar magic-mode-alist `(;; The < comes before the groups (but the first) to reduce backtracking. @@ -2153,7 +2152,7 @@ (goto-char beg) end)))) -(defun hack-local-variables-confirm () +(defun hack-local-variables-confirm (string) (or (eq enable-local-variables t) (and enable-local-variables (save-window-excursion @@ -2170,8 +2169,10 @@ (save-excursion (beginning-of-line) (set-window-start (selected-window) (point))) - (y-or-n-p (format "Set local variables as specified in -*- line of %s? " - (file-name-nondirectory buffer-file-name))))))) + (y-or-n-p (format string + (if buffer-file-name + (file-name-nondirectory buffer-file-name) + (concat "buffer " (buffer-name))))))))) (defun hack-local-variables-prop-line (&optional mode-only) "Set local variables specified in the -*- line. @@ -2227,7 +2228,8 @@ (if mode-only mode-specified (if (and result (or mode-only - (hack-local-variables-confirm))) + (hack-local-variables-confirm + "Set local variables as specified in -*- line of %s? "))) (let ((enable-local-eval enable-local-eval)) (while result (hack-one-local-variable (car (car result)) (cdr (car result))) @@ -2257,7 +2259,8 @@ (when (let ((case-fold-search t)) (and (search-forward "Local Variables:" nil t) (or mode-only - (hack-local-variables-confirm)))) + (hack-local-variables-confirm + "Set local variables as specified at end of %s? ")))) (skip-chars-forward " \t") (let ((enable-local-eval enable-local-eval) ;; suffix is what comes after "local variables:" in its line. @@ -2478,7 +2481,8 @@ (hack-one-local-variable-eval-safep val)) ;; Permit eval if not root and user says ok. (and (not (zerop (user-uid))) - (hack-local-variables-confirm))) + (hack-local-variables-confirm + "Process `eval' or hook local variables in %s? "))) (if (eq var 'eval) (save-excursion (eval val)) (make-local-variable var)
--- a/lisp/font-lock.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/font-lock.el Mon May 16 15:49:27 2005 +0000 @@ -1311,12 +1311,19 @@ ;;; Syntactic fontification functions. +(defvar font-lock-comment-start-skip nil + "If non-nil, Font Lock mode uses this instead of `comment-start-skip'.") + +(defvar font-lock-comment-end-skip nil + "If non-nil, Font Lock mode uses this instead of `comment-end'.") + (defun font-lock-fontify-syntactically-region (start end &optional loudly ppss) "Put proper face on each string and comment between START and END. START should be at the beginning of a line." (let ((comment-end-regexp - (regexp-quote - (replace-regexp-in-string "^ *" "" comment-end))) + (or font-lock-comment-end-skip + (regexp-quote + (replace-regexp-in-string "^ *" "" comment-end)))) state face beg) (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name))) (goto-char start) @@ -1334,12 +1341,14 @@ 'syntax-table)) (when face (put-text-property beg (point) 'face face)) (when (and (eq face 'font-lock-comment-face) - comment-start-skip) + (or font-lock-comment-start-skip + comment-start-skip)) ;; Find the comment delimiters ;; and use font-lock-comment-delimiter-face for them. (save-excursion (goto-char beg) - (if (looking-at comment-start-skip) + (if (looking-at (or font-lock-comment-start-skip + comment-start-skip)) (put-text-property beg (match-end 0) 'face font-lock-comment-delimiter-face))) (if (looking-back comment-end-regexp (point-at-bol))
--- a/lisp/help-mode.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/help-mode.el Mon May 16 15:49:27 2005 +0000 @@ -169,6 +169,18 @@ (goto-char (cdr location)))) 'help-echo (purecopy"mouse-2, RET: find variable's definition")) +(define-button-type 'help-face-def + :supertype 'help-xref + 'help-function (lambda (fun file) + (require 'find-func) + ;; Don't use find-function-noselect because it follows + ;; aliases (which fails for built-in functions). + (let ((location + (find-function-search-for-symbol fun 'defface file))) + (pop-to-buffer (car location)) + (goto-char (cdr location)))) + 'help-echo (purecopy "mouse-2, RET: find face's definition")) + ;;;###autoload (defun help-mode ()
--- a/lisp/ibuf-ext.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/ibuf-ext.el Mon May 16 15:49:27 2005 +0000 @@ -1024,7 +1024,9 @@ (ibuffer-awhen (with-current-buffer buf (or buffer-file-name (and (boundp 'dired-directory) - dired-directory + (if (stringp dired-directory) + dired-directory + (car dired-directory)) (expand-file-name dired-directory)))) (string-match qualifier it)))
--- a/lisp/ibuffer.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/ibuffer.el Mon May 16 15:49:27 2005 +0000 @@ -1688,7 +1688,9 @@ (abbreviate-file-name (or buffer-file-name (and (boundp 'dired-directory) - dired-directory) + (if (stringp dired-directory) + dired-directory + (car dired-directory))) "")))) (define-ibuffer-column filename-and-process
--- a/lisp/ido.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/ido.el Mon May 16 15:49:27 2005 +0000 @@ -1392,10 +1392,15 @@ (define-key map [left] 'ido-prev-match) (define-key map "?" 'ido-completion-help) + ;; Magic commands. + (define-key map "\C-b" 'ido-magic-backward-char) + (define-key map "\C-f" 'ido-magic-forward-char) + (define-key map "\C-d" 'ido-magic-delete-char) + (when (memq ido-cur-item '(file dir)) - (define-key map "\C-b" (or ido-context-switch-command 'ido-enter-switch-buffer)) - (define-key map "\C-d" (or (and ido-context-switch-command 'ignore) 'ido-enter-dired)) - (define-key map "\C-f" 'ido-fallback-command) + (define-key map "\C-x\C-b" (or ido-context-switch-command 'ido-enter-switch-buffer)) + (define-key map "\C-x\C-f" 'ido-fallback-command) + (define-key map "\C-x\C-d" (or (and ido-context-switch-command 'ignore) 'ido-enter-dired)) (define-key map [down] 'ido-next-match-dir) (define-key map [up] 'ido-prev-match-dir) (define-key map [(meta up)] 'ido-prev-work-directory) @@ -1405,7 +1410,7 @@ (define-key map [(meta backspace)] 'ido-delete-backward-word-updir) (define-key map [(control backspace)] 'ido-up-directory) (define-key map "\C-l" 'ido-reread-directory) - (define-key map [(meta ?d)] 'ido-wide-find-dir) + (define-key map [(meta ?d)] 'ido-wide-find-dir-or-delete-dir) (define-key map [(meta ?b)] 'ido-push-dir) (define-key map [(meta ?f)] 'ido-wide-find-file-or-pop-dir) (define-key map [(meta ?k)] 'ido-forget-work-directory) @@ -1426,8 +1431,8 @@ ) (when (eq ido-cur-item 'buffer) - (define-key map "\C-f" (or ido-context-switch-command 'ido-enter-find-file)) - (define-key map "\C-b" 'ido-fallback-command) + (define-key map "\C-x\C-f" (or ido-context-switch-command 'ido-enter-find-file)) + (define-key map "\C-x\C-b" 'ido-fallback-command) (define-key map "\C-k" 'ido-kill-buffer-at-head) ) @@ -2258,6 +2263,52 @@ ((not ido-use-merged-list) (ido-merge-work-directories)))) +;;; Magic C-f + +(defun ido-magic-forward-char () + "Move forward in user input or perform magic action. +If no user input is present, perform magic actions: +C-x C-f C-f fallback to non-ido find-file. +C-x C-d C-f fallback to non-ido brief dired. +C-x d C-f fallback to non-ido dired." + (interactive) + (cond + ((not (eobp)) + (forward-char 1)) + ((and (= (length ido-text) 0) + (memq ido-cur-item '(file dir))) + (ido-fallback-command)))) + +;;; Magic C-b + +(defun ido-magic-backward-char () + "Move backward in user input or perform magic action. +If no user input is present, perform magic actions: +C-x C-b C-b fallback to non-ido switch-to-buffer." + (interactive) + (cond + ((> (length ido-text) 0) + (if (> (point) (minibuffer-prompt-end)) + (forward-char -1))) + ((eq ido-cur-item 'buffer) + (ido-fallback-command)))) + +;;; Magic C-d + +(defun ido-magic-delete-char () + "Delete following char in user input or perform magic action. +If at end of user input, perform magic actions: +C-x C-f ... C-d enter dired on current directory." + (interactive) + (cond + ((not (eobp)) + (delete-char 1)) + (ido-context-switch-command + nil) + ((memq ido-cur-item '(file dir)) + (ido-enter-dired)))) + + ;;; TOGGLE FUNCTIONS (defun ido-toggle-case () @@ -2505,6 +2556,14 @@ (setq ido-rotate-temp t) (exit-minibuffer))) +(defun ido-wide-find-dir-or-delete-dir (&optional dir) + "Prompt for DIR to search for using find, starting from current directory. +If input stack is non-empty, delete current directory component." + (interactive) + (if ido-input-stack + (ido-delete-backward-word-updir 1) + (ido-wide-find-dir))) + (defun ido-push-dir () "Move to previous directory in file name, push current input on stack." (interactive) @@ -4077,6 +4136,7 @@ ;;; Helper functions for other programs (put 'dired-do-rename 'ido 'ignore) +(put 'ibuffer-find-file 'ido 'find-file) ;;;###autoload (defun ido-read-buffer (prompt &optional default require-match) @@ -4111,7 +4171,8 @@ (not (memq this-command ido-read-file-name-non-ido)) (or (null predicate) (eq predicate 'file-exists-p))) (let* (ido-saved-vc-hb - (ido-context-switch-command 'ignore) + (ido-context-switch-command + (if (eq (get this-command 'ido) 'find-file) nil 'ignore)) (vc-handled-backends (and (boundp 'vc-handled-backends) vc-handled-backends)) (ido-current-directory (ido-expand-directory dir)) (ido-directory-nonreadable (not (file-readable-p ido-current-directory))) @@ -4126,6 +4187,8 @@ (cond ((eq ido-exit 'fallback) (setq filename 'fallback)) + ((eq ido-exit 'dired) + (setq filename ido-current-directory)) (filename (setq filename (concat ido-current-directory filename))))))
--- a/lisp/international/latexenc.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/international/latexenc.el Mon May 16 15:49:27 2005 +0000 @@ -173,6 +173,7 @@ 'undecided)))) 'undecided)) + (provide 'latexenc) ;; arch-tag: f971bc3e-1fec-4609-8f2f-73dd41ab22e1
--- a/lisp/international/ogonek.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/international/ogonek.el Mon May 16 15:49:27 2005 +0000 @@ -166,7 +166,7 @@ (set-buffer (get-buffer-create " *ogonek-jak*")) (insert ogonek-informacja) (switch-to-buffer " *ogonek-jak*") - (beginning-of-buffer)) + (goto-char (point-min))) ;; ------ A Little Info in English -------- @@ -264,7 +264,7 @@ (set-buffer (get-buffer-create " *ogonek-how*")) (insert ogonek-information) (switch-to-buffer " *ogonek-how*") - (beginning-of-buffer)) + (goto-char (point-min))) ;; ---- Variables keeping the suggested answers to dialogue questions ----- (defvar ogonek-encoding-choices
--- a/lisp/language/china-util.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/china-util.el Mon May 16 15:49:27 2005 +0000 @@ -1,8 +1,10 @@ ;;; china-util.el --- utilities for Chinese -*- coding: iso-2022-7bit -*- -;; Copyright (C) 1995, 2003 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. -;; Copyright (C) 1995, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001, 2003 +;; Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 2003 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: mule, multilingual, Chinese
--- a/lisp/language/chinese.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/chinese.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,9 @@ ;;; chinese.el --- support for Chinese -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 2001, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 1998 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Chinese
--- a/lisp/language/cyril-util.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/cyril-util.el Mon May 16 15:49:27 2005 +0000 @@ -1,6 +1,6 @@ ;;; cyril-util.el --- utilities for Cyrillic scripts -;; Copyright (C) 1997, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 2001, 2002 Free Software Foundation, Inc. ;; Keywords: mule, multilingual, Cyrillic
--- a/lisp/language/cyrillic.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/cyrillic.el Mon May 16 15:49:27 2005 +0000 @@ -1,8 +1,9 @@ ;;; cyrillic.el --- support for Cyrillic -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. -;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Author: Kenichi Handa <handa@etl.go.jp> ;; Keywords: multilingual, Cyrillic, i18n
--- a/lisp/language/devan-util.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/devan-util.el Mon May 16 15:49:27 2005 +0000 @@ -1,6 +1,10 @@ ;;; devan-util.el --- Support for composing Devanagari characters -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 2001, 2002, 2003 +;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 1999, 2000 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> ;; Keywords: multilingual, Devanagari
--- a/lisp/language/devanagari.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/devanagari.el Mon May 16 15:49:27 2005 +0000 @@ -1,6 +1,6 @@ ;;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*- -;; Copyright (C) 1996, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc. ;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> ;; Keywords: multilingual, Indian, Devanagari
--- a/lisp/language/english.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/english.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,9 @@ ;;; english.el --- support for English -*- no-byte-compile: t -*- -;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1997 Free Software Foundation, Inc. +;; Copyright (C) 1997 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multibyte character, character set, syntax, category
--- a/lisp/language/ethio-util.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/ethio-util.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,10 @@ ;;; ethio-util.el --- utilities for Ethiopic -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1997, 2001 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1997, 1998, 2002 +;; Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 1999, 2001, 2004, 2005 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: mule, multilingual, Ethiopic
--- a/lisp/language/ethiopic.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/ethiopic.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,9 @@ ;;; ethiopic.el --- support for Ethiopic -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1995, 2001 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1997 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2001 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Ethiopic
--- a/lisp/language/european.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/european.el Mon May 16 15:49:27 2005 +0000 @@ -1,8 +1,10 @@ ;;; european.el --- support for European languages -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. -;; Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004 +;; Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, European
--- a/lisp/language/greek.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/greek.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,8 @@ ;;; greek.el --- support for Greek -*- no-byte-compile: t -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1995 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Greek
--- a/lisp/language/hebrew.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/hebrew.el Mon May 16 15:49:27 2005 +0000 @@ -1,8 +1,9 @@ ;;; hebrew.el --- support for Hebrew -*- coding: iso-2022-7bit; no-byte-compile: t -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 1995 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Hebrew
--- a/lisp/language/indian.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/indian.el Mon May 16 15:49:27 2005 +0000 @@ -1,6 +1,9 @@ ;;; indian.el --- Indian languages support -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1999, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org> ;; Keywords: multilingual, i18n, Indian
--- a/lisp/language/japan-util.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/japan-util.el Mon May 16 15:49:27 2005 +0000 @@ -1,8 +1,9 @@ ;;; japan-util.el --- utilities for Japanese -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. -;; Copyright (C) 2001 Free SOftware Foundation, Inc. +;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1998, 2000, 2003 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: mule, multilingual, Japanese
--- a/lisp/language/japanese.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/japanese.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,9 @@ ;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1997 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 1998 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Japanese
--- a/lisp/language/korea-util.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/korea-util.el Mon May 16 15:49:27 2005 +0000 @@ -1,6 +1,9 @@ ;;; korea-util.el --- utilities for Korean -;; Copyright (C) 1997 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 1999 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: mule, multilingual, Korean
--- a/lisp/language/korean.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/korean.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,9 @@ ;;; korean.el --- support for Korean -*- coding: iso-2022-7bit; no-byte-compile: t -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1998 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1998 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Korean
--- a/lisp/language/lao-util.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/lao-util.el Mon May 16 15:49:27 2005 +0000 @@ -1,8 +1,9 @@ ;;; lao-util.el --- utilities for Lao -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 1999, 2000 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Lao
--- a/lisp/language/lao.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/lao.el Mon May 16 15:49:27 2005 +0000 @@ -1,8 +1,9 @@ ;;; lao.el --- support for Lao -*- coding: iso-2022-7bit; no-byte-compile: t -*- -;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. -;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 2001 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 1999, 2002 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Lao
--- a/lisp/language/misc-lang.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/misc-lang.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,8 @@ ;;; misc-lang.el --- support for miscellaneous languages (characters) -*- no-byte-compile: t -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1995, 1997 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, character set, coding system
--- a/lisp/language/tibet-util.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/tibet-util.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,9 @@ ;;; tibet-util.el --- utilities for Tibetan -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1997, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 1998, 2000 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Tibetan
--- a/lisp/language/tibetan.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/tibetan.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,9 @@ ;;; tibetan.el --- support for Tibetan language -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1997, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1999, 2000 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Tibetan
--- a/lisp/language/viet-util.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/viet-util.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,9 @@ ;;; viet-util.el --- utilities for Vietnamese -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1998 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: mule, multilingual, Vietnamese
--- a/lisp/language/vietnamese.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/language/vietnamese.el Mon May 16 15:49:27 2005 +0000 @@ -1,7 +1,9 @@ ;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*- -;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. -;; Licensed to the Free Software Foundation. +;; Copyright (C) 1998, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1997, 1998, 2000 +;; National Institute of Advanced Industrial Science and Technology (AIST) +;; Registration Number H14PRO021 ;; Keywords: multilingual, Vietnamese
--- a/lisp/mail/supercite.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/mail/supercite.el Mon May 16 15:49:27 2005 +0000 @@ -153,6 +153,7 @@ (choice (repeat (repeat sexp)) symbol))))) :group 'supercite-frames) +(put 'sc-cite-frame-alist 'risky-local-variable t) (defcustom sc-uncite-frame-alist '() "*Alist for frame selection during unciting. @@ -161,6 +162,7 @@ (choice (repeat (repeat sexp)) symbol))))) :group 'supercite-frames) +(put 'sc-uncite-frame-alist 'risky-local-variable t) (defcustom sc-recite-frame-alist '() "*Alist for frame selection during reciting. @@ -169,6 +171,7 @@ (choice (repeat (repeat sexp)) symbol))))) :group 'supercite-frames) +(put 'sc-recite-frame-alist 'risky-local-variable t) (defcustom sc-default-cite-frame '(;; initialize fill state and temporary variables when entering @@ -214,6 +217,7 @@ "*Default REGI frame for citing a region." :type '(repeat (repeat sexp)) :group 'supercite-frames) +(put 'sc-default-cite-frame 'risky-local-variable t) (defcustom sc-default-uncite-frame '(;; do nothing on a blank line @@ -224,6 +228,7 @@ "*Default REGI frame for unciting a region." :type '(repeat (repeat sexp)) :group 'supercite-frames) +(put 'sc-default-uncite-frame 'risky-local-variable t) (defcustom sc-default-recite-frame '(;; initialize fill state when entering frame @@ -240,6 +245,7 @@ "*Default REGI frame for reciting a region." :type '(repeat (repeat sexp)) :group 'supercite-frames) +(put 'sc-default-recite-frame 'risky-local-variable t) (defcustom sc-cite-region-limit t "*This variable controls automatic citation of yanked text. @@ -427,6 +433,7 @@ (choice (sexp :tag "List to eval") string))))) :group 'supercite-attr) +(put 'sc-attrib-selection-list 'risky-local-variable t) (defcustom sc-attribs-preselect-hook nil "*Hook to run before selecting an attribution." @@ -482,6 +489,7 @@ Electric reference mode will cycle through this list of functions." :type '(repeat sexp) :group 'supercite) +(put 'sc-rewrite-header-list 'risky-local-variable t) (defcustom sc-titlecue-regexp "\\s +-+\\s +" "*Regular expression describing the separator between names and titles.
--- a/lisp/net/net-utils.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/net/net-utils.el Mon May 16 15:49:27 2005 +0000 @@ -468,7 +468,8 @@ (require 'ffap) (read-from-minibuffer "Lookup host: " - (or (ffap-string-at-point 'machine) ""))))) + (with-no-warnings + (or (ffap-string-at-point 'machine) "")))))) (net-utils-run-program "Dig" (concat "** "
--- a/lisp/net/tramp.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/net/tramp.el Mon May 16 15:49:27 2005 +0000 @@ -1352,7 +1352,9 @@ ;; Chunked sending kluge. We set this to 500 for black-listed constellations ;; known to have a bug in `process-send-string'; some ssh connections appear -;; to drop bytes when data is sent too quickly. +;; to drop bytes when data is sent too quickly. There is also a connection +;; buffer local variable, which is computed depending on remote host properties +;; when `tramp-chunksize' is zero or nil. (defcustom tramp-chunksize (when (and (not (featurep 'xemacs)) (memq system-type '(hpux))) @@ -3231,7 +3233,13 @@ (mapconcat #'tramp-shell-quote-argument (cons program arguments) " ")) (tramp-wait-for-output)) (unless discard - (insert-buffer (tramp-get-buffer multi-method method user host))) + ;; We cannot use `insert-buffer' because the tramp buffer + ;; changes its contents before insertion due to calling + ;; `expand-file' and alike. + (insert + (with-current-buffer + (tramp-get-buffer multi-method method user host) + (buffer-string)))) (save-excursion (prog1 (tramp-send-command-and-check multi-method method user host nil) @@ -3360,8 +3368,10 @@ switches (if wildcard localname - (tramp-shell-quote-argument - (file-name-nondirectory localname)))))) + (if (zerop (length (file-name-nondirectory localname))) + "" + (tramp-shell-quote-argument + (file-name-nondirectory localname))))))) (sit-for 1) ;needed for rsh but not ssh? (tramp-wait-for-output)) ;; The following let-binding is used by code that's commented @@ -3369,8 +3379,13 @@ ;; that the commented-out code is really not needed. Commenting-out ;; happened on 2003-03-13. (let ((old-pos (point))) - (insert-buffer-substring - (tramp-get-buffer multi-method method user host)) + ;; We cannot use `insert-buffer' because the tramp buffer + ;; changes its contents before insertion due to calling + ;; `expand-file' and alike. + (insert + (with-current-buffer + (tramp-get-buffer multi-method method user host) + (buffer-string))) ;; On XEmacs, we want to call (exchange-point-and-mark t), but ;; that doesn't exist on Emacs, so we use this workaround instead. ;; Since zmacs-region-stays doesn't exist in Emacs, this ought to @@ -3561,7 +3576,13 @@ (unless asynchronous (tramp-wait-for-output))) (unless asynchronous - (insert-buffer (tramp-get-buffer multi-method method user host))) + ;; We cannot use `insert-buffer' because the tramp buffer + ;; changes its contents before insertion due to calling + ;; `expand-file' and alike. + (insert + (with-current-buffer + (tramp-get-buffer multi-method method user host) + (buffer-string)))) (when error-buffer (save-excursion (unless (bufferp error-buffer) @@ -3571,7 +3592,11 @@ "cat /tmp/tramp.$$.err") (tramp-wait-for-output) (set-buffer error-buffer) - (insert-buffer (tramp-get-buffer multi-method method user host)) + ;; Same comment as above + (insert + (with-current-buffer + (tramp-get-buffer multi-method method user host) + (buffer-string))) (tramp-send-command-and-check multi-method method user host "rm -f /tmp/tramp.$$.err"))) (save-excursion @@ -4834,6 +4859,9 @@ (defun tramp-set-auto-save () (when (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)) + ;; ange-ftp has its own auto-save mechanism + (eq (tramp-find-foreign-file-name-handler (buffer-file-name)) + 'tramp-sh-file-name-handler) auto-save-default) (auto-save-mode 1))) (add-hook 'find-file-hooks 'tramp-set-auto-save t) @@ -5417,7 +5445,7 @@ method)) (when multi-method (error "Cannot multi-connect using telnet connection method")) - (tramp-pre-connection multi-method method user host) + (tramp-pre-connection multi-method method user host tramp-chunksize) (tramp-message 7 "Opening connection for %s@%s using %s..." (or user (user-login-name)) host method) (let ((process-environment (copy-sequence process-environment))) @@ -5475,7 +5503,7 @@ (save-match-data (when multi-method (error "Cannot multi-connect using rsh connection method")) - (tramp-pre-connection multi-method method user host) + (tramp-pre-connection multi-method method user host tramp-chunksize) (if (and user (not (string= user ""))) (tramp-message 7 "Opening connection for %s@%s using %s..." user host method) @@ -5544,7 +5572,7 @@ (error "Cannot connect to different host `%s' with `su' connection method" host)) - (tramp-pre-connection multi-method method user host) + (tramp-pre-connection multi-method method user host tramp-chunksize) (tramp-message 7 "Opening connection for `%s' using `%s'..." (or user "<root>") method) (let ((process-environment (copy-sequence process-environment))) @@ -5609,7 +5637,7 @@ (unless (and (= (length method) (length user)) (= (length method) (length host))) (error "Arrays METHOD, USER, HOST must have equal length")) - (tramp-pre-connection multi-method method user host) + (tramp-pre-connection multi-method method user host tramp-chunksize) (tramp-message 7 "Opening `%s' connection..." multi-method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) @@ -5810,7 +5838,7 @@ ;; HHH: Not Changed. This might handle the case where USER is not ;; given in the "File name" very poorly. Then, the local ;; variable tramp-current-user will be set to nil. -(defun tramp-pre-connection (multi-method method user host) +(defun tramp-pre-connection (multi-method method user host chunksize) "Do some setup before actually logging in. METHOD, USER and HOST specify the connection." (set-buffer (tramp-get-buffer multi-method method user host)) @@ -5818,6 +5846,7 @@ (set (make-local-variable 'tramp-current-method) method) (set (make-local-variable 'tramp-current-user) user) (set (make-local-variable 'tramp-current-host) host) + (set (make-local-variable 'tramp-chunksize) chunksize) (set (make-local-variable 'inhibit-eol-conversion) nil) (erase-buffer)) @@ -5869,6 +5898,20 @@ (erase-buffer) (tramp-send-command-internal multi-method method user host "TERM=dumb; export TERM") + (erase-buffer) + ;; Check whether the remote host suffers from buggy `send-process-string'. + ;; This is known for FreeBSD (see comment in `send_process', file process.c). + ;; I've tested sending 624 bytes successfully, sending 625 bytes failed. + ;; Emacs makes a hack when this host type is detected locally. It cannot + ;; handle remote hosts, though. + (when (or (not tramp-chunksize) (zerop tramp-chunksize)) + (tramp-message 9 "Checking remote host type for `send-process-string' bug") + (tramp-send-command-internal multi-method method user host + "(uname -sr) 2>/dev/null") + (goto-char (point-min)) + (when (looking-at "FreeBSD") + (setq tramp-chunksize 500))) + ;; Try to set up the coding system correctly. ;; CCC this can't be the right way to do it. Hm. (save-excursion @@ -6948,7 +6991,8 @@ ;; Permissions should be set always, because there might be an old ;; auto-saved file belonging to another original file. This could ;; be a security threat. - (set-file-modes buffer-auto-save-file-name (file-modes bfn))))) + (set-file-modes buffer-auto-save-file-name + (or (file-modes bfn) ?\600))))) (unless (or (> emacs-major-version 21) (and (featurep 'xemacs) @@ -7226,7 +7270,6 @@ tramp-yesno-prompt-regexp tramp-yn-prompt-regexp tramp-terminal-prompt-regexp - tramp-out-of-band-prompt-regexp tramp-temp-name-prefix tramp-file-name-structure tramp-file-name-regexp @@ -7286,31 +7329,44 @@ (defun tramp-append-tramp-buffers () "Append Tramp buffers into the bug report." - ;; We load mml.el from Gnus. + ;; We load message.el and mml.el from Gnus. (if (featurep 'xemacs) - (load "mml" 'noerror) + (progn + (load "message" 'noerror) + (load "mml" 'noerror)) + (require 'message nil 'noerror) (require 'mml nil 'noerror)) + (when (functionp 'message-mode) + (funcall 'message-mode)) + (when (functionp 'mml-mode) + (funcall 'mml-mode t)) (when (and - ;; We don't want to add another dependency. - (functionp 'mml-insert-empty-tag) - ;; 2nd parameter since Emacs 22. - (condition-case nil - (list-buffers-noselect nil nil) - (t nil))) - (let ((buffer-list - (delq nil - (mapcar '(lambda (b) - (when (string-match "^\\*\\(debug \\)?tramp/" (buffer-name b)) b)) - (buffer-list)))) - (curbuf (current-buffer))) + (eq major-mode 'message-mode) + (boundp 'mml-mode) + (symbol-value 'mml-mode)) + + (let* ((tramp-buf-regexp "\\*\\(debug \\)?tramp/") + (buffer-list + (delq nil + (mapcar '(lambda (b) + (when (string-match tramp-buf-regexp (buffer-name b)) b)) + (buffer-list)))) + (curbuf (current-buffer))) ;; There is at least one Tramp buffer. (when buffer-list - (switch-to-buffer (list-buffers-noselect nil buffer-list)) + (switch-to-buffer (list-buffers-noselect nil)) (delete-other-windows) (setq buffer-read-only nil) - (goto-char (point-max)) + (goto-char (point-min)) + (while (not (eobp)) + (if (re-search-forward tramp-buf-regexp (tramp-point-at-eol) t) + (forward-line 1) + (forward-line 0) + (let ((start (point))) + (forward-line 1) + (kill-region start (point))))) (insert " The buffer(s) above will be appended to this message. If you don't want to append a buffer because it contains sensible data, or because the buffer
--- a/lisp/net/trampver.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/net/trampver.el Mon May 16 15:49:27 2005 +0000 @@ -30,7 +30,7 @@ ;; are auto-frobbed from configure.ac, so you should edit that file and run ;; "autoconf && ./configure" to change them. -(defconst tramp-version "2.0.48" +(defconst tramp-version "2.0.49" "This version of Tramp.") (defconst tramp-bug-report-address "tramp-devel@gnu.org"
--- a/lisp/progmodes/cc-engine.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/progmodes/cc-engine.el Mon May 16 15:49:27 2005 +0000 @@ -335,7 +335,8 @@ ;; locking is in use. This variable is extended with the face in ;; `c-doc-face-name' when fontification is activated in cc-fonts.el. (defvar c-literal-faces - '(font-lock-comment-face font-lock-string-face)) + '(font-lock-comment-face font-lock-string-face + font-lock-comment-delimiter-face)) (defun c-shift-line-indentation (shift-amt) ;; This function does not do any hidden buffer changes.
--- a/lisp/progmodes/compile.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/progmodes/compile.el Mon May 16 15:49:27 2005 +0000 @@ -1247,8 +1247,7 @@ (make-local-variable 'compilation-messages-start) (make-local-variable 'compilation-error-screen-columns) (make-local-variable 'overlay-arrow-position) - (set (make-local-variable 'overlay-arrow-string) - (if (display-graphic-p) "=>" "")) + (set (make-local-variable 'overlay-arrow-string) "") (setq next-error-overlay-arrow-position nil) (add-hook 'kill-buffer-hook (lambda () (setq next-error-overlay-arrow-position nil)) nil t) @@ -1575,9 +1574,12 @@ (setcdr loc (list line file marker))) loc)) -(defcustom compilation-context-lines 0 - "*Display this many lines of leading context before message. -If nil, don't scroll the compilation output window." +(defcustom compilation-context-lines nil + "Display this many lines of leading context before the current message. +If nil and the left fringe is displayed, don't scroll the +compilation output window; an arrow in the left fringe points to +the current message. If nil and there is no left fringe, the message +displays at the top of the window; there is no arrow." :type '(choice integer (const :tag "No window scrolling" nil)) :group 'compilation :version "22.1") @@ -1586,10 +1588,16 @@ "Align the compilation output window W with marker MK near top." (if (integerp compilation-context-lines) (set-window-start w (save-excursion - (goto-char mk) - (beginning-of-line (- 1 compilation-context-lines)) - (point)))) - (set-window-point w mk)) + (goto-char mk) + (beginning-of-line + (- 1 compilation-context-lines)) + (point))) + (if (left-fringe-p) + (set-window-start w (save-excursion + (goto-char mk) + (beginning-of-line 1) + (point))))) + (set-window-point w mk)) (defvar next-error-highlight-timer)
--- a/lisp/progmodes/gud.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/progmodes/gud.el Mon May 16 15:49:27 2005 +0000 @@ -3215,7 +3215,7 @@ (add-hook 'tooltip-hook 'gud-tooltip-tips) (define-key global-map [mouse-movement] 'gud-tooltip-mouse-motion)) (unless tooltip-mode (remove-hook 'pre-command-hook 'tooltip-hide) - (remove-hook 'change-major-mode-hook 'tooltip-change-major-mode) + (remove-hook 'change-major-mode-hook 'gud-tooltip-change-major-mode) (remove-hook 'tooltip-hook 'gud-tooltip-tips) (define-key global-map [mouse-movement] 'ignore))) (gud-tooltip-activate-mouse-motions-if-enabled) @@ -3253,7 +3253,7 @@ (when gud-tooltip-dereference (setq expr (concat "*" expr))) (case gud-minor-mode - ((gdb gdba) (concat "server print " expr)) + (gdba (concat "server print " expr)) ((dbx gdbmi) (concat "print " expr)) (xdb (concat "p " expr)) (sdb (concat expr "/")) @@ -3293,6 +3293,10 @@ (tooltip-show (cdr define-elt)) expr)))) (let ((cmd (gud-tooltip-print-command expr))) + (when (and gud-tooltip-mode (eq gud-minor-mode 'gdb)) + (gud-tooltip-mode -1) + (message-box "Using GUD tooltips in this mode is unsafe\n\ +so they have been disabled.")) (unless (null cmd) ; CMD can be nil if unknown debugger (if (memq gud-minor-mode '(gdba gdbmi)) (if gdb-macro-info
--- a/lisp/progmodes/sh-script.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/progmodes/sh-script.el Mon May 16 15:49:27 2005 +0000 @@ -1015,7 +1015,7 @@ :group 'sh-indentation) (defcustom sh-popup-occur-buffer nil - "*Controls when `sh-learn-buffer-indent' pops the *indent* buffer. + "*Controls when `sh-learn-buffer-indent' pops the `*indent*' buffer. If t it is always shown. If nil, it is shown only when there are conflicts." :type '(choice @@ -1044,7 +1044,7 @@ (defcustom sh-basic-offset 4 "*The default indentation increment. -This value is used for the + and - symbols in an indentation variable." +This value is used for the `+' and `-' symbols in an indentation variable." :type 'integer :group 'sh-indentation) @@ -1088,7 +1088,7 @@ :menu-tag "/ Indent left half sh-basic-offset"))) (defcustom sh-indent-for-else 0 - "*How much to indent an else relative to an if. Usually 0." + "*How much to indent an `else' relative to its `if'. Usually 0." :type `(choice (integer :menu-tag "A number (positive=>indent right)" :tag "A number") @@ -1104,75 +1104,75 @@ sh-symbol-list)) (defcustom sh-indent-for-fi 0 - "*How much to indent a fi relative to an if. Usually 0." + "*How much to indent a `fi' relative to its `if'. Usually 0." :type `(choice ,@ sh-number-or-symbol-list ) :group 'sh-indentation) -(defcustom sh-indent-for-done '0 - "*How much to indent a done relative to its matching stmt. Usually 0." +(defcustom sh-indent-for-done 0 + "*How much to indent a `done' relative to its matching stmt. Usually 0." :type `(choice ,@ sh-number-or-symbol-list ) :group 'sh-indentation) (defcustom sh-indent-after-else '+ - "*How much to indent a statement after an else statement." + "*How much to indent a statement after an `else' statement." :type `(choice ,@ sh-number-or-symbol-list ) :group 'sh-indentation) (defcustom sh-indent-after-if '+ - "*How much to indent a statement after an if statement. -This includes lines after else and elif statements, too, but -does not affect then else elif or fi statements themselves." + "*How much to indent a statement after an `if' statement. +This includes lines after `else' and `elif' statements, too, but +does not affect the `else', `elif' or `fi' statements themselves." :type `(choice ,@ sh-number-or-symbol-list ) :group 'sh-indentation) (defcustom sh-indent-for-then 0 - "*How much to indent a then relative to an if." + "*How much to indent a `then' relative to its `if'." :type `(choice ,@ sh-number-or-symbol-list ) :group 'sh-indentation) (defcustom sh-indent-for-do 0 - "*How much to indent a do statement. -This is relative to the statement before the do, i.e. the -while until or for statement." + "*How much to indent a `do' statement. +This is relative to the statement before the `do', typically a +`while', `until', `for', `repeat' or `select' statement." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation) -(defcustom sh-indent-after-do '* - "*How much to indent a line after a do statement. -This is used when the do is the first word of the line. -This is relative to the statement before the do, e.g. a -while for repeat or select statement." +(defcustom sh-indent-after-do '+ + "*How much to indent a line after a `do' statement. +This is used when the `do' is the first word of the line. +This is relative to the statement before the `do', typically a +`while', `until', `for', `repeat' or `select' statement." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation) (defcustom sh-indent-after-loop-construct '+ "*How much to indent a statement after a loop construct. -This variable is used when the keyword \"do\" is on the same line as the -loop statement (e.g. \"until\", \"while\" or \"for\"). -If the do is on a line by itself, then `sh-indent-after-do' is used instead." +This variable is used when the keyword `do' is on the same line as the +loop statement (e.g., `until', `while' or `for'). +If the `do' is on a line by itself, then `sh-indent-after-do' is used instead." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation) (defcustom sh-indent-after-done 0 - "*How much to indent a statement after a \"done\" keyword. -Normally this is 0, which aligns the \"done\" to the matching + "*How much to indent a statement after a `done' keyword. +Normally this is 0, which aligns the `done' to the matching looping construct line. -Setting it non-zero allows you to have the \"do\" statement on a line +Setting it non-zero allows you to have the `do' statement on a line by itself and align the done under to do." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation) (defcustom sh-indent-for-case-label '+ "*How much to indent a case label statement. -This is relative to the line containing the case statement." +This is relative to the line containing the `case' statement." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation) (defcustom sh-indent-for-case-alt '++ "*How much to indent statements after the case label. -This is relative to the line containing the case statement." +This is relative to the line containing the `case' statement." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation) @@ -1184,7 +1184,7 @@ (defcustom sh-indent-after-open '+ "*How much to indent after a line with an opening parenthesis or brace. -For an open paren after a function `sh-indent-after-function' is used." +For an open paren after a function, `sh-indent-after-function' is used." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation) @@ -1196,13 +1196,13 @@ ;; These 2 are for the rc shell: (defcustom sh-indent-after-switch '+ - "*How much to indent a case statement relative to the switch statement. + "*How much to indent a `case' statement relative to the `switch' statement. This is for the rc shell." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation) (defcustom sh-indent-after-case '+ - "*How much to indent a statement relative to the case statement. + "*How much to indent a statement relative to the `case' statement. This is for the rc shell." :type `(choice ,@ sh-number-or-symbol-list) :group 'sh-indentation)
--- a/lisp/subr.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/subr.el Mon May 16 15:49:27 2005 +0000 @@ -983,7 +983,8 @@ If TYPE is nil, then any kind of definition is acceptable. If TYPE is `defun' or `defvar', that specifies function -definition only or variable definition only." +definition only or variable definition only. +`defface' specifies a face definition only." (if (and (or (null type) (eq type 'defun)) (symbolp symbol) (fboundp symbol) (eq 'autoload (car-safe (symbol-function symbol)))) @@ -1040,12 +1041,10 @@ FILE should be the name of a library, with no directory name." (eval-after-load file (read))) -;;; make-network-process wrappers +;;; open-network-stream is a wrapper around make-network-process. -(if (featurep 'make-network-process) - (progn - -(defun open-network-stream (name buffer host service) +(when (featurep 'make-network-process) + (defun open-network-stream (name buffer host service) "Open a TCP connection for a service to a host. Returns a subprocess-object to represent the connection. Input and output work as for subprocesses; `delete-process' closes it. @@ -1061,56 +1060,7 @@ SERVICE is name of the service desired, or an integer specifying a port number to connect to." (make-network-process :name name :buffer buffer - :host host :service service)) - -(defun open-network-stream-nowait (name buffer host service &optional sentinel filter) - "Initiate connection to a TCP connection for a service to a host. -It returns nil if non-blocking connects are not supported; otherwise, -it returns a subprocess-object to represent the connection. - -This function is similar to `open-network-stream', except that it -returns before the connection is established. When the connection -is completed, the sentinel function will be called with second arg -matching `open' (if successful) or `failed' (on error). - -Args are NAME BUFFER HOST SERVICE SENTINEL FILTER. -NAME, BUFFER, HOST, and SERVICE are as for `open-network-stream'. -Optional args SENTINEL and FILTER specify the sentinel and filter -functions to be used for this network stream." - (if (featurep 'make-network-process '(:nowait t)) - (make-network-process :name name :buffer buffer :nowait t - :host host :service service - :filter filter :sentinel sentinel))) - -(defun open-network-stream-server (name buffer service &optional sentinel filter) - "Create a network server process for a TCP service. -It returns nil if server processes are not supported; otherwise, -it returns a subprocess-object to represent the server. - -When a client connects to the specified service, a new subprocess -is created to handle the new connection, and the sentinel function -is called for the new process. - -Args are NAME BUFFER SERVICE SENTINEL FILTER. -NAME is name for the server process. Client processes are named by - appending the ip-address and port number of the client to NAME. -BUFFER is the buffer (or buffer name) to associate with the server - process. Client processes will not get a buffer if a process filter - is specified or BUFFER is nil; otherwise, a new buffer is created for - the client process. The name is similar to the process name. -Third arg SERVICE is name of the service desired, or an integer - specifying a port number to connect to. It may also be t to select - an unused port number for the server. -Optional args SENTINEL and FILTER specify the sentinel and filter - functions to be used for the client processes; the server process - does not use these function." - (if (featurep 'make-network-process '(:server t)) - (make-network-process :name name :buffer buffer - :service service :server t :noquery t - :sentinel sentinel :filter filter))) - -)) ;; (featurep 'make-network-process) - + :host host :service service))) ;; compatibility @@ -2356,6 +2306,9 @@ (and (consp object) (eq (car object) 'frame-configuration))) +(defsubst left-fringe-p () + (equal (car (window-fringes)) 0)) + (defun functionp (object) "Non-nil if OBJECT is any kind of function or a special form. Also non-nil if OBJECT is a symbol and its function definition is @@ -2374,7 +2327,7 @@ "Delete from ALIST all elements whose car is `eq' to KEY. Return the modified alist. Elements of ALIST that are not conses are ignored." - (while (and (consp (car alist)) + (while (and (consp (car alist)) (eq (car (car alist)) key)) (setq alist (cdr alist))) (let ((tail alist) tail-cdr) @@ -2389,7 +2342,7 @@ "Delete from ALIST all elements whose cdr is `eq' to VALUE. Return the modified alist. Elements of ALIST that are not conses are ignored." - (while (and (consp (car alist)) + (while (and (consp (car alist)) (eq (cdr (car alist)) value)) (setq alist (cdr alist))) (let ((tail alist) tail-cdr)
--- a/lisp/tmm.el Sat May 14 01:56:59 2005 +0000 +++ b/lisp/tmm.el Mon May 16 15:49:27 2005 +0000 @@ -395,7 +395,7 @@ `x-popup-menu' argument (when IN-X-MENU is not-nil). This function adds the element only if it is not already present. It uses the free variable `tmm-table-undef' to keep undefined keys." - (let (km str cache plist filter visible (event (car elt))) + (let (km str cache plist filter visible enable (event (car elt))) (setq elt (cdr elt)) (if (eq elt 'undefined) (setq tmm-table-undef (cons (cons event nil) tmm-table-undef)) @@ -436,6 +436,9 @@ (setq visible (plist-get plist :visible)) (if visible (setq km (and (eval visible) km))) + (setq enable (plist-get plist :enable)) + (if enable + (setq km (and (eval enable) km))) (and str (consp (nth 3 elt)) (stringp (cdr (nth 3 elt))) ; keyseq cache
--- a/lispref/ChangeLog Sat May 14 01:56:59 2005 +0000 +++ b/lispref/ChangeLog Mon May 16 15:49:27 2005 +0000 @@ -1,3 +1,45 @@ +2005-05-15 Kim F. Storm <storm@cua.dk> + + * processes.texi (Network): Remove open-network-stream-nowait. + (Network Servers): Remove open-network-stream-server. + +2005-05-15 Luc Teirlinck <teirllm@auburn.edu> + + * elisp.texi (Top): Update detailed menu. + + * variables.texi: Reorder nodes. + (Variables): Update menu. + (File Local Variables): Do not refer to the `-*-' line as + a "local variables list". Add pxref. + +2005-05-14 Luc Teirlinck <teirllm@auburn.edu> + + * elisp.texi (Top): Update detailed menu for node changes. + + * modes.texi (Modes): Update Menu. + (Hooks): Move to beginning of chapter. + Most minor modes run mode hooks too. + `add-hook' can handle void hooks or hooks whose value is a single + function. + (Major Modes): Update Menu. + (Major Mode Basics): New node, split off from `Major Modes'. + (Major Mode Conventions): Correct xref. Explain how to handle + auto-mode-alist if the major mode command has an autoload cookie. + (Auto Major Mode): Major update. Add magic-mode-alist. + (Derived Modes): Major update. + (Mode Line Format): Update Menu. + (Mode Line Basics): New node, split off from `Mode Line Format'. + + * loading.texi (Autoload): Mention `autoload cookie' as synonym + for `magic autoload comment'. Add index entries and anchor. + +2005-05-14 Richard M. Stallman <rms@gnu.org> + + * tips.texi (Coding Conventions): Explain how important it is + that just loading certain files not change Emacs behavior. + + * modes.texi (Defining Minor Modes): Define define-global-minor-mode. + 2005-05-12 Lute Kamstra <lute@gnu.org> * modes.texi (Generic Modes): Update.
--- a/lispref/elisp.texi Sat May 14 01:56:59 2005 +0000 +++ b/lispref/elisp.texi Mon May 16 15:49:27 2005 +0000 @@ -383,8 +383,8 @@ * Buffer-Local Variables:: Variable values in effect only in one buffer. * Frame-Local Variables:: Variable values in effect only in one frame. * Future Local Variables:: New kinds of local values we might add some day. +* File Local Variables:: Handling local variable lists in files. * Variable Aliases:: Variables that are aliases for other variables. -* File Local Variables:: Handling local variable lists in files. * Variables with Restricted Values:: Non-constant variables whose value can @emph{not} be an arbitrary Lisp object. @@ -617,6 +617,8 @@ Major and Minor Modes +* Hooks:: How to use hooks; how to write code that + provides hooks. * Major Modes:: Defining major modes. * Minor Modes:: Defining minor modes. * Mode Line Format:: Customizing the text that appears in the mode line. @@ -625,11 +627,10 @@ * Font Lock Mode:: How modes can highlight text according to syntax. * Desktop Save Mode:: How modes can have buffer state saved between Emacs sessions. -* Hooks:: How to use hooks; how to write code that - provides hooks. Major Modes +* Major Mode Basics:: * Major Mode Conventions:: Coding conventions for keymaps, etc. * Example Major Modes:: Text mode and Lisp modes. * Auto Major Mode:: How Emacs chooses the major mode automatically. @@ -648,6 +649,7 @@ Mode Line Format +* Mode Line Basics:: * Mode Line Data:: The data structure that controls the mode line. * Mode Line Variables:: Variables used in that data structure. * %-Constructs:: Putting information into a mode line.
--- a/lispref/loading.texi Sat May 14 01:56:59 2005 +0000 +++ b/lispref/loading.texi Mon May 16 15:49:27 2005 +0000 @@ -436,8 +436,12 @@ @findex update-file-autoloads @findex update-directory-autoloads - A magic autoload comment consists of @samp{;;;###autoload}, on a line -by itself, just before the real definition of the function in its +@cindex magic autoload comment +@cindex autoload cookie +@anchor{autoload cookie} + A magic autoload comment (often called an @dfn{autoload cookie}) +consists of @samp{;;;###autoload}, on a line by itself, +just before the real definition of the function in its autoloadable source file. The command @kbd{M-x update-file-autoloads} writes a corresponding @code{autoload} call into @file{loaddefs.el}. Building Emacs loads @file{loaddefs.el} and thus calls @code{autoload}.
--- a/lispref/modes.texi Sat May 14 01:56:59 2005 +0000 +++ b/lispref/modes.texi Mon May 16 15:49:27 2005 +0000 @@ -20,6 +20,7 @@ @ref{Keymaps}, and @ref{Syntax Tables}. @menu +* Hooks:: How to use hooks; how to write code that provides hooks. * Major Modes:: Defining major modes. * Minor Modes:: Defining minor modes. * Mode Line Format:: Customizing the text that appears in the mode line. @@ -28,13 +29,153 @@ * Font Lock Mode:: How modes can highlight text according to syntax. * Desktop Save Mode:: How modes can have buffer state saved between Emacs sessions. -* Hooks:: How to use hooks; how to write code that provides hooks. @end menu +@node Hooks +@section Hooks +@cindex hooks + + A @dfn{hook} is a variable where you can store a function or functions +to be called on a particular occasion by an existing program. Emacs +provides hooks for the sake of customization. Most often, hooks are set +up in the init file (@pxref{Init File}), but Lisp programs can set them also. +@xref{Standard Hooks}, for a list of standard hook variables. + +@cindex normal hook + Most of the hooks in Emacs are @dfn{normal hooks}. These variables +contain lists of functions to be called with no arguments. When the +hook name ends in @samp{-hook}, that tells you it is normal. We try to +make all hooks normal, as much as possible, so that you can use them in +a uniform way. + + Every major mode function is supposed to run a normal hook called the +@dfn{mode hook} as the last step of initialization. This makes it easy +for a user to customize the behavior of the mode, by overriding the +buffer-local variable assignments already made by the mode. Most +minor modes also run a mode hook at their end. But hooks are used in +other contexts too. For example, the hook @code{suspend-hook} runs +just before Emacs suspends itself (@pxref{Suspending Emacs}). + + The recommended way to add a hook function to a normal hook is by +calling @code{add-hook} (see below). The hook functions may be any of +the valid kinds of functions that @code{funcall} accepts (@pxref{What +Is a Function}). Most normal hook variables are initially void; +@code{add-hook} knows how to deal with this. You can add hooks either +globally or buffer-locally with @code{add-hook}. + +@cindex abnormal hook + If the hook variable's name does not end with @samp{-hook}, that +indicates it is probably an @dfn{abnormal hook}. Then you should look at its +documentation to see how to use the hook properly. + + If the variable's name ends in @samp{-functions} or @samp{-hooks}, +then the value is a list of functions, but it is abnormal in that either +these functions are called with arguments or their values are used in +some way. You can use @code{add-hook} to add a function to the list, +but you must take care in writing the function. (A few of these +variables, notably those ending in @samp{-hooks}, are actually +normal hooks which were named before we established the convention of +using @samp{-hook} for them.) + + If the variable's name ends in @samp{-function}, then its value +is just a single function, not a list of functions. + + Here's an example that uses a mode hook to turn on Auto Fill mode when +in Lisp Interaction mode: + +@example +(add-hook 'lisp-interaction-mode-hook 'turn-on-auto-fill) +@end example + + At the appropriate time, Emacs uses the @code{run-hooks} function to +run particular hooks. This function calls the hook functions that have +been added with @code{add-hook}. + +@defun run-hooks &rest hookvars +This function takes one or more normal hook variable names as +arguments, and runs each hook in turn. Each argument should be a +symbol that is a normal hook variable. These arguments are processed +in the order specified. + +If a hook variable has a non-@code{nil} value, that value may be a +function or a list of functions. (The former option is considered +obsolete.) If the value is a function (either a lambda expression or +a symbol with a function definition), it is called. If it is a list +that isn't a function, its elements are called, consecutively. All +the hook functions are called with no arguments. +@end defun + +@defun run-hook-with-args hook &rest args +This function is the way to run an abnormal hook and always call all +of the hook functions. It calls each of the hook functions one by +one, passing each of them the arguments @var{args}. +@end defun + +@defun run-hook-with-args-until-failure hook &rest args +This function is the way to run an abnormal hook until one of the hook +functions fails. It calls each of the hook functions, passing each of +them the arguments @var{args}, until some hook function returns +@code{nil}. It then stops and returns @code{nil}. If none of the +hook functions return @code{nil}, it returns a non-@code{nil} value. +@end defun + +@defun run-hook-with-args-until-success hook &rest args +This function is the way to run an abnormal hook until a hook function +succeeds. It calls each of the hook functions, passing each of them +the arguments @var{args}, until some hook function returns +non-@code{nil}. Then it stops, and returns whatever was returned by +the last hook function that was called. If all hook functions return +@code{nil}, it returns @code{nil} as well. +@end defun + +@defun add-hook hook function &optional append local +This function is the handy way to add function @var{function} to hook +variable @var{hook}. You can use it for abnormal hooks as well as for +normal hooks. @var{function} can be any Lisp function that can accept +the proper number of arguments for @var{hook}. For example, + +@example +(add-hook 'text-mode-hook 'my-text-hook-function) +@end example + +@noindent +adds @code{my-text-hook-function} to the hook called @code{text-mode-hook}. + +If @var{function} is already present in @var{hook} (comparing using +@code{equal}), then @code{add-hook} does not add it a second time. + +It is best to design your hook functions so that the order in which they +are executed does not matter. Any dependence on the order is ``asking +for trouble''. However, the order is predictable: normally, +@var{function} goes at the front of the hook list, so it will be +executed first (barring another @code{add-hook} call). If the optional +argument @var{append} is non-@code{nil}, the new hook function goes at +the end of the hook list and will be executed last. + +@code{add-hook} can handle the cases where @var{hook} is void or its +value is a single function; it sets or changes the value to a list of +functions. + +If @var{local} is non-@code{nil}, that says to add @var{function} to +the buffer-local hook list instead of to the global hook list. If +needed, this makes the hook buffer-local and adds @code{t} to the +buffer-local value. The latter acts as a flag to run the hook +functions in the default value as well as in the local value. +@end defun + +@defun remove-hook hook function &optional local +This function removes @var{function} from the hook variable +@var{hook}. It compares @var{function} with elements of @var{hook} +using @code{equal}, so it works for both symbols and lambda +expressions. + +If @var{local} is non-@code{nil}, that says to remove @var{function} +from the buffer-local hook list instead of from the global hook list. +@end defun + @node Major Modes @section Major Modes @cindex major mode -@cindex Fundamental mode Major modes specialize Emacs for editing particular kinds of text. Each buffer has only one major mode at a time. For each major mode @@ -44,6 +185,23 @@ buffer, such as a local keymap. The effect lasts until you switch to another major mode in the same buffer. +@menu +* Major Mode Basics:: +* Major Mode Conventions:: Coding conventions for keymaps, etc. +* Example Major Modes:: Text mode and Lisp modes. +* Auto Major Mode:: How Emacs chooses the major mode automatically. +* Mode Help:: Finding out how to use a mode. +* Derived Modes:: Defining a new major mode based on another major + mode. +* Generic Modes:: Defining a simple major mode that supports + comment syntax and Font Lock mode. +* Mode Hooks:: Hooks run at the end of major mode functions. +@end menu + +@node Major Mode Basics +@subsection Major Mode Basics +@cindex Fundamental mode + The least specialized major mode is called @dfn{Fundamental mode}. This mode has no mode-specific definitions or variable settings, so each Emacs command behaves in its default manner, and each option is in its @@ -95,18 +253,6 @@ are written. Text mode is perhaps the simplest major mode aside from Fundamental mode. Rmail mode is a complicated and specialized mode. -@menu -* Major Mode Conventions:: Coding conventions for keymaps, etc. -* Example Major Modes:: Text mode and Lisp modes. -* Auto Major Mode:: How Emacs chooses the major mode automatically. -* Mode Help:: Finding out how to use a mode. -* Derived Modes:: Defining a new major mode based on another major - mode. -* Generic Modes:: Defining a simple major mode that supports - comment syntax and Font Lock mode. -* Mode Hooks:: Hooks run at the end of major mode functions. -@end menu - @node Major Mode Conventions @subsection Major Mode Conventions @@ -240,7 +386,7 @@ in a variable named @code{@var{modename}-mode-abbrev-table}. If the major mode command defines any abbrevs itself, it should pass @code{t} for the @var{system-flag} argument to @code{define-abbrev}. -@xref{Abbrev Tables}. +@xref{Defining Abbrevs}. @item The mode should specify how to do highlighting for Font Lock mode, by @@ -326,8 +472,11 @@ recognizable names, add an element to @code{auto-mode-alist} to select the mode for those file names. If you define the mode command to autoload, you should add this element in the same file that calls -@code{autoload}. Otherwise, it is sufficient to add the element in the -file that contains the mode definition. @xref{Auto Major Mode}. +@code{autoload}. If you use an autoload cookie for the mode command, +you can also use an autoload cookie for the form that adds the element +(@pxref{autoload cookie}). If you do not autoload the mode command, +it is sufficient to add the element in the file that contains the mode +definition. @xref{Auto Major Mode}. @item In the comments that document the file, you should provide a sample @@ -635,21 +784,28 @@ @deffn Command normal-mode &optional find-file This function establishes the proper major mode and buffer-local variable -bindings for the current buffer. First it calls @code{set-auto-mode}, -then it runs @code{hack-local-variables} to parse, and bind or -evaluate as appropriate, the file's local variables. +bindings for the current buffer. First it calls @code{set-auto-mode} +(see below), then it runs @code{hack-local-variables} to parse, and +bind or evaluate as appropriate, the file's local variables +(@pxref{File Local Variables}). If the @var{find-file} argument to @code{normal-mode} is non-@code{nil}, @code{normal-mode} assumes that the @code{find-file} function is calling -it. In this case, it may process a local variables list at the end of -the file and in the @samp{-*-} line. The variable +it. In this case, it may process local variables in the @samp{-*-} +line or at the end of the file. The variable @code{enable-local-variables} controls whether to do so. @xref{File -variables, , Local Variables in Files, emacs, The GNU Emacs Manual}, for -the syntax of the local variables section of a file. +Variables, , Local Variables in Files, emacs, The GNU Emacs Manual}, +for the syntax of the local variables section of a file. If you run @code{normal-mode} interactively, the argument @var{find-file} is normally @code{nil}. In this case, -@code{normal-mode} unconditionally processes any local variables list. +@code{normal-mode} unconditionally processes any file local variables. + +If @code{normal-mode} processes the local variables list and this list +specifies a major mode, that mode overrides any mode chosen by +@code{set-auto-mode}. If neither @code{set-auto-mode} nor +@code{hack-local-variables} specify a major mode, the buffer stays in +the major mode determined by @code{default-major-mode} (see below). @cindex file mode specification error @code{normal-mode} uses @code{condition-case} around the call to the @@ -657,16 +813,25 @@ mode specification error}, followed by the original error message. @end deffn -@defun set-auto-mode +@defun set-auto-mode &optional keep-mode-if-same @cindex visited file mode This function selects the major mode that is appropriate for the -current buffer. It may base its decision on the value of the @w{@samp{-*-}} -line, on the visited file name (using @code{auto-mode-alist}), on the -@w{@samp{#!}} line (using @code{interpreter-mode-alist}), or on the -file's local variables list. However, this function does not look for -the @samp{mode:} local variable near the end of a file; the -@code{hack-local-variables} function does that. @xref{Choosing Modes, , -How Major Modes are Chosen, emacs, The GNU Emacs Manual}. +current buffer. It bases its decision (in order of precedence) on +the @w{@samp{-*-}} line, on the @w{@samp{#!}} line (using +@code{interpreter-mode-alist}), on the text at the beginning of the +buffer (using @code{magic-mode-alist}), and finally on the visited +file name (using @code{auto-mode-alist}). @xref{Choosing Modes, , How +Major Modes are Chosen, emacs, The GNU Emacs Manual}. However, this +function does not look for the @samp{mode:} local variable near the +end of a file; the @code{hack-local-variables} function does that. +If @code{enable-local-variables} is @code{nil}, @code{set-auto-mode} +does not check the @w{@samp{-*-}} line for a mode tag either. + +If @var{keep-mode-if-same} is non-@code{nil}, this function does not +call the mode command if the buffer is already in the proper major +mode. For instance, @code{set-visited-file-name} sets this to +@code{t} to avoid killing buffer local variables that the user may +have set. @end defun @defopt default-major-mode @@ -674,8 +839,8 @@ standard value is @code{fundamental-mode}. If the value of @code{default-major-mode} is @code{nil}, Emacs uses -the (previously) current buffer's major mode for the major mode of a new -buffer. However, if that major mode symbol has a @code{mode-class} +the (previously) current buffer's major mode as the default major mode +of a new buffer. However, if that major mode symbol has a @code{mode-class} property with value @code{special}, then it is not used for new buffers; Fundamental mode is used instead. The modes that have this property are those such as Dired and Rmail that are useful only with text that has @@ -684,28 +849,50 @@ @defun set-buffer-major-mode buffer This function sets the major mode of @var{buffer} to the value of -@code{default-major-mode}. If that variable is @code{nil}, it uses -the current buffer's major mode (if that is suitable). +@code{default-major-mode}; if that variable is @code{nil}, it uses the +current buffer's major mode (if that is suitable). As an exception, +if @var{buffer}'s name is @samp{*scratch*}, it sets the mode to +@code{initial-major-mode}. The low-level primitives for creating buffers do not use this function, but medium-level commands such as @code{switch-to-buffer} and @code{find-file-noselect} use it whenever they create buffers. @end defun -@defvar initial-major-mode +@defopt initial-major-mode @cindex @samp{*scratch*} The value of this variable determines the major mode of the initial @samp{*scratch*} buffer. The value should be a symbol that is a major mode command. The default value is @code{lisp-interaction-mode}. +@end defopt + +@defvar interpreter-mode-alist +This variable specifies major modes to use for scripts that specify a +command interpreter in a @samp{#!} line. Its value is an alist with +elements of the form @code{(@var{interpreter} . @var{mode})}; for +example, @code{("perl" . perl-mode)} is one element present by +default. The element says to use mode @var{mode} if the file +specifies an interpreter which matches @var{interpreter}. The value +of @var{interpreter} is actually a regular expression. @xref{Regular +Expressions}. +@end defvar + +@defvar magic-mode-alist +This variable's value is an alist with elements of the form +@code{(@var{regexp} . @var{function})}, where @var{regexp} is a +regular expression and @var{function} is a function or @code{nil}. +After visiting a file, @code{set-auto-mode} calls @var{function} if +the text at the beginning of the buffer matches @var{regexp} and +@var{function} is non-@code{nil}; if @var{function} is @code{nil}, +@code{auto-mode-alist} gets to decide the mode. @end defvar @defvar auto-mode-alist This variable contains an association list of file name patterns -(regular expressions; @pxref{Regular Expressions}) and corresponding -major mode commands. Usually, the file name patterns test for suffixes, -such as @samp{.el} and @samp{.c}, but this need not be the case. An -ordinary element of the alist looks like @code{(@var{regexp} . -@var{mode-function})}. +(regular expressions) and corresponding major mode commands. Usually, +the file name patterns test for suffixes, such as @samp{.el} and +@samp{.c}, but this need not be the case. An ordinary element of the +alist looks like @code{(@var{regexp} . @var{mode-function})}. For example, @@ -724,9 +911,11 @@ @end smallexample When you visit a file whose expanded file name (@pxref{File Name -Expansion}) matches a @var{regexp}, @code{set-auto-mode} calls the -corresponding @var{mode-function}. This feature enables Emacs to select -the proper major mode for most files. +Expansion}), with version numbers and backup suffixes removed using +@code{file-name-sans-versions} (@pxref{File Name Components}), matches +a @var{regexp}, @code{set-auto-mode} calls the corresponding +@var{mode-function}. This feature enables Emacs to select the proper +major mode for most files. If an element of @code{auto-mode-alist} has the form @code{(@var{regexp} @var{function} t)}, then after calling @var{function}, Emacs searches @@ -755,19 +944,6 @@ @end smallexample @end defvar -@defvar interpreter-mode-alist -This variable specifies major modes to use for scripts that specify a -command interpreter in a @samp{#!} line. Its value is a list of -elements of the form @code{(@var{interpreter} . @var{mode})}; for -example, @code{("perl" . perl-mode)} is one element present by default. -The element says to use mode @var{mode} if the file specifies -an interpreter which matches @var{interpreter}. The value of -@var{interpreter} is actually a regular expression. - -This variable is applicable only when the @code{auto-mode-alist} does -not indicate which major mode to use. -@end defvar - @node Mode Help @subsection Getting Help about a Major Mode @cindex mode help @@ -804,36 +980,38 @@ It's often useful to define a new major mode in terms of an existing one. An easy way to do this is to use @code{define-derived-mode}. -@defmac define-derived-mode variant parent name docstring body@dots{} +@defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{} This construct defines @var{variant} as a major mode command, using -@var{name} as the string form of the mode name. +@var{name} as the string form of the mode name. @var{variant} and +@var{parent} should be unquoted symbols. The new command @var{variant} is defined to call the function @var{parent}, then override certain aspects of that parent mode: @itemize @bullet @item -The new mode has its own keymap, named @code{@var{variant}-map}. -@code{define-derived-mode} initializes this map to inherit from -@code{@var{parent}-map}, if it is not already set. +The new mode has its own sparse keymap, named +@code{@var{variant}-map}. @code{define-derived-mode} +makes the parent mode's keymap the parent of the new map, unless +@code{@var{variant}-map} is already set and already has a parent. @item The new mode has its own syntax table, kept in the variable -@code{@var{variant}-syntax-table}. -@code{define-derived-mode} initializes this variable by copying -@code{@var{parent}-syntax-table}, if it is not already set. +@code{@var{variant}-syntax-table}, unless you override this using the +@code{:syntax-table} keyword (see below). @code{define-derived-mode} +makes the parent mode's syntax-table the parent of +@code{@var{variant}-syntax-table}, unless the latter is already set +and already has a parent different from @code{standard-syntax-table}. @item The new mode has its own abbrev table, kept in the variable -@code{@var{variant}-abbrev-table}. -@code{define-derived-mode} initializes this variable by copying -@code{@var{parent}-abbrev-table}, if it is not already set. +@code{@var{variant}-abbrev-table}, unless you override this using the +@code{:abbrev-table} keyword (see below). @item -The new mode has its own mode hook, @code{@var{variant}-hook}, -which it runs in standard fashion as the very last thing that it does. -(The new mode also runs the mode hook of @var{parent} as part -of calling @var{parent}.) +The new mode has its own mode hook, @code{@var{variant}-hook}. It +runs this hook, after running the hooks of its ancestor modes, with +@code{run-mode-hooks} (@pxref{Mode Hooks}). @end itemize In addition, you can specify how to override other aspects of @@ -841,9 +1019,38 @@ evaluates the forms in @var{body} after setting up all its usual overrides, just before running @code{@var{variant}-hook}. -The argument @var{docstring} specifies the documentation string for the -new mode. If you omit @var{docstring}, @code{define-derived-mode} -generates a documentation string. +You can also specify @code{nil} for @var{parent}. This gives the new +mode no parent. Then @code{define-derived-mode} behaves as described +above, but, of course, omits all actions connected with @var{parent}. + +The argument @var{docstring} specifies the documentation string for +the new mode. @code{define-derived-mode} adds some general +information about the mode's hook, followed by the mode's keymap, at +the end of this docstring. If you omit @var{docstring}, +@code{define-derived-mode} generates a documentation string. + +The @var{keyword-args} are pairs of keywords and values. The values +are evaluated. The following keywords are currently supported: + +@table @code +@item :group +If this is specified, it is the customization group for this mode. + +@item :syntax-table +You can use this to explicitly specify a syntax table for the new +mode. If you specify a @code{nil} value, the new mode uses the same +syntax table as @var{parent}, or @code{standard-syntax-table} if +@var{parent} is @code{nil}. (Note that this does @emph{not} follow +the convention used for non-keyword arguments that a @code{nil} value +is equivalent with not specifying the argument.) + +@item :abbrev-table +You can use this to explicitly specify an abbrev table for the new +mode. If you specify a @code{nil} value, the new mode uses the same +abbrev table as @var{parent}, or @code{fundamental-mode-abbrev-table} +if @var{parent} is @code{nil}. (Again, a @code{nil} value is +@emph{not} equivalent to not specifying this keyword.) +@end table Here is a hypothetical example: @@ -1184,8 +1391,9 @@ Definitions}. @item :global @var{global} -If non-@code{nil} specifies that the minor mode should be global. -By default, minor modes are buffer-local. +If non-@code{nil} specifies that the minor mode should be global. By +default, minor modes defined with @code{define-minor-mode} are +buffer-local. @item :init-value @var{init-value} This is equivalent to specifying @var{init-value} positionally. @@ -1266,6 +1474,17 @@ :group 'hunger) @end smallexample +@defmac define-global-minor-mode global-mode mode turn-on keyword-args... +This defines a global minor mode named @var{global-mode} whose meaning +is to enable the buffer-local minor mode @var{mode} in every buffer. +To turn on the minor mode in a buffer, it uses the function +@var{turn-on}; to turn off the minor mode, it calls @code{mode} with +@minus{}1 as argument. + +Use @code{:group @var{group}} in @var{keyword-args} to specify the +custom group for the mode variable of the global minor mode. +@end defmac + @node Mode Line Format @section Mode-Line Format @cindex mode line @@ -1283,6 +1502,19 @@ information displayed in the mode line relates to the enabled major and minor modes. +@menu +* Mode Line Basics:: +* Mode Line Data:: The data structure that controls the mode line. +* Mode Line Variables:: Variables used in that data structure. +* %-Constructs:: Putting information into a mode line. +* Properties in Mode:: Using text properties in the mode line. +* Header Lines:: Like a mode line, but at the top. +* Emulating Mode Line:: Formatting text as the mode line would. +@end menu + +@node Mode Line Basics +@subsection Mode Line Basics + @code{mode-line-format} is a buffer-local variable that holds a template used to display the mode line of the current buffer. All windows for the same buffer use the same @code{mode-line-format}, so @@ -1324,15 +1556,6 @@ line at once; if the variables call for both, only the mode line actually appears. -@menu -* Mode Line Data:: The data structure that controls the mode line. -* Mode Line Variables:: Variables used in that data structure. -* %-Constructs:: Putting information into a mode line. -* Properties in Mode:: Using text properties in the mode line. -* Header Lines:: Like a mode line, but at the top. -* Emulating Mode Line:: Formatting text as the mode line would. -@end menu - @node Mode Line Data @subsection The Data Structure of the Mode Line @cindex mode-line construct @@ -2801,147 +3024,8 @@ and it should return the restored buffer. Here @var{desktop-buffer-misc} is the value returned by the function optionally bound to @code{desktop-save-buffer}. - @end defvar -@node Hooks -@section Hooks -@cindex hooks - - A @dfn{hook} is a variable where you can store a function or functions -to be called on a particular occasion by an existing program. Emacs -provides hooks for the sake of customization. Most often, hooks are set -up in the init file (@pxref{Init File}), but Lisp programs can set them also. -@xref{Standard Hooks}, for a list of standard hook variables. - -@cindex normal hook - Most of the hooks in Emacs are @dfn{normal hooks}. These variables -contain lists of functions to be called with no arguments. When the -hook name ends in @samp{-hook}, that tells you it is normal. We try to -make all hooks normal, as much as possible, so that you can use them in -a uniform way. - - Every major mode function is supposed to run a normal hook called the -@dfn{mode hook} as the last step of initialization. This makes it easy -for a user to customize the behavior of the mode, by overriding the -buffer-local variable assignments already made by the mode. But hooks -are used in other contexts too. For example, the hook -@code{suspend-hook} runs just before Emacs suspends itself -(@pxref{Suspending Emacs}). - - The recommended way to add a hook function to a normal hook is by -calling @code{add-hook} (see below). The hook functions may be any of -the valid kinds of functions that @code{funcall} accepts (@pxref{What -Is a Function}). Most normal hook variables are initially void; -@code{add-hook} knows how to deal with this. You can add hooks either -globally or buffer-locally with @code{add-hook}. - -@cindex abnormal hook - If the hook variable's name does not end with @samp{-hook}, that -indicates it is probably an @dfn{abnormal hook}. Then you should look at its -documentation to see how to use the hook properly. - - If the variable's name ends in @samp{-functions} or @samp{-hooks}, -then the value is a list of functions, but it is abnormal in that either -these functions are called with arguments or their values are used in -some way. You can use @code{add-hook} to add a function to the list, -but you must take care in writing the function. (A few of these -variables, notably those ending in @samp{-hooks}, are actually -normal hooks which were named before we established the convention of -using @samp{-hook} for them.) - - If the variable's name ends in @samp{-function}, then its value -is just a single function, not a list of functions. - - Here's an example that uses a mode hook to turn on Auto Fill mode when -in Lisp Interaction mode: - -@example -(add-hook 'lisp-interaction-mode-hook 'turn-on-auto-fill) -@end example - - At the appropriate time, Emacs uses the @code{run-hooks} function to -run particular hooks. This function calls the hook functions that have -been added with @code{add-hook}. - -@defun run-hooks &rest hookvars -This function takes one or more normal hook variable names as -arguments, and runs each hook in turn. Each argument should be a -symbol that is a normal hook variable. These arguments are processed -in the order specified. - -If a hook variable has a non-@code{nil} value, that value may be a -function or a list of functions. (The former option is considered -obsolete.) If the value is a function (either a lambda expression or -a symbol with a function definition), it is called. If it is a list -that isn't a function, its elements are called, consecutively. All -the hook functions are called with no arguments. -@end defun - -@defun run-hook-with-args hook &rest args -This function is the way to run an abnormal hook and always call all -of the hook functions. It calls each of the hook functions one by -one, passing each of them the arguments @var{args}. -@end defun - -@defun run-hook-with-args-until-failure hook &rest args -This function is the way to run an abnormal hook until one of the hook -functions fails. It calls each of the hook functions, passing each of -them the arguments @var{args}, until some hook function returns -@code{nil}. It then stops and returns @code{nil}. If none of the -hook functions return @code{nil}, it returns a non-@code{nil} value. -@end defun - -@defun run-hook-with-args-until-success hook &rest args -This function is the way to run an abnormal hook until a hook function -succeeds. It calls each of the hook functions, passing each of them -the arguments @var{args}, until some hook function returns -non-@code{nil}. Then it stops, and returns whatever was returned by -the last hook function that was called. If all hook functions return -@code{nil}, it returns @code{nil} as well. -@end defun - -@defun add-hook hook function &optional append local -This function is the handy way to add function @var{function} to hook -variable @var{hook}. You can use it for abnormal hooks as well as for -normal hooks. @var{function} can be any Lisp function that can accept -the proper number of arguments for @var{hook}. For example, - -@example -(add-hook 'text-mode-hook 'my-text-hook-function) -@end example - -@noindent -adds @code{my-text-hook-function} to the hook called @code{text-mode-hook}. - -If @var{function} is already present in @var{hook} (comparing using -@code{equal}), then @code{add-hook} does not add it a second time. - -It is best to design your hook functions so that the order in which they -are executed does not matter. Any dependence on the order is ``asking -for trouble''. However, the order is predictable: normally, -@var{function} goes at the front of the hook list, so it will be -executed first (barring another @code{add-hook} call). If the optional -argument @var{append} is non-@code{nil}, the new hook function goes at -the end of the hook list and will be executed last. - -If @var{local} is non-@code{nil}, that says to add @var{function} to -the buffer-local hook list instead of to the global hook list. If -needed, this makes the hook buffer-local and adds @code{t} to the -buffer-local value. The latter acts as a flag to run the hook -functions in the default value as well as in the local value. -@end defun - -@defun remove-hook hook function &optional local -This function removes @var{function} from the hook variable -@var{hook}. It compares @var{function} with elements of @var{hook} -using @code{equal}, so it works for both symbols and lambda -expressions. - -If @var{local} is non-@code{nil}, that says to remove @var{function} -from the buffer-local hook list instead of from the global hook list. -@end defun - @ignore arch-tag: 4c7bff41-36e6-4da6-9e7f-9b9289e27c8e @end ignore
--- a/lispref/processes.texi Sat May 14 01:56:59 2005 +0000 +++ b/lispref/processes.texi Mon May 16 15:49:27 2005 +0000 @@ -1559,9 +1559,7 @@ keyword/argument pairs, for example @code{:server t} to create a server process, or @code{:type 'datagram} to create a datagram connection. @xref{Low-Level Network}, for details. You can also use -one of the @code{open-network-...} functions descibed below; -internally, they just call @code{make-network-process} with suitable -arguments. +the @code{open-network-stream} function descibed below. You can distinguish process objects representing network connections and servers from those representing subprocesses with the @@ -1601,25 +1599,6 @@ a defined network service (a string) or a port number (an integer). @end defun -@defun open-network-stream-nowait name buffer-or-name host service &optional sentinel filter -This function opens a TCP connection, like @code{open-network-stream}, -but it returns immediately without waiting for the request to be -accepted or rejected by the remote server. When the request is -subsequently accepted or rejected, the process's sentinel function -will be called with a string that starts with @code{"open"} (on -success) or @code{"failed"} (on error). - -Some systems do not support non-blocking connections; on those -systems, @code{open-network-stream-nowait} returns @code{nil} -and does nothing. - -The optional arguments @var{sentinel} and @var{filter} specify the -sentinel and filter functions for this network connection. It is -useful to specify them when opening the connection, because they will -be used later asynchronously. The other arguments mean the same as in -@code{open-network-stream}. -@end defun - @defun process-contact process &optional key This function returns information about how a network process was set up. For a connection, when @var{key} is @code{nil}, it returns @@ -1704,24 +1683,6 @@ The client process' plist is initialized from the server's plist. @end itemize -@defun open-network-stream-server name buffer-or-name service &optional sentinel filter -Create a network server process for a TCP service. -It returns @code{nil} if server processes are not supported; otherwise, -it returns a subprocess-object to represent the server. - -When a client connects to the specified service, Emacs creates a new -subprocess to handle the new connection, and then calls its sentinel -function (which it has inherited from the server). - -The optional arguments @var{sentinel} and @var{filter} specify the -sentinel and filter functions for the server. It is useful to specify -them now, because they will be used later asynchronously when the -server receives a connection request. The three arguments @var{name}, -@var{buffer-or-name} and @var{service} mean the same thing as in -@code{open-network-stream}, but @var{service} can be @code{t} -meaning ask the system to allocate an unused port to listen on. -@end defun - @node Datagrams @section Datagrams @cindex datagrams
--- a/lispref/tips.texi Sat May 14 01:56:59 2005 +0000 +++ b/lispref/tips.texi Mon May 16 15:49:27 2005 +0000 @@ -37,6 +37,16 @@ @itemize @bullet @item +Simply loading the package should not change Emacs's editing behavior. +Include a command or commands to enable and disable the feature, +or to invoke it. + +This convention is mandatory for any file that includes custom +definitions. If fixing such a file to follow this convention requires +an incompatible change, go ahead and make the incompatible change; +don't postpone it. + +@item Since all global variables share the same name space, and all functions share another name space, you should choose a short word to distinguish your program from other Lisp programs.@footnote{The @@ -201,17 +211,6 @@ In addition, they should mark the text as a kind of ``link'' so that @kbd{mouse-1} will follow it also. @xref{Links and Mouse-1}. -@item -When a package provides a modification of ordinary Emacs behavior, it is -good to include a command to enable and disable the feature, provide a -command named @code{@var{whatever}-mode} which turns the feature on or -off, and make it autoload (@pxref{Autoload}). Design the package so -that simply loading it has no visible effect---that should not enable -the feature.@footnote{Consider that the package may be loaded -arbitrarily by Custom for instance.} Users will request the feature by -invoking the command. It is a good idea to define this command -as a minor mode. - @cindex unloading packages If loading the file adds functions to hooks, define a function @code{@var{feature}-unload-hook}, where @var{feature} is the name of
--- a/lispref/variables.texi Sat May 14 01:56:59 2005 +0000 +++ b/lispref/variables.texi Mon May 16 15:49:27 2005 +0000 @@ -42,8 +42,8 @@ * Buffer-Local Variables:: Variable values in effect only in one buffer. * Frame-Local Variables:: Variable values in effect only in one frame. * Future Local Variables:: New kinds of local values we might add some day. +* File Local Variables:: Handling local variable lists in files. * Variable Aliases:: Variables that are aliases for other variables. -* File Local Variables:: Handling local variable lists in files. * Variables with Restricted Values:: Non-constant variables whose value can @emph{not} be an arbitrary Lisp object. @end menu @@ -1688,6 +1688,92 @@ If sufficient application is found for either of these two kinds of local bindings, we will provide it in a subsequent Emacs version. +@node File Local Variables +@section File Local Variables + + This section describes the functions and variables that affect +processing of file local variables. @xref{File variables, , +Local Variables in Files, emacs, The GNU Emacs Manual}, for basic +information about file local variables. + +@defopt enable-local-variables +This variable controls whether to process file local variables. A +value of @code{t} means process them unconditionally; @code{nil} means +ignore them; anything else means ask the user what to do for each +file. The default value is @code{t}. +@end defopt + +@defun hack-local-variables &optional mode-only +This function parses, and binds or evaluates as appropriate, any local +variables specified by the contents of the current buffer. The variable +@code{enable-local-variables} has its effect here. However, this +function does not look for the @samp{mode:} local variable in the +@w{@samp{-*-}} line. @code{set-auto-mode} does that, also taking +@code{enable-local-variables} into account (@pxref{Auto Major Mode}). + +If the optional argument @var{mode-only} is non-@code{nil}, then all +this function does is return @code{t} if the @w{@samp{-*-}} line or +the local variables list specifies a mode and @code{nil} otherwise. +It does not set the mode nor any other file local variable. +@end defun + + If a file local variable could specify a function that would +be called later, or an expression that would be executed later, simply +visiting a file could take over your Emacs. To prevent this, Emacs +takes care not to allow to set such file local variables. + + For one thing, any variable whose name ends in @samp{-command}, +@samp{-frame-alist}, @samp{-function}, @samp{-functions}, +@samp{-hook}, @samp{-hooks}, @samp{-form}, @samp{-forms}, @samp{-map}, +@samp{-map-alist}, @samp{-mode-alist}, @samp{-program}, or +@samp{-predicate} cannot be given a file local value. In general, +you should use such a name whenever it is appropriate for the +variable's meaning. The variables @samp{font-lock-keywords}, +@samp{font-lock-keywords-[0-9]}, and +@samp{font-lock-syntactic-keywords} cannot be given file local values either. +These rules can be overridden by giving the variable's +name a non-@code{nil} @code{safe-local-variable} property. If one +gives it a @code{safe-local-variable} property of @code{t}, then one +can give the variable any file local value. One can also give any +symbol, including the above, a @code{safe-local-variable} property +that is a function taking exactly one argument. In that case, giving +a variable with that name a file local value is only allowed if the +function returns non-@code{nil} when called with that value as +argument. + + In addition, any variable whose name has a non-@code{nil} +@code{risky-local-variable} property is also ignored. So are all +variables listed in @code{ignored-local-variables}: + +@defvar ignored-local-variables +This variable holds a list of variables that should not be given local +values by files. Any value specified for one of these variables is +ignored. +@end defvar + +@defun risky-local-variable-p sym &optional val +If @var{val} is non-@code{nil}, returns non-@code{nil} if giving +@var{sym} a file local value of @var{val} would be risky, for any of +the reasons stated above. If @var{val} is @code{nil} or omitted, only +returns @code{nil} if @var{sym} can be safely assigned any file local +value whatsoever. +@end defun + + The @samp{Eval:} ``variable'' is also a potential loophole, so Emacs +normally asks for confirmation before handling it. + +@defopt enable-local-eval +This variable controls processing of @samp{Eval:} in @samp{-*-} lines +or local variables +lists in files being visited. A value of @code{t} means process them +unconditionally; @code{nil} means ignore them; anything else means ask +the user what to do for each file. The default value is @code{maybe}. +@end defopt + + Text properties are also potential loopholes, since their values +could include functions to call. So Emacs discards all text +properties from string values specified for file local variables. + @node Variable Aliases @section Variable Aliases @@ -1780,92 +1866,6 @@ @result{} 0 @end example -@node File Local Variables -@section File Local Variables - - This section describes the functions and variables that affect -processing of local variables lists in files. @xref{File variables, , -Local Variables in Files, emacs, The GNU Emacs Manual}, for basic -information about file local variables. - -@defopt enable-local-variables -This variable controls whether to process file local variables lists. A -value of @code{t} means process the local variables lists -unconditionally; @code{nil} means ignore them; anything else means ask -the user what to do for each file. The default value is @code{t}. -@end defopt - -@defun hack-local-variables &optional mode-only -This function parses, and binds or evaluates as appropriate, any local -variables specified by the contents of the current buffer. The variable -@code{enable-local-variables} has its effect here. However, this -function does not look for the @samp{mode:} local variable in the -@w{@samp{-*-}} line. @code{set-auto-mode} does that, also taking -@code{enable-local-variables} into account. - -If the optional argument @var{mode-only} is non-@code{nil}, then all -this function does is return @code{t} if the @w{@samp{-*-}} line or -the local variables list specifies a mode and @code{nil} otherwise. -It does not set the mode nor any other file local variable. -@end defun - - If a file local variable list could specify a function that would -be called later, or an expression that would be executed later, simply -visiting a file could take over your Emacs. To prevent this, Emacs -takes care not to allow local variable lists to set such variables. - - For one thing, any variable whose name ends in @samp{-command}, -@samp{-frame-alist}, @samp{-function}, @samp{-functions}, -@samp{-hook}, @samp{-hooks}, @samp{-form}, @samp{-forms}, @samp{-map}, -@samp{-map-alist}, @samp{-mode-alist}, @samp{-program}, or -@samp{-predicate} cannot be set in a local variable list. In general, -you should use such a name whenever it is appropriate for the -variable's meaning. The variables @samp{font-lock-keywords}, -@samp{font-lock-keywords-[0-9]}, and -@samp{font-lock-syntactic-keywords} cannot be set in a local variable -list, either. These rules can be overridden by giving the variable's -name a non-@code{nil} @code{safe-local-variable} property. If one -gives it a @code{safe-local-variable} property of @code{t}, then one -can give the variable any file local value. One can also give any -symbol, including the above, a @code{safe-local-variable} property -that is a function taking exactly one argument. In that case, giving -a variable with that name a file local value is only allowed if the -function returns non-@code{nil} when called with that value as -argument. - - In addition, any variable whose name has a non-@code{nil} -@code{risky-local-variable} property is also ignored. So are all -variables listed in @code{ignored-local-variables}: - -@defvar ignored-local-variables -This variable holds a list of variables that should not be -set by a file's local variables list. Any value specified -for one of these variables is ignored. -@end defvar - -@defun risky-local-variable-p sym &optional val -If @var{val} is non-@code{nil}, returns non-@code{nil} if giving -@var{sym} a file local value of @var{val} would be risky, for any of -the reasons stated above. If @var{val} is @code{nil} or omitted, only -returns @code{nil} if @var{sym} can be safely assigned any file local -value whatsoever. -@end defun - - The @samp{Eval:} ``variable'' is also a potential loophole, so Emacs -normally asks for confirmation before handling it. - -@defopt enable-local-eval -This variable controls processing of @samp{Eval:} in local variables -lists in files being visited. A value of @code{t} means process them -unconditionally; @code{nil} means ignore them; anything else means ask -the user what to do for each file. The default value is @code{maybe}. -@end defopt - - Text properties are also potential loopholes, since their values -could include functions to call. So Emacs discards all text -properties from string values specified in a file's local variables -list. - @node Variables with Restricted Values @section Variables with Restricted Values
--- a/man/ChangeLog Sat May 14 01:56:59 2005 +0000 +++ b/man/ChangeLog Mon May 16 15:49:27 2005 +0000 @@ -1,3 +1,47 @@ +2005-05-16 Jay Belanger <belanger@truman.edu> + + * calc.texi (Storing Variables): Mention `calc-copy-special-constant'. + +2005-05-16 Nick Roberts <nickrob@snap.net.nz> + + * building.texi: Replace toolbar with "tool bar" for consistency. + (Compilation Mode): Describe compilation-context-lines + and use of arrow in compilation buffer. + (Debugger Operation): Replace help text with variable's value. + + * frames.texi (Tooltips): Replace toolbar with "tool bar" for + consistency. + +2005-05-15 Luc Teirlinck <teirllm@auburn.edu> + + * major.texi (Choosing Modes): normal-mode processes the -*- line. + Add xref. + +2005-05-14 Jay Belanger <belanger@truman.edu> + + * calc.texi (Default Simplifications): Insert missing ! (logical + not operator). + +2005-05-14 Michael Albinus <michael.albinus@gmx.de> + + Sync with Tramp 2.0.49. + +2005-05-14 Luc Teirlinck <teirllm@auburn.edu> + + * basic.texi (Moving Point): Mention `M-g g' binding for `goto-line'. + (Position Info): Delete discussion of `goto-line'. It is already + described in `Moving point'. + + * mini.texi (Completion Commands): Correct reference. + (Completion Options): Fix typo. + + * killing.texi (Deletion): Complete description of `C-x C-o'. + +2005-05-10 Jay Belanger <belanger@truman.edu> + + * calc.texi (Default Simplifications): Mention that 0^0 simplifies + to 1. + 2005-05-10 Richard M. Stallman <rms@gnu.org> * building.texi (Compilation): Clarify recompile's directory choice.
--- a/man/basic.texi Sat May 14 01:56:59 2005 +0000 +++ b/man/basic.texi Mon May 16 15:49:27 2005 +0000 @@ -238,6 +238,7 @@ Read a number @var{n} and move point to buffer position @var{n}. Position 1 is the beginning of the buffer. @item M-g M-g +@itemx M-g g @itemx M-x goto-line Read a number @var{n} and move point to line number @var{n}. Line 1 is the beginning of the buffer. @@ -595,19 +596,13 @@ @cindex location of point @cindex cursor location @cindex point location - There are two commands for working with line numbers. @kbd{M-x -what-line} computes the current line number and displays it in the -echo area. To go to a given line by number, use @kbd{M-g M-g} or -@kbd{M-g g} (@code{goto-line}). This prompts you for a line number, -then moves point to the beginning of that line. To move to a given -line in the most recently displayed other buffer, use @kbd{C-u M-g -M-g}. Line numbers in Emacs count from one at the beginning of the buffer. - - You can also see the current line number in the mode line; see @ref{Mode -Line}. If you narrow the buffer, then the line number in the mode line -is relative to the accessible portion (@pxref{Narrowing}). By contrast, -@code{what-line} shows both the line number relative to the narrowed -region and the line number relative to the whole buffer. + @kbd{M-x what-line} computes the current line number and displays it +in the echo area. You can also see the current line number in the +mode line; see @ref{Mode Line}. If you narrow the buffer, then the +line number in the mode line is relative to the accessible portion +(@pxref{Narrowing}). By contrast, @code{what-line} shows both the +line number relative to the narrowed region and the line number +relative to the whole buffer. @kbd{M-x what-page} counts pages from the beginning of the file, and counts lines within the page, showing both numbers in the echo area.
--- a/man/building.texi Sat May 14 01:56:59 2005 +0000 +++ b/man/building.texi Mon May 16 15:49:27 2005 +0000 @@ -223,6 +223,14 @@ buffer and finds no more error messages to visit, it fails and signals an Emacs error. +When the left fringe is displayed, an arrow points to the +current message in the compilation buffer. The variable +@code{compilation-context-lines} controls the number of lines of +leading context in the window before the current message. If it is +@code{nil} and the left fringe is displayed, the window doesn't +scroll. If there is no left fringe, no arrow is displayed and a value +of @code{nil} means display the message at the top of the window. + You don't have to be in the compilation buffer in order to use @code{next-error}. If one window on the selected frame can be the target of the @code{next-error} call, it is used. Else, if a buffer @@ -504,8 +512,8 @@ associated with an identifier when the program is not executing. This operates in the GUD buffer and in source buffers with major modes in the list @code{gud-tooltip-modes}. If the variable -@code{gud-tooltip-echo-area} is non-@code{nil} then the help text is -displayed in the echo area. +@code{gud-tooltip-echo-area} is non-@code{nil} then the variable's +value is displayed in the echo area. @node Commands of GUD @subsection Commands of GUD @@ -515,7 +523,7 @@ also provides commands for setting and clearing breakpoints, for selecting stack frames, and for stepping through the program. These commands are available both in the GUD buffer and globally, but with -different key bindings. It also has its own toolbar from which you +different key bindings. It also has its own tool bar from which you can invoke the more common commands by clicking on the appropriate icon. This is particularly useful for repetitive commands like gud-next and gud-step and allows the user to hide the GUD buffer. @@ -742,7 +750,7 @@ (@code{gdb-mouse-set-clear-breakpoint}). Where Emacs uses the margin to display breakpoints, it is also possible to enable or disable them when you click @kbd{Mouse-3} there -(@code{gdb-mouse-toggle--breakpoint}). +(@code{gdb-mouse-toggle-breakpoint}). @vindex gud-gdb-command-name @findex gdba @@ -869,7 +877,7 @@ If you want to see how a variable changes each time your program stops then place the cursor over the variable name and click on the watch -icon in the toolbar (@code{gud-watch}). +icon in the tool bar (@code{gud-watch}). Each watch expression is displayed in the speedbar. Complex data types, such as arrays, structures and unions are represented in a tree
--- a/man/calc.texi Sat May 14 01:56:59 2005 +0000 +++ b/man/calc.texi Mon May 16 15:49:27 2005 +0000 @@ -22660,11 +22660,10 @@ The formula @expr{x^0} is simplified to @expr{1}, or to @samp{idn(1)} in Matrix mode. The formula @expr{0^x} is simplified to @expr{0} -unless @expr{x} is a negative number or complex number, in which -case the result is an infinity or an unsimplified formula according -to the current infinite mode. Note that @expr{0^0} is an -indeterminate form, as evidenced by the fact that the simplifications -for @expr{x^0} and @expr{0^x} conflict when @expr{x=0}. +unless @expr{x} is a negative number, complex number or zero. +If @expr{x} is negative, complex or @expr{0.0}, @expr{0^x} is an +infinity or an unsimplified formula according to the current infinite +mode. The expression @expr{0^0} is simplified to @expr{1}. Powers of products or quotients @expr{(a b)^c}, @expr{(a/b)^c} are distributed to @expr{a^c b^c}, @expr{a^c / b^c} only if @expr{c} @@ -22766,7 +22765,7 @@ stored a different value in the Calc variable @samp{e}; but this would be a bad idea in any case if you were also using natural logarithms! -Among the logical functions, @tfn{(@var{a} <= @var{b})} changes to +Among the logical functions, @tfn{!(@var{a} <= @var{b})} changes to @tfn{@var{a} > @var{b}} and so on. Equations and inequalities where both sides are either negative-looking or zero are simplified by negating both sides and reversing the inequality. While it might seem reasonable to simplify @@ -28299,6 +28298,15 @@ The @kbd{s u} (@code{calc-unstore}) command returns a variable to the void state. +@kindex s c +@pindex calc-copy-variable +The @kbd{s c} (@code{calc-copy-variable}) command copies the stored +value of one variable to another. One way it differs from a simple +@kbd{s r} followed by an @kbd{s t} (aside from saving keystrokes) is +that the value never goes on the stack and thus is never rounded, +evaluated, or simplified in any way; it is not even rounded down to the +current precision. + The only variables with predefined values are the ``special constants'' @code{pi}, @code{e}, @code{i}, @code{phi}, and @code{gamma}. You are free to unstore these variables or to store new values into them if you like, @@ -28308,25 +28316,26 @@ special variables @code{inf}, @code{uinf}, and @code{nan} (which are normally void). -Note that @code{pi} doesn't actually have 3.14159265359 stored -in it, but rather a special magic value that evaluates to @cpi{} -at the current precision. Likewise @code{e}, @code{i}, and -@code{phi} evaluate according to the current precision or polar mode. -If you recall a value from @code{pi} and store it back, this magic -property will be lost. - -@kindex s c -@pindex calc-copy-variable -The @kbd{s c} (@code{calc-copy-variable}) command copies the stored -value of one variable to another. It differs from a simple @kbd{s r} -followed by an @kbd{s t} in two important ways. First, the value never -goes on the stack and thus is never rounded, evaluated, or simplified -in any way; it is not even rounded down to the current precision. -Second, the ``magic'' contents of a variable like @code{e} can -be copied into another variable with this command, perhaps because -you need to unstore @code{e} right now but you wish to put it -back when you're done. The @kbd{s c} command is the only way to -manipulate these magic values intact. +Note that @code{pi} doesn't actually have 3.14159265359 stored in it, +but rather a special magic value that evaluates to @cpi{} at the current +precision. Likewise @code{e}, @code{i}, and @code{phi} evaluate +according to the current precision or polar mode. If you recall a value +from @code{pi} and store it back, this magic property will be lost. The +magic property is preserved, however, when a variable is copied with +@kbd{s c}. + +@kindex s k +@pindex calc-copy-special-constant +If one of the ``special constants'' is redefined (or undefined) so that +it no longer has its magic property, the property can be restored with +@kbd{s k} (@code{calc-copy-special-constant}). This command will prompt +for a special constant and a variable to store it in, and so a special +constant can be stored in any variable. Here, the special constant that +you enter doesn't depend on the value of the corresponding variable; +@code{pi} will represent 3.14159@dots{} regardless of what is currently +stored in the Calc variable @code{pi}. If one of the other special +variables, @code{inf}, @code{uinf} or @code{nan}, is given a value, its +original behavior can be restored by voiding it with @kbd{s u}. @node Recalling Variables, Operations on Variables, Storing Variables, Store and Recall @section Recalling Variables @@ -35616,6 +35625,7 @@ @r{ @: s d @:var, decl @: @:calc-declare-variable@:} @r{ @: s e @:var, editing @: 29,30 @:calc-edit-variable@:} @r{ @: s i @:buffer @: @:calc-insert-variables@:} +@r{ @: s k @:const, var @: 29 @:calc-copy-special-constant@:} @r{ a b@: s l @:var @: 29 @:@:a (letting var=b)} @r{ a ...@: s m @:op, var @: 22,29 @:calc-store-map@:} @r{ @: s n @:var @: 29,47 @:calc-store-neg@: (v/-1)}
--- a/man/ediff.texi Sat May 14 01:56:59 2005 +0000 +++ b/man/ediff.texi Mon May 16 15:49:27 2005 +0000 @@ -155,6 +155,12 @@ @findex ediff Compare two files. +@item ediff-backup +@findex ediff-backup +Compare a file with its backup. If there are several numerical backups, use +the latest. If the file is itself a backup, then compare it with its +original. + @item ediff-buffers @findex ediff-buffers Compare two buffers.
--- a/man/frames.texi Sat May 14 01:56:59 2005 +0000 +++ b/man/frames.texi Mon May 16 15:49:27 2005 +0000 @@ -979,7 +979,7 @@ @dfn{Help tooltips} typically display over text---including the mode line---but may be also available for many other parts of the Emacs -frame such as the toolbar and menu items. +frame such as the tool bar and menu items. @findex tooltip-mode You can toggle help tooltips (Tooltip mode) with the command
--- a/man/killing.texi Sat May 14 01:56:59 2005 +0000 +++ b/man/killing.texi Mon May 16 15:49:27 2005 +0000 @@ -157,7 +157,7 @@ @kbd{C-x C-o} (@code{delete-blank-lines}) deletes all blank lines after the current line. If the current line is blank, it deletes all blank lines preceding the current line as well (leaving one blank line, -the current line). +the current line). On a solitary blank line, it deletes that line. @kbd{M-^} (@code{delete-indentation}) joins the current line and the previous line, by deleting a newline and all surrounding spaces, usually
--- a/man/major.texi Sat May 14 01:56:59 2005 +0000 +++ b/man/major.texi Mon May 16 15:49:27 2005 +0000 @@ -176,7 +176,8 @@ mode Emacs would choose automatically: use the command @kbd{M-x normal-mode} to do this. This is the same function that @code{find-file} calls to choose the major mode. It also processes -the file's local variables list (if any). +the file's @samp{-*-} line or local variables list (if any). +@xref{File Variables}. @vindex change-major-mode-with-file-name The commands @kbd{C-x C-w} and @code{set-visited-file-name} change to
--- a/man/mini.texi Sat May 14 01:56:59 2005 +0000 +++ b/man/mini.texi Mon May 16 15:49:27 2005 +0000 @@ -260,7 +260,14 @@ (@code{minibuffer-complete-word}). @item @key{RET} Submit the text in the minibuffer as the argument, possibly completing -first as described below (@code{minibuffer-complete-and-exit}). +first as described +@iftex +in the next subsection (@code{minibuffer-complete-and-exit}). +@end iftex +@ifnottex +in the next node (@code{minibuffer-complete-and-exit}). @xref{Strict +Completion}. +@end ifnottex @item ? Display a list of all possible completions of the text in the minibuffer (@code{minibuffer-list-completions}). @@ -410,7 +417,7 @@ @vindex PC-include-file-path @vindex PC-disable-includes Another feature of Partial Completion mode is to extend -@code{find-file} so that the @samp{<@var{include}>} stands for the +@code{find-file} so that @samp{<@var{include}>} stands for the file named @var{include} in some directory in the path @code{PC-include-file-path}. If you set @code{PC-disable-includes} to non-@code{nil}, this feature is disabled.
--- a/man/trampver.texi Sat May 14 01:56:59 2005 +0000 +++ b/man/trampver.texi Mon May 16 15:49:27 2005 +0000 @@ -4,7 +4,7 @@ @c In the Tramp CVS, the version number is auto-frobbed from @c configure.ac, so you should edit that file and run @c "autoconf && ./configure" to change the version number. -@set trampver 2.0.48 +@set trampver 2.0.49 @c Other flags from configuration @set prefix /usr/local
--- a/src/ChangeLog Sat May 14 01:56:59 2005 +0000 +++ b/src/ChangeLog Mon May 16 15:49:27 2005 +0000 @@ -1,3 +1,25 @@ +2005-05-14 Richard M. Stallman <rms@gnu.org> + + * xdisp.c (message3): Call cancel_echoing. + + * alloc.c (Fmemory_full_p): New function. + (syms_of_alloc): defsubr it. + + * process.c (send_process_trap): Unblock SIGPIPE. + (send_process): Reset SIGPIPE handler before reporting error. + +2005-05-14 Nick Roberts <nickrob@snap.net.nz> + + * emacs.c (syms_of_emacs): Fix doc string for system-type. + +2005-05-13 Richard M. Stallman <rms@gnu.org> + + * fileio.c (Ffind_file_name_handler): Handle lambda-exp as handler. + (Finsert_file_contents): If we read 0 bytes from a special file, + unlock the visited file if we locked it. + (Fmake_symbolic_link, Frecent_auto_save_p): Doc fixes. + (Ffile_exists_p, Ffile_symlink_p): Doc fixes. + 2005-05-13 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * emacs.c (main) [MAC_OS8]: Call init_atimer before mac_term_init.
--- a/src/alloc.c Sat May 14 01:56:59 2005 +0000 +++ b/src/alloc.c Mon May 16 15:49:27 2005 +0000 @@ -535,6 +535,12 @@ Fsignal (Qnil, Vmemory_signal_data); } +DEFUN ("memory-full-p", Fmemory_full_p, Smemory_full_p, 0, 0, 0, + doc: /* t if memory is nearly full, nil otherwise. */) + () +{ + return (spare_memory ? Qnil : Qt); +} /* Called if we can't allocate relocatable space for a buffer. */ @@ -6080,6 +6086,7 @@ DEFVAR_INT ("gcs-done", &gcs_done, doc: /* Accumulated number of garbage collections done. */); + defsubr (&Smemory_full_p); defsubr (&Scons); defsubr (&Slist); defsubr (&Svector);
--- a/src/emacs.c Sat May 14 01:56:59 2005 +0000 +++ b/src/emacs.c Mon May 16 15:49:27 2005 +0000 @@ -2441,16 +2441,16 @@ Many arguments are deleted from the list as they are processed. */); DEFVAR_LISP ("system-type", &Vsystem_type, -+ doc: /* Value is symbol indicating type of operating system you are using. -+Special values: -+ `gnu/linux' compiled for a GNU/Linux system. -+ `darwin' compiled for Darwin (GNU-Darwin, Mac OS X, ...). -+ `macos' compiled for Mac OS 9. -+ `ms-dos' compiled as an MS-DOS application. -+ `windows-nt' compiled as a native W32 application. -+ `cygwin' compiled using the Cygwin library. -+ `vax-vms' or `axp-vms': compiled for a (Open)VMS system. -+Anything else indicates some sort of Unix system. */); + doc: /* Value is symbol indicating type of operating system you are using. +Special values: + `gnu/linux' compiled for a GNU/Linux system. + `darwin' compiled for Darwin (GNU-Darwin, Mac OS X, ...). + `macos' compiled for Mac OS 9. + `ms-dos' compiled as an MS-DOS application. + `windows-nt' compiled as a native W32 application. + `cygwin' compiled using the Cygwin library. + `vax-vms' or `axp-vms': compiled for a (Open)VMS system. +Anything else indicates some sort of Unix system. */); Vsystem_type = intern (SYSTEM_TYPE); DEFVAR_LISP ("system-configuration", &Vsystem_configuration,
--- a/src/fileio.c Sat May 14 01:56:59 2005 +0000 +++ b/src/fileio.c Mon May 16 15:49:27 2005 +0000 @@ -375,7 +375,10 @@ Lisp_Object string = XCAR (elt); int match_pos; Lisp_Object handler = XCDR (elt); - Lisp_Object operations = Fget (handler, Qoperations); + Lisp_Object operations = Qnil; + + if (SYMBOLP (handler)) + operations = Fget (handler, Qoperations); if (STRINGP (string) && (match_pos = fast_string_match (string, filename)) > pos @@ -2864,7 +2867,8 @@ #ifdef S_IFLNK DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", - doc: /* Make a symbolic link to FILENAME, named LINKNAME. Both args must be strings. + doc: /* Make a symbolic link to FILENAME, named LINKNAME. +Both args must be strings. Signals a `file-already-exists' error if a file LINKNAME already exists unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. A number as third arg means request confirmation if LINKNAME already exists. @@ -3062,8 +3066,10 @@ } DEFUN ("file-exists-p", Ffile_exists_p, Sfile_exists_p, 1, 1, 0, - doc: /* Return t if file FILENAME exists. (This does not mean you can read it.) -See also `file-readable-p' and `file-attributes'. */) + doc: /* Return t if file FILENAME exists (whether or not you can read it.) +See also `file-readable-p' and `file-attributes'. +This returns nil for a symlink to a nonexistent file. +Use `file-symlink-p' to test for such links. */) (filename) Lisp_Object filename; { @@ -3240,7 +3246,10 @@ DEFUN ("file-symlink-p", Ffile_symlink_p, Sfile_symlink_p, 1, 1, 0, doc: /* Return non-nil if file FILENAME is the name of a symbolic link. The value is the link target, as a string. -Otherwise returns nil. */) +Otherwise it returns nil. + +This function returns t when given the name of a symlink that +points to a nonexistent file. */) (filename) Lisp_Object filename; { @@ -3730,6 +3739,8 @@ int set_coding_system = 0; int coding_system_decided = 0; int read_quit = 0; + int old_Vdeactivate_mark = Vdeactivate_mark; + int we_locked_file = 0; if (current_buffer->base_buffer && ! NILP (visit)) error ("Cannot do file visiting in an indirect buffer"); @@ -4402,8 +4413,17 @@ /* For a special file, all we can do is guess. */ total = READ_BUF_SIZE; - if (NILP (visit) && total > 0) - prepare_to_modify_buffer (PT, PT, NULL); + if (NILP (visit) && inserted > 0) + { +#ifdef CLASH_DETECTION + if (!NILP (current_buffer->file_truename) + /* Make binding buffer-file-name to nil effective. */ + && !NILP (current_buffer->filename) + && SAVE_MODIFF >= MODIFF) + we_locked_file = 1; +#endif /* CLASH_DETECTION */ + prepare_to_modify_buffer (GPT, GPT, NULL); + } move_gap (PT); if (GAP_SIZE < total) @@ -4493,6 +4513,18 @@ } } + /* Now we have read all the file data into the gap. + If it was empty, undo marking the buffer modified. */ + + if (inserted == 0) + { +#ifdef CLASH_DETECTION + if (we_locked_file) + unlock_file (current_buffer->file_truename); +#endif + Vdeactivate_mark = old_Vdeactivate_mark; + } + /* Make the text read part of the buffer. */ GAP_SIZE -= inserted; GPT += inserted; @@ -6038,7 +6070,10 @@ DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p, 0, 0, 0, - doc: /* Return t if current buffer has been auto-saved since last read in or saved. */) + doc: /* Return t if current buffer has been auto-saved recently. +More precisely, if it has been auto-saved since last read from or saved +in the visited file. If the buffer has no visited file, +then any auto-save counts as "recent". */) () { return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil;
--- a/src/process.c Sat May 14 01:56:59 2005 +0000 +++ b/src/process.c Mon May 16 15:49:27 2005 +0000 @@ -5108,6 +5108,7 @@ sigrelse (SIGPIPE); sigrelse (SIGALRM); #endif /* BSD4_1 */ + sigunblock (sigmask (SIGPIPE)); longjmp (send_process_frame, 1); } @@ -5299,7 +5300,11 @@ 0, datagram_address[outfd].sa, datagram_address[outfd].len); if (rv < 0 && errno == EMSGSIZE) - report_file_error ("sending datagram", Fcons (proc, Qnil)); + { + signal (SIGPIPE, old_sigpipe); + report_file_error ("sending datagram", + Fcons (proc, Qnil)); + } } else #endif
--- a/src/xdisp.c Sat May 14 01:56:59 2005 +0000 +++ b/src/xdisp.c Mon May 16 15:49:27 2005 +0000 @@ -6909,7 +6909,9 @@ /* Display an echo area message M with a specified length of NBYTES bytes. The string may include null characters. If M is not a string, clear out any existing message, and let the mini-buffer - text show through. */ + text show through. + + This function cancels echoing. */ void message3 (m, nbytes, multibyte) @@ -6921,6 +6923,7 @@ GCPRO1 (m); clear_message (1,1); + cancel_echoing (); /* First flush out any partial line written with print. */ message_log_maybe_newline (); @@ -6932,7 +6935,10 @@ } -/* The non-logging version of message3. */ +/* The non-logging version of message3. + This does not cancel echoing, because it is used for echoing. + Perhaps we need to make a separate function for echoing + and make this cancel echoing. */ void message3_nolog (m, nbytes, multibyte)