# HG changeset patch # User Karoly Lorentey # Date 1115413591 0 # Node ID b151ec53c504ffefbe774573f86f63a5cbf2ad32 # Parent 6deb860255f3b646814a54321356e8f0afb1eb4c# Parent d1245d21896435c850112403d7a9a39551522b44 Merged from miles@gnu.org--gnu-2005 (patch 68, 286-291) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-286 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-287 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-288 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-289 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-290 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-291 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-68 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-341 diff -r 6deb860255f3 -r b151ec53c504 admin/FOR-RELEASE --- a/admin/FOR-RELEASE Tue May 03 03:01:09 2005 +0000 +++ b/admin/FOR-RELEASE Fri May 06 21:06:31 2005 +0000 @@ -7,8 +7,6 @@ * NEW FEATURES -** Face remapping. - ** Make VC-over-Tramp work where possible, or at least fail gracefully if something isn't supported over Tramp. To be done by Andre Spiegel . @@ -33,10 +31,6 @@ invalid pointer from string_free_list. -* LOSSAGE - -** Clean up flymake.el to follow Emacs Lisp conventions. - * BUGS ** Ange-ftp should ignore irrelevant IPv6 errors: @@ -92,9 +86,10 @@ *** Update man/info.texi. -*** Update man/ack.texi. +** Add missing years in copyright notices of all files. -** Add missing years in copyright notices of all files. +Please record your name here and say which part of the distribution +you're going to handle. ** Update AUTHORS. @@ -235,7 +230,7 @@ etc/TUTORIAL.ja Kenichi Handa etc/TUTORIAL.ko etc/TUTORIAL.nl Lute Kamstra -etc/TUTORIAL.pl +etc/TUTORIAL.pl Slawomir Nowaczyk etc/TUTORIAL.pt_BR Marcelo Toledo etc/TUTORIAL.ro etc/TUTORIAL.ru Alex Ott diff -r 6deb860255f3 -r b151ec53c504 etc/ChangeLog --- a/etc/ChangeLog Tue May 03 03:01:09 2005 +0000 +++ b/etc/ChangeLog Fri May 06 21:06:31 2005 +0000 @@ -1,3 +1,16 @@ +2005-05-05 Marcelo Toledo (tiny change) + + * TUTORIAL.pl: Updated header. Patch by Slawomir Nowaczyk + . + +2005-05-02 Richard M. Stallman + + * NEWS: More rearrangements. + +2005-05-02 Chong Yidong + + * NEWS: Items rearranged in logical order. + 2005-05-01 Lars Hansen * NEWS: Correct key binding for dired-mark-omitted. diff -r 6deb860255f3 -r b151ec53c504 etc/NEWS --- a/etc/NEWS Tue May 03 03:01:09 2005 +0000 +++ b/etc/NEWS Fri May 06 21:06:31 2005 +0000 @@ -18,17 +18,12 @@ * Installation Changes in Emacs 22.1 --- -** Emacs includes now support for loading image libraries on demand. -(Currently this feature is only used on MS Windows.) You can configure -the supported image types and their associated dynamic libraries by -setting the variable `image-library-alist'. - ---- -** New translations of the Emacs Tutorial are available in the following - languages: Brasilian, Bulgarian, Chinese (both with simplified and - traditional characters), French, and Italian. Type `C-u C-h t' to - choose one of them in case your language setup doesn't automatically - select the right one. +** Emacs now supports new configure options `--program-prefix', +`--program-suffix' and `--program-transform-name' that affect the names of +installed programs. + +--- +** Emacs can now be built without sound support. --- ** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk' @@ -36,17 +31,9 @@ provides a way to display multilingual text in menus (with some caveats). --- -** Emacs can now be built without sound support. - ---- ** The `emacsserver' program has been removed, replaced with elisp code. --- -** Emacs now supports new configure options `--program-prefix', -`--program-suffix' and `--program-transform-name' that affect the names of -installed programs. - ---- ** By default, Emacs now uses a setgid helper program to update game scores. The directory ${localstatedir}/games/emacs is the normal place for game scores to be stored. This may be controlled by the @@ -63,7 +50,7 @@ +++ ** The Emacs Lisp Reference Manual is now part of the distribution. -The ELisp reference manual in Info format is built as part of the +The Emacs Lisp Reference Manual in Info format is built as part of the Emacs build procedure and installed together with the Emacs User Manual. A menu item was added to the menu bar that makes it easy accessible (Help->More Manuals->Emacs Lisp Reference). @@ -78,6 +65,22 @@ (Help->More Manuals->Introduction to Emacs Lisp). --- +** New translations of the Emacs Tutorial are available in the +following languages: Brasilian Portuguese, Bulgarian, Chinese (both +with simplified and traditional characters), French, and Italian. +Type `C-u C-h t' to choose one of them in case your language setup +doesn't automatically select the right one. + +--- +** A French translation of the `Emacs Survival Guide' is available. + +--- +** Emacs now includes support for loading image libraries on demand. +(Currently this feature is only used on MS Windows.) You can configure +the supported image types and their associated dynamic libraries by +setting the variable `image-library-alist'. + +--- ** Support for Cygwin was added. --- @@ -99,135 +102,615 @@ the files mac/README and mac/INSTALL for build instructions. --- -** A French translation of the `Emacs Survival Guide' is available. - ---- ** Building with -DENABLE_CHECKING does not automatically build with union types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. + +* Startup Changes in Emacs 22.1 + +** New command line option -Q or --quick. +This is like using -q --no-site-file, but in addition it also disables +the fancy startup screen. + ++++ +** New command line option -D or --basic-display. +Disables the menu-bar, the tool-bar, the scroll-bars, tool tips, and +the blinking cursor. + ++++ +** New command line option -nbc or --no-blinking-cursor disables +the blinking cursor on graphical terminals. + ++++ +** The command line option --no-windows has been changed to +--no-window-system. The old one still works, but is deprecated. + ++++ +** The -f option, used from the command line to call a function, +now reads arguments for the function interactively if it is +an interactively callable function. + ++++ +** Emacs can now be invoked in full-screen mode on a windowed display. +When Emacs is invoked on a window system, the new command-line options +`--fullwidth', `--fullheight', and `--fullscreen' produce a frame +whose width, height, or both width and height take up the entire +screen size. (For now, this does not work with some window managers.) + ++++ +** Emacs now displays a splash screen by default even if command-line +arguments were given. The new command-line option --no-splash +disables the splash screen; see also the variable +`inhibit-startup-message' (which is also aliased as +`inhibit-splash-screen'). + ++++ +** New user option `inhibit-startup-buffer-menu'. +When loading many files, for instance with `emacs *', Emacs normally +displays a buffer menu. This option turns the buffer menu off. + ++++ +** Init file changes +You can now put the init files .emacs and .emacs_SHELL under +~/.emacs.d or directly under ~. Emacs will find them in either place. + ++++ +** Emacs now reads the standard abbrevs file ~/.abbrev_defs +automatically at startup, if it exists. When Emacs offers to save +modified buffers, it saves the abbrevs too if they have changed. It +can do this either silently or asking for confirmation first, +according to the value of `save-abbrevs'. -* Changes in Emacs 22.1 - -+++ -** In graphical mode, with a C program, GUD Tooltips have been extended to -display the #define directive associated with an identifier when program is -not executing. - -+++ -** `comint-use-prompt-regexp-instead-of-fields' has been renamed -`comint-use-prompt-regexp'. The old name has been kept as an alias, -but declared obsolete. - -** Improved key bindings support when running in an xterm. -When emacs is running in an xterm more key bindings are available. The -following should work: -{C,S,C-S,A}-{right,left,up,down,prior,next,delete,insert,F1-12}. -These key bindings work on xterm from X.org 6.8, they might not work on -some older versions of xterm, or on some proprietary versions. - -** Improved Thai support. A new minor mode `thai-word-mode' (which is -automatically activated if you select Thai as a language -environment) changes key bindings of most word-oriented commands to -versions which recognize Thai words. Affected commands are - M-f (forward-word) - M-b (backward-word) - M-d (kill-word) - M-DEL (backward-kill-word) - M-t (transpose-words) - M-q (fill-paragraph) - -+++ -** Auto Compression mode is now enabled by default. - -** C-x C-f RET, typing nothing in the minibuffer, is no longer a special case. - -Since the default input is the current directory, this has the effect -of specifying the current directory. Normally that means to visit the -directory with Dired. - ---- -** fast-lock.el and lazy-lock.el are obsolete. Use jit-lock.el instead. - ---- -** The default settings for JIT stealth lock parameters are changed. -The default value for the user option jit-lock-stealth-time is now 16 -instead of 3, and the default value of jit-lock-stealth-nice is now -0.5 instead of 0.125. The new defaults should lower the CPU usage -when Emacs is fontifying in the background. - ---- -** iso-acc.el is now obsolete. Use one of the latin input methods instead. - ---- -** Language environment and various default coding systems are setup -more correctly according to the current locale name. If the locale -name doesn't specify a charset, the default is what glibc defines. -This change may result in using the different coding systems as -default in some locale (e.g. vi_VN). - -+++ -** The commands copy-file, rename-file, make-symbolic-link and -add-name-to-file, when given a directory as the "new name" argument, -convert it to a file name by merging in the within-directory part of -the existing file's name. (This is the same convention that shell -commands cp, mv, and ln follow.) Thus, M-x copy-file RET ~/foo RET -/tmp RET copies ~/foo to /tmp/foo. +* Editing Changes in Emacs 22.1 + ++++ +** The mode line position information now comes before the major mode. +When the file is maintained under version control, that information +appears between the position information and the major mode. + ++++ +** M-g is now a prefix key. +M-g g and M-g M-g run goto-line. +M-g n and M-g M-n run next-error (like C-x `). +M-g p and M-g M-p run previous-error. +++ ** M-o now is the prefix key for setting text properties; M-o M-o requests refontification. +++ -** M-g is now a prefix key. - -M-g g and M-g M-g run goto-line. -M-g n and M-g M-n run next-error (like C-x `). -M-g p and M-g M-p run previous-error. - -+++ -** font-lock-lines-before specifies a number of lines before the -current line that should be refontified when you change the buffer. -The default value is 1. - -+++ ** C-u M-x goto-line now switches to the most recent previous buffer, and goes to the specified line in that buffer. When goto-line starts to execute, if there's a number in the buffer at point then it acts as the default argument for the minibuffer. ---- -** Emacs now responds to mouse-clicks on the mode-line, header-line and -display margin, when run in an xterm. ++++ +** You can now switch buffers in a cyclic order with C-x C-left and +(prev-buffer) and C-x C-right (next-buffer). C-x left and C-x right +can be used as well. + ++++ +** The old bindings C-M-delete and C-M-backspace have been deleted, +since there are situations where one or the other will shut down +the operating system or your X server. + ++++ +** `undo-only' does an undo which does not redo any previous undo. + ++++ +** When the undo information of the current command gets really large +(beyond the value of `undo-outer-limit'), Emacs discards it and warns +you about it. +++ ** M-SPC (just-one-space) when given a numeric argument N converts whitespace around point to N spaces. +++ -** Control characters and escape glyphs are now shown in the new +** line-move-ignore-invisible now defaults to t. + +--- +** New commands to operate on pairs of open and close characters: +`insert-pair', `delete-pair', `raise-sexp'. + +--- +** New command `kill-whole-line' kills an entire line at once. +By default, it is bound to C-S-. + ++++ +** Yanking text now discards certain text properties that can +be inconvenient when you did not expect them. The variable +`yank-excluded-properties' specifies which ones. Insertion +of register contents and rectangles also discards these properties. + ++++ +** The default values of paragraph-start and indent-line-function have +been changed to reflect those used in Text mode rather than those used +in Indented-Text mode. + ++++ +** Movement commands `beginning-of-buffer', `end-of-buffer', +`beginning-of-defun', `end-of-defun' do not set the mark if the mark +is already active in Transient Mark mode. + +** Mark Changes: + ++++ +*** A prefix argument is no longer required to repeat a jump to a +previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the +mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump. + ++++ +*** Marking commands extend the region when invoked multiple times. If +you hit M-C-SPC (mark-sexp), M-@ (mark-word), M-h (mark-paragraph), or +C-M-h (mark-defun) repeatedly, the marked region extends each time, so +you can mark the next two sexps with M-C-SPC M-C-SPC, for example. +This feature also works for mark-end-of-sentence, if you bind that to +a key. It also extends the region when the mark is active in Transient +Mark mode, regardless of the last command. To start a new region with +one of marking commands in Transient Mark mode, you can deactivate the +active region with C-g, or set the new mark with C-SPC. + ++++ +*** M-h (mark-paragraph) now accepts a prefix arg. +With positive arg, M-h marks the current and the following paragraphs; +if the arg is negative, it marks the current and the preceding +paragraphs. + ++++ +*** Some commands do something special in Transient Mark mode when the +mark is active--for instance, they limit their operation to the +region. Even if you don't normally use Transient Mark mode, you might +want to get this behavior from a particular command. There are two +ways you can enable Transient Mark mode and activate the mark, for one +command only. + +One method is to type C-SPC C-SPC; this enables Transient Mark mode +and sets the mark at point. The other method is to type C-u C-x C-x. +This enables Transient Mark mode temporarily but does not alter the +mark or the region. + +After these commands, Transient Mark mode remains enabled until you +deactivate the mark. That typically happens when you type a command +that alters the buffer, but you can also deactivate the mark by typing +C-g. + +** Help command changes: + ++++ +*** Changes in C-h bindings: + +C-h e displays the *Messages* buffer. + +C-h followed by a control character is used for displaying files + that do not change: + +C-h C-f displays the FAQ. +C-h C-e displays the PROBLEMS file. + +The info-search bindings on C-h C-f, C-h C-k and C-h C-i +have been moved to C-h F, C-h K and C-h S. + +C-h c, C-h k, C-h w, and C-h f now handle remapped interactive commands. + +- C-h c and C-h k report the actual command (after possible remapping) + run by the key sequence. + +- C-h w and C-h f on a command which has been remapped now report the + command it is remapped to, and the keys which can be used to run + that command. + +For example, if C-k is bound to kill-line, and kill-line is remapped +to new-kill-line, these commands now report: + +- C-h c and C-h k C-k reports: + C-k runs the command new-kill-line + +- C-h w and C-h f kill-line reports: + kill-line is remapped to new-kill-line which is on C-k, + +- C-h w and C-h f new-kill-line reports: + new-kill-line is on C-k + +--- +*** Help commands `describe-function' and `describe-key' now show function +arguments in lowercase italics on displays that support it. To change the +default, customize face `help-argument-name' or redefine the function +`help-default-arg-highlight'. + ++++ +*** C-h v and C-h f commands now include a hyperlink to the C source for +variables and functions defined in C (if the C source is available). + ++++ +*** Help mode now only makes hyperlinks for faces when the face name is +preceded or followed by the word `face'. It no longer makes +hyperlinks for variables without variable documentation, unless +preceded by one of the words `variable' or `option'. It now makes +hyperlinks to Info anchors (or nodes) if the anchor (or node) name is +enclosed in single quotes and preceded by `info anchor' or `Info +anchor' (in addition to earlier `info node' and `Info node'). + ++++ +*** The new command `describe-char' (C-u C-x =) pops up a buffer with +description various information about a character, including its +encodings and syntax, its text properties, how to input, overlays, and +widgets at point. You can get more information about some of them, by +clicking on mouse-sensitive areas or moving there and pressing RET. + ++++ +*** New command `display-local-help' displays any local help at point +in the echo area. It is bound to `C-h .'. It normally displays the +same string that would be displayed on mouse-over using the +`help-echo' property, but, in certain cases, it can display a more +keyboard oriented alternative. + ++++ +*** New user option `help-at-pt-display-when-idle' allows to +automatically show the help provided by `display-local-help' on +point-over, after suitable idle time. The amount of idle time is +determined by the user option `help-at-pt-timer-delay' and defaults +to one second. This feature is turned off by default. + +** Buffer Menu changes + ++++ +*** New command `Buffer-menu-toggle-files-only' toggles display of file +buffers only in the Buffer Menu. It is bound to `T' in Buffer Menu +mode. + ++++ +*** `buffer-menu' and `list-buffers' now list buffers whose names begin +with a space, when those buffers are visiting files. Normally buffers +whose names begin with space are omitted. + +--- +*** The new options `buffers-menu-show-directories' and +`buffers-menu-show-status' let you control how buffers are displayed +in the menu dropped down when you click "Buffers" from the menu bar. + +`buffers-menu-show-directories' controls whether the menu displays +leading directories as part of the file name visited by the buffer. +If its value is `unless-uniquify', the default, directories are +shown unless uniquify-buffer-name-style' is non-nil. The value of nil +and t turn the display of directories off and on, respectively. + +`buffers-menu-show-status' controls whether the Buffers menu includes +the modified and read-only status of the buffers. By default it is +t, and the status is shown. + +Setting these variables directly does not take effect until next time +the Buffers menu is regenerated. + +** File Operation Changes: + ++++ +*** find-file-read-only visits multiple files in read-only mode, +when the file name contains wildcard characters. + ++++ +*** find-alternate-file replaces the current file with multiple files, +when the file name contains wildcard characters. + ++++ +*** Auto Compression mode is now enabled by default. + +--- +*** C-x C-f RET, typing nothing in the minibuffer, is no longer a special case. + +Since the default input is the current directory, this has the effect +of specifying the current directory. Normally that means to visit the +directory with Dired. + ++++ +*** When you are root, and you visit a file whose modes specify +read-only, the Emacs buffer is now read-only too. Type C-x C-q if you +want to make the buffer writable. (As root, you can in fact alter the +file.) + ++++ +*** C-x s (save-some-buffers) now offers an option `d' to diff a buffer +against its file, so you can see what changes you would be saving. + ++++ +*** The commands copy-file, rename-file, make-symbolic-link and +add-name-to-file, when given a directory as the "new name" argument, +convert it to a file name by merging in the within-directory part of +the existing file's name. (This is the same convention that shell +commands cp, mv, and ln follow.) Thus, M-x copy-file RET ~/foo RET +/tmp RET copies ~/foo to /tmp/foo. + +--- +*** When used interactively, `format-write-file' now asks for confirmation +before overwriting an existing file, unless a prefix argument is +supplied. This behavior is analogous to `write-file'. + +--- +*** The variable `auto-save-file-name-transforms' now has a third element that +controls whether or not the function `make-auto-save-file-name' will +attempt to construct a unique auto-save name (e.g. for remote files). + ++++ +*** If the user visits a file larger than `large-file-warning-threshold', +Emacs prompts her for confirmation. + ++++ +*** require-final-newline now has two new possible values: + +`visit' means add a newline (as an undoable change) if it's needed +when visiting the file. + +`visit-save' means add a newline (as an undoable change) if it's +needed when visiting the file, and also add a newline if it's needed +when saving the file. + ++++ +*** The new option mode-require-final-newline controls how certain +major modes enable require-final-newline. Any major mode that's +designed for a kind of file that should normally end in a newline +sets require-final-newline based on mode-require-final-newline. +So you can customize mode-require-final-newline to control what these +modes do. + ++++ +** The max size of buffers and integers has been doubled. +On 32bit machines, it is now 256M (i.e. 268435455). + +** Minibuffer changes: + ++++ +*** There's a new face `minibuffer-prompt'. +Emacs adds this face to the list of text properties stored in the +variable `minibuffer-prompt-properties', which is used to display the +prompt string. + +--- +*** Enhanced visual feedback in *Completions* buffer. + +Completions lists use faces to highlight what all completions +have in common and where they begin to differ. + +The common prefix shared by all possible completions uses the face +`completions-common-part', while the first character that isn't the +same uses the face `completions-first-difference'. By default, +`completions-common-part' inherits from `default', and +`completions-first-difference' inherits from `bold'. The idea of +`completions-common-part' is that you can use it to make the common +parts less visible than normal, so that the rest of the differing +parts is, by contrast, slightly highlighted. + ++++ +*** File-name completion can now ignore directories. +If an element of the list in `completion-ignored-extensions' ends in a +slash `/', it indicates a subdirectory that should be ignored when +completing file names. Elements of `completion-ignored-extensions' +which do not end in a slash are never considered when a completion +candidate is a directory. + ++++ +*** The completion commands TAB, SPC and ? in the minibuffer apply only +to the text before point. If there is text in the buffer after point, +it remains unchanged. + ++++ +*** New user option `history-delete-duplicates'. +If set to t when adding a new history element, all previous identical +elements are deleted. + +** Redisplay Changes + +*** 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. +++ -** Non-breaking space and hyphens are now prefixed with an escape +*** Non-breaking space and hyphens are now prefixed with an escape character, unless the new user variable `show-nonbreak-escape' is set to nil. ---- -** 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 -annoyed by the need for interaction when you kill Emacs. - ---- -** 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'. ++++ +*** The parameters of automatic hscrolling can now be customized. +The variable `hscroll-margin' determines how many columns away from +the window edge point is allowed to get before automatic hscrolling +will horizontally scroll the window. The default value is 5. + +The variable `hscroll-step' determines how many columns automatic +hscrolling scrolls the window when point gets too close to the +window edge. If its value is zero, the default, Emacs scrolls the +window so as to center point. If its value is an integer, it says how +many columns to scroll. If the value is a floating-point number, it +gives the fraction of the window's width to scroll the window. + +The variable `automatic-hscrolling' was renamed to +`auto-hscroll-mode'. The old name is still available as an alias. + +*** Moving or scrolling through images (and other lines) taller that +the window now works sensible, by automatically adjusting the window's +vscroll property. + ++++ +*** In graphical mode, with a C program, GUD Tooltips have been extended to +display the #define directive associated with an identifier when program is +not executing. + ++++ +*** The new face `mode-line-inactive' is used to display the mode line +of non-selected windows. The `mode-line' face is now used to display +the mode line of the currently selected window. + +The new variable `mode-line-in-non-selected-windows' controls whether +the `mode-line-inactive' face is used. + ++++ +*** You can now customize the use of window fringes. To control this +for all frames, use M-x fringe-mode or the Show/Hide submenu of the +top-level Options menu, or customize the `fringe-mode' variable. To +control this for a specific frame, use the command M-x +set-fringe-style. + ++++ +*** The buffer boundaries (i.e. first and last line in the buffer) may +now be marked with angle bitmaps in the fringes. In addition, up and +down arrow bitmaps may be shown at the top and bottom of the left or +right fringe if the window can be scrolled in either direction. + +This behavior is activated by setting the buffer-local variable +`indicate-buffer-boundaries' to a non-nil value. The default value of +this variable is found in `default-indicate-buffer-boundaries'. + +If value is `left' or `right', both angle and arrow bitmaps are +displayed in the left or right fringe, resp. + +Value may also be an alist which specifies the presense and position +of each bitmap individually. + +For example, ((top . left) (t . right)) places the top angle bitmap +in left fringe, the bottom angle bitmap in right fringe, and both +arrow bitmaps in right fringe. To show just the angle bitmaps in the +left fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). + ++++ +*** On window systems, lines which are exactly as wide as the window +(not counting the final newline character) are no longer broken into +two lines on the display (with just the newline on the second line). +Instead, the newline now "overflows" into the right fringe, and the +cursor will be displayed in the fringe when positioned on that newline. + +The new user option 'overflow-newline-into-fringe' may be set to nil to +revert to the old behavior of continuing such lines. + ++++ +*** When display margins are present in a window, the fringes are now +displayed between the margins and the buffer's text area, rather than +at the edges of the window. + ++++ +*** A window may now have individual fringe and scroll-bar settings, +in addition to the individual display margin settings. + +Such individual settings are now preserved when windows are split +horizontally or vertically, a saved window configuration is restored, +or when the frame is resized. + +** Cursor Display Changes + ++++ +*** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is +now controlled by the variable `blink-cursor-alist'. + ++++ +*** The X resource cursorBlink can be used to turn off cursor blinking. + ++++ +*** Emacs can produce an underscore-like (horizontal bar) cursor. +The underscore cursor is set by putting `(cursor-type . hbar)' in +default-frame-alist. It supports variable heights, like the `bar' +cursor does. + ++++ +*** Display of hollow cursors now obeys the buffer-local value (if any) +of `cursor-in-non-selected-windows' in the buffer that the cursor +appears in. + ++++ +*** The variable `cursor-in-non-selected-windows' can now be set to any +of the recognized cursor types. + ++++ +** font-lock-lines-before specifies a number of lines before the +current line that should be refontified when you change the buffer. +The default value is 1. + +--- +** JIT-lock changes + +*** The default settings for JIT stealth lock parameters are changed. +The default value for the user option jit-lock-stealth-time is now 16 +instead of 3, and the default value of jit-lock-stealth-nice is now +0.5 instead of 0.125. The new defaults should lower the CPU usage +when Emacs is fontifying in the background. + + +*** jit-lock can now be delayed with `jit-lock-defer-time'. + +If this variable is non-nil, its value should be the amount of Emacs +idle time in seconds to wait before starting fontification. For +example, if you set `jit-lock-defer-time' to 0.25, fontification will +only happen after 0.25s of idle time. + +*** contextual refontification is now separate from stealth fontification. + +jit-lock-defer-contextually is renamed jit-lock-contextually and +jit-lock-context-time determines the delay after which contextual +refontification takes place. + +** Menu Bar changes + +--- +*** A menu item "Show/Hide" was added to the top-level menu "Options". +This menu allows you to turn various display features on and off (such +as the fringes, the tool bar, the speedbar, and the menu bar itself). +You can also move the vertical scroll bar to either side here or turn +it off completely. There is also a menu-item to toggle displaying of +current date and time, current line and column number in the +mode-line. + +--- +*** Speedbar has moved from the "Tools" top level menu to "Show/Hide". + ++++ +** 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. + ++++ +** New display feature: focus follows the mouse from one Emacs window +to another, even within a frame. If you set the variable +mouse-autoselect-window to non-nil value, moving the mouse to a +different Emacs window will select that window (minibuffer window can +be selected only when it is active). The default is nil, so that this +feature is not enabled. + ++++ +** On X, when the window manager requires that you click on a frame to +select it (give it focus), the selected window and cursor position +normally changes according to the mouse click position. If you set +the variable x-mouse-click-focus-ignore-position to t, the selected +window and cursor position do not change when you click on a frame +to give it focus. + ++++ +** When you specify a frame size with --geometry, the size applies to +all frames you create. A position specified with --geometry only +affects the initial frame. + ++++ +** `special-display-buffer-names' and `special-display-regexps' now +understand two new boolean pseudo-frame-parameters `same-frame' and +`same-window'. + +--- +** New commands `scan-buf-next-region' and `scan-buf-previous-region' +move to the start of the next (previous, respectively) region with +non-nil help-echo property and display any help found there in the +echo area, using `display-local-help'. + ++++ +** In processing a local variables list, Emacs strips the prefix and +suffix are from every line before processing all the lines. + ++++ +** `apply-macro-to-region-lines' now operates on all lines that begin +in the region, rather than on all complete lines in the region. +++ ** You can now follow links by clicking Mouse-1 on the link. @@ -260,109 +743,328 @@ `mouse-1-click-follows-link' and `mouse-1-click-in-non-selected-windows'. +++ -** require-final-newline now has two new possible values: - -`visit' means add a newline (as an undoable change) if it's needed -when visiting the file. - -`visit-save' means add a newline (as an undoable change) if it's -needed when visiting the file, and also add a newline if it's needed -when saving the file. - -+++ -** The new option mode-require-final-newline controls how certain -major modes enable require-final-newline. Any major mode that's -designed for a kind of file that should normally end in a newline -sets require-final-newline based on mode-require-final-newline. -So you can customize mode-require-final-newline to control what these -modes do. - -+++ -** When the undo information of the current command gets really large -(beyond the value of `undo-outer-limit'), Emacs discards it and warns -you about it. - -+++ -** line-move-ignore-invisible now defaults to t. +** Emacs normally highlights mouse sensitive text whenever the mouse +is over the text. By setting the new variable `mouse-highlight', you +can optionally enable mouse highlighting only after you move the +mouse, so that highlighting disappears when you press a key. You can +also disable mouse highlighting. + ++++ +** You can now customize if selecting a region by dragging the mouse +shall not copy the selected text to the kill-ring by setting the new +variable mouse-drag-copy-region to nil. + +--- +** mouse-wheels can now scroll a specific fraction of the window +(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 +mouse-wheel-inhibit-click-time variables. + ++++ +** Under X, mouse-wheel-mode is turned on by default. + ++++ +** M-x setenv now expands environment variables of the form `$foo' and +`${foo}' in the specified new value of the environment variable. To +include a `$' in the value, use `$$'. + ++++ +** Unquoted `$' in file names do not signal an error any more when +the corresponding environment variable does not exist. +Instead, the `$ENVVAR' text is left as is, so that `$$' quoting +is only rarely needed. + +--- +** Language environment and various default coding systems are setup +more correctly according to the current locale name. If the locale +name doesn't specify a charset, the default is what glibc defines. +This change may result in using the different coding systems as +default in some locale (e.g. vi_VN). + ++++ +** The default for the paper size (variable ps-paper-type) is taken +from the locale. + ++++ +** The keyboard-coding-system is now automatically set based on your +current locale settings if you are not using a window system. This +may mean that the META key doesn't work but generates non-ASCII +characters instead, depending on how the terminal (or terminal +emulator) works. Use `set-keyboard-coding-system' (or customize +keyboard-coding-system) if you prefer META to work (the old default) +or if the locale doesn't describe the character set actually generated +by the keyboard. See Info node `Single-Byte Character Support'. + ++++ +** The new command `revert-buffer-with-coding-system' (C-x RET r) +revisits the current file using a coding system that you specify. + ++++ +** New command `recode-region' decodes the region again by a specified +coding system. + ++++ +** The new command `recode-file-name' changes the encoding of the name +of a file. + +--- +** New command `ucs-insert' inserts a character specified by its +unicode. + ++++ +** The new command `set-file-name-coding-system' (C-x RET F) sets +coding system for encoding and decoding file names. A new menu item +(Options->Mule->Set Coding Systems->For File Name) invokes this +command. + ++++ +** New command quail-show-key shows what key (or key sequence) to type +in the current input method to input a character at point. + ++++ +** Limited support for character `unification' has been added. +Emacs now knows how to translate between different representations of +the same characters in various Emacs charsets according to standard +Unicode mappings. This applies mainly to characters in the ISO 8859 +sets plus some other 8-bit sets, but can be extended. For instance, +translation works amongst the Emacs ...-iso8859-... charsets and the +mule-unicode-... ones. + +By default this translation happens automatically on encoding. +Self-inserting characters are translated to make the input conformant +with the encoding of the buffer in which it's being used, where +possible. + +You can force a more complete unification with the user option +unify-8859-on-decoding-mode. That maps all the Latin-N character sets +into Unicode characters (from the latin-iso8859-1 and +mule-unicode-0100-24ff charsets) on decoding. Note that this mode +will often effectively clobber data with an iso-2022 encoding. + +--- +** There is support for decoding Greek and Cyrillic characters into +either Unicode (the mule-unicode charsets) or the iso-8859 charsets, +when possible. The latter are more space-efficient. This is +controlled by user option utf-fragment-on-decoding. + +--- +** New language environments: French, Ukrainian, Tajik, +Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6, +Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian, +Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW. (Set up +automatically according to the locale.) + +--- +** New input methods: latin-alt-postfix, latin-postfix, latin-prefix, +ukrainian-computer, belarusian, bulgarian-bds, russian-computer, +vietnamese-telex, lithuanian-numeric, lithuanian-keyboard, +latvian-keyboard, welsh, georgian, rfc1345, ucs, sgml, +bulgarian-phonetic, dutch, slovenian, croatian, malayalam-inscript, +tamil-inscript. + +--- +** New input method chinese-sisheng for inputting Chinese Pinyin +characters. + +--- +** Improved Thai support. A new minor mode `thai-word-mode' (which is +automatically activated if you select Thai as a language +environment) changes key bindings of most word-oriented commands to +versions which recognize Thai words. Affected commands are + M-f (forward-word) + M-b (backward-word) + M-d (kill-word) + M-DEL (backward-kill-word) + M-t (transpose-words) + M-q (fill-paragraph) + +--- +** Indian support has been updated. +The in-is13194 coding system is now Unicode-based. CDAC fonts are +assumed. There is a framework for supporting various +Indian scripts, but currently only Devanagari, Malayalam and Tamil are +supported. + +--- +** A UTF-7 coding system is available in the library `utf-7'. + +--- +** The utf-8/16 coding systems have been enhanced. +By default, untranslatable utf-8 sequences are simply composed into +single quasi-characters. User option `utf-translate-cjk-mode' (it is +turned on by default) arranges to translate many utf-8 CJK character +sequences into real Emacs characters in a similar way to the Mule-UCS +system. As this loads a fairly big data on demand, people who are not +interested in CJK characters may want to customize it to nil. +You can augment/amend the CJK translation via hash tables +`ucs-mule-cjk-to-unicode' and `ucs-unicode-to-mule-cjk'. The utf-8 +coding system now also encodes characters from most of Emacs's +one-dimensional internal charsets, specifically the ISO-8859 ones. +The utf-16 coding system is affected similarly. + +--- +** A new coding system `euc-tw' has been added for traditional Chinese +in CNS encoding; it accepts both Big 5 and CNS as input; on saving, +Big 5 is then converted to CNS. + +--- +** Many new coding systems are available by loading the `code-pages' +library. These include complete versions of most of those in +codepage.el, based on Unicode mappings. `codepage-setup' is now +obsolete and is used only in the MS-DOS port of Emacs. windows-1252 +and windows-1251 are preloaded since the former is so common and the +latter is used by GNU locales. + +--- +** New variable `utf-translate-cjk-unicode-range' controls which +Unicode characters to translate in `utf-translate-cjk-mode'. + +--- +** iso-10646-1 (`Unicode') fonts can be used to display any range of +characters encodable by the utf-8 coding system. Just specify the +fontset appropriately. + ++++ +** Vertical scrolling is now possible within incremental search. +To enable this feature, customize the new user option +`isearch-allow-scroll'. User written commands which satisfy stringent +constraints can be marked as "scrolling commands". See the Emacs manual +for details. + ++++ +** C-w in incremental search now grabs either a character or a word, +making the decision in a heuristic way. This new job is done by the +command `isearch-yank-word-or-char'. To restore the old behavior, +bind C-w to `isearch-yank-word' in `isearch-mode-map'. + ++++ +** C-y in incremental search now grabs the next line if point is already +at the end of a line. + ++++ +** C-M-w deletes and C-M-y grabs a character in isearch mode. +Another method to grab a character is to enter the minibuffer by `M-e' +and to type `C-f' at the end of the search string in the minibuffer. + ++++ +** M-% typed in isearch mode invokes `query-replace' or +`query-replace-regexp' (depending on search mode) with the current +search string used as the string to replace. + ++++ +** Isearch no longer adds `isearch-resume' commands to the command +history by default. To enable this feature, customize the new +user option `isearch-resume-in-command-history'. + +--- +** New user option `query-replace-skip-read-only': when non-nil, +`query-replace' and related functions simply ignore +a match if part of it has a read-only property. + ++++ +** When used interactively, the commands `query-replace-regexp' and +`replace-regexp' allow \,expr to be used in a replacement string, +where expr is an arbitrary Lisp expression evaluated at replacement +time. In many cases, this will be more convenient than using +`query-replace-regexp-eval'. `\#' in a replacement string now refers +to the count of replacements already made by the replacement command. +All regular expression replacement commands now allow `\?' in the +replacement string to specify a position where the replacement string +can be edited for each replacement. + ++++ +** query-replace uses isearch lazy highlighting when the new user option +`query-replace-lazy-highlight' is non-nil. + +--- +** The current match in query-replace is highlighted in new face +`query-replace' which by default inherits from isearch face. + ++++ +** M-x compare-windows now can automatically skip non-matching text to +resync points in both windows. + ++++ +** The commands M-x customize-face and M-x customize-face-other-window +now look at the character after point. If a face or faces are +specified for that character, the commands by default customize those +faces. + +--- +** The face-customization widget has been reworked to be less confusing. +In particular, when you enable a face attribute using the corresponding +check-box, there's no longer a redundant `*' option in value selection +for that attribute; the values you can choose are only those which make +sense for the attribute. When an attribute is de-selected by unchecking +its check-box, then the (now ignored, but still present temporarily in +case you re-select the attribute) value is hidden. + ++++ +** When you set or reset a variable's value in a Customize buffer, +the previous value becomes the "backup value" of the variable. +You can go back to that backup value by selecting "Use Backup Value" +under the "[State]" button. + +** Dired mode: + +--- +*** New faces dired-header, dired-mark, dired-marked, dired-flagged, +dired-ignored, dired-directory, dired-symlink, dired-warning +introduced for Dired mode instead of font-lock faces. + ++++ +*** New Dired command `dired-compare-directories' marks files +with different file attributes in two dired buffers. + ++++ +*** New Dired command `dired-do-touch' (bound to T) changes timestamps +of marked files with the value entered in the minibuffer. + ++++ +*** In Dired's ! command (dired-do-shell-command), `*' and `?' now +control substitution of the file names only when they are surrounded +by whitespace. This means you can now use them as shell wildcards +too. If you want to use just plain `*' as a wildcard, type `*""'; the +doublequotes make no difference in the shell, but they prevent +special treatment in `dired-do-shell-command'. + ++++ +*** In Dired, the w command now copies the current line's file name +into the kill ring. With a zero prefix arg, copies absolute file names. + ++++ +** The variables dired-free-space-program and dired-free-space-args +have been renamed to directory-free-space-program and +directory-free-space-args, and they now apply whenever Emacs puts a +directory listing into a buffer. + ++++ +** Dired-x: + ++++ +*** Omitting files is now a minor mode, dired-omit-mode. The mode toggling +command is bound to M-o. A new command dired-mark-omitted, bound to * O, +marks omitted files. The variable dired-omit-files-p is obsoleted, use the +mode toggling function instead. +++ ** In Outline mode, hide-body no longer hides lines at the top of the file that precede the first header line. +++ -** In Enriched mode, `set-left-margin' and `set-right-margin' are now -by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l' -and `C-c C-r'. - -+++ -** In processing a local variables list, Emacs strips the prefix and -suffix are from every line before processing all the lines. - -+++ -** `apply-macro-to-region-lines' now operates on all lines that begin -in the region, rather than on all complete lines in the region. - ---- -** global-whitespace-mode is a new alias for whitespace-global-mode. - -+++ -** 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. ---- -*** rx.el has new corresponding `symbol-end' and `symbol-start' elements. - -+++ -** 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: - - emacs --xrm "Emacs.Background:red" --xrm "Emacs.Geometry:100x20" - -will start up Emacs on an initial frame of 100x20 with red background, -irrespective of geometry or background setting on the Windows registry. +** Occur, Info, and comint-derived modes now support using +M-x font-lock-mode to toggle fontification. The variable +`Info-fontify' is no longer applicable; to disable fontification, +remove `turn-on-font-lock' from `Info-mode-hook'. --- ** The terminal emulation code in term.el has been improved, it can run most curses applications now. -** New features in evaluation commands - -+++ -*** 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 -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-:), -`eval-print-last-sexp' (C-j) and some edebug evaluation functions. - ---- -** New input method chinese-sisheng for inputting Chinese Pinyin -characters. - -+++ -** New command quail-show-key shows what key (or key sequence) to type -in the current input method to input a character at point. - -+++ -** You can now switch buffers in a cyclic order with C-x C-left and -(prev-buffer) and C-x C-right (next-buffer). C-x left and C-x right -can be used as well. - ---- -** Commands winner-redo and winner-undo, from winner.el, are now bound to -C-c and C-c , respectively. This is an incompatible change. - ---- -** Help commands `describe-function' and `describe-key' now show function -arguments in lowercase italics on displays that support it. To change the -default, customize face `help-argument-name' or redefine the function -`help-default-arg-highlight'. - --- ** The comint prompt can now be made read-only, using the new user option `comint-prompt-read-only'. This is not enabled by default, @@ -386,75 +1088,18 @@ kill-ring, but does not delete it. +++ -** You can now use next-error (C-x `) and previous-error to advance to -the next/previous matching line found by M-x occur. +** The new command `comint-insert-previous-argument' in comint-derived +modes (shell-mode etc) inserts arguments from previous command lines, +like bash's `ESC .' binding. It is bound by default to `C-c .', but +otherwise behaves quite similarly to the bash version. + +** `comint-use-prompt-regexp-instead-of-fields' has been renamed +`comint-use-prompt-regexp'. The old name has been kept as an alias, +but declared obsolete. +++ ** Telnet now prompts you for a port number with C-u M-x telnet. -+++ -** New command line option -Q or --quick. - -This is like using -q --no-site-file, but in addition it also disables -the fancy startup screen. - -+++ -** New command line option -D or --basic-display. - -Disables the menu-bar, the tool-bar, the scroll-bars, tool tips, and -the blinking cursor. - -+++ -** New command line option -nbc or --no-blinking-cursor disables -the blinking cursor on graphical terminals. - -+++ -** C-h v and C-h f commands now include a hyperlink to the C source for -variables and functions defined in C (if the C source is available). - ---- -** When used interactively, `format-write-file' now asks for confirmation -before overwriting an existing file, unless a prefix argument is -supplied. This behavior is analogous to `write-file'. - -+++ -** 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 -the end of the buffer in that window. This allows to tail a file: -just put point at the end of the buffer and it stays there. This -rule applies to file buffers. For non-file buffers, the behavior may -be mode dependent. - -If you are sure that the file will only change by growing at the end, -then you can tail the file more efficiently by using the new minor -mode Auto Revert Tail mode. The function `auto-revert-tail-mode' -toggles this mode. - -+++ -** Auto Revert mode is now more careful to avoid excessive reverts and -other potential problems when deciding which non-file buffers to -revert. This matters especially if Global Auto Revert mode is enabled -and `global-auto-revert-non-file-buffers' is non-nil. Auto Revert -mode only reverts a non-file buffer if the buffer has a non-nil -`revert-buffer-function' and a non-nil `buffer-stale-function', which -decides whether the buffer should be reverted. Currently, this means -that auto reverting works for Dired buffers (although this may not -work properly on all operating systems) and for the Buffer Menu. - -+++ -** If the new user option `auto-revert-check-vc-info' is non-nil, Auto -Revert mode reliably updates version control info (such as the version -control number in the mode line), in all version controlled buffers in -which it is active. If the option is nil, the default, then this info -only gets updated whenever the buffer gets reverted. - -+++ -** New command `Buffer-menu-toggle-files-only' toggles display of file -buffers only in the Buffer Menu. It is bound to `T' in Buffer Menu -mode. - --- ** M-x compile has become more robust and reliable @@ -525,6 +1170,14 @@ file. +++ +** M-x grep now tries to avoid appending `/dev/null' to the command line +by using GNU grep `-H' option instead. M-x grep automatically +detects whether this is possible or not the first time it is invoked. +When `-H' is used, the grep command line supplied by the user is passed +unchanged to the system to execute, which allows more complicated +command lines to be used than was possible before. + ++++ ** New options `next-error-highlight' and `next-error-highlight-no-select' specify the method of highlighting of the corresponding source line in new face `next-error'. @@ -541,235 +1194,27 @@ ** M-x diff uses diff-mode instead of compilation-mode. +++ -** M-x compare-windows now can automatically skip non-matching text to -resync points in both windows. - ---- -** New command `strokes-global-set-stroke-string'. -This is like `strokes-global-set-stroke', but it allows you to bind -the stroke directly to a string to insert. This is convenient for -using strokes as an input method. - -** Gnus package - ---- -*** 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. - -+++ -** 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. - ---- -*** 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). - -+++ -*** New commands: - - desktop-revert reverts to the last loaded desktop. - - desktop-change-dir kills current desktop and loads a new. - - desktop-save-in-desktop-dir saves desktop in the directory from which - it was loaded. - - desktop-lazy-complete runs the desktop load to completion. - - desktop-lazy-abort aborts lazy loading of the desktop. - ---- -*** New customizable variables: - - desktop-save. Determins whether the desktop should be saved when it is - killed. - - desktop-file-name-format. Format in which desktop file names should be saved. - - desktop-path. List of directories in which to lookup the desktop file. - - desktop-locals-to-save. List of local variables to save. - - desktop-globals-to-clear. List of global variables that `desktop-clear' will clear. - - desktop-clear-preserve-buffers-regexp. Regexp identifying buffers that `desktop-clear' - should not delete. - - desktop-restore-eager. Number of buffers to restore immediately. Remaining buffers are - restored lazily (when Emacs is idle). - - desktop-lazy-verbose. Verbose reporting of lazily created buffers. - - desktop-lazy-idle-delay. Idle delay before starting to create buffers. - -+++ -*** New command line option --no-desktop - ---- -*** New hooks: - - desktop-after-read-hook run after a desktop is loaded. - - desktop-no-desktop-file-hook run when no desktop file is found. - ---- -** 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 -to get the old behavior. The new options `save-place-save-skipped' -and `save-place-skip-check-regexp' allow further fine-tuning of this -feature. - -+++ -** You can have several Emacs servers on the same machine. - - % emacs --eval '(setq server-name "foo")' -f server-start & - % emacs --eval '(setq server-name "bar")' -f server-start & - % emacsclient -s foo file1 - % emacsclient -s bar file2 - -+++ -** On window systems, lines which are exactly as wide as the window -(not counting the final newline character) are no longer broken into -two lines on the display (with just the newline on the second line). -Instead, the newline now "overflows" into the right fringe, and the -cursor will be displayed in the fringe when positioned on that newline. - -The new user option 'overflow-newline-into-fringe' may be set to nil to -revert to the old behavior of continuing such lines. - -+++ -** The buffer boundaries (i.e. first and last line in the buffer) may -now be marked with angle bitmaps in the fringes. In addition, up and -down arrow bitmaps may be shown at the top and bottom of the left or -right fringe if the window can be scrolled in either direction. - -This behavior is activated by setting the buffer-local variable -`indicate-buffer-boundaries' to a non-nil value. The default value of -this variable is found in `default-indicate-buffer-boundaries'. - -If value is `left' or `right', both angle and arrow bitmaps are -displayed in the left or right fringe, resp. - -Value may also be an alist which specifies the presense and position -of each bitmap individually. - -For example, ((top . left) (t . right)) places the top angle bitmap -in left fringe, the bottom angle bitmap in right fringe, and both -arrow bitmaps in right fringe. To show just the angle bitmaps in the -left fringe, but no arrow bitmaps, use ((top . left) (bottom . left)). - -+++ -** New command `display-local-help' displays any local help at point -in the echo area. It is bound to `C-h .'. It normally displays the -same string that would be displayed on mouse-over using the -`help-echo' property, but, in certain cases, it can display a more -keyboard oriented alternative. - -+++ -** New user option `help-at-pt-display-when-idle' allows to -automatically show the help provided by `display-local-help' on -point-over, after suitable idle time. The amount of idle time is -determined by the user option `help-at-pt-timer-delay' and defaults -to one second. This feature is turned off by default. - ---- -** New commands `scan-buf-next-region' and `scan-buf-previous-region' -move to the start of the next (previous, respectively) region with -non-nil help-echo property and display any help found there in the -echo area, using `display-local-help'. - -+++ -** Help mode now only makes hyperlinks for faces when the face name is -preceded or followed by the word `face'. It no longer makes -hyperlinks for variables without variable documentation, unless -preceded by one of the words `variable' or `option'. It now makes -hyperlinks to Info anchors (or nodes) if the anchor (or node) name is -enclosed in single quotes and preceded by `info anchor' or `Info -anchor' (in addition to earlier `info node' and `Info node'). - -+++ -** The max size of buffers and integers has been doubled. -On 32bit machines, it is now 256M (i.e. 268435455). - -+++ -** The -f option, used from the command line to call a function, -now reads arguments for the function interactively if it is -an interactively callable function. - ---- -** sql changes. - -*** The variable `sql-product' controls the highlightng of different -SQL dialects. This variable can be set globally via Customize, on a -buffer-specific basis via local variable settings, or for the current -session using the new SQL->Product submenu. (This menu replaces the -SQL->Highlighting submenu.) - -The following values are supported: - - ansi ANSI Standard (default) - db2 DB2 - informix Informix - ingres Ingres - interbase Interbase - linter Linter - ms Microsoft - mysql MySQL - oracle Oracle - postgres Postgres - solid Solid - sqlite SQLite - sybase Sybase - -The current product name will be shown on the mode line following the -SQL mode indicator. - -The technique of setting `sql-mode-font-lock-defaults' directly in -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, -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 -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 -are displayed when they occur rather than when the session is -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 -credentials to authenticate the user. - -*** Postgres support is enhanced. -Keyword highlighting of Postgres 7.3 is implemented. Prompting for -the username and the pgsql `-U' option is added. - -*** MySQL support is enhanced. -Keyword higlighting of MySql 4.0 is implemented. - -*** Imenu support has been enhanced to locate tables, views, indexes, -packages, procedures, functions, triggers, sequences, rules, and -defaults. - -*** Added SQL->Start SQLi Session menu entry which calls the -appropriate sql-interactive-mode wrapper for the current setting of -`sql-product'. - ---- -** M-x view-file and commands that use it now avoid interfering -with special modes such as Tar mode. +** In the *Occur* buffer, `o' switches to it in another window, and +C-o displays the current line's occurrence in another window without +switching to it. + ++++ +** You can now use next-error (C-x `) and previous-error to advance to +the next/previous matching line found by M-x occur. + ++++ +** The new command `multi-occur' is just like `occur', except it can +search multiple buffers. There is also a new command +`multi-occur-by-filename-regexp' which allows you to specify the +buffers to search by their filename. Internally, Occur mode has been +rewritten, and now uses font-lock, among other changes. + ++++ +** font-lock: in modes like C and Lisp where the fontification assumes that +an open-paren in column 0 is always outside of any string or comment, +font-lock now highlights any such open-paren-in-column-zero in bold-red +if it is inside a string or a comment, to indicate that it can cause +trouble with fontification and/or indentation. ** Enhancements to apropos commands: @@ -788,83 +1233,457 @@ matching item. +++ -** The old bindings C-M-delete and C-M-backspace have been deleted, -since there are situations where one or the other will shut down -the operating system or your X server. +** You can have several Emacs servers on the same machine. + + % emacs --eval '(setq server-name "foo")' -f server-start & + % emacs --eval '(setq server-name "bar")' -f server-start & + % emacsclient -s foo file1 + % emacsclient -s bar file2 + ++++ +** The `emacsclient' command understands the options `--eval' and +`--display' which tell Emacs respectively to evaluate the given elisp +expression and to use the given display when visiting files. + ++++ +** User option `server-mode' can be used to start a server process. + ++++ +** 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. + +** Menu support: + +--- +*** Dialogs and menus pop down if you type C-g. + +--- +*** The menu item "Open File..." has been split into two items, "New File..." +and "Open File...". "Open File..." now opens only existing files. This is +to support existing GUI file selection dialogs better. + ++++ +*** The file selection dialog for Gtk+, Mac, W32 and Motif/Lesstif can be +disabled by customizing the variable `use-file-dialog'. + +** X Windows Support: + ++++ +*** Emacs now supports drag and drop for X. Dropping a file on a window + opens it, dropping text inserts the text. Dropping a file on a dired + buffer copies or moves the file to that directory. + ++++ +*** Under X11, it is possible to swap Alt and Meta (and Super and Hyper). +The new variables `x-alt-keysym', `x-hyper-keysym', `x-meta-keysym', +and `x-super-keysym' can be used to choose which keysyms Emacs should +use for the modifiers. For example, the following two lines swap +Meta and Alt: + (setq x-alt-keysym 'meta) + (setq x-meta-keysym 'alt) + ++++ +*** The X resource useXIM can be used to turn off use of XIM, which may +speed up Emacs with slow networking to the X server. + +If the configure option `--without-xim' was used to turn off use of +XIM by default, the X resource useXIM can be used to turn it on. + +--- +*** The new variable `x-select-request-type' controls how Emacs +requests X selection. The default value is nil, which means that +Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING, +and use the more appropriately result. + +--- +*** The scrollbar under LessTif or Motif has a smoother drag-scrolling. +On the other hand, the size of the thumb does not represent the actual +amount of text shown any more (only a crude approximation of it). + +--- +*** The pop up menus for Lucid now stay up if you do a fast click and can +be navigated with the arrow keys (like Gtk+, Mac and W32). + ++++ +*** The Lucid menus can display multilingual text in your locale. You have +to explicitly specify a fontSet resource for this to work, for example +`-xrm "Emacs*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'. + +--- +*** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing +ESC, like they do for Gtk+, Mac and W32. + ++++ +** For Gtk+ version 2.4, you can make Emacs use the old file dialog +by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use +the new dialog. + +** Xterm support: + +--- +*** Emacs now responds to mouse-clicks on the mode-line, header-line and +display margin, when run in an xterm. + +--- +*** Improved key bindings support when running in an xterm. +When emacs is running in an xterm more key bindings are available. The +following should work: +{C,S,C-S,A}-{right,left,up,down,prior,next,delete,insert,F1-12}. +These key bindings work on xterm from X.org 6.8, they might not work on +some older versions of xterm, or on some proprietary versions. + +** Changes in support of colors on character terminals + ++++ +*** The new command-line option --color=MODE lets you specify a standard +mode for a tty color support. It is meant to be used on character +terminals whose capabilities are not set correctly in the terminal +database, or with terminal emulators which support colors, but don't +set the TERM environment variable to a name of a color-capable +terminal. "emacs --color" uses the same color commands as GNU `ls' +when invoked with "ls --color", so if your terminal can support colors +in "ls --color", it will support "emacs --color" as well. See the +user manual for the possible values of the MODE parameter. + +--- +*** Emacs now supports several character terminals which provide more +than 8 colors. For example, for `xterm', 16-color, 88-color, and +256-color modes are supported. Emacs automatically notes at startup +the extended number of colors, and defines the appropriate entries for +all of these colors. + ++++ +*** Emacs now uses the full range of available colors for the default +faces when running on a color terminal, including 16-, 88-, and +256-color xterms. This means that when you run "emacs -nw" on an +88-color or 256-color xterm, you will see essentially the same face +colors as on X. + +--- +*** There's a new support for colors on `rxvt' terminal emulator. + +--- +** M-x view-file and commands that use it now avoid interfering +with special modes such as Tar mode. + ++++ +** 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. + +Once you have defined a fileset, you can perform various operations on +all the files in it, such as visiting them or searching and replacing +in them. + +--- +** Commands winner-redo and winner-undo, from winner.el, are now bound to +C-c and C-c , respectively. This is an incompatible change. + +--- +** global-whitespace-mode is a new alias for whitespace-global-mode. + ++++ +** The command `list-text-properties-at' has been deleted because +C-u C-x = gives the same information and more. + +* 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). + ++++ +** Calc is now part of the Emacs distribution. + +Calc is an advanced desk calculator and mathematical tool written in +Emacs Lisp. Its documentation is in a separate manual; within Emacs, +type "C-h i m calc RET" to read that manual. A reference card is +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. + +--- +** CUA mode is now part of the Emacs distribution. + +The new cua package provides CUA-like keybindings using C-x for +cut (kill), C-c for copy, C-v for paste (yank), and C-z for undo. +With cua, the region can be set and extended using shifted movement +keys (like pc-selection-mode) and typed text replaces the active +region (like delete-selection-mode). Do not enable these modes with +cua-mode. Customize the variable `cua-mode' to enable cua. + +In addition, cua provides unified rectangle support with visible +rectangle highlighting: Use S-return to start a rectangle, extend it +using the movement commands (or mouse-3), and cut or copy it using C-x +or C-c (using C-w and M-w also works). + +Use M-o and M-c to `open' or `close' the rectangle, use M-b or M-f, to +fill it with blanks or another character, use M-u or M-l to upcase or +downcase the rectangle, use M-i to increment the numbers in the +rectangle, use M-n to fill the rectangle with a numeric sequence (such +as 10 20 30...), use M-r to replace a regexp in the rectangle, and use +M-' or M-/ to restrict command on the rectangle to a subset of the +rows. See the commentary in cua-base.el for more rectangle commands. + +Cua also provides unified support for registers: Use a numeric +prefix argument between 0 and 9, i.e. M-0 .. M-9, for C-x, C-c, and +C-v to cut or copy into register 0-9, or paste from register 0-9. + +The last text deleted (not killed) is automatically stored in +register 0. This includes text deleted by typing text. + +Finally, cua provides a global mark which is set using S-C-space. +When the global mark is active, any text which is cut or copied is +automatically inserted at the global mark position. See the +commentary in cua-base.el for more global mark related commands. + +The features of cua also works with the standard emacs bindings for +kill, copy, yank, and undo. If you want to use cua mode, but don't +want the C-x, C-c, C-v, and C-z bindings, you may customize the +`cua-enable-cua-keys' variable. + +Note: This version of cua mode is not backwards compatible with older +versions of cua.el and cua-mode.el. To ensure proper operation, you +must remove older versions of cua.el or cua-mode.el as well as the +loading and customization of those packages from the .emacs file. + ++++ +** The new package dns-mode.el add syntax highlight of DNS master files. +The key binding C-c C-s (`dns-mode-soa-increment-serial') can be used +to increment the SOA serial. + +--- +** The new global minor mode `file-name-shadow-mode' modifies the way +filenames being entered by the user in the minibuffer are displayed, so +that it's clear when part of the entered filename will be ignored due to +emacs' filename parsing rules. The ignored portion can be made dim, +invisible, or otherwise less visually noticable. The display method may +be displayed by customizing the variable `file-name-shadow-properties'. + ++++ +** 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 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 +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. + +--- +** 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 +keypad typically has the digits 0 to 9, a decimal point, keys marked ++, -, /, and *, an Enter key, and a NumLock toggle key. The keypad +package only controls the use of the digit and decimal keys. + +By customizing the variables `keypad-setup', `keypad-shifted-setup', +`keypad-numlock-setup', and `keypad-numlock-shifted-setup', or by +using the function `keypad-setup', you can rebind all digit keys and +the decimal key of the keypad in one step for each of the four +possible combinations of the Shift key state (not pressed/pressed) and +the NumLock toggle state (off/on). + +The choices for the keypad keys in each of the above states are: +`Plain numeric keypad' where the keys generates plain digits, +`Numeric keypad with decimal key' where the character produced by the +decimal key can be customized individually (for internationalization), +`Numeric Prefix Arg' where the keypad keys produce numeric prefix args +for emacs editing commands, `Cursor keys' and `Shifted Cursor keys' +where the keys work like (shifted) arrow keys, home/end, etc., and +`Unspecified/User-defined' where the keypad keys (kp-0, kp-1, etc.) +are left unspecified and can be bound individually through the global +or local keymaps. + ++++ +** The new kmacro package provides a simpler user interface to +emacs' keyboard macro facilities. + +Basically, it uses two function keys (default F3 and F4) like this: +F3 starts a macro, F4 ends the macro, and pressing F4 again executes +the last macro. While defining the macro, F3 inserts a counter value +which automatically increments every time the macro is executed. + +There is now a keyboard macro ring which stores the most recently +defined macros. + +The C-x C-k sequence is now a prefix for the kmacro keymap which +defines bindings for moving through the keyboard macro ring, +C-x C-k C-p and C-x C-k C-n, editing the last macro C-x C-k C-e, +manipulating the macro counter and format via C-x C-k C-c, +C-x C-k C-a, and C-x C-k C-f. See the commentary in kmacro.el +for more commands. + +The normal macro bindings C-x (, C-x ), and C-x e now interfaces to +the keyboard macro ring. + +The C-x e command now automatically terminates the current macro +before calling it, if used while defining a macro. + +In addition, when ending or calling a macro with C-x e, the macro can +be repeated immediately by typing just the `e'. You can customize +this behavior via the variable kmacro-call-repeat-key and +kmacro-call-repeat-with-arg. + +Keyboard macros can now be debugged and edited interactively. +C-x C-k SPC steps through the last keyboard macro one key sequence +at a time, prompting for the actions to take. + ++++ +** The new package longlines.el provides a minor mode for editing text +files composed of long lines, based on the `use-hard-newlines' +mechanism. The long lines are broken up by inserting soft newlines, +which are automatically removed when saving the file to disk or +copying into the kill ring, clipboard, etc. By default, Longlines +mode inserts soft newlines automatically during editing, a behavior +referred to as "soft word wrap" in other text editors. This is +similar to Refill mode, but more reliable. To turn the word wrap +feature off, set `longlines-auto-wrap' to nil. + +--- +** The old Octave mode bindings C-c f and C-c i have been changed +to C-c C-f and C-c C-i. The C-c C-i subcommands now have duplicate +bindings on control characters--thus, C-c C-i C-b is the same as +C-c C-i b, and so on. + +** The printing package is now part of the Emacs distribution. + +If you enable the printing package by including (require 'printing) in +the .emacs file, the normal Print item on the File menu is replaced +with a Print sub-menu which allows you to preview output through +ghostview, use ghostscript to print (if you don't have a PostScript +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. +It should work with any package that uses overlays to hide parts +of a buffer, such as outline-minor-mode, hs-minor-mode, hide-ifdef-mode, ... + +There is also Global Reveal mode which affects all buffers. + +--- +** The ruler-mode.el library provides a minor mode for displaying an +"active" ruler in the header line. You can use the mouse to visually +change the `fill-column', `window-margins' and `tab-stop-list' +settings. + ++++ +** SES mode (ses-mode) is a new major mode for creating and editing +spreadsheet files. Besides the usual Emacs features (intuitive command +letters, undo, cell formulas in Lisp, plaintext files, etc.) it also offers +viral immunity and import/export of tab-separated values. + ++++ +** The new global minor mode `size-indication-mode' (off by default) +shows the size of accessible part of the buffer on the mode line. + ++++ +** The new package table.el implements editable, WYSIWYG, embedded +`text tables' in Emacs buffers. It simulates the effect of putting +these tables in a special major mode. The package emulates WYSIWYG +table editing available in modern word processors. The package also +can generate a table source in typesetting and markup languages such +as latex and html from the visually laid out text table. + ++++ +** The thumbs.el package allows you to preview image files as thumbnails +and can be invoked from a Dired buffer. + ++++ +** Tramp is now part of the distribution. + +This package is similar to Ange-FTP: it allows you to edit remote +files. But whereas Ange-FTP uses FTP to access the remote host, +Tramp uses a shell connection. The shell connection is always used +for filename completion and directory listings and suchlike, but for +the actual file transfer, you can choose between the so-called +`inline' methods (which transfer the files through the shell +connection using base64 or uu encoding) and the `out-of-band' methods +(which invoke an external copying program such as `rcp' or `scp' or +`rsync' to do the copying). + +Shell connections can be acquired via `rsh', `ssh', `telnet' and also +`su' and `sudo'. Ange-FTP is still supported via the `ftp' method. + +If you want to disable Tramp you should set + + (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'. ---- -** New command `kill-whole-line' kills an entire line at once. -By default, it is bound to C-S-. - ---- -** New commands to operate on pairs of open and close characters: -`insert-pair', `delete-pair', `raise-sexp'. - -+++ -** A prefix argument of C-M-q in Emacs Lisp mode pretty-printifies the -list starting after point. - -** Dired mode: - ---- -*** New faces dired-header, dired-mark, dired-marked, dired-flagged, -dired-ignored, dired-directory, dired-symlink, dired-warning -introduced for Dired mode instead of font-lock faces. - -+++ -*** New Dired command `dired-compare-directories' marks files -with different file attributes in two dired buffers. - -+++ -*** New Dired command `dired-do-touch' (bound to T) changes timestamps -of marked files with the value entered in the minibuffer. - -+++ -*** In Dired's ! command (dired-do-shell-command), `*' and `?' now -control substitution of the file names only when they are surrounded -by whitespace. This means you can now use them as shell wildcards -too. If you want to use just plain `*' as a wildcard, type `*""'; the -doublequotes make no difference in the shell, but they prevent -special treatment in `dired-do-shell-command'. - -+++ -*** In Dired, the w command now copies the current line's file name -into the kill ring. With a zero prefix arg, copies absolute file names. - -+++ -** Dired-x: - -+++ -*** Omitting files is now a minor mode, dired-omit-mode. The mode toggling -command is bound to M-o. A new command dired-mark-omitted, bound to * O, -marks omitted files. The variable dired-omit-files-p is obsoleted, use the -mode toggling function instead. - -+++ -** find-file-read-only visits multiple files in read-only mode, -when the file name contains wildcard characters. - -+++ -** find-alternate-file replaces the current file with multiple files, -when the file name contains wildcard characters. - -** FFAP - -+++ -*** 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'. ++++ +** The wdired.el package allows you to use normal editing commands on Dired +buffers to change filenames, permissions, etc... + +* Changes in specialized modes and packages: + ++++ +** 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 +`display-time-mail-directory'. + +--- +** PO translation files are decoded according to their MIME headers +when Emacs visits them. ** Info mode: @@ -927,1064 +1746,27 @@ --- *** Info-index offers completion. ---- -** Support for the SQLite interpreter has been added to sql.el by calling -'sql-sqlite'. - -** BibTeX mode: -*** 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 -an existing BibTeX entry. - -*** New `bibtex-entry-format' option `required-fields', enabled by default. - -*** 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, -use fast but simplified algorithm for parsing BibTeX keys. - -*** 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 -types for which fields are filled automatically (if possible). - -*** 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 -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 -individual fields of a BibTeX entry. - -*** 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 -in multiple BibTeX files. - -*** The new command bibtex-copy-summary-as-kill pushes summary -of BibTeX entry to kill ring (bound to C-c C-t). - -+++ -** When display margins are present in a window, the fringes are now -displayed between the margins and the buffer's text area, rather than -at the edges of the window. - -+++ -** A window may now have individual fringe and scroll-bar settings, -in addition to the individual display margin settings. - -Such individual settings are now preserved when windows are split -horizontally or vertically, a saved window configuration is restored, -or when the frame is resized. - -+++ -** New functions frame-current-scroll-bars and window-current-scroll-bars. - -These functions return the current locations of the vertical and -horizontal scroll bars in a frame or window. - -+++ -** Emacs now supports drag and drop for X. Dropping a file on a window - opens it, dropping text inserts the text. Dropping a file on a dired - buffer copies or moves the file to that directory. - -+++ -** Under X, mouse-wheel-mode is turned on by default. - -+++ -** The X resource useXIM can be used to turn off use of XIM, which may -speed up Emacs with slow networking to the X server. - -If the configure option `--without-xim' was used to turn off use of -XIM by default, the X resource useXIM can be used to turn it on. - -+++ -** The X resource cursorBlink can be used to turn off cursor blinking. - -+++ -** `undo-only' does an undo which does not redo any previous undo. - ---- -** `uniquify-strip-common-suffix' tells uniquify to prefer -`file|dir1' and `file|dir2' to `file|dir1/subdir' and `file|dir2/subdir'. - -+++ -** If the user visits a file larger than `large-file-warning-threshold', -Emacs prompts her for confirmation. - ---- -** A UTF-7 coding system is available in the library `utf-7'. - ---- -** GUD mode has its own tool bar for controlling execution of the inferior -and other common debugger commands. - ---- -** recentf changes. - -The recent file list is now automatically cleanup when recentf mode is -enabled. The new option `recentf-auto-cleanup' controls when to do -automatic cleanup. - -The `recentf-keep' option replaces `recentf-keep-non-readable-files-p' -and provides a more general mechanism to customize which file names to -keep in the recent list. - -With the more advanced option: `recentf-filename-handler', you can -specify a function that transforms filenames handled by recentf. For -example, if set to `file-truename', the same file will not be in the -recent list with different symbolic links. - -To follow naming convention, `recentf-menu-append-commands-flag' -replaces the misnamed option `recentf-menu-append-commands-p'. The -old name remains available as alias, but has been marked obsolete. - -+++ -** The default for the paper size (variable ps-paper-type) is taken -from the locale. - -+++ -** Init file changes - -You can now put the init files .emacs and .emacs_SHELL under -~/.emacs.d or directly under ~. Emacs will find them in either place. - ---- -** partial-completion-mode now does partial completion on directory names. - ---- -** 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. - ---- -** MH-E changes. - -Upgraded to MH-E version 7.82. There have been major changes since -version 5.0.2; see MH-E-NEWS for details. - -+++ -** The `emacsclient' command understands the options `--eval' and -`--display' which tell Emacs respectively to evaluate the given elisp -expression and to use the given display when visiting files. - -+++ -** User option `server-mode' can be used to start a server process. - -+++ -** The mode line position information now comes before the major mode. -When the file is maintained under version control, that information -appears between the position information and the major mode. - -+++ -** C-x s (save-some-buffers) now offers an option `d' to diff a buffer -against its file, so you can see what changes you would be saving. - -+++ -** You can now customize the use of window fringes. To control this -for all frames, use M-x fringe-mode or the Show/Hide submenu of the -top-level Options menu, or customize the `fringe-mode' variable. To -control this for a specific frame, use the command M-x -set-fringe-style. - -+++ -** 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 -"~/". - -+++ -** When you are root, and you visit a file whose modes specify -read-only, the Emacs buffer is now read-only too. Type C-x C-q if you -want to make the buffer writable. (As root, you can in fact alter the -file.) - -+++ -** The new command `revert-buffer-with-coding-system' (C-x RET r) -revisits the current file using a coding system that you specify. - -+++ -** The new command `recode-file-name' changes the encoding of the name -of a file. - ---- -** `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. - ---- -** The new options `buffers-menu-show-directories' and -`buffers-menu-show-status' let you control how buffers are displayed -in the menu dropped down when you click "Buffers" from the menu bar. - -`buffers-menu-show-directories' controls whether the menu displays -leading directories as part of the file name visited by the buffer. -If its value is `unless-uniquify', the default, directories are -shown unless uniquify-buffer-name-style' is non-nil. The value of nil -and t turn the display of directories off and on, respectively. - -`buffers-menu-show-status' controls whether the Buffers menu includes -the modified and read-only status of the buffers. By default it is -t, and the status is shown. - -Setting these variables directly does not take effect until next time -the Buffers menu is regenerated. - -+++ -** The commands M-x customize-face and M-x customize-face-other-window -now look at the character after point. If a face or faces are -specified for that character, the commands by default customize those -faces. - ---- -** New language environments: French, Ukrainian, Tajik, -Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6, -Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian, -Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW. (Set up -automatically according to the locale.) - ---- -** Indian support has been updated. -The in-is13194 coding system is now Unicode-based. CDAC fonts are -assumed. There is a framework for supporting various -Indian scripts, but currently only Devanagari, Malayalam and Tamil are -supported. - ---- -** New input methods: latin-alt-postfix, latin-postfix, latin-prefix, -ukrainian-computer, belarusian, bulgarian-bds, russian-computer, -vietnamese-telex, lithuanian-numeric, lithuanian-keyboard, -latvian-keyboard, welsh, georgian, rfc1345, ucs, sgml, -bulgarian-phonetic, dutch, slovenian, croatian, malayalam-inscript, -tamil-inscript. - ---- -** A new coding system `euc-tw' has been added for traditional Chinese -in CNS encoding; it accepts both Big 5 and CNS as input; on saving, -Big 5 is then converted to CNS. - ---- -** Many new coding systems are available by loading the `code-pages' -library. These include complete versions of most of those in -codepage.el, based on Unicode mappings. `codepage-setup' is now -obsolete and is used only in the MS-DOS port of Emacs. windows-1252 -and windows-1251 are preloaded since the former is so common and the -latter is used by GNU locales. - ---- -** The utf-8/16 coding systems have been enhanced. -By default, untranslatable utf-8 sequences are simply composed into -single quasi-characters. User option `utf-translate-cjk-mode' (it is -turned on by default) arranges to translate many utf-8 CJK character -sequences into real Emacs characters in a similar way to the Mule-UCS -system. As this loads a fairly big data on demand, people who are not -interested in CJK characters may want to customize it to nil. -You can augment/amend the CJK translation via hash tables -`ucs-mule-cjk-to-unicode' and `ucs-unicode-to-mule-cjk'. The utf-8 -coding system now also encodes characters from most of Emacs's -one-dimensional internal charsets, specifically the ISO-8859 ones. -The utf-16 coding system is affected similarly. - ---- -** New variable `utf-translate-cjk-unicode-range' controls which -Unicode characters to translate in `utf-translate-cjk-mode'. - ---- -** iso-10646-1 (`Unicode') fonts can be used to display any range of -characters encodable by the utf-8 coding system. Just specify the -fontset appropriately. - ---- -** New command `ucs-insert' inserts a character specified by its -unicode. - -+++ -** Limited support for character `unification' has been added. -Emacs now knows how to translate between different representations of -the same characters in various Emacs charsets according to standard -Unicode mappings. This applies mainly to characters in the ISO 8859 -sets plus some other 8-bit sets, but can be extended. For instance, -translation works amongst the Emacs ...-iso8859-... charsets and the -mule-unicode-... ones. - -By default this translation happens automatically on encoding. -Self-inserting characters are translated to make the input conformant -with the encoding of the buffer in which it's being used, where -possible. - -You can force a more complete unification with the user option -unify-8859-on-decoding-mode. That maps all the Latin-N character sets -into Unicode characters (from the latin-iso8859-1 and -mule-unicode-0100-24ff charsets) on decoding. Note that this mode -will often effectively clobber data with an iso-2022 encoding. - ---- -** There is support for decoding Greek and Cyrillic characters into -either Unicode (the mule-unicode charsets) or the iso-8859 charsets, -when possible. The latter are more space-efficient. This is -controlled by user option utf-fragment-on-decoding. - -+++ -** The new command `set-file-name-coding-system' (C-x RET F) sets -coding system for encoding and decoding file names. A new menu item -(Options->Mule->Set Coding Systems->For File Name) invokes this -command. - ---- -** The scrollbar under LessTif or Motif has a smoother drag-scrolling. -On the other hand, the size of the thumb does not represent the actual -amount of text shown any more (only a crude approximation of it). - ---- -** The pop up menus for Lucid now stay up if you do a fast click and can -be navigated with the arrow keys (like Gtk+, Mac and W32). - -+++ -** The Lucid menus can display multilingual text in your locale. You have -to explicitly specify a fontSet resource for this to work, for example -`-xrm "Emacs*fontSet: -*-helvetica-medium-r-*--*-120-*-*-*-*-*-*,*"'. - ---- -** Dialogs for Lucid/Athena and Lesstif/Motif now pops down when pressing -ESC, like they do for Gtk+, Mac and W32. - ---- -** Dialogs and menus pop down when pressing C-g. - ---- -** The menu item "Open File..." has been split into two items, "New File..." -and "Open File...". "Open File..." now opens only existing files. This is -to support existing GUI file selection dialogs better. - -+++ -** The file selection dialog for Gtk+, Mac, W32 and Motif/Lesstif can be -disabled by customizing the variable `use-file-dialog'. - -+++ -** For Gtk+ version 2.4, you can make Emacs use the old file dialog -by setting the variable `x-use-old-gtk-file-dialog' to t. Default is to use -the new dialog. - -+++ -** Emacs can produce an underscore-like (horizontal bar) cursor. -The underscore cursor is set by putting `(cursor-type . hbar)' in -default-frame-alist. It supports variable heights, like the `bar' -cursor does. - -+++ -** On X, MS Windows, and Mac OS, the blinking cursor's "off" state is -now controlled by the variable `blink-cursor-alist'. - -+++ -** 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. - -Once you have defined a fileset, you can perform various operations on -all the files in it, such as visiting them or searching and replacing -in them. - ---- -** PO translation files are decoded according to their MIME headers -when Emacs visits them. - ---- -** The game `mpuz' is enhanced. - -`mpuz' now allows the 2nd factor not to have two identical digits. By -default, all trivial operations involving whole lines are performed -automatically. The game uses faces for better visual feedback. - ---- -** The new variable `x-select-request-type' controls how Emacs -requests X selection. The default value is nil, which means that -Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING, -and use the more appropriately result. - -+++ -** The parameters of automatic hscrolling can now be customized. -The variable `hscroll-margin' determines how many columns away from -the window edge point is allowed to get before automatic hscrolling -will horizontally scroll the window. The default value is 5. - -The variable `hscroll-step' determines how many columns automatic -hscrolling scrolls the window when point gets too close to the -window edge. If its value is zero, the default, Emacs scrolls the -window so as to center point. If its value is an integer, it says how -many columns to scroll. If the value is a floating-point number, it -gives the fraction of the window's width to scroll the window. - -The variable `automatic-hscrolling' was renamed to -`auto-hscroll-mode'. The old name is still available as an alias. - -** TeX modes: - -+++ -*** C-c C-c prompts for a command to run, and tries to offer a good default. - -+++ -*** The user option `tex-start-options-string' has been replaced -by two new user options: `tex-start-options', which should hold -command-line options to feed to TeX, and `tex-start-commands' which should hold -TeX commands to use at startup. - ---- -*** verbatim environments are now highlighted in courier by font-lock -and super/sub-scripts are made into super/sub-scripts. - -+++ -*** New major mode doctex-mode for *.dtx files. - -+++ -** New display feature: focus follows the mouse from one Emacs window -to another, even within a frame. If you set the variable -mouse-autoselect-window to non-nil value, moving the mouse to a -different Emacs window will select that window (minibuffer window can -be selected only when it is active). The default is nil, so that this -feature is not enabled. - -+++ -** On X, when the window manager requires that you click on a frame to -select it (give it focus), the selected window and cursor position -normally changes according to the mouse click position. If you set -the variable x-mouse-click-focus-ignore-position to t, the selected -window and cursor position do not change when you click on a frame -to give it focus. - -+++ -** The new command `describe-char' (C-u C-x =) pops up a buffer with -description various information about a character, including its -encodings and syntax, its text properties, how to input, overlays, and -widgets at point. You can get more information about some of them, by -clicking on mouse-sensitive areas or moving there and pressing RET. - -+++ -** The new command `multi-occur' is just like `occur', except it can -search multiple buffers. There is also a new command -`multi-occur-by-filename-regexp' which allows you to specify the -buffers to search by their filename. Internally, Occur mode has been -rewritten, and now uses font-lock, among other changes. - -+++ -** The default values of paragraph-start and indent-line-function have -been changed to reflect those used in Text mode rather than those used -in Indented-Text mode. - ---- -** New user option `query-replace-skip-read-only': when non-nil, -`query-replace' and related functions simply ignore -a match if part of it has a read-only property. - -+++ -** When used interactively, the commands `query-replace-regexp' and -`replace-regexp' allow \,expr to be used in a replacement string, -where expr is an arbitrary Lisp expression evaluated at replacement -time. In many cases, this will be more convenient than using -`query-replace-regexp-eval'. `\#' in a replacement string now refers -to the count of replacements already made by the replacement command. -All regular expression replacement commands now allow `\?' in the -replacement string to specify a position where the replacement string -can be edited for each replacement. - -+++ -** query-replace uses isearch lazy highlighting when the new user option -`query-replace-lazy-highlight' is non-nil. - ---- -** The current match in query-replace is highlighted in new face -`query-replace' which by default inherits from isearch face. - -+++ -** Emacs normally highlights mouse sensitive text whenever the mouse -is over the text. By setting the new variable `mouse-highlight', you -can optionally enable mouse highlighting only after you move the -mouse, so that highlighting disappears when you press a key. You can -also disable mouse highlighting. - -+++ -** You can now customize if selecting a region by dragging the mouse -shall not copy the selected text to the kill-ring by setting the new -variable mouse-drag-copy-region to nil. - -+++ -** font-lock: in modes like C and Lisp where the fontification assumes that -an open-paren in column 0 is always outside of any string or comment, -font-lock now highlights any such open-paren-in-column-zero in bold-red -if it is inside a string or a comment, to indicate that it can cause -trouble with fontification and/or indentation. - -+++ -** There's a new face `minibuffer-prompt'. -Emacs adds this face to the list of text properties stored in the -variable `minibuffer-prompt-properties', which is used to display the -prompt string. - -+++ -** The new face `mode-line-inactive' is used to display the mode line -of non-selected windows. The `mode-line' face is now used to display -the mode line of the currently selected window. - -The new variable `mode-line-in-non-selected-windows' controls whether -the `mode-line-inactive' face is used. - ---- -** A menu item "Show/Hide" was added to the top-level menu "Options". -This menu allows you to turn various display features on and off (such -as the fringes, the tool bar, the speedbar, and the menu bar itself). -You can also move the vertical scroll bar to either side here or turn -it off completely. There is also a menu-item to toggle displaying of -current date and time, current line and column number in the -mode-line. - ---- -** Speedbar has moved from the "Tools" top level menu to "Show/Hide". - -+++ -** 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 -`display-time-mail-directory'. - ---- -** LDAP support now defaults to ldapsearch from OpenLDAP version 2. - -+++ -** 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. - -+++ -** Emacs now displays a splash screen by default even if command-line -arguments were given. The new command-line option --no-splash -disables the splash screen; see also the variable -`inhibit-startup-message' (which is also aliased as -`inhibit-splash-screen'). - -** Changes in support of colors on character terminals - -+++ -*** The new command-line option --color=MODE lets you specify a standard -mode for a tty color support. It is meant to be used on character -terminals whose capabilities are not set correctly in the terminal -database, or with terminal emulators which support colors, but don't -set the TERM environment variable to a name of a color-capable -terminal. "emacs --color" uses the same color commands as GNU `ls' -when invoked with "ls --color", so if your terminal can support colors -in "ls --color", it will support "emacs --color" as well. See the -user manual for the possible values of the MODE parameter. - ---- -*** Emacs now supports several character terminals which provide more -than 8 colors. For example, for `xterm', 16-color, 88-color, and -256-color modes are supported. Emacs automatically notes at startup -the extended number of colors, and defines the appropriate entries for -all of these colors. - -+++ -*** Emacs now uses the full range of available colors for the default -faces when running on a color terminal, including 16-, 88-, and -256-color xterms. This means that when you run "emacs -nw" on an -88-color or 256-color xterm, you will see essentially the same face -colors as on X. - ---- -*** There's a new support for colors on `rxvt' terminal emulator. - -+++ -** Emacs can now be invoked in full-screen mode on a windowed display. - -When Emacs is invoked on a window system, the new command-line options -`--fullwidth', `--fullheight', and `--fullscreen' produce a frame -whose width, height, or both width and height take up the entire -screen size. (For now, this does not work with some window managers.) - ---- -** Emacs now tries to set up buffer coding systems for HTML/XML files -automatically. - -+++ -** The new command `comint-insert-previous-argument' in comint-derived -modes (shell-mode etc) inserts arguments from previous command lines, -like bash's `ESC .' binding. It is bound by default to `C-c .', but -otherwise behaves quite similarly to the bash version. - -+++ -** Changes in C-h bindings: - -C-h e displays the *Messages* buffer. - -C-h followed by a control character is used for displaying files - that do not change: - -C-h C-f displays the FAQ. -C-h C-e displays the PROBLEMS file. - -The info-search bindings on C-h C-f, C-h C-k and C-h C-i -have been moved to C-h F, C-h K and C-h S. - -C-h c, C-h k, C-h w, and C-h f now handle remapped interactive commands. - -- C-h c and C-h k report the actual command (after possible remapping) - run by the key sequence. - -- C-h w and C-h f on a command which has been remapped now report the - command it is remapped to, and the keys which can be used to run - that command. - -For example, if C-k is bound to kill-line, and kill-line is remapped -to new-kill-line, these commands now report: - -- C-h c and C-h k C-k reports: - C-k runs the command new-kill-line - -- C-h w and C-h f kill-line reports: - kill-line is remapped to new-kill-line which is on C-k, - -- C-h w and C-h f new-kill-line reports: - new-kill-line is on C-k - -+++ -** Vertical scrolling is now possible within incremental search. -To enable this feature, customize the new user option -`isearch-allow-scroll'. User written commands which satisfy stringent -constraints can be marked as "scrolling commands". See the Emacs manual -for details. - -+++ -** C-w in incremental search now grabs either a character or a word, -making the decision in a heuristic way. This new job is done by the -command `isearch-yank-word-or-char'. To restore the old behavior, -bind C-w to `isearch-yank-word' in `isearch-mode-map'. - -+++ -** C-y in incremental search now grabs the next line if point is already -at the end of a line. - -+++ -** C-M-w deletes and C-M-y grabs a character in isearch mode. -Another method to grab a character is to enter the minibuffer by `M-e' -and to type `C-f' at the end of the search string in the minibuffer. - -+++ -** M-% typed in isearch mode invokes `query-replace' or -`query-replace-regexp' (depending on search mode) with the current -search string used as the string to replace. - -+++ -** Isearch no longer adds `isearch-resume' commands to the command -history by default. To enable this feature, customize the new -user option `isearch-resume-in-command-history'. - -+++ -** New user option `history-delete-duplicates'. -If set to t when adding a new history element, all previous identical -elements are deleted. - -+++ -** Yanking text now discards certain text properties that can -be inconvenient when you did not expect them. The variable -`yank-excluded-properties' specifies which ones. Insertion -of register contents and rectangles also discards these properties. - -+++ -** Occur, Info, and comint-derived modes now support using -M-x font-lock-mode to toggle fontification. The variable -`Info-fontify' is no longer applicable; to disable fontification, -remove `turn-on-font-lock' from `Info-mode-hook'. - -+++ -** M-x grep now tries to avoid appending `/dev/null' to the command line -by using GNU grep `-H' option instead. M-x grep automatically -detects whether this is possible or not the first time it is invoked. -When `-H' is used, the grep command line supplied by the user is passed -unchanged to the system to execute, which allows more complicated -command lines to be used than was possible before. - ---- -** The face-customization widget has been reworked to be less confusing. -In particular, when you enable a face attribute using the corresponding -check-box, there's no longer a redundant `*' option in value selection -for that attribute; the values you can choose are only those which make -sense for the attribute. When an attribute is de-selected by unchecking -its check-box, then the (now ignored, but still present temporarily in -case you re-select the attribute) value is hidden. - -+++ -** When you set or reset a variable's value in a Customize buffer, -the previous value becomes the "backup value" of the variable. -You can go back to that backup value by selecting "Use Backup Value" -under the "[State]" button. - ---- -** The new customization type `float' specifies numbers with floating -point (no integers are allowed). - -+++ -** In GUD mode, when talking to GDB, C-x C-a C-j "jumps" the program -counter to the specified source line (the one where point is). - ---- -** GUD mode improvements for jdb: - -*** Search for source files using jdb classpath and class - information. Fast startup since there is no need to scan all - source files up front. There is also no need to create and maintain - lists of source directories to scan. Look at `gud-jdb-use-classpath' - and `gud-jdb-classpath' customization variables documentation. - -*** Supports the standard breakpoint (gud-break, gud-clear) - set/clear operations from java source files under the classpath, stack - traversal (gud-up, gud-down), and run until current stack finish - (gud-finish). - -*** Supports new jdb (Java 1.2 and later) in addition to oldjdb - (Java 1.1 jdb). - -*** 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. - - 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 - 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 - 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 -`starttls-use-gnutls' to switch to GNUTLS (or simply remove the -"starttls" tool). - -*** Do not allow debugger output history variable to grow without bounds. - -+++ -** 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. - -+++ -** Unquoted `$' in file names do not signal an error any more when -the corresponding environment variable does not exist. -Instead, the `$ENVVAR' text is left as is, so that `$$' quoting -is only rarely needed. - ---- -** JIT-lock changes -*** jit-lock can now be delayed with `jit-lock-defer-time'. - -If this variable is non-nil, its value should be the amount of Emacs -idle time in seconds to wait before starting fontification. For -example, if you set `jit-lock-defer-time' to 0.25, fontification will -only happen after 0.25s of idle time. - -*** contextual refontification is now separate from stealth fontification. - -jit-lock-defer-contextually is renamed jit-lock-contextually and -jit-lock-context-time determines the delay after which contextual -refontification takes place. - -+++ -** Marking commands extend the region when invoked multiple times. If -you hit M-C-SPC (mark-sexp), M-@ (mark-word), M-h (mark-paragraph), or -C-M-h (mark-defun) repeatedly, the marked region extends each time, so -you can mark the next two sexps with M-C-SPC M-C-SPC, for example. -This feature also works for mark-end-of-sentence, if you bind that to -a key. It also extends the region when the mark is active in Transient -Mark mode, regardless of the last command. To start a new region with -one of marking commands in Transient Mark mode, you can deactivate the -active region with C-g, or set the new mark with C-SPC. - -+++ -** Some commands do something special in Transient Mark mode when the -mark is active--for instance, they limit their operation to the -region. Even if you don't normally use Transient Mark mode, you might -want to get this behavior from a particular command. There are two -ways you can enable Transient Mark mode and activate the mark, for one -command only. - -One method is to type C-SPC C-SPC; this enables Transient Mark mode -and sets the mark at point. The other method is to type C-u C-x C-x. -This enables Transient Mark mode temporarily but does not alter the -mark or the region. - -After these commands, Transient Mark mode remains enabled until you -deactivate the mark. That typically happens when you type a command -that alters the buffer, but you can also deactivate the mark by typing -C-g. - -+++ -** A prefix argument is no longer required to repeat a jump to a -previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the -mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump. - -+++ -** Movement commands `beginning-of-buffer', `end-of-buffer', -`beginning-of-defun', `end-of-defun' do not set the mark if the mark -is already active in Transient Mark mode. - -+++ -** In the *Occur* buffer, `o' switches to it in another window, and -C-o displays the current line's occurrence in another window without -switching to it. - -+++ -** When you specify a frame size with --geometry, the size applies to -all frames you create. A position specified with --geometry only -affects the initial frame. - -+++ -** M-h (mark-paragraph) now accepts a prefix arg. -With positive arg, M-h marks the current and the following paragraphs; -if the arg is negative, it marks the current and the preceding -paragraphs. - -+++ -** The variables dired-free-space-program and dired-free-space-args -have been renamed to directory-free-space-program and -directory-free-space-args, and they now apply whenever Emacs puts a -directory listing into a buffer. - ---- -** mouse-wheels can now scroll a specific fraction of the window -(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 -mouse-wheel-inhibit-click-time variables. - -+++ -** The keyboard-coding-system is now automatically set based on your -current locale settings if you are not using a window system. This -may mean that the META key doesn't work but generates non-ASCII -characters instead, depending on how the terminal (or terminal -emulator) works. Use `set-keyboard-coding-system' (or customize -keyboard-coding-system) if you prefer META to work (the old default) -or if the locale doesn't describe the character set actually generated -by the keyboard. See Info node `Single-Byte Character Support'. - -+++ -** Emacs now reads the standard abbrevs file ~/.abbrev_defs -automatically at startup, if it exists. When Emacs offers to save -modified buffers, it saves the abbrevs too if they have changed. It -can do this either silently or asking for confirmation first, -according to the value of `save-abbrevs'. - -+++ -** Display of hollow cursors now obeys the buffer-local value (if any) -of `cursor-in-non-selected-windows' in the buffer that the cursor -appears in. - -+++ -** The variable `cursor-in-non-selected-windows' can now be set to any -of the recognized cursor types. - ---- -** The variable `auto-save-file-name-transforms' now has a third element that -controls whether or not the function `make-auto-save-file-name' will -attempt to construct a unique auto-save name (e.g. for remote files). - -+++ -** There is a new calendar package, icalendar.el, that can be used to -convert Emacs diary entries to/from the iCalendar format. - -+++ -** Diary sexp entries can have custom marking in the calendar. -Diary sexp functions which only apply to certain days (such as -`diary-block' or `diary-cyclic') now take an optional parameter MARK, -which is the name of a face or a single-character string indicating -how to highlight the day in the calendar display. Specifying a -single-character string as @var{mark} places the character next to the -day in the calendar. Specifying a face highlights the day with that -face. This lets you have different colors or markings for vacations, -appointments, paydays or anything else using a sexp. - -+++ -** The new function `calendar-goto-day-of-year' (g D) prompts for a -year and day number, and moves to that date. Negative day numbers -count backward from the end of the year. - -+++ -** The new Calendar function `calendar-goto-iso-week' (g w) -prompts for a year and a week number, and moves to the first -day of that ISO week. - ---- -** The new variable `calendar-minimum-window-height' affects the -window generated by the function `generate-calendar-window'. - ---- -** The functions `holiday-easter-etc' and `holiday-advent' now take -optional arguments, in order to only report on the specified holiday -rather than all. This makes customization of variables such as -`christian-holidays' simpler. - ---- -** The function `simple-diary-display' now by default sets a header line. -This can be controlled through the variables `diary-header-line-flag' -and `diary-header-line-format'. - -+++ -** 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. - -+++ -** The new functions `diary-from-outlook', `diary-from-outlook-gnus', -and `diary-from-outlook-rmail' can be used to import diary entries -from Outlook-format appointments in mail messages. The variable -`diary-outlook-formats' can be customized to recognize additional -formats. - - -** 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: - - (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. - -+++ -*** New backends for Subversion and Meta-CVS. - -** EDiff changes. - -+++ -*** When comparing directories. -Typing D brings up a buffer that lists the differences between the contents of -directories. Now it is possible to use this buffer to copy the missing files -from one directory to another. - -+++ -*** When comparing files or buffers. -Typing the = key now offers to perform the word-by-word comparison of the -currently highlighted regions in an inferior Ediff session. If you answer 'n' -then it reverts to the old behavior and asks the user to select regions for -comparison. - -*** The new command `ediff-backup' compares a file with its most recent -backup using `ediff'. If you specify the name of a backup file, -`ediff-backup' compares it with the file of which it is a backup. - -+++ -** Etags changes. - -*** 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, -where `/TAGNAME' is optional, as usual, and MODS is a string of 0 or -more characters among `i' (ignore case), `m' (multi-line) and `s' -(single-line). The `m' and `s' modifiers behave as in Perl regular -expressions: `m' allows regexps to match more than one line, while `s' -(which implies `m') means that `.' matches newlines. The ability to -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. -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. - -**** 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. - -**** 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. - -**** 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. - -**** 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 -created from Cweb source files. When Etags tags the generated file, it -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 -the file FILE. +** 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. + +*** New features in evaluation commands + ++++ +*** 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 +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-:), +`eval-print-last-sexp' (C-j) and some edebug evaluation functions. +++ ** CC Mode changes. @@ -2275,34 +2057,47 @@ The function c-toggle-syntactic-indentation can be used to toggle syntactic indentation. -+++ -** The command line option --no-windows has been changed to ---no-window-system. The old one still works, but is deprecated. - -+++ -** The command `list-text-properties-at' has been deleted because -C-u C-x = gives the same information and more. - -+++ -** `buffer-menu' and `list-buffers' now list buffers whose names begin -with a space, when those buffers are visiting files. Normally buffers -whose names begin with space are omitted. - -+++ -** 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. - -+++ -** 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. - -+++ -** SGML mode has indentation and supports XML syntax. +--- +** Perl mode has a new variable `perl-indent-continued-arguments'. + +** Fortran mode changes: + +--- +*** Fortran mode does more font-locking by default. Use level 3 +highlighting for the old default. + ++++ +*** Fortran mode has a new variable `fortran-directive-re'. +Adapt this to match the format of any compiler directives you use. +Lines that match are never indented, and are given distinctive font-locking. + ++++ +*** F90 mode and Fortran mode have new navigation commands +`f90-end-of-block', `f90-beginning-of-block', `f90-next-block', +`f90-previous-block', `fortran-end-of-block', +`fortran-beginning-of-block'. + +--- +*** 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. + +--- +*** The new function `f90-backslash-not-special' can be used to change +the syntax of backslashes in F90 buffers. + +--- +** Prolog mode has a new variable `prolog-font-lock-keywords' +to support use of font-lock. + +** HTML/SGML changes: + +--- +*** Emacs now tries to set up buffer coding systems for HTML/XML files +automatically. + ++++ +*** SGML mode has indentation and supports XML syntax. The new variable `sgml-xml-mode' tells SGML mode to use XML syntax. When this option is enabled, SGML tags are inserted in XML style, i.e., there is always a closing tag. @@ -2310,84 +2105,398 @@ from the file name or buffer contents. +++ -** `xml-mode' is now an alias for `sgml-mode', which has XML support. - ---- -** Lisp mode now uses font-lock-doc-face for the docstrings. - ---- -** Perl mode has a new variable `perl-indent-continued-arguments'. - ---- -** Fortran mode does more font-locking by default. Use level 3 -highlighting for the old default. - -+++ -** Fortran mode has a new variable `fortran-directive-re'. -Adapt this to match the format of any compiler directives you use. -Lines that match are never indented, and are given distinctive font-locking. - -+++ -** F90 mode and Fortran mode have new navigation commands -`f90-end-of-block', `f90-beginning-of-block', `f90-next-block', -`f90-previous-block', `fortran-end-of-block', -`fortran-beginning-of-block'. - ---- -** 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. - ---- -** The new function `f90-backslash-not-special' can be used to change -the syntax of backslashes in F90 buffers. - ---- -** Prolog mode has a new variable `prolog-font-lock-keywords' -to support use of font-lock. - -+++ -** `special-display-buffer-names' and `special-display-regexps' now -understand two new boolean pseudo-frame-parameters `same-frame' and -`same-window'. - -+++ -** M-x setenv now expands environment variables of the form `$foo' and -`${foo}' in the specified new value of the environment variable. To -include a `$' in the value, use `$$'. - -+++ -** File-name completion can now ignore directories. -If an element of the list in `completion-ignored-extensions' ends in a -slash `/', it indicates a subdirectory that should be ignored when -completing file names. Elements of `completion-ignored-extensions' -which do not end in a slash are never considered when a completion -candidate is a directory. - -+++ -** The completion commands TAB, SPC and ? in the minibuffer apply only -to the text before point. If there is text in the buffer after point, -it remains unchanged. - ---- -** Enhanced visual feedback in *Completions* buffer. - -Completions lists use faces to highlight what all completions -have in common and where they begin to differ. - -The common prefix shared by all possible completions uses the face -`completions-common-part', while the first character that isn't the -same uses the face `completions-first-difference'. By default, -`completions-common-part' inherits from `default', and -`completions-first-difference' inherits from `bold'. The idea of -`completions-common-part' is that you can use it to make the common -parts less visible than normal, so that the rest of the differing -parts is, by contrast, slightly highlighted. - -+++ -** New user option `inhibit-startup-buffer-menu'. -When loading many files, for instance with `emacs *', Emacs normally -displays a buffer menu. This option turns the buffer menu off. +*** `xml-mode' is now an alias for `sgml-mode', which has XML support. + +** TeX modes: + ++++ +*** C-c C-c prompts for a command to run, and tries to offer a good default. + ++++ +*** The user option `tex-start-options-string' has been replaced +by two new user options: `tex-start-options', which should hold +command-line options to feed to TeX, and `tex-start-commands' which should hold +TeX commands to use at startup. + +--- +*** verbatim environments are now highlighted in courier by font-lock +and super/sub-scripts are made into super/sub-scripts. + ++++ +*** New major mode doctex-mode for *.dtx files. + +** BibTeX mode: +*** 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 +an existing BibTeX entry. + +*** New `bibtex-entry-format' option `required-fields', enabled by default. + +*** 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, +use fast but simplified algorithm for parsing BibTeX keys. + +*** 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 +types for which fields are filled automatically (if possible). + +*** 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 +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 +individual fields of a BibTeX entry. + +*** 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 +in multiple BibTeX files. + +*** The new command bibtex-copy-summary-as-kill pushes summary +of BibTeX entry to kill ring (bound to C-c C-t). + ++++ +** In Enriched mode, `set-left-margin' and `set-right-margin' are now +by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l' +and `C-c C-r'. + +** GUD changes: + ++++ +*** In GUD mode, when talking to GDB, C-x C-a C-j "jumps" the program +counter to the specified source line (the one where point is). + +--- +*** GUD mode has its own tool bar for controlling execution of the inferior +and other common debugger commands. + +--- +** GUD mode improvements for jdb: + +*** Search for source files using jdb classpath and class + information. Fast startup since there is no need to scan all + source files up front. There is also no need to create and maintain + lists of source directories to scan. Look at `gud-jdb-use-classpath' + and `gud-jdb-classpath' customization variables documentation. + +*** Supports the standard breakpoint (gud-break, gud-clear) + set/clear operations from java source files under the classpath, stack + traversal (gud-up, gud-down), and run until current stack finish + (gud-finish). + +*** Supports new jdb (Java 1.2 and later) in addition to oldjdb + (Java 1.1 jdb). + +*** 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. + + 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 + 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 + 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 +`starttls-use-gnutls' to switch to GNUTLS (or simply remove the +"starttls" tool). + +*** Do not allow debugger output history variable to grow without bounds. + +** Auto-Revert changes: + ++++ +*** 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 +the end of the buffer in that window. This allows to tail a file: +just put point at the end of the buffer and it stays there. This +rule applies to file buffers. For non-file buffers, the behavior may +be mode dependent. + +If you are sure that the file will only change by growing at the end, +then you can tail the file more efficiently by using the new minor +mode Auto Revert Tail mode. The function `auto-revert-tail-mode' +toggles this mode. + ++++ +*** Auto Revert mode is now more careful to avoid excessive reverts and +other potential problems when deciding which non-file buffers to +revert. This matters especially if Global Auto Revert mode is enabled +and `global-auto-revert-non-file-buffers' is non-nil. Auto Revert +mode only reverts a non-file buffer if the buffer has a non-nil +`revert-buffer-function' and a non-nil `buffer-stale-function', which +decides whether the buffer should be reverted. Currently, this means +that auto reverting works for Dired buffers (although this may not +work properly on all operating systems) and for the Buffer Menu. + ++++ +*** If the new user option `auto-revert-check-vc-info' is non-nil, Auto +Revert mode reliably updates version control info (such as the version +control number in the mode line), in all version controlled buffers in +which it is active. If the option is nil, the default, then this info +only gets updated whenever the buffer gets reverted. + +--- +** recentf changes. + +The recent file list is now automatically cleanup when recentf mode is +enabled. The new option `recentf-auto-cleanup' controls when to do +automatic cleanup. + +The `recentf-keep' option replaces `recentf-keep-non-readable-files-p' +and provides a more general mechanism to customize which file names to +keep in the recent list. + +With the more advanced option: `recentf-filename-handler', you can +specify a function that transforms filenames handled by recentf. For +example, if set to `file-truename', the same file will not be in the +recent list with different symbolic links. + +To follow naming convention, `recentf-menu-append-commands-flag' +replaces the misnamed option `recentf-menu-append-commands-p'. The +old name remains available as alias, but has been marked obsolete. + ++++ +** 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. + +--- +*** 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). + ++++ +*** New commands: + - desktop-revert reverts to the last loaded desktop. + - desktop-change-dir kills current desktop and loads a new. + - desktop-save-in-desktop-dir saves desktop in the directory from which + it was loaded. + - desktop-lazy-complete runs the desktop load to completion. + - desktop-lazy-abort aborts lazy loading of the desktop. + +--- +*** New customizable variables: + - desktop-save. Determins whether the desktop should be saved when it is + killed. + - desktop-file-name-format. Format in which desktop file names should be saved. + - desktop-path. List of directories in which to lookup the desktop file. + - desktop-locals-to-save. List of local variables to save. + - desktop-globals-to-clear. List of global variables that `desktop-clear' will clear. + - desktop-clear-preserve-buffers-regexp. Regexp identifying buffers that `desktop-clear' + should not delete. + - desktop-restore-eager. Number of buffers to restore immediately. Remaining buffers are + restored lazily (when Emacs is idle). + - desktop-lazy-verbose. Verbose reporting of lazily created buffers. + - desktop-lazy-idle-delay. Idle delay before starting to create buffers. + ++++ +*** New command line option --no-desktop + +--- +*** New hooks: + - desktop-after-read-hook run after a desktop is loaded. + - desktop-no-desktop-file-hook run when no desktop file is found. + +--- +** 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 +to get the old behavior. The new options `save-place-save-skipped' +and `save-place-skip-check-regexp' allow further fine-tuning of this +feature. + +** EDiff changes. + ++++ +*** When comparing directories. +Typing D brings up a buffer that lists the differences between the contents of +directories. Now it is possible to use this buffer to copy the missing files +from one directory to another. + ++++ +*** When comparing files or buffers. +Typing the = key now offers to perform the word-by-word comparison of the +currently highlighted regions in an inferior Ediff session. If you answer 'n' +then it reverts to the old behavior and asks the user to select regions for +comparison. + +*** The new command `ediff-backup' compares a file with its most recent +backup using `ediff'. If you specify the name of a backup file, +`ediff-backup' compares it with the file of which it is a backup. + ++++ +** Etags changes. + +*** 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, +where `/TAGNAME' is optional, as usual, and MODS is a string of 0 or +more characters among `i' (ignore case), `m' (multi-line) and `s' +(single-line). The `m' and `s' modifiers behave as in Perl regular +expressions: `m' allows regexps to match more than one line, while `s' +(which implies `m') means that `.' matches newlines. The ability to +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. +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. + +**** 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. + +**** 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. + +**** 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. + +**** 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 +created from Cweb source files. When Etags tags the generated file, it +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 +the file FILE. + +** 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: + + (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. + ++++ +*** New backends for Subversion and Meta-CVS. + ++++ +*** 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: + + P: annotates the previous revision + N: annotates the next revision + J: annotates the revision at line + A: annotates the revision previous to line + D: shows the diff of the revision at line with its previous revision + L: shows the log of the revision at line + W: annotates the workfile (most up to date) version + +** pcl-cvs changes: + ++++ +*** In pcl-cvs mode, there is a new `d y' command to view the diffs +between the local version of the file and yesterday's head revision +in the repository. + ++++ +*** 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 +-rBASE -rHEAD. + +** Gnus package + +--- +*** 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. --- ** Rmail now displays 5-digit message ids in its summary buffer. @@ -2401,6 +2510,256 @@ used instead of the native one. --- +** MH-E changes. + +Upgraded to MH-E version 7.82. There have been major changes since +version 5.0.2; see MH-E-NEWS for details. + +** Calendar changes: + ++++ +*** There is a new calendar package, icalendar.el, that can be used to +convert Emacs diary entries to/from the iCalendar format. + ++++ +*** Diary sexp entries can have custom marking in the calendar. +Diary sexp functions which only apply to certain days (such as +`diary-block' or `diary-cyclic') now take an optional parameter MARK, +which is the name of a face or a single-character string indicating +how to highlight the day in the calendar display. Specifying a +single-character string as @var{mark} places the character next to the +day in the calendar. Specifying a face highlights the day with that +face. This lets you have different colors or markings for vacations, +appointments, paydays or anything else using a sexp. + ++++ +*** The new function `calendar-goto-day-of-year' (g D) prompts for a +year and day number, and moves to that date. Negative day numbers +count backward from the end of the year. + ++++ +*** The new Calendar function `calendar-goto-iso-week' (g w) +prompts for a year and a week number, and moves to the first +day of that ISO week. + +--- +*** The new variable `calendar-minimum-window-height' affects the +window generated by the function `generate-calendar-window'. + +--- +*** The functions `holiday-easter-etc' and `holiday-advent' now take +optional arguments, in order to only report on the specified holiday +rather than all. This makes customization of variables such as +`christian-holidays' simpler. + +--- +*** The function `simple-diary-display' now by default sets a header line. +This can be controlled through the variables `diary-header-line-flag' +and `diary-header-line-format'. + ++++ +*** 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. + ++++ +*** The new functions `diary-from-outlook', `diary-from-outlook-gnus', +and `diary-from-outlook-rmail' can be used to import diary entries +from Outlook-format appointments in mail messages. The variable +`diary-outlook-formats' can be customized to recognize additional +formats. + +--- +** sql changes. + +*** The variable `sql-product' controls the highlightng of different +SQL dialects. This variable can be set globally via Customize, on a +buffer-specific basis via local variable settings, or for the current +session using the new SQL->Product submenu. (This menu replaces the +SQL->Highlighting submenu.) + +The following values are supported: + + ansi ANSI Standard (default) + db2 DB2 + informix Informix + ingres Ingres + interbase Interbase + linter Linter + ms Microsoft + mysql MySQL + oracle Oracle + postgres Postgres + solid Solid + sqlite SQLite + sybase Sybase + +The current product name will be shown on the mode line following the +SQL mode indicator. + +The technique of setting `sql-mode-font-lock-defaults' directly in +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, +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 +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 +are displayed when they occur rather than when the session is +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 +credentials to authenticate the user. + +*** Postgres support is enhanced. +Keyword highlighting of Postgres 7.3 is implemented. Prompting for +the username and the pgsql `-U' option is added. + +*** MySQL support is enhanced. +Keyword higlighting of MySql 4.0 is implemented. + +*** Imenu support has been enhanced to locate tables, views, indexes, +packages, procedures, functions, triggers, sequences, rules, and +defaults. + +*** Added SQL->Start SQLi Session menu entry which calls the +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'. + +** FFAP changes: + ++++ +*** 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. + +--- +** New variable `hs-set-up-overlay' allows customization of the overlay +used to effect hiding for hideshow minor mode. Integration with isearch +handles the overlay property `display' specially, preserving it during +temporary overlay showing in the course of an isearch operation. + ++++ +** 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. + +--- +** 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 +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. + +--- +** New command `strokes-global-set-stroke-string'. +This is like `strokes-global-set-stroke', but it allows you to bind +the stroke directly to a string to insert. This is convenient for +using strokes as an input method. + +--- +** LDAP support now defaults to ldapsearch from OpenLDAP version 2. + ++++ +** 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. + +--- +** `uniquify-strip-common-suffix' tells uniquify to prefer +`file|dir1' and `file|dir2' to `file|dir1/subdir' and `file|dir2/subdir'. + +--- +** 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. + +--- +** The game `mpuz' is enhanced. + +`mpuz' now allows the 2nd factor not to have two identical digits. By +default, all trivial operations involving whole lines are performed +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'. + +--- +** fast-lock.el and lazy-lock.el are obsolete. Use jit-lock.el instead. + +--- +** 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. + +* Changes for 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: + + emacs --xrm "Emacs.Background:red" --xrm "Emacs.Geometry:100x20" + +will start up Emacs on an initial frame of 100x20 with red background, +irrespective of geometry or background setting on the Windows registry. + +--- ** 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. @@ -2453,51 +2812,6 @@ the clipboard should work correctly for your local language without any customizations. -+++ -** Under X11, it is possible to swap Alt and Meta (and Super and Hyper). -The new variables `x-alt-keysym', `x-hyper-keysym', `x-meta-keysym', -and `x-super-keysym' can be used to choose which keysyms Emacs should -use for the modifiers. For example, the following two lines swap -Meta and Alt: - (setq x-alt-keysym 'meta) - (setq x-meta-keysym 'alt) - -+++ -** 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: - - P: annotates the previous revision - N: annotates the next revision - J: annotates the revision at line - A: annotates the revision previous to line - D: shows the diff of the revision at line with its previous revision - L: shows the log of the revision at line - W: annotates the workfile (most up to date) version - -+++ -** In pcl-cvs mode, there is a new `d y' command to view the diffs -between the local version of the file and yesterday's head revision -in the repository. - -+++ -** 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 --rBASE -rHEAD. - ---- -** New variable `hs-set-up-overlay' allows customization of the overlay -used to effect hiding for hideshow minor mode. Integration with isearch -handles the overlay property `display' specially, preserving it during -temporary overlay showing in the course of an isearch operation. - -+++ -** New command `recode-region' decodes the region again by a specified -coding system. - --- ** On Mac OS, the value of the variable `keyboard-coding-system' is now dynamically changed according to the current keyboard script. The @@ -2505,281 +2819,6 @@ `kTextEncodingMacRoman', `kTextEncodingISOLatin1', and `kTextEncodingISOLatin2' are obsolete. -* New modes and packages in Emacs 22.1 - -+++ -** The new package longlines.el provides a minor mode for editing text -files composed of long lines, based on the `use-hard-newlines' -mechanism. The long lines are broken up by inserting soft newlines, -which are automatically removed when saving the file to disk or -copying into the kill ring, clipboard, etc. By default, Longlines -mode inserts soft newlines automatically during editing, a behavior -referred to as "soft word wrap" in other text editors. This is -similar to Refill mode, but more reliable. To turn the word wrap -feature off, set `longlines-auto-wrap' to nil. - -+++ -** 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 dns-mode.el add syntax highlight of DNS master files. -The key binding C-c C-s (`dns-mode-soa-increment-serial') can be used -to increment the SOA serial. - -+++ -** The new package flymake.el does on-the-fly syntax checking of program -source files. See the Flymake's Info manual for more details. - ---- -** 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 wdired.el package allows you to use normal editing commands on Dired -buffers to change filenames, permissions, etc... - -+++ -** The thumbs.el package allows you to preview image files as thumbnails -and can be invoked from a Dired buffer. - -+++ -** 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 python.el package is used to edit Python and Jython programs. - ---- -** The URL package (which had been part of W3) is now part of Emacs. - -+++ -** The new global minor mode `size-indication-mode' (off by default) -shows the size of accessible part of the buffer on the mode line. - ---- -** GDB-Script-mode is used for files like .gdbinit. - ---- -** 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. - ---- -** CUA mode is now part of the Emacs distribution. - -The new cua package provides CUA-like keybindings using C-x for -cut (kill), C-c for copy, C-v for paste (yank), and C-z for undo. -With cua, the region can be set and extended using shifted movement -keys (like pc-selection-mode) and typed text replaces the active -region (like delete-selection-mode). Do not enable these modes with -cua-mode. Customize the variable `cua-mode' to enable cua. - -In addition, cua provides unified rectangle support with visible -rectangle highlighting: Use S-return to start a rectangle, extend it -using the movement commands (or mouse-3), and cut or copy it using C-x -or C-c (using C-w and M-w also works). - -Use M-o and M-c to `open' or `close' the rectangle, use M-b or M-f, to -fill it with blanks or another character, use M-u or M-l to upcase or -downcase the rectangle, use M-i to increment the numbers in the -rectangle, use M-n to fill the rectangle with a numeric sequence (such -as 10 20 30...), use M-r to replace a regexp in the rectangle, and use -M-' or M-/ to restrict command on the rectangle to a subset of the -rows. See the commentary in cua-base.el for more rectangle commands. - -Cua also provides unified support for registers: Use a numeric -prefix argument between 0 and 9, i.e. M-0 .. M-9, for C-x, C-c, and -C-v to cut or copy into register 0-9, or paste from register 0-9. - -The last text deleted (not killed) is automatically stored in -register 0. This includes text deleted by typing text. - -Finally, cua provides a global mark which is set using S-C-space. -When the global mark is active, any text which is cut or copied is -automatically inserted at the global mark position. See the -commentary in cua-base.el for more global mark related commands. - -The features of cua also works with the standard emacs bindings for -kill, copy, yank, and undo. If you want to use cua mode, but don't -want the C-x, C-c, C-v, and C-z bindings, you may customize the -`cua-enable-cua-keys' variable. - -Note: This version of cua mode is not backwards compatible with older -versions of cua.el and cua-mode.el. To ensure proper operation, you -must remove older versions of cua.el or cua-mode.el as well as the -loading and customization of those packages from the .emacs file. - -+++ -** The new keypad setup package provides several common bindings for -the numeric keypad which is available on most keyboards. The numeric -keypad typically has the digits 0 to 9, a decimal point, keys marked -+, -, /, and *, an Enter key, and a NumLock toggle key. The keypad -package only controls the use of the digit and decimal keys. - -By customizing the variables `keypad-setup', `keypad-shifted-setup', -`keypad-numlock-setup', and `keypad-numlock-shifted-setup', or by -using the function `keypad-setup', you can rebind all digit keys and -the decimal key of the keypad in one step for each of the four -possible combinations of the Shift key state (not pressed/pressed) and -the NumLock toggle state (off/on). - -The choices for the keypad keys in each of the above states are: -`Plain numeric keypad' where the keys generates plain digits, -`Numeric keypad with decimal key' where the character produced by the -decimal key can be customized individually (for internationalization), -`Numeric Prefix Arg' where the keypad keys produce numeric prefix args -for emacs editing commands, `Cursor keys' and `Shifted Cursor keys' -where the keys work like (shifted) arrow keys, home/end, etc., and -`Unspecified/User-defined' where the keypad keys (kp-0, kp-1, etc.) -are left unspecified and can be bound individually through the global -or local keymaps. - -+++ -** The new kmacro package provides a simpler user interface to -emacs' keyboard macro facilities. - -Basically, it uses two function keys (default F3 and F4) like this: -F3 starts a macro, F4 ends the macro, and pressing F4 again executes -the last macro. While defining the macro, F3 inserts a counter value -which automatically increments every time the macro is executed. - -There is now a keyboard macro ring which stores the most recently -defined macros. - -The C-x C-k sequence is now a prefix for the kmacro keymap which -defines bindings for moving through the keyboard macro ring, -C-x C-k C-p and C-x C-k C-n, editing the last macro C-x C-k C-e, -manipulating the macro counter and format via C-x C-k C-c, -C-x C-k C-a, and C-x C-k C-f. See the commentary in kmacro.el -for more commands. - -The normal macro bindings C-x (, C-x ), and C-x e now interfaces to -the keyboard macro ring. - -The C-x e command now automatically terminates the current macro -before calling it, if used while defining a macro. - -In addition, when ending or calling a macro with C-x e, the macro can -be repeated immediately by typing just the `e'. You can customize -this behavior via the variable kmacro-call-repeat-key and -kmacro-call-repeat-with-arg. - -Keyboard macros can now be debugged and edited interactively. -C-x C-k SPC steps through the last keyboard macro one key sequence -at a time, prompting for the actions to take. - ---- -** The old Octave mode bindings C-c f and C-c i have been changed -to C-c C-f and C-c C-i. The C-c C-i subcommands now have duplicate -bindings on control characters--thus, C-c C-i C-b is the same as -C-c C-i b, and so on. - -** The printing package is now part of the Emacs distribution. - -If you enable the printing package by including (require 'printing) in -the .emacs file, the normal Print item on the File menu is replaced -with a Print sub-menu which allows you to preview output through -ghostview, use ghostscript to print (if you don't have a PostScript -printer) or send directly to printer a PostScript code generated by -`ps-print' package. Use M-x pr-help for more information. - -+++ -** Calc is now part of the Emacs distribution. - -Calc is an advanced desk calculator and mathematical tool written in -Emacs Lisp. Its documentation is in a separate manual; within Emacs, -type "C-h i m calc RET" to read that manual. A reference card is -available in `etc/calccard.tex' and `etc/calccard.ps'. - -+++ -** Tramp is now part of the distribution. - -This package is similar to Ange-FTP: it allows you to edit remote -files. But whereas Ange-FTP uses FTP to access the remote host, -Tramp uses a shell connection. The shell connection is always used -for filename completion and directory listings and suchlike, but for -the actual file transfer, you can choose between the so-called -`inline' methods (which transfer the files through the shell -connection using base64 or uu encoding) and the `out-of-band' methods -(which invoke an external copying program such as `rcp' or `scp' or -`rsync' to do the copying). - -Shell connections can be acquired via `rsh', `ssh', `telnet' and also -`su' and `sudo'. Ange-FTP is still supported via the `ftp' method. - -If you want to disable Tramp you should set - - (setq tramp-default-method "ftp") - ---- -** The new global minor mode `file-name-shadow-mode' modifies the way -filenames being entered by the user in the minibuffer are displayed, so -that it's clear when part of the entered filename will be ignored due to -emacs' filename parsing rules. The ignored portion can be made dim, -invisible, or otherwise less visually noticable. The display method may -be displayed by customizing the variable `file-name-shadow-properties'. - ---- -** The ruler-mode.el library provides a minor mode for displaying an -"active" ruler in the header line. You can use the mouse to visually -change the `fill-column', `window-margins' and `tab-stop-list' -settings. - ---- -** The minor mode Reveal mode makes text visible on the fly as you -move your cursor into hidden regions of the buffer. -It should work with any package that uses overlays to hide parts -of a buffer, such as outline-minor-mode, hs-minor-mode, hide-ifdef-mode, ... - -There is also Global Reveal mode which affects all buffers. - ---- -** The new package ibuffer provides a powerful, completely -customizable replacement for buff-menu.el. - -+++ -** The new package table.el implements editable, WYSIWYG, embedded -`text tables' in Emacs buffers. It simulates the effect of putting -these tables in a special major mode. The package emulates WYSIWYG -table editing available in modern word processors. The package also -can generate a table source in typesetting and markup languages such -as latex and html from the visually laid out text table. - -+++ -** SES mode (ses-mode) is a new major mode for creating and editing -spreadsheet files. Besides the usual Emacs features (intuitive command -letters, undo, cell formulas in Lisp, plaintext files, etc.) it also offers -viral immunity and import/export of tab-separated values. - ---- -** 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. - ---- -** cplus-md.el has been removed to avoid problems with Custom. - -+++ -** New package benchmark.el contains simple support for convenient -timing measurements of code (including the garbage collection component). - ---- -** The new Lisp library fringe.el controls the appearance of fringes. - ---- -** `cfengine-mode' is a major mode for editing GNU Cfengine -configuration files. - * Incompatible Lisp Changes in Emacs 22.1 +++ @@ -2800,108 +2839,397 @@ * Lisp Changes in Emacs 22.1 -** New functions, macros, and commands - -+++ -*** 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 -`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 -`buffer-substring-filters' to remove soft newlines from the copied -text. - -+++ -*** (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. - -+++ -*** 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. - -+++ -*** New functions `make-progress-reporter', `progress-reporter-update', -`progress-reporter-force-update', `progress-reporter-done', and -`dotimes-with-progress-reporter' provide a simple and efficient way for -a command to present progress messages for the user. - -+++ -*** The new primitive `get-internal-run-time' returns the processor -run time used by Emacs since start-up. - -+++ -*** 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 add a new "interactive" argument to the -command. - -+++ -*** The new function `assoc-string' replaces `assoc-ignore-case' and -`assoc-ignore-representation', which are still available, but have -been declared obsolete. - ---- -*** New function quail-find-key returns a list of keys to type in the -current input method to input a character. - -+++ -*** New functions posn-at-point and posn-at-x-y return -click-event-style position information for a given visible buffer -position or for a given window pixel coordinate. - -+++ -*** 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 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). - -+++ -*** New function `line-number-at-pos' returns line number of current -line in current buffer, or if optional buffer position is given, line -number of corresponding line in current buffer. - -+++ -*** New function `macroexpand-all' expands all macros in a form. -It is similar to the Common-Lisp function of the same name. -One difference is that it guarantees to return the original argument -if no expansion is done, which may be tested using `eq'. - -+++ -*** New macro with-local-quit temporarily sets inhibit-quit to nil for use -around potentially blocking or long-running code in timers -and post-command-hooks. - -+++ -*** The new function `rassq-delete-all' deletes all elements from an -alist whose cdr is `eq' to a specified value. - -+++ -*** New macros define-obsolete-variable-alias to combine defvaralias and -make-obsolete-variable and define-obsolete-function-alias to combine defalias -and make-obsolete. ++++ +** The option --script FILE runs Emacs in batch mode and loads FILE. +It is useful for writing Emacs Lisp shell script files, because they +can start with this line: + + #!/usr/bin/emacs --script + ++++ +** The option --directory DIR now modifies `load-path' immediately. +Directories are added to the front of `load-path' in the order they +appear on the command line. For example, with this command line: + + emacs -batch -L .. -L /tmp --eval "(require 'foo)" + +Emacs looks for library `foo' in the parent directory, then in /tmp, then +in the other directories in `load-path'. (-L is short for --directory.) + ++++ +** 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'. + ++++ +** The argument to forward-word, backward-word, forward-to-indentation +and backward-to-indentation is now optional, and defaults to 1. + ++++ +** If a command sets transient-mark-mode to `only', that +enables Transient Mark mode for the following command only. +During that following command, the value of transient-mark-mode +is `identity'. If it is still `identity' at the end of the command, +it changes to nil. + ++++ +** 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). + +--- +** list-buffers-noselect now takes an additional argument, BUFFER-LIST. +If it is non-nil, it specifies which buffers to list. + ++++ +** The kill-buffer-hook is now permanent-local. + ++++ +** `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. ---- -** easy-mmode-define-global-mode has been renamed to -define-global-minor-mode. The old name remains as an alias. ++++ +** 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 function `commandp' takes an additional optional +argument. If it is non-nil, then `commandp' checks +for a function that could be called with `call-interactively', +and does not return t for keyboard macros. + ++++ +** An interactive specification may 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. + +--- +** 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. + ++++ +** 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. + ++++ +** 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. + ++++ +** Variable aliases have been implemented: + +*** 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 +returns the value of BASE-VAR, and changing the value of ALIAS-VAR +changes the value of BASE-VAR. + +DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has +the same documentation as BASE-VAR. + +*** 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 +defined as an alias, the function returns VARIABLE. + +It might be noteworthy that variables aliases work for all kinds of +variables, including buffer-local and frame-local variables. + ++++ +*** The macro define-obsolete-variable-alias combines defvaralias and +make-obsolete-variable. The macro define-obsolete-function-alias +combines defalias and make-obsolete. + ++++ +** 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 + 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. + +To perform some changes in the current buffer "atomically" so that +they either all succeed or are all undone, use `atomic-change-group' +around the code that makes changes. For instance: + + (atomic-change-group + (insert foo) + (delete-region x y)) + +If an error (or other nonlocal exit) occurs inside the body of +`atomic-change-group', it unmakes all the changes in that buffer that +were during the execution of the body. The change group has no effect +on any other buffers--any such changes remain. + +If you need something more sophisticated, you can directly call the +lower-level functions that `atomic-change-group' uses. Here is how. + +To set up a change group for one buffer, call `prepare-change-group'. +Specify the buffer as argument; it defaults to the current buffer. +This function returns a "handle" for the change group. You must save +the handle to activate the change group and then finish it. + +Before you change the buffer again, you must activate the change +group. Pass the handle to `activate-change-group' afterward to +do this. + +After you make the changes, you must finish the change group. You can +either accept the changes or cancel them all. Call +`accept-change-group' to accept the changes in the group as final; +call `cancel-change-group' to undo them all. + +You should use `unwind-protect' to make sure the group is always +finished. The call to `activate-change-group' should be inside the +`unwind-protect', in case the user types C-g just after it runs. +(This is one reason why `prepare-change-group' and +`activate-change-group' are separate functions.) Once you finish the +group, don't use the handle again--don't try to finish the same group +twice. + +To make a multibuffer change group, call `prepare-change-group' once +for each buffer you want to cover, then use `nconc' to combine the +returned values, like this: + + (nconc (prepare-change-group buffer-1) + (prepare-change-group buffer-2)) + +You can then activate the multibuffer change group with a single call +to `activate-change-group', and finish it with a single call to +`accept-change-group' or `cancel-change-group'. + +Nested use of several change groups for the same buffer works as you +would expect. Non-nested use of change groups for the same buffer +will lead to undesirable results, so don't let it happen; the first +change group you start for any given buffer should be the last one +finished. + ++++ +** Progress reporters. +The new functions `make-progress-reporter', `progress-reporter-update', +`progress-reporter-force-update', `progress-reporter-done', and +`dotimes-with-progress-reporter' provide a simple and efficient way for +a command to present progress messages for the user. + ++++ +** New `yank-handler' text property may 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 may 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 may be modified by a `yank-handler' +text property. +++ ** An element of buffer-undo-list can now have the form (apply FUNNAME @@ -2914,6 +3242,160 @@ 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. + ++++ +** 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 +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 +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 +speech synthesis. + +*** Adaptive read buffering of subprocess output. + +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 +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. + +*** The new function `call-process-shell-command' executes a shell +command command synchronously in a separate process. + +*** The new function `process-file' is similar to `call-process', but +obeys file handlers. The file handler is chosen based on +default-directory. + +*** The new function `set-process-filter-multibyte' sets the +multibyteness of a string given to a process's filter. + +*** The new function `process-filter-multibyte-p' returns t if a +string given to a process's filter is multibyte. + +*** 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'. + +*** If a process's coding system is raw-text or no-conversion and its +buffer is multibyte, the output of the process is at first converted +to multibyte by `string-to-multibyte' then inserted in the buffer. +Previously, it was converted to multibyte by `string-as-multibyte', +which was not compatible with the behavior of file reading. + ++++ +** 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 +create a stream or datagram server inside emacs. + +- A server is started using :server t arg. +- Datagram connection is selected using :type 'datagram arg. +- A server can open on a random port using :service t arg. +- Local sockets are supported using :family 'local arg. +- Non-blocking connect is supported using :nowait t arg. +- The process' property list may be initialized using :plist PLIST arg; + a copy of the server process' property list is automatically inherited + by new client processes created to handle incoming connections. + +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. + +This function initiates a non-blocking connect and returns immediately +without waiting for the connection to be established. It takes the +filter and sentinel functions as arguments; when the non-blocking +connect completes, the sentinel is called with a status string +matching "open" or "failed". + +*** 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. + +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 +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. + +This function returns a list of network interface names and their +current network addresses. + +*** 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". + ++++ +** New function `force-window-update' can initiate a full redisplay of +one or all windows. Normally, this is not needed as changes in window +contents are detected automatically. However, certain implicit +changes to mode lines, header lines, or display properties may require +forcing an explicit window update. + ++++ ** 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 @@ -2921,139 +3403,152 @@ variable `auto-window-vscroll' to nil. +++ -** 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). - -+++ -** The function symbol-file tells you which file defined -a certain function or variable. - -+++ -** 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. - -+++ -** `set-auto-mode' now gives the interpreter magic line (if present) -precedence over the file name. Likewise an "\^x\^f" - -+++ -** 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". - -+++ -** 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. - -+++ -** skip-chars-forward and skip-chars-backward now handle -character classes such as [:alpha:], along with individual characters -and ranges. - -+++ ** Function pos-visible-in-window-p now returns the pixel coordinates and partial visiblity state of the corresponding row, if the PARTIALLY arg is non-nil. -+++ -** The function `eql' is now available without requiring the CL package. - -+++ -** The display space :width and :align-to text properties are now -supported on text terminals. - -+++ -** Support for displaying image slices - -*** New display property (slice X Y WIDTH HEIGHT) may be used with -an image property to display only a specific slice of the image. - -*** 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 -specified number of evenly sized slices (rows x columns). +** Changes in using window objects: + ++++ +*** You can now make a window as short as one line. + +A window that is just one line tall does not display either a mode +line or a header line, even if the variables `mode-line-format' and +`header-line-format' call for them. A window that is two lines tall +cannot display both a mode line and a header line at once; if the +variables call for both, only the mode line actually appears. + ++++ +*** The new function `window-inside-edges' returns the edges of the +actual text portion of the window, not including the scroll bar or +divider line, the fringes, the display margins, the header line and +the mode line. + ++++ +*** The new functions `window-pixel-edges' and `window-inside-pixel-edges' +return window edges in units of pixels, rather than columns and lines. + ++++ +*** The new macro `with-selected-window' temporarily switches the +selected window without impacting the order of buffer-list. + ++++ +*** `select-window' takes an optional second argument `norecord', like +`switch-to-buffer'. + ++++ +*** `save-selected-window' now saves and restores the selected window +of every frame. This way, it restores everything that can be changed +by calling `select-window'. + ++++ +*** The function `set-window-buffer' now has an optional third argument +KEEP-MARGINS which will preserve the window's current margin, fringe, +and scroll-bar settings if non-nil. + ++++ +** Customizable fringe bitmaps + +*** New function 'define-fringe-bitmap' can now be used to create new +fringe bitmaps, as well as change the built-in fringe bitmaps. + +To change a built-in bitmap, do (require 'fringe) and use the symbol +identifing the bitmap such as `left-truncation or `continued-line'. + +*** New function 'destroy-fringe-bitmap' may be used to destroy a +previously created bitmap, or restore a built-in bitmap. + +*** 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, +that can be used to show a specific bitmap in the left or right fringe +bitmap of the display line. + +Format is 'display '(left-fringe BITMAP [FACE]), where BITMAP is a +symbol identifying a fringe bitmap, either built-in or defined with +`define-fringe-bitmap', and FACE is an optional face name to be used +for displaying the bitmap instead of the default `fringe' face. +When specified, FACE is automatically merged with the `fringe' face. + +*** New function `fringe-bitmaps-at-pos' returns the current fringe +bitmaps in the display line at a given buffer position. + ++++ +** Controlling the default left and right fringe widths. + +The default left and right fringe widths for all windows of a frame +can now be controlled by setting the `left-fringe' and `right-fringe' +frame parameters to an integer value specifying the width in pixels. +Setting the width to 0 effectively removes the corresponding fringe. + +The actual default fringe widths for the frame may deviate from the +specified widths, since the combined fringe widths must match an +integral number of columns. The extra width is distributed evenly +between the left and right fringe. For force a specific fringe width, +specify the width as a negative integer (if both widths are negative, +only the left fringe gets the specified width). + +Setting the width to nil (the default), restores the default fringe +width which is the minimum number of pixels necessary to display any +of the currently defined fringe bitmaps. The width of the built-in +fringe bitmaps is 8 pixels. + ++++ +** Per-window fringe and scrollbar settings + +*** Windows can now have their own individual fringe widths and +position settings. + +To control the fringe widths of a window, either set the buffer-local +variables `left-fringe-width', `right-fringe-width', or call +`set-window-fringes'. + +To control the fringe position in a window, that is, whether fringes +are positioned between the display margins and the window's text area, +or at the edges of the window, either set the buffer-local variable +`fringes-outside-margins' or call `set-window-fringes'. + +The function `window-fringes' can be used to obtain the current +settings. To make `left-fringe-width', `right-fringe-width', and +`fringes-outside-margins' take effect, you must set them before +displaying the buffer in a window, or use `set-window-buffer' to force +an update of the display margins. + +*** Windows can now have their own individual scroll-bar settings +controlling the width and position of scroll-bars. + +To control the scroll-bar of a window, either set the buffer-local +variables `scroll-bar-mode' and `scroll-bar-width', or call +`set-window-scroll-bars'. The function `window-scroll-bars' can be +used to obtain the current settings. To make `scroll-bar-mode' and +`scroll-bar-width' take effect, you must set them before displaying +the buffer in a window, or use `set-window-buffer' to force an update +of the display margins. + ++++ +** When using non-toolkit scroll bars with the default width, +the scroll-bar-width frame parameter value is nil. + ++++ +** Multiple overlay arrows can now be defined and managed via the new +variable `overlay-arrow-variable-list'. It contains a list of +varibles which contain overlay arrow position markers, including +the original `overlay-arrow-position' variable. + +Each variable on this list may have individual `overlay-arrow-string' +and `overlay-arrow-bitmap' properties that specify an overlay arrow +string (for non-window terminals) or fringe bitmap (for window +systems) to display at the corresponding overlay arrow position. +If either property is not set, the default `overlay-arrow-string' or +'overlay-arrow-fringe-bitmap' will be used. +++ ** New line-height and line-spacing properties for newline characters @@ -3158,139 +3653,16 @@ The form `(- EXPR ...)' negates or subtracts the value of the expressions. +++ -** Normally, the cursor is displayed at the end of any overlay and -text property string that may be present at the current window -position. The cursor may now be placed on any character of such -strings by giving that character a non-nil `cursor' text property. - -+++ -** The first face specification element in a defface can specify -`default' instead of frame classification. Then its attributes act as -defaults that apply to all the subsequent cases (and may be overridden -by them). - -+++ -** New face attribute `min-colors' can be used to tailor the face color -to the number of colors supported by a display, and define the -foreground and background colors accordingly so that they look best on -a terminal that supports at least this many colors. This is now the -preferred method for defining default faces in a way that makes a good -use of the capabilities of the display. - -+++ -** Customizable fringe bitmaps - -*** New function 'define-fringe-bitmap' can now be used to create new -fringe bitmaps, as well as change the built-in fringe bitmaps. - -To change a built-in bitmap, do (require 'fringe) and use the symbol -identifing the bitmap such as `left-truncation or `continued-line'. - -*** New function 'destroy-fringe-bitmap' may be used to destroy a -previously created bitmap, or restore a built-in bitmap. - -*** 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, -that can be used to show a specific bitmap in the left or right fringe -bitmap of the display line. - -Format is 'display '(left-fringe BITMAP [FACE]), where BITMAP is a -symbol identifying a fringe bitmap, either built-in or defined with -`define-fringe-bitmap', and FACE is an optional face name to be used -for displaying the bitmap instead of the default `fringe' face. -When specified, FACE is automatically merged with the `fringe' face. - -*** New function `fringe-bitmaps-at-pos' returns the current fringe -bitmaps in the display line at a given buffer position. - -+++ -** Multiple overlay arrows can now be defined and managed via the new -variable `overlay-arrow-variable-list'. It contains a list of -varibles which contain overlay arrow position markers, including -the original `overlay-arrow-position' variable. - -Each variable on this list may have individual `overlay-arrow-string' -and `overlay-arrow-bitmap' properties that specify an overlay arrow -string (for non-window terminals) or fringe bitmap (for window -systems) to display at the corresponding overlay arrow position. -If either property is not set, the default `overlay-arrow-string' or -'overlay-arrow-fringe-bitmap' will be used. - -+++ -** 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'. - -+++ -** 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. - -+++ -** 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. - -+++ -** 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. - -+++ -** 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. - -+++ -** 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. - -+++ -** New function `get-char-property-and-overlay' accepts the same -arguments as `get-char-property' and returns a cons whose car is the -return value of `get-char-property' called with those arguments and -whose cdr is the overlay in which the property was found, or nil if -it was found as a text property or not found at all. - -+++ (lispref) -??? (man) -** The mouse pointer shape in void text areas (i.e. after the end of a -line or below the last line in the buffer) of the text window is now -controlled by the new variable `void-text-area-pointer'. The default -is to use the `arrow' (non-text) pointer. Other choices are `text' -(or nil), `hand', `vdrag', `hdrag', `modeline', and `hourglass'. - -+++ -** The mouse pointer shape over an image can now be controlled by the -:pointer image property. - -+++ -** The mouse pointer shape over ordinary text or images may now be -controlled/overriden via the `pointer' text property. +** Support for displaying image slices + +*** New display property (slice X Y WIDTH HEIGHT) may be used with +an image property to display only a specific slice of the image. + +*** 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 +specified number of evenly sized slices (rows x columns). +++ ** Images may now have an associated image map via the :map property. @@ -3315,6 +3687,27 @@ an event is composed by combining the ID of the hot-spot with the mouse event, e.g. [area4 mouse-1] if the hot-spot's ID is `area4'. ++++ (lispref) +??? (man) +** The mouse pointer shape in void text areas (i.e. after the end of a +line or below the last line in the buffer) of the text window is now +controlled by the new variable `void-text-area-pointer'. The default +is to use the `arrow' (non-text) pointer. Other choices are `text' +(or nil), `hand', `vdrag', `hdrag', `modeline', and `hourglass'. + ++++ +** The mouse pointer shape over an image can now be controlled by the +:pointer image property. + ++++ +** 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. + ++++ +** The mouse pointer shape over ordinary text or images may now be +controlled/overriden via the `pointer' text property. + ** Mouse event enhancements: +++ @@ -3363,45 +3756,58 @@ of that object, and the total width and height of that object. +++ -** New function `force-window-update' can initiate a full redisplay of -one or all windows. Normally, this is not needed as changes in window -contents are detected automatically. However, certain implicit -changes to mode lines, header lines, or display properties may require -forcing an explicit window update. - ---- -** New function `redirect-debugging-output' can be used to redirect -debugging output on the stderr file handle to a file. - -+++ -** `split-string' now includes null substrings in the returned list if -the optional argument SEPARATORS is non-nil and there are matches for -SEPARATORS at the beginning or end of the string. If SEPARATORS is -nil, or if the new optional third argument OMIT-NULLS is non-nil, all -empty matches are omitted from the returned list. - -+++ -** `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. - -+++ -** Major modes can define `eldoc-documentation-function' -locally to provide Eldoc functionality by some method appropriate to -the language. - ---- -** New coding system property `mime-text-unsuitable' indicates that -the coding system's `mime-charset' is not suitable for MIME text -parts, e.g. utf-16. - -+++ -** The argument to forward-word, backward-word, forward-to-indentation -and backward-to-indentation is now optional, and defaults to 1. +** At the end of a command, point moves out from within invisible +text, in the same way it moves out from within text covered by an +image or composition property. + +This makes it generally unnecessary to mark invisible text as intangible. +This is particularly good because the intangible property often has +unexpected side-effects since the property applies to everything +(including `goto-char', ...) whereas this new code is only run after +post-command-hook and thus does not care about intermediate states. + ++++ +** Normally, the cursor is displayed at the end of any overlay and +text property string that may be present at the current window +position. The cursor may now be placed on any character of such +strings by giving that character a non-nil `cursor' text property. + ++++ +** The display space :width and :align-to text properties are now +supported on text terminals. + ++++ +** Arguments for remove-overlays are now optional, so that you can +remove all overlays in the buffer by just calling (remove-overlay). + ++++ +** 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', +although it applies to overlays as well. This variable was introduced +to implement the `font-lock-face' property. + ++++ +** New function `get-char-property-and-overlay' accepts the same +arguments as `get-char-property' and returns a cons whose car is the +return value of `get-char-property' called with those arguments and +whose cdr is the overlay in which the property was found, or nil if +it was found as a text property or not found at all. + ++++ +** The new frame parameter `tty-color-mode' specifies the mode to use +for color support on character terminal frames. Its value can be a +number of colors to support, or a symbol. See the Emacs Lisp +Reference manual for more detailed documentation. + ++++ +** The new face attribute `min-colors' can be used to tailor the face +color to the number of colors supported by a display, and define the +foreground and background colors accordingly so that they look best on +a terminal that supports at least this many colors. This is now the +preferred method for defining default faces in a way that makes a good +use of the capabilities of the display. +++ ** (char-displayable-p CHAR) returns non-nil if Emacs ought to be able @@ -3412,42 +3818,223 @@ does that, this value may not be accurate. +++ -** The new function `window-inside-edges' returns the edges of the -actual text portion of the window, not including the scroll bar or -divider line, the fringes, the display margins, the header line and -the mode line. - -+++ -** The new functions `window-pixel-edges' and `window-inside-pixel-edges' -return window edges in units of pixels, rather than columns and lines. - -+++ -** The kill-buffer-hook is now permanent-local. - -+++ -** `select-window' takes an optional second argument `norecord', like -`switch-to-buffer'. - -+++ -** The new macro `with-selected-window' temporarily switches the -selected window without impacting the order of buffer-list. - -+++ -** 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. - -+++ -** (map-keymap FUNCTION KEYMAP) applies the function to each binding -in the keymap. - ---- -** VC changes for backends: -*** (vc-switches BACKEND OPERATION) is a new function for use by backends. -*** The new `find-version' backend function replaces the `destfile' -parameter of the `checkout' backend function. -Old code still works thanks to a default `find-version' behavior that -uses the old `destfile' parameter. +** New function display-supports-face-attributes-p may 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. + +--- +** The special treatment of faces whose names are of the form `fg:COLOR' +or `bg:COLOR' has been removed. Lisp programs should use the +`defface' facility for defining faces with specific colors, or use +the feature of specifying the face attributes :foreground and :background +directly in the `face' property instead of using a named face. + ++++ +** The first face specification element in a defface can specify +`default' instead of frame classification. Then its attributes act as +defaults that apply to all the subsequent cases (and may be overridden +by them). + ++++ +** The variable `face-font-rescale-alist' specifies how much larger +(or smaller) font we should use. For instance, if the value is +'((SOME-FONTNAME-PATTERN . 1.3)) and a face requests a font of 10 +point, we actually use a font of 13 point if the font matches +SOME-FONTNAME-PATTERN. + +--- +** `set-fontset-font', `fontset-info', `fontset-font' now operate on +the default fontset if the argument NAME is nil.. + +--- +** The function face-differs-from-default-p now truly checks whether the +given face displays differently from the default face or 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. + ++++ +** New functions face-attribute-relative-p and merge-face-attribute +help with handling relative face attributes. + ++++ +** The priority of faces in an :inherit attribute face-list is reversed. +If a face contains an :inherit attribute with a list of faces, earlier +faces in the list override later faces in the list; in previous releases +of Emacs, the order was the opposite. This change was made so that +:inherit face-lists operate identically to face-lists in text `face' +properties. + ++++ +** New standard font-lock face `font-lock-preprocessor-face'. + ++++ +** New special text property `font-lock-face'. + +This property acts like the `face' property, but it is controlled by +M-x font-lock-mode. It is not, strictly speaking, a builtin text +property. Instead, it is implemented inside font-core.el, using the +new variable `char-property-alias-alist'. + +--- +** jit-lock obeys a new text-property `jit-lock-defer-multiline'. +If a piece of text with that property gets contextually refontified +(see jit-lock-defer-contextually), then all of that text will +be refontified. This is useful when the syntax of a textual element +depends on text several lines further down (and when font-lock-multiline +is not appropriate to solve that problem). For example in Perl: + + s{ + foo + }{ + bar + }e + +Adding/removing the last `e' changes the `bar' from being a piece of +text to being a piece of code, so you'd put a jit-lock-defer-multiline +property over the second half of the command to force (deferred) +refontification of `bar' whenever the `e' is added/removed. + ++++ +** font-lock can manage arbitrary text-properties beside `face'. +*** 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 extra +properties are automatically cleaned up by font-lock. + +--- +** 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. + ++++ +** `set-auto-mode' now gives the interpreter magic line (if present) +precedence over the file name. Likewise an 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. - -+++ -** 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. - -To perform some changes in the current buffer "atomically" so that -they either all succeed or are all undone, use `atomic-change-group' -around the code that makes changes. For instance: - - (atomic-change-group - (insert foo) - (delete-region x y)) - -If an error (or other nonlocal exit) occurs inside the body of -`atomic-change-group', it unmakes all the changes in that buffer that -were during the execution of the body. The change group has no effect -on any other buffers--any such changes remain. - -If you need something more sophisticated, you can directly call the -lower-level functions that `atomic-change-group' uses. Here is how. - -To set up a change group for one buffer, call `prepare-change-group'. -Specify the buffer as argument; it defaults to the current buffer. -This function returns a "handle" for the change group. You must save -the handle to activate the change group and then finish it. - -Before you change the buffer again, you must activate the change -group. Pass the handle to `activate-change-group' afterward to -do this. - -After you make the changes, you must finish the change group. You can -either accept the changes or cancel them all. Call -`accept-change-group' to accept the changes in the group as final; -call `cancel-change-group' to undo them all. - -You should use `unwind-protect' to make sure the group is always -finished. The call to `activate-change-group' should be inside the -`unwind-protect', in case the user types C-g just after it runs. -(This is one reason why `prepare-change-group' and -`activate-change-group' are separate functions.) Once you finish the -group, don't use the handle again--don't try to finish the same group -twice. - -To make a multibuffer change group, call `prepare-change-group' once -for each buffer you want to cover, then use `nconc' to combine the -returned values, like this: - - (nconc (prepare-change-group buffer-1) - (prepare-change-group buffer-2)) - -You can then activate the multibuffer change group with a single call -to `activate-change-group', and finish it with a single call to -`accept-change-group' or `cancel-change-group'. - -Nested use of several change groups for the same buffer works as you -would expect. Non-nested use of change groups for the same buffer -will lead to undesirable results, so don't let it happen; the first -change group you start for any given buffer should be the last one -finished. - -+++ -** 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', -although it applies to overlays as well. This variable was introduced -to implement the `font-lock-face' property. - -+++ -** New special text property `font-lock-face'. - -This property acts like the `face' property, but it is controlled by -M-x font-lock-mode. It is not, strictly speaking, a builtin text -property. Instead, it is implemented inside font-core.el, using the -new variable `char-property-alias-alist'. - -+++ -** New function remove-list-of-text-properties. - -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. - -+++ -** New function insert-for-yank. - -This function normally works like `insert' but removes the text -properties in the `yank-excluded-properties' list. However, if the -inserted text has a `yank-handler' text property on the first -character of the string, the insertion of the text may be modified in -a number of ways. See the description of `yank-handler' below. - -+++ -** New function insert-buffer-substring-as-yank. - -This function works like `insert-buffer-substring', but removes the -text properties in the `yank-excluded-properties' list. - -+++ -** New function insert-buffer-substring-no-properties. - -This function is like insert-buffer-substring, but removes all -text properties from the inserted substring. - -+++ -** New `yank-handler' text property may 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 may 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. - -+++ -** New function display-supports-face-attributes-p may 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. - ---- -** The function face-differs-from-default-p now truly checks whether the -given face displays differently from the default face or 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. - -+++ -** New functions face-attribute-relative-p and merge-face-attribute -help with handling relative face attributes. - -+++ -** The priority of faces in an :inherit attribute face-list is reversed. -If a face contains an :inherit attribute with a list of faces, earlier -faces in the list override later faces in the list; in previous releases -of Emacs, the order was the opposite. This change was made so that -:inherit face-lists operate identically to face-lists in text `face' -properties. - -+++ -** 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 -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 -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 -speech synthesis. - ---- -*** Adaptive read buffering of subprocess output. - -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 -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. - -+++ -** 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 -create a stream or datagram server inside emacs. - -- A server is started using :server t arg. -- Datagram connection is selected using :type 'datagram arg. -- A server can open on a random port using :service t arg. -- Local sockets are supported using :family 'local arg. -- Non-blocking connect is supported using :nowait t arg. -- The process' property list may be initialized using :plist PLIST arg; - a copy of the server process' property list is automatically inherited - by new client processes created to handle incoming connections. - -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. - -This function initiates a non-blocking connect and returns immediately -without waiting for the connection to be established. It takes the -filter and sentinel functions as arguments; when the non-blocking -connect completes, the sentinel is called with a status string -matching "open" or "failed". - -*** 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. - -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 -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. - -This function returns a list of network interface names and their -current network addresses. - -*** New function network-interface-info. - -This function returns the network address, hardware address, current -status, and other information about a specific network interface. - -+++ -** New function copy-tree. - -+++ -** New function substring-no-properties. - -+++ -** New function minibuffer-selected-window. - -+++ -** New function `call-process-shell-command'. - -+++ -** New function `process-file'. - -This is similar to `call-process', but obeys file handlers. The file -handler is chosen based on default-directory. - ---- -** The dummy function keys made by easymenu -are now always lower case. If you specify the -menu item name "Ada", for instance, it uses `ada' -as the "key" bound by that key binding. - -This is relevant only if Lisp code looks for -the bindings that were made with easymenu. - -+++ -** The function `commandp' takes an additional optional -argument. If it is non-nil, then `commandp' checks -for a function that could be called with `call-interactively', -and does not return t for keyboard macros. - ---- -** 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)))) - -+++ -** File local variables. - -A file local variables list cannot specify a string with text -properties--any specified text properties are discarded. - -+++ -** New function window-body-height. - -This is like window-height but does not count the mode line -or the header line. - -+++ -** New function format-mode-line. - -This returns the mode-line or header-line of the selected (or a -specified) window as a string with or without text properties. - +++ ** Functions `get' and `plist-get' no longer signals an error for a malformed property list. They also detect cyclic lists. +++ -** New functions `lax-plist-get' and `lax-plist-put'. - -These functions are like `plist-get' and `plist-put' except that they -compare the property name using `equal' rather than `eq'. - -+++ -** New function `tool-bar-local-item-from-menu' - -The `tool-bar-add-item-from-menu' must not be used (as previously -recommended) for making entries in the tool bar for local keymaps. -Instead, use the function `tool-bar-local-item-from-menu', which lets -you specify the map to use as an argument. - -+++ ** The function `atan' now accepts an optional second argument. When called with 2 arguments, as in `(atan Y X)', `atan' returns the @@ -4299,19 +4291,10 @@ equivalent to the standard C library function `atan2'.) +++ -** You can now make a window as short as one line. - -A window that is just one line tall does not display either a mode -line or a header line, even if the variables `mode-line-format' and -`header-line-format' call for them. A window that is two lines tall -cannot display both a mode line and a header line at once; if the -variables call for both, only the mode line actually appears. - -+++ -** The new frame parameter `tty-color-mode' specifies the mode to use -for color support on character terminal frames. Its value can be a -number of colors to support, or a symbol. See the Emacs Lisp -Reference manual for more detailed documentation. +** New function format-mode-line. + +This returns the mode-line or header-line of the selected (or a +specified) window as a string with or without text properties. +++ ** The new mode-line construct `(:propertize ELT PROPS...)' can be @@ -4334,41 +4317,6 @@ cl-indent package. See the new user option `lisp-backquote-indentation'. +++ -** Already true in Emacs 21.1, but not emphasized clearly enough: - -Multibyte buffers can now faithfully record all 256 character codes -from 0 to 255. As a result, most of the past reasons to use unibyte -buffers no longer exist. We only know of three reasons to use them -now: - -1. If you prefer to use unibyte text all of the time. - -2. For reading files into temporary buffers, when you want to avoid -the time it takes to convert the format. - -3. For binary files where format conversion would be pointless and -wasteful. - -+++ -** If text has a `keymap' property, that keymap takes precedence -over minor mode keymaps. - -+++ -** A hex escape in a string forces the string to be multibyte. -An octal escape makes it unibyte. - -+++ -** At the end of a command, point moves out from within invisible -text, in the same way it moves out from within text covered by an -image or composition property. - -This makes it generally unnecessary to mark invisible text as intangible. -This is particularly good because the intangible property often has -unexpected side-effects since the property applies to everything -(including `goto-char', ...) whereas this new code is only run after -post-command-hook and thus does not care about intermediate states. - -+++ ** field-beginning and field-end now accept an additional optional argument, LIMIT. @@ -4380,44 +4328,6 @@ flag. --- -** Support for Mocklisp has been removed. - ---- -** The function insert-string is now obsolete. - ---- -** 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. - ---- -** Dense keymaps now handle inheritance correctly. -Previously a dense keymap would hide all of the simple-char key -bindings of the parent keymap. - ---- -** jit-lock obeys a new text-property `jit-lock-defer-multiline'. -If a piece of text with that property gets contextually refontified -(see jit-lock-defer-contextually), then all of that text will -be refontified. This is useful when the syntax of a textual element -depends on text several lines further down (and when font-lock-multiline -is not appropriate to solve that problem). For example in Perl: - - s{ - foo - }{ - bar - }e - -Adding/removing the last `e' changes the `bar' from being a piece of -text to being a piece of code, so you'd put a jit-lock-defer-multiline -property over the second half of the command to force (deferred) -refontification of `bar' whenever the `e' is added/removed. - ---- ** describe-vector now takes a second argument `describer' which is called to print the entries' values. It defaults to `princ'. @@ -4425,137 +4335,33 @@ ** 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). + +++ ** emacsserver now runs pre-command-hook and post-command-hook when it receives a request from emacsclient. --- -** The variable `recursive-load-depth-limit' has been deleted. -Emacs now signals an error if the same file is loaded with more -than 3 levels of nesting. - ---- -** If a major mode function has a non-nil `no-clone-indirect' -property, `clone-indirect-buffer' signals an error if you use -it in that buffer. - ---- -** 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. - -+++ -** New function `buffer-local-value'. - -This function 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. - ---- ** New function `text-clone-create'. Text clones are chunks of text that are kept identical by transparently propagating changes from one clone to the other. +++ -** font-lock can manage arbitrary text-properties beside `face'. -*** 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 extra -properties are automatically cleaned up by font-lock. - ---- -** The special treatment of faces whose names are of the form `fg:COLOR' -or `bg:COLOR' has been removed. Lisp programs should use the -`defface' facility for defining faces with specific colors, or use -the feature of specifying the face attributes :foreground and :background -directly in the `face' property instead of using a named face. - -+++ -** The new function `run-mode-hooks' and the new macro `delay-mode-hooks' -are used by define-derived-mode to make sure the mode hook for the -parent mode is run at the end of the child mode. - -+++ -** define-minor-mode now accepts arbitrary additional keyword arguments -and simply passes them to defcustom, if applicable. - -+++ -** define-derived-mode by default creates a new empty abbrev table. -It does not copy abbrevs from the parent mode's abbrev table. - -+++ -** `provide' and `featurep' now accept an optional second argument -to test/provide subfeatures. Also `provide' now checks `after-load-alist' -and runs any code associated with the provided feature. - -+++ -** 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. - -+++ ** Functions `user-uid' and `user-real-uid' now return floats if the user UID doesn't fit in a Lisp integer. Function `user-full-name' accepts a float as UID parameter. ---- -** `define-key-after' now accepts keys longer than 1. - -+++ -** The local variable `no-byte-compile' in elisp files is now obeyed. - -+++ -** The Emacs Lisp 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. - -+++ -** New functions `keymap-prompt' and `current-active-maps'. - ---- -** New function `describe-buffer-bindings'. - +++ ** New vars `exec-suffixes' and `load-suffixes' used when searching for an executable resp. an elisp file. +++ -** Variable aliases have been implemented: - -*** 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 -returns the value of BASE-VAR, and changing the value of ALIAS-VAR -changes the value of BASE-VAR. - -DOCSTRING, if present, is the documentation for ALIAS-VAR; else it has -the same documentation as BASE-VAR. - -*** 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 -defined as an alias, the function returns VARIABLE. - -It might be noteworthy that variables aliases work for all kinds of -variables, including buffer-local and frame-local variables. - -+++ ** 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. +++ -** 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. - -+++ ** The variables most-positive-fixnum and most-negative-fixnum hold the largest and smallest possible integer values. @@ -4565,30 +4371,194 @@ formerly used for that purpose is now an alias for locale-coding-system. --- -** 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. - ---- ** New function x-send-client-message sends a client message when running under X. -+++ -** Arguments for remove-overlays are now optional, so that you can remove -all overlays in the buffer by just calling (remove-overlay). +--- +** easy-mmode-define-global-mode has been renamed to +define-global-minor-mode. The old name remains as an alias. + +--- +** To manipulate the File menu using easy-menu, you must specify the +proper name "file". In previous Emacs versions, you had to specify +"files", even though the menu item itself was changed to say "File" +several versions ago. + +--- +** The dummy function keys made by easymenu are now always lower case. +If you specify the menu item name "Ada", for instance, it uses `ada' +as the "key" bound by that key binding. + +This is relevant only if Lisp code looks for the bindings that were +made with easymenu. + +--- +** `easy-menu-define' now allows you to use nil for the symbol name +if you don't need to give the menu a name. If you install the menu +into other keymaps right away (MAPS is non-nil), it usually doesn't +need to have a name. + +--- +** rx.el has new corresponding `symbol-end' and `symbol-start' elements. + +** New functions, macros, and commands: + ++++ +*** The new function `assoc-string' replaces `assoc-ignore-case' and +`assoc-ignore-representation', which are still available, but have +been declared obsolete. + ++++ +*** 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. + ++++ +*** 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 add a new "interactive" argument to the +command. + +*** The new function copy-abbrev-table returns a new abbrev table that +is a copy of a given abbrev table. + ++++ +*** 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. + ++++ +*** 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 +`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 +`buffer-substring-filters' to remove soft newlines from the copied +text. + ++++ +*** New functions frame-current-scroll-bars and window-current-scroll-bars. + +These functions return the current locations of the vertical and +horizontal scroll bars in a frame or window. + ++++ +*** The new primitive `get-internal-run-time' returns the processor +run time used by Emacs since start-up. + ++++ +*** 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-buffer-substring-no-properties is like +insert-buffer-substring, but removes all text properties from the +inserted substring. + ++++ +*** 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'. + ++++ +*** 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. + ++++ +*** 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. + ++++ +*** New function `macroexpand-all' expands all macros in a form. +It is similar to the Common-Lisp function of the same name. +One difference is that it guarantees to return the original argument +if no expansion is done, which may be tested using `eq'. + +*** 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. + ++++ +*** The new function `modify-all-frames-parameters' modifies parameters +for all (existing and future) frames. + ++++ +*** New functions posn-at-point and posn-at-x-y return +click-event-style position information for a given visible buffer +position or for a given window pixel coordinate. + +--- +*** New function quail-find-key returns a list of keys to type in the +current input method to input a character. + ++++ +*** The new function `rassq-delete-all' deletes all elements from an +alist whose cdr is `eq' to a specified value. + ++++ +*** 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 primitive `set-file-times' sets a file's access and +modification times. Magic file name handlers can handle this +operation. + ++++ +*** New function substring-no-properties returns a substring without +text properties. + ++++ +*** 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). + ++++ +*** New function `tool-bar-local-item-from-menu' + +The `tool-bar-add-item-from-menu' must not be used (as previously +recommended) for making entries in the tool bar for local keymaps. +Instead, use the function `tool-bar-local-item-from-menu', which lets +you specify the map to use as an argument. + ++++ +*** New function window-body-height. +This is like window-height but does not count the mode line +or the header line. + ++++ +*** (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. + ++++ +*** New macro with-local-quit temporarily sets inhibit-quit to nil for use +around potentially blocking or long-running code in timers +and post-command-hooks. ** New packages: -+++ -*** 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 -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. - *** The new package syntax.el provides an efficient way to find the current syntactic context (as returned by parse-partial-sexp). @@ -4607,6 +4577,54 @@ 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. + +--- +** Support for Mocklisp has been removed. + +--- +** The function insert-string is now obsolete. * Installation changes in Emacs 21.3 diff -r 6deb860255f3 -r b151ec53c504 etc/TUTORIAL.pl --- a/etc/TUTORIAL.pl Tue May 03 03:01:09 2005 +0000 +++ b/etc/TUTORIAL.pl Fri May 06 21:06:31 2005 +0000 @@ -1,5 +1,5 @@ -krótki samouczek Emacsa. Copyright (c) 1985, 2001 -Free Software Foundation, Inc. Szczegó³y na koñcu pliku. +Krótki samouczek Emacsa. Warunki kopiowania znajduj± sie na koñcu pliku. +Copyright (c) 1985, 1996, 1998, 2001, 2002, 2005 Free Software Foundation. Polecenia Emacsa wymagaj± na ogó³ wci¶niêcia klawisza CONTROL (oznaczanego czasami Ctrl lub CTL) lub klawisza META (oznaczanego czasami EDIT diff -r 6deb860255f3 -r b151ec53c504 lisp/ChangeLog --- a/lisp/ChangeLog Tue May 03 03:01:09 2005 +0000 +++ b/lisp/ChangeLog Fri May 06 21:06:31 2005 +0000 @@ -1,3 +1,207 @@ +2005-05-05 Luc Teirlinck + + * emacs-lisp/byte-run.el (define-obsolete-function-alias) + (define-obsolete-variable-alias): Doc Fixes. + +2005-05-06 Kim F. Storm + + * simple.el (line-move-1): Fix 2005-04-26 change. Must still use + vertical-motion when selective-display is active. + + * ido.el (ido-setup-hook): New hook. + (ido-define-mode-map-hook): Remove hook; use ido-setup-hook instead. + (ido-input-stack): New var. + (ido-define-mode-map): Bind M-b to ido-push-dir. Move old + ido-next-work-file binding to M-O. + Bind M-f to ido-wide-find-file-or-pop-dir. + (ido-define-mode-map): Don't run ido-define-mode-map-hook. + (ido-read-internal): Run ido-setup-hook. + Catch quit in read-file-name and read-string to cancel edit. + Handle new push, pop, and pop-all exit codes (for M-b/M-f). + Automatically pop-all when completing a directory name (RET). + (ido-file-internal): Add with-no-warnings around ffap and dired code. + (ido-exit-minibuffer): Use exit-minibuffer instead of throw. + (ido-wide-find-file, ido-wide-find-dir): Catch quit to cancel find. + (ido-push-dir, ido-pop-dir, ido-wide-find-file-or-pop-dir): New + functions for M-b/M-f to move among the directory components. + (ido-make-merged-file-list): Catch quit to cancel merge. + (ido-make-dir-list): Delete "." when ido-input-stack is non-empty. + (ido-completion-help): No warnings for ido-completion-buffer-full. + +2005-05-05 Daniel Pfeiffer + + * font-lock.el (font-lock-negation-char-face): New face and variable. + * progmodes/cc-fonts.el (c-cpp-matchers): Use it. + * progmodes/sh-script.el (sh-font-lock-keywords): Use it. + * progmodes/cperl-mode.el (cperl-init-faces): Use it. + * progmodes/make-mode.el (makefile-font-lock-keywords): Use it. + +2005-05-05 Juanma Barranquero + + * emacs-lisp/byte-run.el (define-obsolete-function-alias): Fix + typo in docstring. + + * progmodes/ebrowse.el (ebrowse-install-1-to-9-keys) + (ebrowse-print-statistics-line) + (ebrowse-electric-position-mode-hook): Fix typo in docstring. + + * term/w32-win.el (image-library-alist): Add additional name for + Xpm library. + +2005-05-05 Nick Roberts + + * progmodes/cmacexp.el (c-macro-preprocessor): Update for BSD and + use gcc instead of cpp. + + * progmodes/gdb-ui.el (gdb-cpp-define-alist-flags): New variable. + (gdb-create-define-alist): Use it. + (gdb-cpp-define-alist-program): Update for MS-DOS? + +2005-05-04 Nick Roberts + + * progmodes/cmacexp.el (c-macro-preprocessor): Update for Mac OSX. + +2005-05-03 Ulf Jasper + + * calendar/icalendar.el (icalendar-version): Now at 0.12. + (icalendar-duration-correction): Remove. + (icalendar--get-event-properties): Split result at commas. + (icalendar--decode-isoduration): New optional argument + DURATION-CORRECTION. + (icalendar--convert-ordinary-to-ical, icalendar--convert-sexp-to-ical) + (icalendar--convert-yearly-to-ical, icalendar--convert-weekly-to-ical) + (icalendar--convert-block-to-ical, icalendar--convert-float-to-ical) + (icalendar--convert-date-to-ical, icalendar--convert-cyclic-to-ical) + (icalendar--convert-anniversary-to-ical): New functions, extracted + from icalendar-export-region, with bug fixes. + (icalendar-export-region): Use the above functions. + (icalendar-import-buffer): Check before saving diary file. + (icalendar--convert-recurring-to-diary) + (icalendar--convert-non-recurring-all-day-to-diary) + (icalendar--convert-non-recurring-not-all-day-to-diary): New functions, + extracted from icalendar--convert-ical-to-diary, with bug fixes. + (icalendar--convert-ical-to-diary): Use the above functions. + +2005-05-03 Nick Roberts + + * progmodes/cc-mode.el (cc-define-alist, cc-create-define-alist): + Remove these recent additions. + (c-mode): Restore to before 2005-04-28. + + * progmodes/cc-vars.el (cc-define-list-program): Remove this + recent addition. + + * progmodes/gdb-ui.el (gdb-cpp-define-alist-program) + (gdb-define-alist): New variables. + (gdb-create-define-alist): New function. + (gdb-set-gud-minor-mode-1): Handle gdb-define-alist. + (gdb-source, gdb-memory-set-repeat-count): Replace string-to-int + with string-to-number. + (gdb-reset): Kill gdb-define-alist. Move assignments outside loop. + + * progmodes/gud.el: Replace string-to-int with string-to-number. + (gud-find-file): Handle gdb-define-alist. + + * tooltip.el (tooltip-gud-tips): Use gdb-define-alist. + +2005-05-02 Jay Belanger + + * calc/calc-aent.el (math-read-token): + * calc/calc-bin.el (calc-word-size): + * calc/calc-ext.el (calc-read-number-fancy): + * calc/calc-forms.el (calc-time, calc-date-notation, math-this-year) + (math-parse-date, math-parse-standard-date, calcFunc-tzone): + * calc/calc-frac.el (calc-over-notation): + * calc/calc-graph.el (calc-graph-plot, calc-graph-set-styles) + (calc-graph-num-points, calc-graph-init): + * calc/calc-prog.el (calc-read-parse-table-part) + (calc-edit-macro-repeats): + * calc/calc-yank.el (calc-do-grab-rectangle): + * calc/calc.el (calcDigit-key, math-read-number, math-read-bignum): + Replace `string-to-int' by `string-to-number'. + +2005-05-02 Kim F. Storm + + * kmacro.el: Use executing-kbd-macro-index variable. + +2005-05-02 Thien-Thi Nguyen + + * net/rlogin.el (rlogin-parse-words): Delete func. + (rlogin): Use split-string, not rlogin-parse-words. + Also, if there are option-like elements in the parsed args, + take the host to be the first arg immediately following them. + Suggested by Michael Mauger. + +2005-05-01 Luc Teirlinck + + * subr.el (executing-macro): Use `define-obsolete-variable-alias'. + +2005-05-02 Nick Roberts + + * progmodes/cc-mode.el (cc-create-define-alist): Use a shell. + (cc-mode-cpp-program): Rename to cc-define-list-program and + move to cc-vars.el. + + * progmodes/cc-vars.el (cc-define-list-program): + Change to "gcc -E -dM -". Make customizable. + +2005-05-02 Kim F. Storm + + * emulation/cua-base.el: Fix check for CUA-mode if no init file. + +2005-05-02 Nick Roberts + + * progmodes/cc-mode.el (cc-mode-cpp-program): Change to "gcc -E". + + * international/mule-util.el (truncate-string): Remove alias and + obsolete declaration. + + * international/mule-cmds.el (update-iso-coding-systems): + Remove alias and obsolete declaration. + + * international/mule.el (coding-system-parent): Remove alias and + obsolete declaration. + + * subr.el (define-function, sref): Remove aliases and obsolete + declarations. + (chars-in-region): Remove obsolete declaration. + +2005-05-01 Richard M. Stallman + + * info.el (Info-mode): Set widen-automatically to nil, locally. + + * simple.el (widen-automatically): New variable. + (pop-global-mark): Obey widen-automatically. + +2005-05-01 Dan Nicolaescu + + * term/xterm.el (function-key-map): Call substitute-key-definition + before the keymap size is increased by a lot of define-key calls. + +2005-05-01 Richard M. Stallman + + * subr.el (add-to-invisibility-spec, remove-from-invisibility-spec): + Rename ARG to ELEMENT. Doc fix. + +2005-05-01 Nick Roberts + + * allout.el (allout-exposure): Remove macro and obsolete declaration. + Remove references to allout-exposure/change to allout-new-exposure. + + * emacs-lisp/bytecomp.el (dot, dot-min, dot-max): Don't create + bytecode symbols. + + * subr.el (dot, dot-marker, dot-min, dot-max, buffer-flush-undo) + (compiled-function-p, focus-frame, unfocus-frame): + Remove aliases and obsolete declarations. + Back out inadvertant changes from previous commit. + +2005-05-01 Luc Teirlinck + + * files.el (require-final-newline): Make Custom tags consistent + with mode-require-final-newline. + (mode-require-final-newline): Doc fix. + 2005-05-01 Lute Kamstra * international/latexenc.el (latexenc-find-file-coding-system): @@ -19,7 +223,7 @@ to jka-compr-hook.el. (compression, jka-compr): defgroups moved to jka-compr-hook.el. (jka-compr-inhibit): Autoload. - + * jka-comp-hook.el: New file. Enable the mode by default. diff -r 6deb860255f3 -r b151ec53c504 lisp/allout.el --- a/lisp/allout.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/allout.el Fri May 06 21:06:31 2005 +0000 @@ -3975,18 +3975,16 @@ Cursor is left at start position. -Use this instead of obsolete `allout-exposure'. - Examples: -\(allout-exposure (-1 () () () 1) 0) +\(allout-new-exposure (-1 () () () 1) 0) Close current topic at current level so only the immediate subtopics are shown, except also show the children of the third subtopic; and close the next topic at the current level. -\(allout-exposure : -1 0) +\(allout-new-exposure : -1 0) Close all topics at current level to expose only their immediate children, except for the last topic at the current level, in which even its immediate children are hidden. -\(allout-exposure -2 : -1 *) +\(allout-new-exposure -2 : -1 *) Expose children and grandchildren of first topic at current level, and expose children of subsequent topics at current level *except* for the last, which should be opened completely." @@ -3995,17 +3993,6 @@ (allout-next-heading))) (error "allout-new-exposure: Can't find any outline topics")) (list 'allout-expose-topic (list 'quote spec)))) -;;;_ > allout-exposure '() -(defmacro allout-exposure (&rest spec) - "Literal frontend for `allout-old-expose-topic', doesn't evaluate arguments -and retains start position." - (list 'save-excursion - '(if (not (or (allout-goto-prefix) - (allout-next-heading))) - (error "Can't find any outline topics")) - (cons 'allout-old-expose-topic - (mapcar (function (lambda (x) (list 'quote x))) spec)))) -(make-obsolete 'allout-exposure 'allout-new-exposure "19.23") ;;;_ #7 Systematic outline presentation - copying, printing, flattening diff -r 6deb860255f3 -r b151ec53c504 lisp/calc/calc-aent.el --- a/lisp/calc/calc-aent.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calc/calc-aent.el Fri May 06 21:06:31 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-aent.el --- algebraic entry functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: Dave Gillespie ;; Maintainer: Jay Belanger @@ -734,7 +734,7 @@ math-exp-pos (match-end 1)) (if (eq (string-match "\\$\\([1-9][0-9]*\\)" math-exp-str math-exp-pos) math-exp-pos) - (setq math-expr-data (- (string-to-int (math-match-substring + (setq math-expr-data (- (string-to-number (math-match-substring math-exp-str 1)))) (string-match "\\$+" math-exp-str math-exp-pos) (setq math-expr-data (- (match-end 0) (match-beginning 0)))) @@ -743,7 +743,7 @@ ((eq ch ?\#) (if (eq (string-match "#\\([1-9][0-9]*\\)" math-exp-str math-exp-pos) math-exp-pos) - (setq math-expr-data (string-to-int + (setq math-expr-data (string-to-number (math-match-substring math-exp-str 1)) math-exp-pos (match-end 0)) (setq math-expr-data 1 diff -r 6deb860255f3 -r b151ec53c504 lisp/calc/calc-bin.el --- a/lisp/calc/calc-bin.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calc/calc-bin.el Fri May 06 21:06:31 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-bin.el --- binary functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainer: Jay Belanger @@ -135,7 +135,7 @@ (if (equal n "") calc-word-size (if (string-match "\\`[-+]?[0-9]+\\'" n) - (string-to-int n) + (string-to-number n) (error "Expected an integer"))) (prefix-numeric-value n))) (or (= n calc-word-size) diff -r 6deb860255f3 -r b151ec53c504 lisp/calc/calc-ext.el --- a/lisp/calc/calc-ext.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calc/calc-ext.el Fri May 06 21:06:31 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-ext.el --- various extension functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainer: Jay Belanger @@ -2815,7 +2815,7 @@ ;; Integer+fraction with explicit radix ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]\\)$" s) - (let ((radix (string-to-int (math-match-substring s 1))) + (let ((radix (string-to-number (math-match-substring s 1))) (int (math-match-substring s 3)) (num (math-match-substring s 4)) (den (math-match-substring s 5))) @@ -2829,7 +2829,7 @@ ;; Fraction with explicit radix ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)$" s) - (let ((radix (string-to-int (math-match-substring s 1))) + (let ((radix (string-to-number (math-match-substring s 1))) (num (math-match-substring s 3)) (den (math-match-substring s 4))) (let ((num (if (> (length num) 0) (math-read-radix num radix) 1)) @@ -2839,7 +2839,7 @@ ;; Float with explicit radix and exponent ((or (string-match "^0*\\(\\([2-9]\\|1[0-4]\\)\\(#\\|\\^\\^\\)[0-9a-dA-D.]+\\)[eE]\\([-+]?[0-9]+\\)$" s) (string-match "^\\(\\([0-9]+\\)\\(#\\|\\^\\^\\)[0-9a-zA-Z.]+\\) *\\* *\\2\\.? *\\^ *\\([-+]?[0-9]+\\)$" s)) - (let ((radix (string-to-int (math-match-substring s 2))) + (let ((radix (string-to-number (math-match-substring s 2))) (mant (math-match-substring s 1)) (exp (math-match-substring s 4))) (let ((mant (math-read-number mant)) @@ -2849,7 +2849,7 @@ ;; Float with explicit radix, no exponent ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)\\.\\([0-9a-zA-Z]*\\)$" s) - (let ((radix (string-to-int (math-match-substring s 1))) + (let ((radix (string-to-number (math-match-substring s 1))) (int (math-match-substring s 3)) (fracs (math-match-substring s 4))) (let ((int (if (> (length int) 0) (math-read-radix int radix) 0)) @@ -2861,7 +2861,7 @@ ;; Integer with explicit radix ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]+\\)$" s) (math-read-radix (math-match-substring s 3) - (string-to-int (math-match-substring s 1)))) + (string-to-number (math-match-substring s 1)))) ;; C language hexadecimal notation ((and (eq calc-language 'c) diff -r 6deb860255f3 -r b151ec53c504 lisp/calc/calc-forms.el --- a/lisp/calc/calc-forms.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calc/calc-forms.el Fri May 06 21:06:31 2005 +0000 @@ -39,9 +39,9 @@ (calc-enter-result 0 "time" (list 'mod (list 'hms - (string-to-int (substring time 11 13)) - (string-to-int (substring time 14 16)) - (string-to-int (substring time 17 19))) + (string-to-number (substring time 11 13)) + (string-to-number (substring time 14 16)) + (string-to-number (substring time 17 19))) (list 'hms 24 0 0)))))) (defun calc-to-hms (arg) @@ -80,7 +80,7 @@ (if (equal fmt "") (setq fmt "1")) (if (string-match "\\` *[0-9] *\\'" fmt) - (setq fmt (nth (string-to-int fmt) calc-standard-date-formats))) + (setq fmt (nth (string-to-number fmt) calc-standard-date-formats))) (or (string-match "[a-zA-Z]" fmt) (error "Bad date format specifier")) (and arg @@ -441,7 +441,7 @@ (defun math-this-year () - (string-to-int (substring (current-time-string) -4))) + (string-to-number (substring (current-time-string) -4))) (defun math-leap-year-p (year) (if (Math-lessp year 1752) @@ -730,14 +730,14 @@ (if (or (string-match "\\([0-9][0-9]?\\):\\([0-9][0-9]?\\)\\(:\\([0-9][0-9]?\\(\\.[0-9]+\\)?\\)\\)? *\\([ap]m?\\|[ap]\\. *m\\.\\|noon\\|n\\>\\|midnight\\|mid\\>\\|m\\>\\)?" math-pd-str) (string-match "\\([0-9][0-9]?\\)\\(\\)\\(\\(\\(\\)\\)\\) *\\([ap]m?\\|[ap]\\. *m\\.\\|noon\\|n\\>\\|midnight\\|mid\\>\\|m\\>\\)" math-pd-str)) (let ((ampm (math-match-substring math-pd-str 6))) - (setq hour (string-to-int (math-match-substring math-pd-str 1)) + (setq hour (string-to-number (math-match-substring math-pd-str 1)) minute (math-match-substring math-pd-str 2) second (math-match-substring math-pd-str 4) math-pd-str (concat (substring math-pd-str 0 (match-beginning 0)) (substring math-pd-str (match-end 0)))) (if (equal minute "") (setq minute 0) - (setq minute (string-to-int minute))) + (setq minute (string-to-number minute))) (if (equal second "") (setq second 0) (setq second (math-read-number second))) @@ -801,7 +801,7 @@ (setq temp 0) (while (string-match "[0-9]+" math-pd-str temp) (and c (throw 'syntax "Too many numbers in date")) - (setq c (string-to-int (math-match-substring math-pd-str 0))) + (setq c (string-to-number (math-match-substring math-pd-str 0))) (or b (setq b c c nil)) (or a (setq a b b nil)) (setq temp (match-end 0))) @@ -1021,7 +1021,7 @@ (string-match "\\` *[0-9][0-9][0-9]" math-pd-str) (string-match "\\` *[0-9][0-9]" math-pd-str)) (string-match "\\` *[0-9]+" math-pd-str))) - (and (setq num (string-to-int + (and (setq num (string-to-number (math-match-substring math-pd-str 0)) math-pd-str (substring math-pd-str (match-end 0))) nil)) @@ -1236,13 +1236,13 @@ (setq p (cdr p)))) (if (looking-at "\\([-+][0-9]?[0-9]\\)\\([0-9][0-9]\\)?\\(\\'\\|[^0-9]\\)") (setq offset (math-add - (string-to-int (buffer-substring + (string-to-number (buffer-substring (match-beginning 1) (match-end 1))) (if (match-beginning 2) - (math-div (string-to-int (buffer-substring - (match-beginning 2) - (match-end 2))) + (math-div (string-to-number (buffer-substring + (match-beginning 2) + (match-end 2))) 60) 0))))) (if p diff -r 6deb860255f3 -r b151ec53c504 lisp/calc/calc-frac.el --- a/lisp/calc/calc-frac.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calc/calc-frac.el Fri May 06 21:06:31 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-frac.el --- fraction functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainer: Jay Belanger @@ -56,7 +56,7 @@ (if (string-match "\\`\\([^ 0-9][^ 0-9]?\\)[0-9]*\\'" fmt) (let ((n nil)) (if (/= (match-end 0) (match-end 1)) - (setq n (string-to-int (substring fmt (match-end 1))) + (setq n (string-to-number (substring fmt (match-end 1))) fmt (math-match-substring fmt 1))) (if (eq n 0) (error "Bad denominator")) (calc-change-mode 'calc-frac-format (list fmt n) t)) diff -r 6deb860255f3 -r b151ec53c504 lisp/calc/calc-graph.el --- a/lisp/calc/calc-graph.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calc/calc-graph.el Fri May 06 21:06:31 2005 +0000 @@ -407,13 +407,13 @@ (prin1-to-string output))))) (setq calc-graph-resolution (calc-graph-find-command "samples")) (if calc-graph-resolution - (setq calc-graph-resolution (string-to-int calc-graph-resolution)) + (setq calc-graph-resolution (string-to-number calc-graph-resolution)) (setq calc-graph-resolution (if calc-graph-is-splot calc-graph-default-resolution-3d calc-graph-default-resolution))) (setq precision (calc-graph-find-command "precision")) (if precision - (setq precision (string-to-int precision)) + (setq precision (string-to-number precision)) (setq precision calc-graph-default-precision)) (calc-graph-set-command "terminal") (calc-graph-set-command "output") @@ -1078,11 +1078,11 @@ (setq mode (buffer-substring (match-beginning 1) (match-end 1)))) (if (looking-at "[ \ta-z]+\\([0-9]+\\)") - (setq lstyle (string-to-int + (setq lstyle (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))) (if (looking-at "[ \ta-z]+[0-9]+[ \t]+\\([0-9]+\\)") - (setq pstyle (string-to-int + (setq pstyle (string-to-number (buffer-substring (match-beginning 1) (match-end 1))))))) (setq lenbl (or (equal mode "lines") (equal mode "linespoints")) @@ -1195,11 +1195,11 @@ (if (equal res "") (message "Default resolution is %d" calc-graph-default-resolution) - (setq calc-graph-default-resolution (string-to-int res))) + (setq calc-graph-default-resolution (string-to-number res))) (if (equal res "") (message "Default 3D resolution is %d" calc-graph-default-resolution-3d) - (setq calc-graph-default-resolution-3d (string-to-int res)))) + (setq calc-graph-default-resolution-3d (string-to-number res)))) (calc-graph-set-command "samples" (if (not (equal res "")) res)))) (defun calc-graph-device (name flag) @@ -1456,7 +1456,7 @@ (goto-char origin) (re-search-forward "G N U P L O T.*\n.*version \\([0-9]+\\)\\." nil t)) - (setq calc-gnuplot-version (string-to-int (buffer-substring + (setq calc-gnuplot-version (string-to-number (buffer-substring (match-beginning 1) (match-end 1)))) (setq calc-gnuplot-version 1)) diff -r 6deb860255f3 -r b151ec53c504 lisp/calc/calc-prog.el --- a/lisp/calc/calc-prog.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calc/calc-prog.el Fri May 06 21:06:31 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-prog.el --- user programmability functions for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainer: Jay Belanger @@ -637,7 +637,7 @@ (setq part (nconc part (list (if (= (match-beginning 1) (match-end 1)) 0 - (string-to-int + (string-to-number (buffer-substring (1+ (match-beginning 1)) (match-end 1))))))) @@ -727,7 +727,7 @@ (goto-char calc-edit-top) (while (re-search-forward "^\\([0-9]+\\)\\*" nil t) - (let ((num (string-to-int (match-string 1))) + (let ((num (string-to-number (match-string 1))) (line (buffer-substring (point) (line-end-position)))) (goto-char (line-beginning-position)) (kill-line 1) diff -r 6deb860255f3 -r b151ec53c504 lisp/calc/calc-yank.el --- a/lisp/calc/calc-yank.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calc/calc-yank.el Fri May 06 21:06:31 2005 +0000 @@ -1,6 +1,6 @@ ;;; calc-yank.el --- kill-ring functionality for Calc -;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2005 Free Software Foundation, Inc. ;; Author: David Gillespie ;; Maintainer: Jay Belanger @@ -231,7 +231,7 @@ pos j))))) (if (string-match "\\` *-?[0-9][0-9]?[0-9]?[0-9]?[0-9]?[0-9]? *\\'" (car data)) - (setq vals (list 'vec (string-to-int (car data)))) + (setq vals (list 'vec (string-to-number (car data)))) (if (and (null arg) (string-match "[[{][^][{}]*[]}]" (car data))) (setq pos (match-beginning 0) diff -r 6deb860255f3 -r b151ec53c504 lisp/calc/calc.el --- a/lisp/calc/calc.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calc/calc.el Fri May 06 21:06:31 2005 +0000 @@ -2136,7 +2136,7 @@ (t (insert (char-to-string last-command-char)) (if (or (and (calc-minibuffer-contains "[-+]?\\(.*\\+/- *\\|.*mod *\\)?\\([0-9][0-9]?\\)#[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\(:[0-9a-zA-Z]*\\)?\\|.[0-9a-zA-Z]*\\(e[-+]?[0-9]*\\)?\\)?\\'") - (let ((radix (string-to-int + (let ((radix (string-to-number (buffer-substring (match-beginning 2) (match-end 2))))) (and (>= radix 2) @@ -3278,7 +3278,7 @@ (eq (aref digs 0) ?0)) (math-read-number (concat "8#" digs)) (if (<= (length digs) 6) - (string-to-int digs) + (string-to-number digs) (cons 'bigpos (math-read-bignum digs)))))) ;; Clean up the string if necessary @@ -3315,7 +3315,7 @@ (exp (math-match-substring s 2))) (let ((mant (if (> (length mant) 0) (math-read-number mant) 1)) (exp (if (<= (length exp) (if (memq (aref exp 0) '(?+ ?-)) 8 7)) - (string-to-int exp)))) + (string-to-number exp)))) (and mant exp (Math-realp mant) (> exp -4000000) (< exp 4000000) (let ((mant (math-float mant))) (list 'float (nth 1 mant) (+ (nth 2 mant) exp))))))) @@ -3330,9 +3330,9 @@ (defun math-read-bignum (s) ; [l X] (if (> (length s) 3) - (cons (string-to-int (substring s -3)) + (cons (string-to-number (substring s -3)) (math-read-bignum (substring s 0 -3))) - (list (string-to-int s)))) + (list (string-to-number s)))) (defconst math-tex-ignore-words diff -r 6deb860255f3 -r b151ec53c504 lisp/calendar/icalendar.el --- a/lisp/calendar/icalendar.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/calendar/icalendar.el Fri May 06 21:06:31 2005 +0000 @@ -28,6 +28,13 @@ ;; This package is documented in the Emacs Manual. +;; Please note: +;; - Diary entries which have a start time but no end time are assumed to +;; last for one hour when they are exported. +;; - Weekly diary entries are assumed to occur the first time in the first +;; week of the year 2000 when they are exported. +;; - Yearly diary entries are assumed to occur the first time in the year +;; 1900 when they are exported. ;;; History: @@ -75,11 +82,11 @@ ;; + the parser is too soft ;; + error log is incomplete ;; + nice to have: #include "webcal://foo.com/some-calendar.ics" +;; + timezones, currently all times are local! ;; * Export from diary to ical ;; + diary-date, diary-float, and self-made sexp entries are not ;; understood -;; + timezones, currently all times are local! ;; * Other things ;; + clean up all those date/time parsing functions @@ -90,7 +97,7 @@ ;;; Code: -(defconst icalendar-version 0.11 +(defconst icalendar-version 0.12 "Version number of icalendar.el.") ;; ====================================================================== @@ -145,16 +152,8 @@ :type 'string :group 'icalendar) -(defcustom icalendar-duration-correction - t - "Workaround for all-day events. -If non-nil the length=duration of iCalendar appointments that -have a length of exactly n days is decreased by one day. This -fixes problems with all-day events, which appear to be one day -longer than they are." - :type 'boolean - :group 'icalendar) - +(defvar icalendar-debug nil + "Enable icalendar debug messages.") ;; ====================================================================== ;; NO USER SERVICABLE PARTS BELOW THIS LINE @@ -162,8 +161,6 @@ (defconst icalendar--weekday-array ["SU" "MO" "TU" "WE" "TH" "FR" "SA"]) -(defvar icalendar-debug nil ".") - ;; ====================================================================== ;; all the other libs we need ;; ====================================================================== @@ -295,7 +292,7 @@ (while props (setq pp (car props)) (if (eq (car pp) prop) - (setq result (cons (car (cddr pp)) result))) + (setq result (append (split-string (car (cddr pp)) ",") result))) (setq props (cdr props))) result)) @@ -411,12 +408,15 @@ ;; isodatetimestring == nil nil)) -(defun icalendar--decode-isoduration (isodurationstring) - "Return ISODURATIONSTRING in format like `decode-time'. +(defun icalendar--decode-isoduration (isodurationstring + &optional duration-correction) + "Convert ISODURATIONSTRING into format provided by `decode-time'. Converts from ISO-8601 to Emacs representation. If ISODURATIONSTRING specifies UTC time (trailing letter Z) the decoded time is given in the local time zone! +Optional argument DURATION-CORRECTION shortens result by one day. + FIXME: TZID-attributes are ignored....! FIXME: multiple comma-separated values should be allowed!" (if isodurationstring @@ -442,7 +442,7 @@ (setq days (read (substring isodurationstring (match-beginning 3) (match-end 3)))) - (when icalendar-duration-correction + (when duration-correction (setq days (1- days)))) ((match-beginning 4) ;days and time (if (match-beginning 5) @@ -710,14 +710,14 @@ "?"))) ;; prepare buffer with error messages (save-current-buffer - (set-buffer (get-buffer-create " *icalendar-errors*")) + (set-buffer (get-buffer-create "*icalendar-errors*")) (erase-buffer)) ;; here we go (save-excursion (goto-char min) (while (re-search-forward - "^\\([^ \t\n].*\\)\\(\\(\n[ \t].*\\)*\\)" max t) + "^\\([^ \t\n].+\\)\\(\\(\n[ \t].*\\)*\\)" max t) (setq entry-main (match-string 1)) (if (match-beginning 2) (setq entry-rest (match-string 2)) @@ -728,369 +728,42 @@ (car (cddr (current-time))))) (condition-case error-val (progn - (cond - ;; anniversaries - ((string-match - (concat nonmarker - "%%(diary-anniversary \\([^)]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-anniversary %s" entry-main) - (let* ((datetime (substring entry-main (match-beginning 1) - (match-end 1))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 2) - (match-end 2)))) - (startisostring (icalendar--datestring-to-isodate - datetime)) - (endisostring (icalendar--datestring-to-isodate - datetime 1))) - (setq contents - (concat "\nDTSTART;VALUE=DATE:" startisostring - "\nDTEND;VALUE=DATE:" endisostring - "\nSUMMARY:" summary - "\nRRULE:FREQ=YEARLY;INTERVAL=1" - ;; the following is redundant, - ;; but korganizer seems to expect this... ;( - ;; and evolution doesn't understand it... :( - ;; so... who is wrong?! - ";BYMONTH=" - (substring startisostring 4 6) - ";BYMONTHDAY=" - (substring startisostring 6 8)))) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) - ;; cyclic events - ;; %%(diary-cyclic ) - ((string-match - (concat nonmarker - "%%(diary-cyclic \\([^ ]+\\) +" - "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-cyclic %s" entry-main) - (let* ((frequency (substring entry-main (match-beginning 1) - (match-end 1))) - (datetime (substring entry-main (match-beginning 2) - (match-end 2))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 3) - (match-end 3)))) - (startisostring (icalendar--datestring-to-isodate - datetime)) - (endisostring (icalendar--datestring-to-isodate - datetime 1))) - (setq contents - (concat "\nDTSTART;VALUE=DATE:" startisostring - "\nDTEND;VALUE=DATE:" endisostring - "\nSUMMARY:" summary - "\nRRULE:FREQ=DAILY;INTERVAL=" frequency - ;; strange: korganizer does not expect - ;; BYSOMETHING here... - ))) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) - ;; diary-date -- FIXME - ((string-match - (concat nonmarker - "%%(diary-date \\([^)]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-date %s" entry-main) - (error "`diary-date' is not supported yet")) - ;; float events -- FIXME - ((string-match - (concat nonmarker - "%%(diary-float \\([^)]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-float %s" entry-main) - (error "`diary-float' is not supported yet")) - ;; block events - ((string-match - (concat nonmarker - "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)" - " +\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*" - "\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-block %s" entry-main) - (let* ((startstring (substring entry-main - (match-beginning 1) - (match-end 1))) - (endstring (substring entry-main - (match-beginning 2) - (match-end 2))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 3) - (match-end 3)))) - (startisostring (icalendar--datestring-to-isodate - startstring)) - (endisostring (icalendar--datestring-to-isodate - endstring 1))) - (setq contents - (concat "\nDTSTART;VALUE=DATE:" startisostring - "\nDTEND;VALUE=DATE:" endisostring - "\nSUMMARY:" summary)) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest)))))) - ;; other sexp diary entries -- FIXME - ((string-match - (concat nonmarker - "%%(\\([^)]+\\))\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "diary-sexp %s" entry-main) - (error "sexp-entries are not supported yet")) - ;; weekly by day - ;; Monday 8:30 Team meeting - ((and (string-match - (concat nonmarker - "\\([a-z]+\\)\\s-+" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)" - "\\([ap]m\\)?" - "\\(-0?" - "\\([1-9][0-9]?:[0-9][0-9]\\)" - "\\([ap]m\\)?\\)?" - "\\)?" - "\\s-*\\(.*\\)$") - entry-main) - (icalendar--get-weekday-abbrev - (substring entry-main (match-beginning 1) - (match-end 1)))) - (icalendar--dmsg "weekly %s" entry-main) - (let* ((day (icalendar--get-weekday-abbrev - (substring entry-main (match-beginning 1) - (match-end 1)))) - (starttimestring (icalendar--diarytime-to-isotime - (if (match-beginning 3) - (substring entry-main - (match-beginning 3) - (match-end 3)) - nil) - (if (match-beginning 4) - (substring entry-main - (match-beginning 4) - (match-end 4)) - nil))) - (endtimestring (icalendar--diarytime-to-isotime - (if (match-beginning 6) - (substring entry-main - (match-beginning 6) - (match-end 6)) - nil) - (if (match-beginning 7) - (substring entry-main - (match-beginning 7) - (match-end 7)) - nil))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 8) - (match-end 8))))) - (when starttimestring - (unless endtimestring - (let ((time (read - (icalendar--rris "^T0?" "" - starttimestring)))) - (setq endtimestring (format "T%06d" - (+ 10000 time)))))) - (setq contents - (concat "\nDTSTART;" - (if starttimestring - "VALUE=DATE-TIME:" - "VALUE=DATE:") - ;; find the correct week day, - ;; 1st january 2000 was a saturday - (format - "200001%02d" - (+ (icalendar--get-weekday-number day) 2)) - (or starttimestring "") - "\nDTEND;" - (if endtimestring - "VALUE=DATE-TIME:" - "VALUE=DATE:") - (format - "200001%02d" - ;; end is non-inclusive! - (+ (icalendar--get-weekday-number day) - (if endtimestring 2 3))) - (or endtimestring "") - "\nSUMMARY:" summary - "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=" - day))) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) - ;; yearly by day - ;; 1 May Tag der Arbeit - ((string-match - (concat nonmarker - (if european-calendar-style - "0?\\([1-9]+[0-9]?\\)\\s-+\\([a-z]+\\)\\s-+" - "\\([a-z]+\\)\\s-+0?\\([1-9]+[0-9]?\\)\\s-+") - "\\*?\\s-*" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" - "\\(" - "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" - "\\)?" - "\\s-*\\([^0-9]+.*\\)$" ; must not match years - ) - entry-main) - (icalendar--dmsg "yearly %s" entry-main) - (let* ((daypos (if european-calendar-style 1 2)) - (monpos (if european-calendar-style 2 1)) - (day (read (substring entry-main - (match-beginning daypos) - (match-end daypos)))) - (month (icalendar--get-month-number - (substring entry-main - (match-beginning monpos) - (match-end monpos)))) - (starttimestring (icalendar--diarytime-to-isotime - (if (match-beginning 4) - (substring entry-main - (match-beginning 4) - (match-end 4)) - nil) - (if (match-beginning 5) - (substring entry-main - (match-beginning 5) - (match-end 5)) - nil))) - (endtimestring (icalendar--diarytime-to-isotime - (if (match-beginning 7) - (substring entry-main - (match-beginning 7) - (match-end 7)) - nil) - (if (match-beginning 8) - (substring entry-main - (match-beginning 8) - (match-end 8)) - nil))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 9) - (match-end 9))))) - (when starttimestring - (unless endtimestring - (let ((time (read - (icalendar--rris "^T0?" "" - starttimestring)))) - (setq endtimestring (format "T%06d" - (+ 10000 time)))))) - (setq contents - (concat "\nDTSTART;" - (if starttimestring "VALUE=DATE-TIME:" - "VALUE=DATE:") - (format "1900%02d%02d" month day) - (or starttimestring "") - "\nDTEND;" - (if endtimestring "VALUE=DATE-TIME:" - "VALUE=DATE:") - ;; end is not included! shift by one day - (icalendar--date-to-isodate - (list month day 1900) - (if endtimestring 0 1)) - (or endtimestring "") - "\nSUMMARY:" - summary - "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=" - (format "%2d" month) - ";BYMONTHDAY=" - (format "%2d" day)))) - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest))))) - ;; "ordinary" events, start and end time given - ;; 1 Feb 2003 Hs Hochzeitsfeier, Dreieich - ((string-match - (concat nonmarker - "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)\\s-+" - "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" - "\\(" - "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" - "\\)?" - "\\s-*\\(.*\\)") - entry-main) - (icalendar--dmsg "ordinary %s" entry-main) - (let* ((startdatestring (icalendar--datestring-to-isodate - (substring entry-main - (match-beginning 1) - (match-end 1)))) - (starttimestring (icalendar--diarytime-to-isotime - (if (match-beginning 3) - (substring entry-main - (match-beginning 3) - (match-end 3)) - nil) - (if (match-beginning 4) - (substring entry-main - (match-beginning 4) - (match-end 4)) - nil))) - (endtimestring (icalendar--diarytime-to-isotime - (if (match-beginning 6) - (substring entry-main - (match-beginning 6) - (match-end 6)) - nil) - (if (match-beginning 7) - (substring entry-main - (match-beginning 7) - (match-end 7)) - nil))) - (summary (icalendar--convert-string-for-export - (substring entry-main (match-beginning 8) - (match-end 8))))) - (unless startdatestring - (error "Could not parse date")) - (when starttimestring - (unless endtimestring - (let ((time - (read (icalendar--rris "^T0?" "" - starttimestring)))) - (setq endtimestring (format "T%06d" - (+ 10000 time)))))) - (setq contents (concat - "\nDTSTART;" - (if starttimestring "VALUE=DATE-TIME:" - "VALUE=DATE:") - startdatestring - (or starttimestring "") - "\nDTEND;" - (if endtimestring "VALUE=DATE-TIME:" - "VALUE=DATE:") - (icalendar--datestring-to-isodate - (substring entry-main - (match-beginning 1) - (match-end 1)) - (if endtimestring 0 1)) - (or endtimestring "") - "\nSUMMARY:" - summary)) - ;; could not parse the date - (unless (string= entry-rest "") - (setq contents - (concat contents "\nDESCRIPTION:" - (icalendar--convert-string-for-export - entry-rest)))))) - ;; everything else - (t - ;; Oops! what's that? - (error "Could not parse entry"))) + (setq contents + (or + ;; anniversaries -- %%(diary-anniversary ...) + (icalendar--convert-anniversary-to-ical nonmarker + entry-main) + ;; cyclic events -- %%(diary-cyclic ...) + (icalendar--convert-cyclic-to-ical nonmarker entry-main) + ;; diary-date -- %%(diary-date ...) + (icalendar--convert-date-to-ical nonmarker entry-main) + ;; float events -- %%(diary-float ...) + (icalendar--convert-float-to-ical nonmarker entry-main) + ;; block events -- %%(diary-block ...) + (icalendar--convert-block-to-ical nonmarker entry-main) + ;; other sexp diary entries + (icalendar--convert-sexp-to-ical nonmarker entry-main) + ;; weekly by day -- Monday 8:30 Team meeting + (icalendar--convert-weekly-to-ical nonmarker entry-main) + ;; yearly by day -- 1 May Tag der Arbeit + (icalendar--convert-yearly-to-ical nonmarker entry-main) + ;; "ordinary" events, start and end time given + ;; 1 Feb 2003 blah + (icalendar--convert-ordinary-to-ical nonmarker entry-main) + ;; everything else + ;; Oops! what's that? + (error "Could not parse entry"))) + (unless (string= entry-rest "") + (setq contents + (concat contents "\nDESCRIPTION:" + (icalendar--convert-string-for-export + entry-rest)))) (setq result (concat result header contents "\nEND:VEVENT"))) ;; handle errors (error (setq found-error t) (save-current-buffer - (set-buffer (get-buffer-create " *icalendar-errors*")) + (set-buffer (get-buffer-create "*icalendar-errors*")) (insert (format "Error in line %d -- %s: `%s'\n" (count-lines (point-min) (point)) (cadr error-val) @@ -1110,6 +783,518 @@ (save-buffer)))) found-error)) +;; subroutines +(defun icalendar--convert-ordinary-to-ical (nonmarker entry-main) + "Convert \"ordinary\" diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)") + entry-main) + (let* ((datetime (substring entry-main (match-beginning 1) + (match-end 1))) + (startisostring (icalendar--datestring-to-isodate + datetime)) + (endisostring (icalendar--datestring-to-isodate + datetime 1)) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 3) + (substring entry-main + (match-beginning 3) + (match-end 3)) + nil) + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 6) + (substring entry-main + (match-beginning 6) + (match-end 6)) + nil) + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 8) + (match-end 8))))) + (icalendar--dmsg "ordinary %s" entry-main) + + (unless startisostring + (error "Could not parse date")) + (when starttimestring + (unless endtimestring + (let ((time + (read (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + startisostring + (or starttimestring "") + "\nDTEND;" + (if endtimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + (if starttimestring + startisostring + endisostring) + (or endtimestring "") + "\nSUMMARY:" + summary)) + ;; no match + nil)) + +(defun icalendar--convert-weekly-to-ical (nonmarker entry-main) + "Convert weekly diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (and (string-match (concat nonmarker + "\\([a-z]+\\)\\s-+" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)" + "\\([ap]m\\)?" + "\\(-0?" + "\\([1-9][0-9]?:[0-9][0-9]\\)" + "\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)$") + entry-main) + (icalendar--get-weekday-abbrev + (substring entry-main (match-beginning 1) + (match-end 1)))) + (let* ((day (icalendar--get-weekday-abbrev + (substring entry-main (match-beginning 1) + (match-end 1)))) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 3) + (substring entry-main + (match-beginning 3) + (match-end 3)) + nil) + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 6) + (substring entry-main + (match-beginning 6) + (match-end 6)) + nil) + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 8) + (match-end 8))))) + (icalendar--dmsg "weekly %s" entry-main) + + (when starttimestring + (unless endtimestring + (let ((time (read + (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring + "VALUE=DATE-TIME:" + "VALUE=DATE:") + ;; find the correct week day, + ;; 1st january 2000 was a saturday + (format + "200001%02d" + (+ (icalendar--get-weekday-number day) 2)) + (or starttimestring "") + "\nDTEND;" + (if endtimestring + "VALUE=DATE-TIME:" + "VALUE=DATE:") + (format + "200001%02d" + ;; end is non-inclusive! + (+ (icalendar--get-weekday-number day) + (if endtimestring 2 3))) + (or endtimestring "") + "\nSUMMARY:" summary + "\nRRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=" + day)) + ;; no match + nil)) + +(defun icalendar--convert-yearly-to-ical (nonmarker entry-main) + "Convert yearly diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + (if european-calendar-style + "0?\\([1-9]+[0-9]?\\)\\s-+\\([a-z]+\\)\\s-+" + "\\([a-z]+\\)\\s-+0?\\([1-9]+[0-9]?\\)\\s-+") + "\\*?\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\([^0-9]+.*\\)$" ; must not match years + ) + entry-main) + (let* ((daypos (if european-calendar-style 1 2)) + (monpos (if european-calendar-style 2 1)) + (day (read (substring entry-main + (match-beginning daypos) + (match-end daypos)))) + (month (icalendar--get-month-number + (substring entry-main + (match-beginning monpos) + (match-end monpos)))) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil) + (if (match-beginning 5) + (substring entry-main + (match-beginning 5) + (match-end 5)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil) + (if (match-beginning 8) + (substring entry-main + (match-beginning 8) + (match-end 8)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 9) + (match-end 9))))) + (icalendar--dmsg "yearly %s" entry-main) + + (when starttimestring + (unless endtimestring + (let ((time (read + (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + (format "1900%02d%02d" month day) + (or starttimestring "") + "\nDTEND;" + (if endtimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + ;; end is not included! shift by one day + (icalendar--date-to-isodate + (list month day 1900) + (if endtimestring 0 1)) + (or endtimestring "") + "\nSUMMARY:" + summary + "\nRRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=" + (format "%2d" month) + ";BYMONTHDAY=" + (format "%2d" day))) + ;; no match + nil)) + +(defun icalendar--convert-sexp-to-ical (nonmarker entry-main) + "Convert complex sexp diary entry to icalendar format -- unsupported! + +FIXME! + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(\\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (progn + (icalendar--dmsg "diary-sexp %s" entry-main) + (error "Sexp-entries are not supported yet")) + ;; no match + nil)) + +(defun icalendar--convert-block-to-ical (nonmarker entry-main) + "Convert block diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-block \\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\)" + " +\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)") + entry-main) + (let* ((startstring (substring entry-main + (match-beginning 1) + (match-end 1))) + (endstring (substring entry-main + (match-beginning 2) + (match-end 2))) + (startisostring (icalendar--datestring-to-isodate + startstring)) + (endisostring (icalendar--datestring-to-isodate + endstring)) + (endisostring+1 (icalendar--datestring-to-isodate + endstring 1)) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil) + (if (match-beginning 5) + (substring entry-main + (match-beginning 5) + (match-end 5)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil) + (if (match-beginning 8) + (substring entry-main + (match-beginning 8) + (match-end 8)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 9) + (match-end 9))))) + (icalendar--dmsg "diary-block %s" entry-main) + (when starttimestring + (unless endtimestring + (let ((time + (read (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (if starttimestring + ;; with time -> write rrule + (concat "\nDTSTART;VALUE=DATE-TIME:" + startisostring + starttimestring + "\nDTEND;VALUE=DATE-TIME:" + startisostring + endtimestring + "\nSUMMARY:" + summary + "\nRRULE:FREQ=DAILY;INTERVAL=1;UNTIL=" + endisostring) + ;; no time -> write long event + (concat "\nDTSTART;VALUE=DATE:" startisostring + "\nDTEND;VALUE=DATE:" endisostring+1 + "\nSUMMARY:" summary))) + ;; no match + nil)) + +(defun icalendar--convert-float-to-ical (nonmarker entry-main) + "Convert float diary entry to icalendar format -- unsupported! + +FIXME! + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-float \\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (progn + (icalendar--dmsg "diary-float %s" entry-main) + (error "`diary-float' is not supported yet")) + ;; no match + nil)) + +(defun icalendar--convert-date-to-ical (nonmarker entry-main) + "Convert `diary-date' diary entry to icalendar format -- unsupported! + +FIXME! + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-date \\([^)]+\\))\\s-*\\(.*\\)") + entry-main) + (progn + (icalendar--dmsg "diary-date %s" entry-main) + (error "`diary-date' is not supported yet")) + ;; no match + nil)) + +(defun icalendar--convert-cyclic-to-ical (nonmarker entry-main) + "Convert `diary-cyclic' diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-cyclic \\([^ ]+\\) +" + "\\([^ /]+[ /]+[^ /]+[ /]+[^ ]+\\))\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)") + entry-main) + (let* ((frequency (substring entry-main (match-beginning 1) + (match-end 1))) + (datetime (substring entry-main (match-beginning 2) + (match-end 2))) + (startisostring (icalendar--datestring-to-isodate + datetime)) + (endisostring (icalendar--datestring-to-isodate + datetime)) + (endisostring+1 (icalendar--datestring-to-isodate + datetime 1)) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil) + (if (match-beginning 5) + (substring entry-main + (match-beginning 5) + (match-end 5)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil) + (if (match-beginning 8) + (substring entry-main + (match-beginning 8) + (match-end 8)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 9) + (match-end 9))))) + (icalendar--dmsg "diary-cyclic %s" entry-main) + (when starttimestring + (unless endtimestring + (let ((time + (read (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + startisostring + (or starttimestring "") + "\nDTEND;" + (if endtimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + (if endtimestring endisostring endisostring+1) + (or endtimestring "") + "\nSUMMARY:" summary + "\nRRULE:FREQ=DAILY;INTERVAL=" frequency + ;; strange: korganizer does not expect + ;; BYSOMETHING here... + )) + ;; no match + nil)) + +(defun icalendar--convert-anniversary-to-ical (nonmarker entry-main) + "Convert `diary-anniversary' diary entry to icalendar format. + +NONMARKER is a regular expression matching the start of non-marking +entries. ENTRY-MAIN is the first line of the diary entry." + (if (string-match (concat nonmarker + "%%(diary-anniversary \\([^)]+\\))\\s-*" + "\\(0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?" + "\\(" + "-0?\\([1-9][0-9]?:[0-9][0-9]\\)\\([ap]m\\)?\\)?" + "\\)?" + "\\s-*\\(.*\\)") + entry-main) + (let* ((datetime (substring entry-main (match-beginning 1) + (match-end 1))) + (startisostring (icalendar--datestring-to-isodate + datetime)) + (endisostring (icalendar--datestring-to-isodate + datetime 1)) + (starttimestring (icalendar--diarytime-to-isotime + (if (match-beginning 3) + (substring entry-main + (match-beginning 3) + (match-end 3)) + nil) + (if (match-beginning 4) + (substring entry-main + (match-beginning 4) + (match-end 4)) + nil))) + (endtimestring (icalendar--diarytime-to-isotime + (if (match-beginning 6) + (substring entry-main + (match-beginning 6) + (match-end 6)) + nil) + (if (match-beginning 7) + (substring entry-main + (match-beginning 7) + (match-end 7)) + nil))) + (summary (icalendar--convert-string-for-export + (substring entry-main (match-beginning 8) + (match-end 8))))) + (icalendar--dmsg "diary-anniversary %s" entry-main) + (when starttimestring + (unless endtimestring + (let ((time + (read (icalendar--rris "^T0?" "" + starttimestring)))) + (setq endtimestring (format "T%06d" + (+ 10000 time)))))) + (concat "\nDTSTART;" + (if starttimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + startisostring + (or starttimestring "") + "\nDTEND;" + (if endtimestring "VALUE=DATE-TIME:" + "VALUE=DATE:") + endisostring + (or endtimestring "") + "\nSUMMARY:" summary + "\nRRULE:FREQ=YEARLY;INTERVAL=1" + ;; the following is redundant, + ;; but korganizer seems to expect this... ;( + ;; and evolution doesn't understand it... :( + ;; so... who is wrong?! + ";BYMONTH=" + (substring startisostring 4 6) + ";BYMONTHDAY=" + (substring startisostring 6 8))) + ;; no match + nil)) + ;; ====================================================================== ;; Import -- convert icalendar to emacs-diary ;; ====================================================================== @@ -1170,10 +1355,12 @@ ical-contents diary-file do-not-ask non-marking)) (when diary-file - ;; save the diary file - (save-current-buffer - (set-buffer (find-buffer-visiting diary-file)) - (save-buffer))) + ;; save the diary file if it is visited already + (let ((b (find-buffer-visiting diary-file))) + (when b + (save-current-buffer + (set-buffer b) + (save-buffer))))) (message "Converting icalendar...done") ;; return t if no error occured (not ical-errors)) @@ -1185,10 +1372,6 @@ (defalias 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer) (make-obsolete 'icalendar-extract-ical-from-buffer 'icalendar-import-buffer) -;; ====================================================================== -;; private area -;; ====================================================================== - (defun icalendar--format-ical-event (event) "Create a string representation of an iCalendar EVENT." (let ((string icalendar-import-format) @@ -1226,7 +1409,7 @@ events are created as non-marking. This function attempts to return t if something goes wrong. In this case an error string which describes all the errors and problems is -written into the buffer ` *icalendar-errors*'." +written into the buffer `*icalendar-errors*'." (let* ((ev (icalendar--all-events ical-list)) (error-string "") (event-ok t) @@ -1238,14 +1421,16 @@ (setq ev (cdr ev)) (setq event-ok nil) (condition-case error-val - (let* ((dtstart (icalendar--decode-isodatetime - (icalendar--get-event-property e 'DTSTART))) + (let* ((dtstart (icalendar--get-event-property e 'DTSTART)) + (dtstart-dec (icalendar--decode-isodatetime dtstart)) (start-d (icalendar--datetime-to-diary-date - dtstart)) - (start-t (icalendar--datetime-to-colontime dtstart)) - (dtend (icalendar--decode-isodatetime - (icalendar--get-event-property e 'DTEND))) + dtstart-dec)) + (start-t (icalendar--datetime-to-colontime dtstart-dec)) + (dtend (icalendar--get-event-property e 'DTEND)) + (dtend-dec (icalendar--decode-isodatetime dtend)) + (dtend-1-dec (icalendar--decode-isodatetime dtend -1)) end-d + end-1-d end-t (subject (icalendar--convert-string-for-import (or (icalendar--get-event-property e 'SUMMARY) @@ -1253,165 +1438,50 @@ (rrule (icalendar--get-event-property e 'RRULE)) (rdate (icalendar--get-event-property e 'RDATE)) (duration (icalendar--get-event-property e 'DURATION))) - (icalendar--dmsg "%s: %s" start-d subject) + (icalendar--dmsg "%s: `%s'" start-d subject) ;; check whether start-time is missing - (if (and (icalendar--get-event-property-attributes - e 'DTSTART) - (string= (cadr (icalendar--get-event-property-attributes - e 'DTSTART)) - "DATE")) + (if (and dtstart + (string= + (cadr (icalendar--get-event-property-attributes + e 'DTSTART)) + "DATE")) (setq start-t nil)) (when duration - (let ((dtend2 (icalendar--add-decoded-times - dtstart - (icalendar--decode-isoduration duration)))) - (if (and dtend (not (eq dtend dtend2))) + (let ((dtend-dec-d (icalendar--add-decoded-times + dtstart-dec + (icalendar--decode-isoduration duration))) + (dtend-1-dec-d (icalendar--add-decoded-times + dtstart-dec + (icalendar--decode-isoduration duration + t)))) + (if (and dtend-dec (not (eq dtend-dec dtend-dec-d))) (message "Inconsistent endtime and duration for %s" subject)) - (setq dtend dtend2))) - (setq end-d (if dtend - (icalendar--datetime-to-diary-date dtend) + (setq dtend-dec dtend-dec-d) + (setq dtend-1-dec dtend-1-dec-d))) + (setq end-d (if dtend-dec + (icalendar--datetime-to-diary-date dtend-dec) start-d)) - (setq end-t (if dtend - (icalendar--datetime-to-colontime dtend) + (setq end-1-d (if dtend-1-dec + (icalendar--datetime-to-diary-date dtend-1-dec) + start-d)) + (setq end-t (if (and + dtend-dec + (not (string= + (cadr + (icalendar--get-event-property-attributes + e 'DTEND)) + "DATE"))) + (icalendar--datetime-to-colontime dtend-dec) start-t)) (icalendar--dmsg "start-d: %s, end-d: %s" start-d end-d) (cond ;; recurring event (rrule - (icalendar--dmsg "recurring event") - (let* ((rrule-props (icalendar--split-value rrule)) - (frequency (cadr (assoc 'FREQ rrule-props))) - (until (cadr (assoc 'UNTIL rrule-props))) - (interval (read (cadr (assoc 'INTERVAL rrule-props))))) - (cond ((string-equal frequency "WEEKLY") - (if (not start-t) - (progn - ;; weekly and all-day - (icalendar--dmsg "weekly all-day") - (if until - (let ((fro - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - (icalendar--get-event-property - e - 'DTSTART)))) - (unt - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until -1)))) - (setq diary-string - (format - (concat "%%%%(and " - "(diary-cyclic %d %s) " - "(diary-block %s %s))") - (* interval 7) - (icalendar--datetime-to-diary-date - dtstart) - (icalendar--datetime-to-diary-date - dtstart) - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until -1))))) - (setq diary-string - (format "%%%%(and (diary-cyclic %d %s))" - (* interval 7) - (icalendar--datetime-to-diary-date - dtstart)))) - (setq event-ok t)) - ;; weekly and not all-day - (let* ((byday (cadr (assoc 'BYDAY rrule-props))) - (weekday - (icalendar--get-weekday-number byday))) - (icalendar--dmsg "weekly not-all-day") - (if until - (let ((fro - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - (icalendar--get-event-property - e - 'DTSTART)))) - (unt - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until)))) - (setq diary-string - (format - (concat "%%%%(and " - "(diary-cyclic %d %s) " - "(diary-block %s %s)) " - "%s%s%s") - (* interval 7) - (icalendar--datetime-to-diary-date - dtstart) - (icalendar--datetime-to-diary-date - dtstart) - (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until)) - start-t - (if end-t "-" "") (or end-t "")))) - ;; no limit - ;; FIXME!!!! - ;; DTSTART;VALUE=DATE-TIME:20030919T090000 - ;; DTEND;VALUE=DATE-TIME:20030919T113000 - (setq diary-string - (format - "%%%%(and (diary-cyclic %s %s)) %s%s%s" - (* interval 7) - (icalendar--datetime-to-diary-date - dtstart) - start-t - (if end-t "-" "") (or end-t "")))) - (setq event-ok t)))) - ;; yearly - ((string-equal frequency "YEARLY") - (icalendar--dmsg "yearly") - (setq diary-string - (format - "%%%%(and (diary-anniversary %s))" - (icalendar--datetime-to-diary-date dtstart))) - (setq event-ok t)) - ;; FIXME: war auskommentiert: - ((and (string-equal frequency "DAILY") - ;;(not (string= start-d end-d)) - ;;(not start-t) - ;;(not end-t) - ) - (let ((ds (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - (icalendar--get-event-property - e 'DTSTART)))) - (de (icalendar--datetime-to-diary-date - (icalendar--decode-isodatetime - until -1)))) - (setq diary-string - (format - "%%%%(and (diary-block %s %s))" - ds de))) - (setq event-ok t)))) - ;; Handle exceptions from recurrence rules - (let ((ex-dates (icalendar--get-event-properties e - 'EXDATE))) - (while ex-dates - (let* ((ex-start (icalendar--decode-isodatetime - (car ex-dates))) - (ex-d (icalendar--datetime-to-diary-date - ex-start))) - (setq diary-string - (icalendar--rris "^%%(\\(and \\)?" - (format - "%%%%(and (not (diary-date %s)) " - ex-d) - diary-string))) - (setq ex-dates (cdr ex-dates)))) - ;; FIXME: exception rules are not recognized - (if (icalendar--get-event-property e 'EXRULE) - (setq diary-string - (concat diary-string - "\n Exception rules: " - (icalendar--get-event-properties - e 'EXRULE))))) + (setq diary-string + (icalendar--convert-recurring-to-diary e dtstart-dec start-t + end-t)) + (setq event-ok t)) (rdate (icalendar--dmsg "rdate event") (setq diary-string "") @@ -1423,35 +1493,22 @@ ;; non-recurring event ;; all-day event ((not (string= start-d end-d)) - (icalendar--dmsg "non-recurring event") - (let ((ds (icalendar--datetime-to-diary-date dtstart)) - (de (icalendar--datetime-to-diary-date dtend))) - (setq diary-string - (format "%%%%(and (diary-block %s %s))" - ds de))) + (setq diary-string + (icalendar--convert-non-recurring-all-day-to-diary + e start-d end-1-d)) (setq event-ok t)) ;; not all-day ((and start-t (or (not end-t) (not (string= start-t end-t)))) - (icalendar--dmsg "not all day event") - (cond (end-t - (setq diary-string - (format "%s %s-%s" - (icalendar--datetime-to-diary-date - dtstart "/") - start-t end-t))) - (t - (setq diary-string - (format "%s %s" - (icalendar--datetime-to-diary-date - dtstart "/") - start-t)))) + (setq diary-string + (icalendar--convert-non-recurring-not-all-day-to-diary + e dtstart-dec dtend-dec start-t end-t)) (setq event-ok t)) ;; all-day event (t (icalendar--dmsg "all day event") (setq diary-string (icalendar--datetime-to-diary-date - dtstart "/")) + dtstart-dec "/")) (setq event-ok t))) ;; add all other elements unless the user doesn't want to have ;; them @@ -1478,12 +1535,237 @@ (message error-string)))) (if found-error (save-current-buffer - (set-buffer (get-buffer-create " *icalendar-errors*")) + (set-buffer (get-buffer-create "*icalendar-errors*")) (erase-buffer) (insert error-string))) (message "Converting icalendar...done") found-error)) +;; subroutines for importing +(defun icalendar--convert-recurring-to-diary (e dtstart-dec start-t end-t) + "Convert recurring icalendar event E to diary format. + +DTSTART-DEC is the DTSTART property of E. +START-T is the event's start time in diary format. +END-T is the event's end time in diary format." + (icalendar--dmsg "recurring event") + (let* ((rrule (icalendar--get-event-property e 'RRULE)) + (rrule-props (icalendar--split-value rrule)) + (frequency (cadr (assoc 'FREQ rrule-props))) + (until (cadr (assoc 'UNTIL rrule-props))) + (count (cadr (assoc 'COUNT rrule-props))) + (interval (read (or (cadr (assoc 'INTERVAL rrule-props)) "1"))) + (dtstart-conv (icalendar--datetime-to-diary-date dtstart-dec)) + (until-conv (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime until))) + (until-1-conv (icalendar--datetime-to-diary-date + (icalendar--decode-isodatetime until -1))) + (result "")) + + ;; FIXME FIXME interval!!!!!!!!!!!!! + + (when count + (if until + (message "Must not have UNTIL and COUNT -- ignoring COUNT element!") + (let ((until-1 0)) + (cond ((string-equal frequency "DAILY") + (setq until (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 (* (read count) interval) 0 0))) + (setq until-1 (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 (* (- (read count) 1) interval) + 0 0))) + ) + ((string-equal frequency "WEEKLY") + (setq until (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 (* (read count) 7 interval) 0 0))) + (setq until-1 (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 (* (- (read count) 1) 7 + interval) 0 0))) + ) + ((string-equal frequency "MONTHLY") + (setq until (icalendar--add-decoded-times + dtstart-dec (list 0 0 0 0 (* (- (read count) 1) + interval) 0))) + (setq until-1 (icalendar--add-decoded-times + dtstart-dec (list 0 0 0 0 (* (- (read count) 1) + interval) 0))) + ) + ((string-equal frequency "YEARLY") + (setq until (icalendar--add-decoded-times + dtstart-dec (list 0 0 0 0 0 (* (- (read count) 1) + interval)))) + (setq until-1 (icalendar--add-decoded-times + dtstart-dec + (list 0 0 0 0 0 (* (- (read count) 1) + interval)))) + ) + (t + (message "Cannot handle COUNT attribute for `%s' events." + frequency))) + (setq until-conv (icalendar--datetime-to-diary-date until)) + (setq until-1-conv (icalendar--datetime-to-diary-date until-1)) + )) + ) + (cond ((string-equal frequency "WEEKLY") + (if (not start-t) + (progn + ;; weekly and all-day + (icalendar--dmsg "weekly all-day") + (if until + (setq result + (format + (concat "%%%%(and " + "(diary-cyclic %d %s) " + "(diary-block %s %s))") + (* interval 7) + dtstart-conv + dtstart-conv + (if count until-1-conv until-conv) + )) + (setq result + (format "%%%%(and (diary-cyclic %d %s))" + (* interval 7) + dtstart-conv)))) + ;; weekly and not all-day + (let* ((byday (cadr (assoc 'BYDAY rrule-props))) + (weekday + (icalendar--get-weekday-number byday))) + (icalendar--dmsg "weekly not-all-day") + (if until + (setq result + (format + (concat "%%%%(and " + "(diary-cyclic %d %s) " + "(diary-block %s %s)) " + "%s%s%s") + (* interval 7) + dtstart-conv + dtstart-conv + until-conv + (or start-t "") + (if end-t "-" "") (or end-t ""))) + ;; no limit + ;; FIXME!!!! + ;; DTSTART;VALUE=DATE-TIME:20030919T090000 + ;; DTEND;VALUE=DATE-TIME:20030919T113000 + (setq result + (format + "%%%%(and (diary-cyclic %s %s)) %s%s%s" + (* interval 7) + dtstart-conv + (or start-t "") + (if end-t "-" "") (or end-t ""))))))) + ;; yearly + ((string-equal frequency "YEARLY") + (icalendar--dmsg "yearly") + (if until + (setq result (format + (concat "%%%%(and (diary-date %s %s t) " + "(diary-block %s %s)) %s%s%s") + (if european-calendar-style (nth 3 dtstart-dec) + (nth 4 dtstart-dec)) + (if european-calendar-style (nth 4 dtstart-dec) + (nth 3 dtstart-dec)) + dtstart-conv + until-conv + (or start-t "") + (if end-t "-" "") (or end-t ""))) + (setq result (format + "%%%%(and (diary-anniversary %s)) %s%s%s" + dtstart-conv + (or start-t "") + (if end-t "-" "") (or end-t ""))))) + ;; monthly + ((string-equal frequency "MONTHLY") + (icalendar--dmsg "monthly") + (setq result + (format + "%%%%(and (diary-date %s %s %s) (diary-block %s %s)) %s%s%s" + (if european-calendar-style (nth 3 dtstart-dec) "t") + (if european-calendar-style "t" (nth 3 dtstart-dec)) + "t" + dtstart-conv + (if until + until-conv + "1 1 9999") ;; FIXME: should be unlimited + (or start-t "") + (if end-t "-" "") (or end-t "")))) + ;; daily + ((and (string-equal frequency "DAILY")) + (if until + (setq result + (format + (concat "%%%%(and (diary-cyclic %s %s) " + "(diary-block %s %s)) %s%s%s") + interval dtstart-conv dtstart-conv + (if count until-1-conv until-conv) + (or start-t "") + (if end-t "-" "") (or end-t ""))) + (setq result + (format + "%%%%(and (diary-cyclic %s %s)) %s%s%s" + interval + dtstart-conv + (or start-t "") + (if end-t "-" "") (or end-t "")))))) + ;; Handle exceptions from recurrence rules + (let ((ex-dates (icalendar--get-event-properties e 'EXDATE))) + (while ex-dates + (let* ((ex-start (icalendar--decode-isodatetime + (car ex-dates))) + (ex-d (icalendar--datetime-to-diary-date + ex-start))) + (setq result + (icalendar--rris "^%%(\\(and \\)?" + (format + "%%%%(and (not (diary-date %s)) " + ex-d) + result))) + (setq ex-dates (cdr ex-dates)))) + ;; FIXME: exception rules are not recognized + (if (icalendar--get-event-property e 'EXRULE) + (setq result + (concat result + "\n Exception rules: " + (icalendar--get-event-properties + e 'EXRULE)))) + result)) + +(defun icalendar--convert-non-recurring-all-day-to-diary (event start-d end-d) + "Convert non-recurring icalendar EVENT to diary format. + +DTSTART is the decoded DTSTART property of E. +Argument START-D gives the first day. +Argument END-D gives the last day." + (icalendar--dmsg "non-recurring all-day event") + (format "%%%%(and (diary-block %s %s))" start-d end-d)) + +(defun icalendar--convert-non-recurring-not-all-day-to-diary (event dtstart-dec + dtend-dec + start-t + end-t) + "Convert recurring icalendar EVENT to diary format. + +DTSTART-DEC is the decoded DTSTART property of E. +DTEND-DEC is the decoded DTEND property of E. +START-T is the event's start time in diary format. +END-T is the event's end time in diary format." + (icalendar--dmsg "not all day event") + (cond (end-t + (format "%s %s-%s" + (icalendar--datetime-to-diary-date + dtstart-dec "/") + start-t end-t)) + (t + (format "%s %s" + (icalendar--datetime-to-diary-date + dtstart-dec "/") + start-t)))) + (defun icalendar--add-diary-entry (string diary-file non-marking &optional subject) "Add STRING to the diary file DIARY-FILE. diff -r 6deb860255f3 -r b151ec53c504 lisp/emacs-lisp/byte-run.el --- a/lisp/emacs-lisp/byte-run.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/emacs-lisp/byte-run.el Fri May 06 21:06:31 2005 +0000 @@ -116,12 +116,16 @@ (defmacro define-obsolete-function-alias (function new &optional when docstring) - "Set FUNCTION's function definition to NEW and warn that FUNCTION is obsolete. -If provided, WHEN should be a string indicating when FUNCTION was -first made obsolete, for example a date or a release number. The -optional argument DOCSTRING specifies the documentation string -for FUNCTION; if DOCSTRING is omitted or nil, FUNCTION uses the -documentation string of NEW unluess it already has one." + "Set FUNCTION's function definition to NEW and mark it obsolete. + +\(define-obsolete-function-alias 'old-fun 'new-fun \"22.1\" \"old-fun's doc.\") + +is equivalent to the following two lines of code: + +\(defalias 'old-fun 'new-fun \"old-fun's doc.\") +\(make-obsolete 'old-fun 'new-fun \"22.1\") + +See the docstrings of `defalias' and `make-obsolete' for more details." `(progn (defalias ,function ,new ,docstring) (make-obsolete ,function ,new ,when))) @@ -143,12 +147,17 @@ (defmacro define-obsolete-variable-alias (variable new &optional when docstring) - "Make VARIABLE a variable alias for NEW and warn that VARIABLE is obsolete. -If provided, WHEN should be a string indicating when VARIABLE was -first made obsolete, for example a date or a release number. The -optional argument DOCSTRING specifies the documentation string -for VARIABLE; if DOCSTRING is omitted or nil, VARIABLE uses the -documentation string of NEW unless it already has one." + "Make VARIABLE a variable alias for NEW and mark it obsolete. + +\(define-obsolete-variable-alias 'old-var 'new-var \"22.1\" \"old-var's doc.\") + +is equivalent to the following two lines of code: + +\(defvaralias 'old-var 'new-var \"old-var's doc.\") +\(make-obsolete-variable 'old-var 'new-var \"22.1\") + +See the docstrings of `defvaralias' and `make-obsolete-variable' or +Info node `(elisp)Variable Aliases' for more details." `(progn (defvaralias ,variable ,new ,docstring) (make-obsolete-variable ,variable ,new ,when))) diff -r 6deb860255f3 -r b151ec53c504 lisp/emacs-lisp/bytecomp.el --- a/lisp/emacs-lisp/bytecomp.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Fri May 06 21:06:31 2005 +0000 @@ -2900,9 +2900,6 @@ (put 'byte-concatN 'byte-opcode-invert 'concat) (put 'byte-insertN 'byte-opcode-invert 'insert) -(byte-defop-compiler (dot byte-point) 0) -(byte-defop-compiler (dot-max byte-point-max) 0) -(byte-defop-compiler (dot-min byte-point-min) 0) (byte-defop-compiler point 0) ;;(byte-defop-compiler mark 0) ;; obsolete (byte-defop-compiler point-max 0) diff -r 6deb860255f3 -r b151ec53c504 lisp/emulation/cua-base.el --- a/lisp/emulation/cua-base.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/emulation/cua-base.el Fri May 06 21:06:31 2005 +0000 @@ -1397,10 +1397,11 @@ ;;;###autoload '(error (concat "\n\n" ;;;###autoload "CUA-mode is now part of the standard GNU Emacs distribution,\n" ;;;###autoload "so you may now enable and customize CUA via the Options menu.\n\n" -;;;###autoload "Your " (file-name-nondirectory user-init-file) " loads an older version of CUA-mode which does\n" -;;;###autoload "not work correctly with this version of GNU Emacs.\n" +;;;###autoload "You have loaded an older version of CUA-mode which does\n" +;;;###autoload "not work correctly with this version of GNU Emacs.\n\n" +;;;###autoload (if user-init-file (concat ;;;###autoload "To correct this, remove the loading and customization of the\n" -;;;###autoload "old version from the " user-init-file " file.\n\n"))) +;;;###autoload "old version from the " user-init-file " file.\n\n"))))) (provide 'cua) diff -r 6deb860255f3 -r b151ec53c504 lisp/files.el --- a/lisp/files.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/files.el Fri May 06 21:06:31 2005 +0000 @@ -287,13 +287,13 @@ (const :tag "When saving" t) (const :tag "When visiting or saving" visit-save) (const :tag "Don't add newlines" nil) - (other :tag "Ask" ask)) + (other :tag "Ask each time" ask)) :group 'editing-basics) (defcustom mode-require-final-newline t "*Whether to add a newline at end of file, in certain major modes. Those modes set `require-final-newline' to this value when you enable them. -They do so because they are used for files that are supposed +They do so because they are often used for files that are supposed to end in newlines, and the question is how to arrange that. A value of t means do this only when the file is about to be saved. diff -r 6deb860255f3 -r b151ec53c504 lisp/font-lock.el --- a/lisp/font-lock.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/font-lock.el Fri May 06 21:06:31 2005 +0000 @@ -339,6 +339,10 @@ (defvar font-lock-warning-face 'font-lock-warning-face "Face name to use for things that should stand out.") +(defvar font-lock-negation-char-face 'font-lock-negation-char-face + "Face name to use for easy to overlook negation. +This can be an \"!\" or the \"n\" in \"ifndef\".") + (defvar font-lock-preprocessor-face 'font-lock-preprocessor-face "Face name to use for preprocessor directives.") @@ -386,7 +390,7 @@ MATCH-HIGHLIGHT should be of the form: - (MATCH FACENAME [[OVERRIDE [LAXMATCH]]) + (MATCH FACENAME [OVERRIDE [LAXMATCH]]) MATCH is the subexpression of MATCHER to be highlighted. FACENAME is an expression whose value is the face name to use. Face default attributes @@ -1761,6 +1765,16 @@ "Font Lock mode face used to highlight warnings." :group 'font-lock-highlighting-faces) +;; Matches font-lock-builtin-face, because that is used for #ifndef and +;; font-lock-keyword-face, which alas make-mode uses for ifndef +(defface font-lock-negation-char-face + '((((class color) (min-colors 88) (background light)) (:foreground "VioletRed" :weight bold)) + (((class color) (min-colors 88) (background dark)) (:foreground "MediumOrchid1" :weight bold)) + (((class color) (min-colors 8)) (:foreground "red" :weight bold)) + (t (:inverse-video t :weight bold))) + "Font Lock mode face used to highlight easy to overlook negation." + :group 'font-lock-highlighting-faces) + (defface font-lock-preprocessor-face '((t :inherit font-lock-builtin-face)) "Font Lock mode face used to highlight preprocessor directives." diff -r 6deb860255f3 -r b151ec53c504 lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Tue May 03 03:01:09 2005 +0000 +++ b/lisp/gnus/ChangeLog Fri May 06 21:06:31 2005 +0000 @@ -1,3 +1,15 @@ +2005-04-28 Katsumi Yamaoka + + * gnus-art.el (article-date-ut): Support converting date in + forwarded parts as well. + (gnus-article-save-original-date): New macro. + (gnus-display-mime): Use it. + +2005-04-28 David Hansen + + * nnrss.el (nnrss-check-group, nnrss-request-article): Support the + enclosure element of . + 2005-04-24 Teodor Zlatanov * spam-report.el (spam-report-unplug-agent) @@ -18,7 +30,7 @@ Process requests from `spam-report-requests-file'. (spam-report-url-ping-mm-url): Autoload. [Added missing offline functionality from trunk.] - + 2005-04-18 Katsumi Yamaoka * qp.el (quoted-printable-encode-region): Save excursion. diff -r 6deb860255f3 -r b151ec53c504 lisp/gnus/gnus-art.el --- a/lisp/gnus/gnus-art.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/gnus/gnus-art.el Fri May 06 21:06:31 2005 +0000 @@ -2824,72 +2824,76 @@ (forward-line 1) (setq ended t))))) -(defun article-date-ut (&optional type highlight header) +(defun article-date-ut (&optional type highlight) "Convert DATE date to universal time in the current article. If TYPE is `local', convert to local time; if it is `lapsed', output how much time has lapsed since DATE. For `lapsed', the value of `gnus-article-date-lapsed-new-header' says whether the \"X-Sent:\" header should replace the \"Date:\" one, or should be added below it." (interactive (list 'ut t)) - (let* ((header (or header - (message-fetch-field "date") - "")) - (tdate-regexp "^Date:[ \t]\\|^X-Sent:[ \t]") - (date-regexp - (cond - ((not gnus-article-date-lapsed-new-header) - tdate-regexp) - ((eq type 'lapsed) - "^X-Sent:[ \t]") - (t - "^Date:[ \t]"))) - (date (if (vectorp header) (mail-header-date header) - header)) + (let* ((tdate-regexp "^Date:[ \t]\\|^X-Sent:[ \t]") + (date-regexp (cond ((not gnus-article-date-lapsed-new-header) + tdate-regexp) + ((eq type 'lapsed) + "^X-Sent:[ \t]") + (article-lapsed-timer + "^Date:[ \t]") + (t + tdate-regexp))) + (case-fold-search t) + (inhibit-read-only t) (inhibit-point-motion-hooks t) - pos - bface eface) + pos date bface eface) (save-excursion (save-restriction - (article-narrow-to-head) - (when (re-search-forward tdate-regexp nil t) - (setq bface (get-text-property (gnus-point-at-bol) 'face) - date (or (get-text-property (gnus-point-at-bol) - 'original-date) - date) - eface (get-text-property (1- (gnus-point-at-eol)) 'face)) - (forward-line 1)) - (when (and date (not (string= date ""))) + (widen) + (goto-char (point-min)) + (while (or (setq date (get-text-property (setq pos (point)) + 'original-date)) + (when (setq pos (next-single-property-change + (point) 'original-date)) + (setq date (get-text-property pos 'original-date)) + t)) + (narrow-to-region pos (or (text-property-any pos (point-max) + 'original-date nil) + (point-max))) + (goto-char (point-min)) + (when (re-search-forward tdate-regexp nil t) + (setq bface (get-text-property (gnus-point-at-bol) 'face) + eface (get-text-property (1- (gnus-point-at-eol)) 'face))) (goto-char (point-min)) - (let ((inhibit-read-only t)) - ;; Delete any old Date headers. - (while (re-search-forward date-regexp nil t) - (if pos - (delete-region (progn (beginning-of-line) (point)) - (progn (gnus-article-forward-header) - (point))) - (delete-region (progn (beginning-of-line) (point)) - (progn (gnus-article-forward-header) - (forward-char -1) - (point))) - (setq pos (point)))) - (when (and (not pos) - (re-search-forward tdate-regexp nil t)) - (forward-line 1)) - (when pos - (goto-char pos)) - (insert (article-make-date-line date (or type 'ut))) - (unless pos - (insert "\n") - (forward-line -1)) - ;; Do highlighting. - (beginning-of-line) - (when (looking-at "\\([^:]+\\): *\\(.*\\)$") - (put-text-property (match-beginning 1) (1+ (match-end 1)) - 'original-date date) - (put-text-property (match-beginning 1) (1+ (match-end 1)) - 'face bface) - (put-text-property (match-beginning 2) (match-end 2) - 'face eface)))))))) + (setq pos nil) + ;; Delete any old Date headers. + (while (re-search-forward date-regexp nil t) + (if pos + (delete-region (gnus-point-at-bol) + (progn + (gnus-article-forward-header) + (point))) + (delete-region (gnus-point-at-bol) + (progn + (gnus-article-forward-header) + (forward-char -1) + (point))) + (setq pos (point)))) + (when (and (not pos) + (re-search-forward tdate-regexp nil t)) + (forward-line 1)) + (gnus-goto-char pos) + (insert (article-make-date-line date (or type 'ut))) + (unless pos + (insert "\n") + (forward-line -1)) + ;; Do highlighting. + (beginning-of-line) + (when (looking-at "\\([^:]+\\): *\\(.*\\)$") + (put-text-property (match-beginning 1) (1+ (match-end 1)) + 'face bface) + (put-text-property (match-beginning 2) (match-end 2) + 'face eface)) + (put-text-property (point-min) (1- (point-max)) 'original-date date) + (goto-char (point-max)) + (widen)))))) (defun article-make-date-line (date type) "Return a DATE line of TYPE." @@ -3075,6 +3079,27 @@ (interactive (list t)) (article-date-ut 'iso8601 highlight)) +(defmacro gnus-article-save-original-date (&rest forms) + "Save the original date as a text property and evaluate FORMS." + `(let* ((case-fold-search t) + (start (progn + (goto-char (point-min)) + (when (and (re-search-forward "^date:[\t\n ]+" nil t) + (not (bolp))) + (match-end 0)))) + (date (when (and start + (re-search-forward "[\t ]*\n\\([^\t ]\\|\\'\\)" + nil t)) + (buffer-substring-no-properties start + (match-beginning 0))))) + (goto-char (point-max)) + (skip-chars-backward "\n") + (put-text-property (point-min) (point) 'original-date date) + ,@forms + (goto-char (point-max)) + (skip-chars-backward "\n") + (put-text-property (point-min) (point) 'original-date date))) + ;; (defun article-show-all () ;; "Show all hidden text in the article buffer." ;; (interactive) @@ -4686,7 +4711,8 @@ (save-restriction (article-goto-body) (narrow-to-region (point-min) (point)) - (gnus-treat-article 'head)))))))) + (gnus-article-save-original-date + (gnus-treat-article 'head))))))))) (defcustom gnus-mime-display-multipart-as-mixed nil "Display \"multipart\" parts as \"multipart/mixed\". diff -r 6deb860255f3 -r b151ec53c504 lisp/gnus/nnrss.el --- a/lisp/gnus/nnrss.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/gnus/nnrss.el Fri May 06 21:06:31 2005 +0000 @@ -195,6 +195,7 @@ (delete "" (split-string (nth 6 e) "\n+")) " "))) (link (nth 2 e)) + (enclosure (nth 7 e)) ;; Enable encoding of Newsgroups header in XEmacs. (default-enable-multibyte-characters t) (rfc2047-header-encoding-alist @@ -203,18 +204,21 @@ rfc2047-header-encoding-alist) rfc2047-header-encoding-alist)) rfc2047-encode-encoded-words body) - (when (or text link) + (when (or text link enclosure) (insert "\n") (insert "<#multipart type=alternative>\n" "<#part type=\"text/plain\">\n") (setq body (point)) - (if text - (progn - (insert text "\n") - (when link - (insert "\n" link "\n"))) - (when link - (insert link "\n"))) + (when text + (insert text "\n") + (when (or link enclosure) + (insert "\n"))) + (when link + (insert link "\n")) + (when enclosure + (insert (car enclosure) " " + (nth 2 enclosure) " " + (nth 3 enclosure) "\n")) (setq body (buffer-substring body (point))) (insert "<#/part>\n" "<#part type=\"text/html\">\n" @@ -223,6 +227,10 @@ (insert text "\n")) (when link (insert "

link

\n")) + (when enclosure + (insert "

" + (cadr enclosure) " " (nth 2 enclosure) + " " (nth 3 enclosure) "

\n")) (insert "\n" "<#/part>\n" "<#/multipart>\n")) @@ -518,8 +526,8 @@ ;;; Snarf functions (defun nnrss-check-group (group server) - (let (file xml subject url extra changed author - date rss-ns rdf-ns content-ns dc-ns) + (let (file xml subject url extra changed author date + enclosure rss-ns rdf-ns content-ns dc-ns) (if (and nnrss-use-local (file-exists-p (setq file (expand-file-name (nnrss-translate-file-chars @@ -567,6 +575,27 @@ (setq date (or (nnrss-node-text dc-ns 'date item) (nnrss-node-text rss-ns 'pubDate item) (message-make-date))) + (when (setq enclosure (cadr (assq (intern (concat rss-ns "enclosure")) item))) + (let ((url (cdr (assq 'url enclosure))) + (len (cdr (assq 'length enclosure))) + (type (cdr (assq 'type enclosure))) + (name)) + (setq len + (if (and len (integerp (setq len (string-to-number len)))) + ;; actually already in `ls-lisp-format-file-size' but + ;; probably not worth to require it for one function + (do ((size (/ len 1.0) (/ size 1024.0)) + (post-fixes (list "" "k" "M" "G" "T" "P" "E") + (cdr post-fixes))) + ((< size 1024) + (format "%.1f%s" size (car post-fixes)))) + "0")) + (setq url (or url "")) + (setq name (if (string-match "/\\([^/]*\\)$" url) + (match-string 1 url) + "file")) + (setq type (or type "")) + (setq enclosure (list url name len type)))) (push (list (incf nnrss-group-max) @@ -575,7 +604,8 @@ (and subject (nnrss-mime-encode-string subject)) (and author (nnrss-mime-encode-string author)) date - (and extra (nnrss-decode-entities-string extra))) + (and extra (nnrss-decode-entities-string extra)) + enclosure) nnrss-group-data) (gnus-sethash (or url extra) t nnrss-group-hashtb) (setq changed t)) diff -r 6deb860255f3 -r b151ec53c504 lisp/help.el --- a/lisp/help.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/help.el Fri May 06 21:06:31 2005 +0000 @@ -611,6 +611,7 @@ If non-nil UNTRANSLATED is a vector of the untranslated events. It can also be a number in which case the untranslated events from the last key hit are used." + ;; UP-EVENT is the up-event that was discarded by reading KEY, or nil. (interactive "kDescribe key: \np\nU") (if (numberp untranslated) (setq untranslated (this-single-command-raw-keys))) @@ -634,7 +635,8 @@ ;; Don't bother user with strings from (e.g.) the select-paste menu. (if (stringp (aref key (1- (length key)))) (aset key (1- (length key)) "(any string)")) - (if (stringp (aref untranslated (1- (length untranslated)))) + (if (and untranslated + (stringp (aref untranslated (1- (length untranslated))))) (aset untranslated (1- (length untranslated)) "(any string)")) (with-output-to-temp-buffer (help-buffer) diff -r 6deb860255f3 -r b151ec53c504 lisp/ido.el --- a/lisp/ido.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/ido.el Fri May 06 21:06:31 2005 +0000 @@ -56,7 +56,7 @@ ;; so I invented a common "ido-" namespace for the merged packages. ;; ;; This version is based on ido.el version 1.57 released on -;; gnu.emacs.sources adapted for emacs 21.5 to use command remapping +;; gnu.emacs.sources adapted for emacs 22.1 to use command remapping ;; and optionally hooking the read-buffer and read-file-name functions. ;; ;; Prefix matching was added by Klaus Berndl based on @@ -251,8 +251,8 @@ ;; ;; Customize the `ido' group to change the `ido' functionality. ;; -;; To modify the keybindings, use the hook provided. For example: -;;(add-hook 'ido-define-mode-map-hook 'ido-my-keys) +;; To modify the keybindings, use the ido-setup-hook. For example: +;;(add-hook 'ido-setup-hook 'ido-my-keys) ;; ;;(defun ido-my-keys () ;; "Add my keybindings for ido." @@ -705,8 +705,11 @@ (const never)) :group 'ido) -(defcustom ido-define-mode-map-hook nil - "*Hook to define keys in `ido-mode-map' for extra keybindings." +(defcustom ido-setup-hook nil + "*Hook run after the ido variables and keymap has been setup. +The dynamic variable `ido-cur-item' contains the current type of item that +is read by ido, possible values are file, dir, buffer, and list. +Additional keys can be defined in `ido-mode-map'." :type 'hook :group 'ido) @@ -931,6 +934,9 @@ (defvar ido-text-init nil "The initial string for the users string it is typed in.") +(defvar ido-input-stack nil + "Stores the users strings when user hits M-b/M-f.") + (defvar ido-matches nil "List of files currently matching `ido-text'.") @@ -1399,13 +1405,14 @@ (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 ?b)] 'ido-next-work-file) (define-key map [(meta ?d)] 'ido-wide-find-dir) - (define-key map [(meta ?f)] 'ido-wide-find-file) + (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) (define-key map [(meta ?m)] 'ido-make-directory) (define-key map [(meta ?n)] 'ido-next-work-directory) (define-key map [(meta ?o)] 'ido-prev-work-file) + (define-key map [(meta ?O)] 'ido-next-work-file) (define-key map [(meta ?p)] 'ido-prev-work-directory) (define-key map [(meta ?s)] 'ido-merge-work-directories) ) @@ -1431,8 +1438,7 @@ (define-key map [remap viper-del-backward-char-in-insert] 'ido-delete-backward-updir) (define-key map [remap viper-delete-backward-word] 'ido-delete-backward-word-updir))) - (setq ido-mode-map map) - (run-hooks 'ido-define-mode-map-hook))) + (setq ido-mode-map map))) (defun ido-final-slash (dir &optional fix-it) ;; return DIR if DIR has final slash. @@ -1601,6 +1607,10 @@ (ido-define-mode-map) (setq ido-text-init initial) + (setq ido-input-stack nil) + + (run-hooks 'ido-setup-hook) + (while (not done) (ido-trace "\n_LOOP_" ido-text-init) (setq ido-exit nil) @@ -1742,9 +1752,11 @@ (setq ido-text-init "") (while new (setq new (if edit - (read-file-name (concat prompt "[EDIT] ") - (expand-file-name d) - (concat d f) nil f) + (condition-case nil + (read-file-name (concat prompt "[EDIT] ") + (expand-file-name d) + (concat d f) nil f) + (quit (concat d f))) f) d (or (file-name-directory new) "/") f (file-name-nondirectory new) @@ -1763,7 +1775,11 @@ (setq ido-text-init f new nil)))))) (t - (setq ido-text-init (read-string (concat prompt "[EDIT] ") ido-final-text)))) + (setq ido-text-init + (condition-case nil + (read-string (concat prompt "[EDIT] ") ido-final-text) + (quit ido-final-text))))) + nil) ((eq ido-exit 'keep) @@ -1772,7 +1788,7 @@ ((memq ido-exit '(dired fallback find-file switch-to-buffer insert-buffer insert-file)) (setq done t)) - ((eq ido-exit 'updir) + ((memq ido-exit '(updir push)) ;; cannot go up if already at the root-dir (Unix) or at the ;; root-dir of a certain drive (Windows or MS-DOS). (if (ido-is-tramp-root) @@ -1781,9 +1797,31 @@ (ido-set-current-directory (match-string 1 ido-current-directory)) (setq ido-set-default-item t)) (unless (ido-is-root-directory) + (when (eq ido-exit 'push) + (setq ido-input-stack (cons (cons ido-cur-item ido-text) ido-input-stack)) + (setq ido-cur-item 'dir) + (setq ido-text-init (file-name-nondirectory (substring ido-current-directory 0 -1))) + (ido-trace "push" ido-input-stack)) (ido-set-current-directory (file-name-directory (substring ido-current-directory 0 -1))) (setq ido-set-default-item t)))) + ((eq ido-exit 'pop) + (ido-trace "pop" ido-input-stack) + (let ((elt (car ido-input-stack))) + (setq ido-input-stack (cdr ido-input-stack)) + (ido-set-current-directory (concat ido-current-directory ido-text)) + (setq ido-cur-item (car elt)) + (setq ido-text-init (cdr elt)))) + + ((eq ido-exit 'pop-all) + (ido-trace "pop-all" ido-input-stack) + (while ido-input-stack + (let ((elt (car ido-input-stack))) + (setq ido-input-stack (cdr ido-input-stack)) + (ido-set-current-directory (concat ido-current-directory ido-text)) + (setq ido-cur-item (car elt)) + (setq ido-text-init (cdr elt))))) + ;; Handling the require-match must be done in a better way. ((and require-match (not (if ido-directory-too-big @@ -1838,7 +1876,14 @@ (setq ido-last-directory-list (cons (cons ido-current-directory ido-selected) ido-last-directory-list))))) (ido-set-current-directory ido-current-directory ido-selected) - (setq ido-set-default-item t)) + (if ido-input-stack + (while ido-input-stack + (let ((elt (car ido-input-stack))) + (if (setq ido-input-stack (cdr ido-input-stack)) + (ido-set-current-directory ido-current-directory (cdr elt)) + (setq ido-text-init (cdr elt))) + (setq ido-cur-item (car elt)))) + (setq ido-set-default-item t))) (t (setq done t)))))) @@ -1968,10 +2013,11 @@ (require 'ffap) ;; Duplicate code from ffap-guesser as we want different behaviour for files and URLs. (cond - ((and ido-use-url-at-point - ffap-url-regexp - (ffap-fixup-url (or (ffap-url-at-point) - (ffap-gopher-at-point)))) + ((with-no-warnings + (and ido-use-url-at-point + ffap-url-regexp + (ffap-fixup-url (or (ffap-url-at-point) + (ffap-gopher-at-point))))) (setq ido-exit 'ffap filename t)) @@ -2041,7 +2087,8 @@ (ido-record-work-directory) (funcall method ido-current-directory) (if (eq method 'dired) - (dired-goto-file (expand-file-name file)))) + (with-no-warnings + (dired-goto-file (expand-file-name file))))) ((string-match "[[*?]" filename) (setq dirname (concat ido-current-directory filename)) (ido-record-command method dirname) @@ -2283,7 +2330,7 @@ (interactive) (if (or (not ido-require-match) (ido-existing-item-p)) - (throw 'exit nil))) + (exit-minibuffer))) (defun ido-select-text () "Select the buffer or file named by the prompt. @@ -2432,7 +2479,9 @@ (unless file (let ((enable-recursive-minibuffers t)) (setq file - (read-string (concat "Wide find file: " ido-current-directory) ido-text)))) + (condition-case nil + (read-string (concat "Wide find file: " ido-current-directory) ido-text) + (quit ""))))) (when (> (length file) 0) (setq ido-use-merged-list t ido-try-merged-list 'wide) (setq ido-exit 'refresh) @@ -2446,7 +2495,9 @@ (unless dir (let ((enable-recursive-minibuffers t)) (setq dir - (read-string (concat "Wide find directory: " ido-current-directory) ido-text)))) + (condition-case nil + (read-string (concat "Wide find directory: " ido-current-directory) ido-text) + (quit ""))))) (when (> (length dir) 0) (setq ido-use-merged-list t ido-try-merged-list 'wide) (setq ido-exit 'refresh) @@ -2454,6 +2505,26 @@ (setq ido-rotate-temp t) (exit-minibuffer))) +(defun ido-push-dir () + "Move to previous directory in file name, push current input on stack." + (interactive) + (setq ido-exit 'push) + (exit-minibuffer)) + +(defun ido-pop-dir (arg) + "Pop directory from input stack back to input. +With \\[universal-argument], pop all element." + (interactive "P") + (when ido-input-stack + (setq ido-exit (if arg 'pop-all 'pop)) + (exit-minibuffer))) + +(defun ido-wide-find-file-or-pop-dir (arg) + (interactive "P") + (if ido-input-stack + (ido-pop-dir arg) + (ido-wide-find-file))) + (defun ido-make-directory (&optional dir) "Prompt for DIR to create in current directory." (interactive) @@ -2771,67 +2842,69 @@ (defun ido-make-merged-file-list (text auto wide) (let (res) (message "Searching for `%s'...." text) - (if (and (ido-final-slash text) ido-dir-file-cache) - (if wide - (setq res (ido-wide-find-dirs-or-files - ido-current-directory (substring text 0 -1) ido-enable-prefix t)) - ;; Use list of cached directories - (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'")) - (dirs ido-dir-file-cache) - dir b d f) - (if nil ;; simple - (while dirs - (setq dir (car (car dirs)) - dirs (cdr dirs)) - (when (and (string-match re dir) - (not (ido-ignore-item-p dir ido-ignore-directories-merge)) - (file-directory-p dir)) - (setq b (substring dir 0 -1) - f (concat (file-name-nondirectory b) "/") - d (file-name-directory b) - res (cons (cons f d) res)))) + (condition-case nil + (if (and (ido-final-slash text) ido-dir-file-cache) + (if wide + (setq res (ido-wide-find-dirs-or-files + ido-current-directory (substring text 0 -1) ido-enable-prefix t)) + ;; Use list of cached directories + (let ((re (concat (regexp-quote (substring text 0 -1)) "[^/:]*/\\'")) + (dirs ido-dir-file-cache) + dir b d f) + (if nil ;; simple + (while dirs + (setq dir (car (car dirs)) + dirs (cdr dirs)) + (when (and (string-match re dir) + (not (ido-ignore-item-p dir ido-ignore-directories-merge)) + (file-directory-p dir)) + (setq b (substring dir 0 -1) + f (concat (file-name-nondirectory b) "/") + d (file-name-directory b) + res (cons (cons f d) res)))) + (while dirs + (setq dir (car dirs) + d (car dir) + dirs (cdr dirs)) + (when (not (ido-ignore-item-p d ido-ignore-directories-merge)) + (setq dir (cdr (cdr dir))) + (while dir + (setq f (car dir) + dir (cdr dir)) + (if (and (string-match re f) + (not (ido-ignore-item-p f ido-ignore-directories))) + (setq res (cons (cons f d) res))))) + (if (and auto (input-pending-p)) + (setq dirs nil + res t)))))) + (if wide + (setq res (ido-wide-find-dirs-or-files + ido-current-directory text ido-enable-prefix nil)) + (let ((ido-text text) + (dirs ido-work-directory-list) + (must-match (and text (> (length text) 0))) + dir fl) + (if (and auto (not (member ido-current-directory dirs))) + (setq dirs (cons ido-current-directory dirs))) (while dirs (setq dir (car dirs) - d (car dir) dirs (cdr dirs)) - (when (not (ido-ignore-item-p d ido-ignore-directories-merge)) - (setq dir (cdr (cdr dir))) - (while dir - (setq f (car dir) - dir (cdr dir)) - (if (and (string-match re f) - (not (ido-ignore-item-p f ido-ignore-directories))) - (setq res (cons (cons f d) res))))) + (when (and dir (stringp dir) + (or ido-merge-ftp-work-directories + (not (ido-is-ftp-directory dir))) + (file-directory-p dir) + ;; TODO. check for nonreadable and too-big. + (setq fl (if (eq ido-cur-item 'file) + (ido-make-file-list1 dir t) + (ido-make-dir-list1 dir t)))) + (if must-match + (setq fl (ido-set-matches1 fl))) + (if fl + (setq res (nconc fl res)))) (if (and auto (input-pending-p)) (setq dirs nil res t)))))) - (if wide - (setq res (ido-wide-find-dirs-or-files - ido-current-directory text ido-enable-prefix nil)) - (let ((ido-text text) - (dirs ido-work-directory-list) - (must-match (and text (> (length text) 0))) - dir fl) - (if (and auto (not (member ido-current-directory dirs))) - (setq dirs (cons ido-current-directory dirs))) - (while dirs - (setq dir (car dirs) - dirs (cdr dirs)) - (when (and dir (stringp dir) - (or ido-merge-ftp-work-directories - (not (ido-is-ftp-directory dir))) - (file-directory-p dir) - ;; TODO. check for nonreadable and too-big. - (setq fl (if (eq ido-cur-item 'file) - (ido-make-file-list1 dir t) - (ido-make-dir-list1 dir t)))) - (if must-match - (setq fl (ido-set-matches1 fl))) - (if fl - (setq res (nconc fl res)))) - (if (and auto (input-pending-p)) - (setq dirs nil - res t)))))) + (quit (setq res t))) (if (and res (not (eq res t))) (setq res (ido-sort-merged-list res auto))) (when (and (or ido-rotate-temp ido-rotate-file-list-default) @@ -3063,7 +3136,8 @@ (setq ido-temp-list (cons default ido-temp-list)))) (setq ido-temp-list (delete "." ido-temp-list)) - (setq ido-temp-list (cons "." ido-temp-list)) + (unless ido-input-stack + (setq ido-temp-list (cons "." ido-temp-list))) (run-hooks 'ido-make-dir-list-hook) ido-temp-list)) @@ -3265,7 +3339,8 @@ (if (pos-visible-in-window-p (point-max) win) (if (or ido-completion-buffer-all-completions (boundp 'ido-completion-buffer-full)) (set-window-start win (point-min)) - (set (make-local-variable 'ido-completion-buffer-full) t) + (with-no-warnings + (set (make-local-variable 'ido-completion-buffer-full) t)) (setq full-list t display-it t)) (scroll-other-window)) diff -r 6deb860255f3 -r b151ec53c504 lisp/info.el --- a/lisp/info.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/info.el Fri May 06 21:06:31 2005 +0000 @@ -3243,6 +3243,8 @@ (make-local-variable 'line-move-ignore-invisible) (setq line-move-ignore-invisible t) (make-local-variable 'desktop-save-buffer) + (make-local-variable 'widen-automatically) + (setq widen-automatically nil) (setq desktop-save-buffer 'Info-desktop-buffer-misc-data) (add-hook 'kill-buffer-hook 'Info-kill-buffer nil t) (add-hook 'clone-buffer-hook 'Info-clone-buffer-hook nil t) diff -r 6deb860255f3 -r b151ec53c504 lisp/international/mule-cmds.el --- a/lisp/international/mule-cmds.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/international/mule-cmds.el Fri May 06 21:06:31 2005 +0000 @@ -351,9 +351,6 @@ (setq default-process-coding-system (cons output-coding input-coding)))) -(defalias 'update-iso-coding-systems 'update-coding-systems-internal) -(make-obsolete 'update-iso-coding-systems 'update-coding-systems-internal "20.3") - (defun prefer-coding-system (coding-system) "Add CODING-SYSTEM at the front of the priority list for automatic detection. This also sets the following coding systems: diff -r 6deb860255f3 -r b151ec53c504 lisp/international/mule-util.el --- a/lisp/international/mule-util.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/international/mule-util.el Fri May 06 21:06:31 2005 +0000 @@ -208,12 +208,6 @@ ;; (prin1-to-string (cdr ret))) ;; (prin1-to-string ret)))))) -;;; For backward compatibility ... -;;;###autoload -(defalias 'truncate-string 'truncate-string-to-width) - -;;;###autoload -(make-obsolete 'truncate-string 'truncate-string-to-width "20.1") ;;; Nested alist handler. Nested alist is alist whose elements are ;;; also nested alist. diff -r 6deb860255f3 -r b151ec53c504 lisp/international/mule.el --- a/lisp/international/mule.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/international/mule.el Fri May 06 21:06:31 2005 +0000 @@ -486,9 +486,6 @@ Any alias nor subsidiary coding systems are not base coding system." (car (coding-system-get coding-system 'alias-coding-systems))) -(defalias 'coding-system-parent 'coding-system-base) -(make-obsolete 'coding-system-parent 'coding-system-base "20.3") - ;; Coding system also has a property `eol-type'. ;; ;; This property indicates how the coding system handles end-of-line diff -r 6deb860255f3 -r b151ec53c504 lisp/kmacro.el --- a/lisp/kmacro.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/kmacro.el Fri May 06 21:06:31 2005 +0000 @@ -960,9 +960,9 @@ (defun kmacro-step-edit-prompt (macro index) ;; Show step-edit prompt (let ((keys (and (not kmacro-step-edit-appending) - index (substring macro index executing-macro-index))) + index (substring macro index executing-kbd-macro-index))) (future (and (not kmacro-step-edit-appending) - (substring macro executing-macro-index))) + (substring macro executing-kbd-macro-index))) (message-log-max nil) (curmsg (current-message))) @@ -1020,12 +1020,12 @@ (not (eq kmacro-step-edit-action t))) ;; Find the actual end of this key sequence. ;; Must be able to backtrack in case we actually execute it. - (setq restore-index executing-macro-index) + (setq restore-index executing-kbd-macro-index) (let (unread-command-events) (quoted-insert 0) (when unread-command-events - (setq executing-macro-index (- executing-macro-index (length unread-command-events)) - next-index executing-macro-index))))) + (setq executing-kbd-macro-index (- executing-kbd-macro-index (length unread-command-events)) + next-index executing-kbd-macro-index))))) ;; Query the user; stop macro exection temporarily (let ((macro executing-kbd-macro) @@ -1045,7 +1045,7 @@ (when unread-command-events (setq kmacro-step-edit-new-macro (substring kmacro-step-edit-new-macro 0 (- (length unread-command-events))) - executing-macro-index (- executing-macro-index (length unread-command-events))))) + executing-kbd-macro-index (- executing-kbd-macro-index (length unread-command-events))))) (setq current-prefix-arg nil prefix-arg nil) (setq act 'ignore)) @@ -1099,24 +1099,24 @@ (setq act t) t) ((member act '(insert-1 insert)) - (setq executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) (setq kmacro-step-edit-inserting (if (eq act 'insert-1) 1 t)) nil) ((member act '(replace-1 replace)) (setq kmacro-step-edit-inserting (if (eq act 'replace-1) 1 t)) (setq kmacro-step-edit-prefix-index nil) - (if (= executing-macro-index (length executing-kbd-macro)) + (if (= executing-kbd-macro-index (length executing-kbd-macro)) (setq executing-kbd-macro (vconcat executing-kbd-macro [nil]) kmacro-step-edit-appending t)) nil) ((eq act 'append) (setq kmacro-step-edit-inserting t) - (if (= executing-macro-index (length executing-kbd-macro)) + (if (= executing-kbd-macro-index (length executing-kbd-macro)) (setq executing-kbd-macro (vconcat executing-kbd-macro [nil]) kmacro-step-edit-appending t)) t) ((eq act 'append-end) - (if (= executing-macro-index (length executing-kbd-macro)) + (if (= executing-kbd-macro-index (length executing-kbd-macro)) (setq executing-kbd-macro (vconcat executing-kbd-macro [nil]) kmacro-step-edit-inserting t kmacro-step-edit-appending t) @@ -1124,21 +1124,21 @@ (setq act t) t) ((eq act 'help) - (setq executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) (setq kmacro-step-edit-help (not kmacro-step-edit-help)) nil) (t ;; Ignore unknown responses - (setq executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) nil)) - (if (> executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (if (> executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) (setq kmacro-step-edit-new-macro (vconcat kmacro-step-edit-new-macro (substring executing-kbd-macro (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index) - (if (eq act t) nil executing-macro-index))) + (if (eq act t) nil executing-kbd-macro-index))) kmacro-step-edit-prefix-index nil)) (if restore-index - (setq executing-macro-index restore-index))) + (setq executing-kbd-macro-index restore-index))) (t (setq this-command 'ignore))) (setq kmacro-step-edit-key-index next-index))) @@ -1151,7 +1151,7 @@ (executing-kbd-macro nil) (defining-kbd-macro nil) cmd keys next-index) - (setq executing-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index) + (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index) kmacro-step-edit-prefix-index nil) (kmacro-step-edit-prompt macro nil) ;; Now, we have read a key sequence from the macro, but we don't want @@ -1172,8 +1172,8 @@ (setq kmacro-step-edit-inserting nil) (when unread-command-events (setq keys (substring keys 0 (- (length unread-command-events))) - executing-macro-index (- executing-macro-index (length unread-command-events)) - next-index executing-macro-index + executing-kbd-macro-index (- executing-kbd-macro-index (length unread-command-events)) + next-index executing-kbd-macro-index unread-command-events nil))) (setq cmd 'ignore) nil) @@ -1217,7 +1217,7 @@ ((eq kmacro-step-edit-active 'ignore) (setq this-command 'ignore)) ((eq kmacro-step-edit-active 'append-end) - (if (= executing-macro-index (length executing-kbd-macro)) + (if (= executing-kbd-macro-index (length executing-kbd-macro)) (setq executing-kbd-macro (vconcat executing-kbd-macro [nil]) kmacro-step-edit-inserting t kmacro-step-edit-appending t @@ -1243,8 +1243,8 @@ (when kmacro-step-edit-active (add-hook 'pre-command-hook 'kmacro-step-edit-pre-command nil nil) (if kmacro-step-edit-key-index - (setq executing-macro-index kmacro-step-edit-key-index) - (setq kmacro-step-edit-key-index executing-macro-index)))) + (setq executing-kbd-macro-index kmacro-step-edit-key-index) + (setq kmacro-step-edit-key-index executing-kbd-macro-index)))) (defun kmacro-step-edit-macro () diff -r 6deb860255f3 -r b151ec53c504 lisp/net/rlogin.el --- a/lisp/net/rlogin.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/net/rlogin.el Fri May 06 21:06:31 2005 +0000 @@ -179,10 +179,15 @@ (let* ((process-connection-type rlogin-process-connection-type) (args (if rlogin-explicit-args - (append (rlogin-parse-words input-args) + (append (split-string input-args) rlogin-explicit-args) - (rlogin-parse-words input-args))) - (host (car args)) + (split-string input-args))) + (host (let ((tail args)) + ;; Find first arg that doesn't look like an option. + ;; This still loses for args that take values, feh. + (while (and tail (= ?- (aref (car tail) 0))) + (setq tail (cdr tail))) + (car tail))) (user (or (car (cdr (member "-l" args))) (user-login-name))) (buffer-name (if (string= user (user-login-name)) @@ -281,19 +286,6 @@ (goto-char orig-point))))))) -;; Parse a line into its constituent parts (words separated by -;; whitespace). Return a list of the words. -(defun rlogin-parse-words (line) - (let ((list nil) - (posn 0) - (match-data (match-data))) - (while (string-match "[^ \t\n]+" line posn) - (setq list (cons (substring line (match-beginning 0) (match-end 0)) - list)) - (setq posn (match-end 0))) - (set-match-data (match-data)) - (nreverse list))) - (defun rlogin-send-Ctrl-C () (interactive) (process-send-string nil "\C-c")) diff -r 6deb860255f3 -r b151ec53c504 lisp/progmodes/cc-fonts.el --- a/lisp/progmodes/cc-fonts.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/progmodes/cc-fonts.el Fri May 06 21:06:31 2005 +0000 @@ -495,6 +495,12 @@ "[" (c-lang-const c-symbol-chars) "]+" "\\)") `(,(1+ ncle-depth) c-preprocessor-face-name t))) + + ;; fontify the n in ifndef + (,(concat noncontinued-line-end + (c-lang-const c-opt-cpp-prefix) + "if\\(n\\)def\\>") + ,(+ ncle-depth 1) font-lock-negation-char-face prepend) ))) ,@(when (c-major-mode-is 'pike-mode) @@ -666,6 +672,8 @@ (narrow-to-region (point-min) limit) (c-font-lock-objc-iip-decl))) nil)))))) + + ("!" . font-lock-negation-char-face) )) (defun c-font-lock-complex-decl-prepare (limit) diff -r 6deb860255f3 -r b151ec53c504 lisp/progmodes/cc-mode.el --- a/lisp/progmodes/cc-mode.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/progmodes/cc-mode.el Fri May 06 21:06:31 2005 +0000 @@ -639,24 +639,6 @@ ;;;###autoload (add-to-list 'auto-mode-alist '("\\.y\\(acc\\)?\\'" . c-mode)) ;;;###autoload (add-to-list 'auto-mode-alist '("\\.lex\\'" . c-mode)) -(defvar cc-define-alist nil "Alist of #define directives for GUD tooltips.") -(defvar cc-mode-cpp-program "/lib/cpp" - "*The program name for the CPP pre-processor.") - -(defun cc-create-define-alist () - (let* ((file (buffer-file-name)) - (output - (with-output-to-string - (with-current-buffer standard-output - (call-process cc-mode-cpp-program - (if (file-exists-p file) file nil) t nil "-dM")))) - (define-list (split-string output "\n" t)) - (name)) - (setq cc-define-alist nil) - (dolist (define define-list) - (setq name (nth 1 (split-string define "[( ]"))) - (push (cons name define) cc-define-alist)))) - ;;;###autoload (defun c-mode () "Major mode for editing K&R and ANSI C code. @@ -680,14 +662,11 @@ mode-name "C" local-abbrev-table c-mode-abbrev-table abbrev-mode t) - (make-local-variable 'cc-define-alist) (use-local-map c-mode-map) (c-init-language-vars-for 'c-mode) (c-common-init 'c-mode) (easy-menu-add c-c-menu) (cc-imenu-init cc-imenu-c-generic-expression) - (if (buffer-file-name) (cc-create-define-alist)) - (add-hook 'after-save-hook 'cc-create-define-alist nil t) (run-mode-hooks 'c-mode-common-hook 'c-mode-hook) (c-update-modeline)) diff -r 6deb860255f3 -r b151ec53c504 lisp/progmodes/cmacexp.el --- a/lisp/progmodes/cmacexp.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/progmodes/cmacexp.el Fri May 06 21:06:31 2005 +0000 @@ -118,6 +118,7 @@ (file-exists-p "/opt/SUNWspro/SC3.0.1/bin/acomp")) "/opt/SUNWspro/SC3.0.1/bin/acomp -C -E") ((file-exists-p "/usr/ccs/lib/cpp") "/usr/ccs/lib/cpp -C") + ((memq system-type '(darwin berkeley-unix)) "gcc -E -C -") (t "/lib/cpp -C")) "The preprocessor used by the cmacexp package. diff -r 6deb860255f3 -r b151ec53c504 lisp/progmodes/cperl-mode.el --- a/lisp/progmodes/cperl-mode.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/progmodes/cperl-mode.el Fri May 06 21:06:31 2005 +0000 @@ -4751,7 +4751,10 @@ (t '("^[ \t{}]*\\(my\\|local\\our\\)[ \t]*\\(([ \t]*\\)?\\([$@%*][a-zA-Z0-9_:]+\\)" 3 font-lock-variable-name-face))) '("\\") @@ -2028,7 +2032,7 @@ ;; ( . ) . (if (if (match-beginning 1) (let (n) - (setq n (string-to-int (substring + (setq n (string-to-number (substring gud-marker-acc (1+ (match-beginning 1)) (- (match-end 1) 2)))) @@ -2039,7 +2043,7 @@ (gud-jdb-find-source (match-string 2 gud-marker-acc))) (setq gud-last-frame (cons file-found - (string-to-int + (string-to-number (let ((numstr (match-string 4 gud-marker-acc))) (if (string-match "[.,]" numstr) @@ -2187,7 +2191,7 @@ ;; Extract the frame position from the marker. gud-last-frame (cons (match-string 2 gud-marker-acc) - (string-to-int (match-string 4 gud-marker-acc))) + (string-to-number (match-string 4 gud-marker-acc))) ;; Append any text before the marker to the output we're going ;; to return - we don't include the marker in this text. @@ -2977,6 +2981,7 @@ (message "gud-find-class: class for file %s not found in gud-jdb-class-source-alist!" f) nil)))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; GDB script mode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff -r 6deb860255f3 -r b151ec53c504 lisp/progmodes/make-mode.el --- a/lisp/progmodes/make-mode.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/progmodes/make-mode.el Fri May 06 21:06:31 2005 +0000 @@ -47,7 +47,7 @@ ;; prerequisites. ;; ;; The command C-c C-b pops up a browser window listing all target and -;; macro names. You can mark or unmark items wit C-c SPC, and insert +;; macro names. You can mark or unmark items with C-c SPC, and insert ;; all marked items back in the Makefile with C-c TAB. ;; ;; The command C-c TAB in the makefile buffer inserts a GNU make builtin. @@ -284,6 +284,9 @@ "\\>[ \t]*\\([^: \t\n#]*\\)") '(1 font-lock-keyword-face) '(2 font-lock-variable-name-face)) + '("^\\(?: [ \t]*\\)?if\\(n\\)\\(?:def\\|eq\\)\\>" + 1 font-lock-negation-char-face prepend) + ;; Highlight lines that contain just whitespace. ;; They can cause trouble, especially if they start with a tab. '("^[ \t]+$" . makefile-space-face) diff -r 6deb860255f3 -r b151ec53c504 lisp/progmodes/sh-script.el --- a/lisp/progmodes/sh-script.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/progmodes/sh-script.el Fri May 06 21:06:31 2005 +0000 @@ -827,7 +827,9 @@ ;; Function names. ("^\\(\\sw+\\)[ \t]*(" 1 font-lock-function-name-face) ("\\<\\(function\\)\\>[ \t]*\\(\\sw+\\)?" - (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))) + (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) + ("\\(?:^\\s *\\|[[();&|]\\s *\\|\\(?:\\s +-[ao]\\|if\\|else\\|then\\|while\\|do\\)\\s +\\)\\(!\\)" + 1 font-lock-negation-char-face)) ;; The next entry is only used for defining the others (shell sh-append executable-font-lock-keywords diff -r 6deb860255f3 -r b151ec53c504 lisp/simple.el --- a/lisp/simple.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/simple.el Fri May 06 21:06:31 2005 +0000 @@ -3205,6 +3205,14 @@ commands which are sensitive to the Transient Mark mode." :global t :group 'editing-basics :require nil) +(defvar widen-automatically t + "Non-nil means it is ok for commands to call `widen' when they want to. +Some commands will do this in order to go to positions outside +the current accessible part of the buffer. + +If `widen-automatically' is nil, these commands will do something else +as a fallback, and won't change the buffer bounds.") + (defun pop-global-mark () "Pop off global mark ring and jump to the top location." (interactive) @@ -3221,7 +3229,9 @@ (set-buffer buffer) (or (and (>= position (point-min)) (<= position (point-max))) - (widen)) + (if widen-automatically + (error "Global mark position is outside accessible part of buffer") + (widen))) (goto-char position) (switch-to-buffer buffer))) @@ -3410,11 +3420,14 @@ ;; Now move a line. (end-of-line) ;; If there's no invisibility here, move over the newline. - (if (not (line-move-invisible-p (point))) + (if (and (not (integerp selective-display)) + (not (line-move-invisible-p (point)))) ;; We avoid vertical-motion when possible ;; because that has to fontify. (if (eobp) - (setq done t) + (if (not noerror) + (signal 'end-of-buffer nil) + (setq done t)) (forward-line 1)) ;; Otherwise move a more sophisticated way. ;; (What's the logic behind this code?) @@ -3424,13 +3437,17 @@ (setq done t)))) (unless done (setq arg (1- arg)))) - ;; The logic of this is the same as the loop above, + ;; The logic of this is the same as the loop above, ;; it just goes in the other direction. (while (and (< arg 0) (not done)) (beginning-of-line) - (if (not (line-move-invisible-p (1- (point)))) + (if (or (bobp) + (and (not (integerp selective-display)) + (not (line-move-invisible-p (1- (point)))))) (if (bobp) - (setq done t) + (if (not noerror) + (signal 'beginning-of-buffer nil) + (setq done t)) (forward-line -1)) (if (zerop (vertical-motion -1)) (if (not noerror) diff -r 6deb860255f3 -r b151ec53c504 lisp/subr.el --- a/lisp/subr.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/subr.el Fri May 06 21:06:31 2005 +0000 @@ -349,10 +349,14 @@ (defvar key-substitution-in-progress nil "Used internally by substitute-key-definition.") -(defun substitute-key-definitions (subst keymap &optional oldmap prefix) - "Applies the SUBST remapping to key bindings in KEYMAP. -SUBST will be a list of elements of the form (OLDDEF . NEWDEF). -See `substitue-key-definition'." +(defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix) + "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. +In other words, OLDDEF is replaced with NEWDEF where ever it appears. +Alternatively, if optional fourth argument OLDMAP is specified, we redefine +in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP. + +For most uses, it is simpler and safer to use command remappping like this: + \(define-key KEYMAP [remap OLDDEF] NEWDEF)" ;; Don't document PREFIX in the doc string because we don't want to ;; advertise it. It's meant for recursive calls only. Here's its ;; meaning @@ -370,28 +374,11 @@ (map-keymap (lambda (char defn) (aset prefix1 (length prefix) char) - (substitute-key-definitions-key defn subst prefix1 keymap)) + (substitute-key-definition-key defn olddef newdef prefix1 keymap)) scan))) -(defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix) - "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. -In other words, OLDDEF is replaced with NEWDEF where ever it appears. -Alternatively, if optional fourth argument OLDMAP is specified, we redefine -in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP. - -For most uses, it is simpler and safer to use command remappping like this: - \(define-key KEYMAP [remap OLDDEF] NEWDEF)" - ;; Don't document PREFIX in the doc string because we don't want to - ;; advertise it. It's meant for recursive calls only. Here's its - ;; meaning - - ;; If optional argument PREFIX is specified, it should be a key - ;; prefix, a string. Redefined bindings will then be bound to the - ;; original key, with PREFIX added at the front. - (substitute-key-definitions (list (cons olddef newdef)) keymap oldmap prefix)) - -(defun substitute-key-definitions-key (defn subst prefix keymap) - (let (inner-def skipped menu-item mapping) +(defun substitute-key-definition-key (defn olddef newdef prefix keymap) + (let (inner-def skipped menu-item) ;; Find the actual command name within the binding. (if (eq (car-safe defn) 'menu-item) (setq menu-item defn defn (nth 2 defn)) @@ -401,17 +388,17 @@ ;; Skip past cached key-equivalence data for menu items. (if (consp (car-safe defn)) (setq defn (cdr defn)))) - (if (or (setq mapping (assq defn subst)) + (if (or (eq defn olddef) ;; Compare with equal if definition is a key sequence. ;; That is useful for operating on function-key-map. (and (or (stringp defn) (vectorp defn)) - (setq mapping (assoc defn subst)))) + (equal defn olddef))) (define-key keymap prefix (if menu-item (let ((copy (copy-sequence menu-item))) - (setcar (nthcdr 2 copy) (cdr mapping)) + (setcar (nthcdr 2 copy) newdef) copy) - (nconc (nreverse skipped) (cdr mapping)))) + (nconc (nreverse skipped) newdef))) ;; Look past a symbol that names a keymap. (setq inner-def (and defn @@ -427,7 +414,7 @@ ;; Avoid recursively rescanning keymap being scanned. (not (memq inner-def key-substitution-in-progress))) ;; If this one isn't being scanned already, scan it now. - (substitute-key-definitions subst keymap inner-def prefix))))) + (substitute-key-definition olddef newdef keymap inner-def prefix))))) (defun define-key-after (keymap key definition &optional after) "Add binding in KEYMAP for KEY => DEFINITION, right after AFTER's binding. @@ -766,35 +753,16 @@ ;;;; Obsolescent names for functions. -(defalias 'dot 'point) -(defalias 'dot-marker 'point-marker) -(defalias 'dot-min 'point-min) -(defalias 'dot-max 'point-max) (defalias 'window-dot 'window-point) (defalias 'set-window-dot 'set-window-point) (defalias 'read-input 'read-string) (defalias 'send-string 'process-send-string) (defalias 'send-region 'process-send-region) (defalias 'show-buffer 'set-window-buffer) -(defalias 'buffer-flush-undo 'buffer-disable-undo) (defalias 'eval-current-buffer 'eval-buffer) -(defalias 'compiled-function-p 'byte-code-function-p) -(defalias 'define-function 'defalias) -(defalias 'sref 'aref) -(make-obsolete 'sref 'aref "20.4") (make-obsolete 'char-bytes "now always returns 1." "20.4") -(make-obsolete 'chars-in-region "use (abs (- BEG END))." "20.3") -(make-obsolete 'dot 'point "before 19.15") -(make-obsolete 'dot-max 'point-max "before 19.15") -(make-obsolete 'dot-min 'point-min "before 19.15") -(make-obsolete 'dot-marker 'point-marker "before 19.15") -(make-obsolete 'buffer-flush-undo 'buffer-disable-undo "before 19.15") (make-obsolete 'baud-rate "use the `baud-rate' variable instead." "before 19.15") -(make-obsolete 'compiled-function-p 'byte-code-function-p "before 19.15") -(make-obsolete 'define-function 'defalias "20.1") -(make-obsolete 'focus-frame "it does nothing." "19.32") -(make-obsolete 'unfocus-frame "it does nothing." "19.32") (defun insert-string (&rest args) "Mocklisp-compatibility insert function. @@ -811,9 +779,6 @@ "Return the value of the `baud-rate' variable." baud-rate) -(defalias 'focus-frame 'ignore "") -(defalias 'unfocus-frame 'ignore "") - ;;;; Obsolescence declarations for variables, and aliases. @@ -822,12 +787,15 @@ (make-obsolete-variable 'unread-command-char "use `unread-command-events' instead. That variable is a list of events to reread, so it now uses nil to mean `no event', instead of -1." "before 19.15") -(make-obsolete-variable 'executing-macro 'executing-kbd-macro "before 19.34") (make-obsolete-variable 'post-command-idle-hook "use timers instead, with `run-with-idle-timer'." "before 19.34") (make-obsolete-variable 'post-command-idle-delay "use timers instead, with `run-with-idle-timer'." "before 19.34") +;; Lisp manual only updated in 22.1. +(define-obsolete-variable-alias 'executing-macro 'executing-kbd-macro + "before 19.34") + (defvaralias 'x-lost-selection-hooks 'x-lost-selection-functions) (make-obsolete-variable 'x-lost-selection-hooks 'x-lost-selection-functions "22.1") (defvaralias 'x-sent-selection-hooks 'x-sent-selection-functions) @@ -2317,19 +2285,19 @@ If SYNTAX is nil, return nil." (and syntax (logand (car syntax) 65535))) -(defun add-to-invisibility-spec (arg) - "Add elements to `buffer-invisibility-spec'. +(defun add-to-invisibility-spec (element) + "Add ELEMENT to `buffer-invisibility-spec'. See documentation for `buffer-invisibility-spec' for the kind of elements that can be added." (if (eq buffer-invisibility-spec t) (setq buffer-invisibility-spec (list t))) (setq buffer-invisibility-spec - (cons arg buffer-invisibility-spec))) + (cons element buffer-invisibility-spec))) -(defun remove-from-invisibility-spec (arg) - "Remove elements from `buffer-invisibility-spec'." +(defun remove-from-invisibility-spec (element) + "Remove ELEMENT from `buffer-invisibility-spec'." (if (consp buffer-invisibility-spec) - (setq buffer-invisibility-spec (delete arg buffer-invisibility-spec)))) + (setq buffer-invisibility-spec (delete element buffer-invisibility-spec)))) (defun global-set-key (key command) "Give KEY a global binding as COMMAND. diff -r 6deb860255f3 -r b151ec53c504 lisp/term/w32-win.el --- a/lisp/term/w32-win.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/term/w32-win.el Fri May 06 21:06:31 2005 +0000 @@ -1223,7 +1223,7 @@ ;;; Set default known names for image libraries (setq image-library-alist - '((xpm "libXpm-nox4.dll" "libxpm.dll") + '((xpm "xpm4.dll" "libXpm-nox4.dll" "libxpm.dll") (png "libpng13d.dll" "libpng13.dll" "libpng12d.dll" "libpng12.dll" "libpng.dll") (jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll") (tiff "libtiff3.dll" "libtiff.dll") diff -r 6deb860255f3 -r b151ec53c504 lisp/term/xterm.el --- a/lisp/term/xterm.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/term/xterm.el Fri May 06 21:06:31 2005 +0000 @@ -31,7 +31,68 @@ (defvar xterm-function-map (make-sparse-keymap) "Function key map overrides for xterm.") -;; XXX We need to find a way to have these define-keys be display-local. -- Lorentey +;; XXX We need to find a way to have these definitions be display-local. -- Lorentey + +;;; The terminal intialization C code file might have initialized +;;; function keys F13->F60 from the termcap/terminfo information. On +;;; a PC-style keyboard these keys correspond to +;;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The +;;; code here subsitutes the corresponding defintions in +;;; function-key-map. This substitution is needed because if a key +;;; definition if found in function-key-map, there are no further +;;; lookups in other keymaps. +(substitute-key-definition [f13] [S-f1] function-key-map) +(substitute-key-definition [f14] [S-f2] function-key-map) +(substitute-key-definition [f15] [S-f3] function-key-map) +(substitute-key-definition [f16] [S-f4] function-key-map) +(substitute-key-definition [f17] [S-f5] function-key-map) +(substitute-key-definition [f18] [S-f6] function-key-map) +(substitute-key-definition [f19] [S-f7] function-key-map) +(substitute-key-definition [f20] [S-f8] function-key-map) +(substitute-key-definition [f21] [S-f9] function-key-map) +(substitute-key-definition [f22] [S-f10] function-key-map) +(substitute-key-definition [f23] [S-f11] function-key-map) +(substitute-key-definition [f24] [S-f12] function-key-map) + +(substitute-key-definition [f25] [C-f1] function-key-map) +(substitute-key-definition [f26] [C-f2] function-key-map) +(substitute-key-definition [f27] [C-f3] function-key-map) +(substitute-key-definition [f28] [C-f4] function-key-map) +(substitute-key-definition [f29] [C-f5] function-key-map) +(substitute-key-definition [f30] [C-f6] function-key-map) +(substitute-key-definition [f31] [C-f7] function-key-map) +(substitute-key-definition [f32] [C-f8] function-key-map) +(substitute-key-definition [f33] [C-f9] function-key-map) +(substitute-key-definition [f34] [C-f10] function-key-map) +(substitute-key-definition [f35] [C-f11] function-key-map) +(substitute-key-definition [f36] [C-f12] function-key-map) + +(substitute-key-definition [f37] [C-S-f1] function-key-map) +(substitute-key-definition [f38] [C-S-f2] function-key-map) +(substitute-key-definition [f39] [C-S-f3] function-key-map) +(substitute-key-definition [f40] [C-S-f4] function-key-map) +(substitute-key-definition [f41] [C-S-f5] function-key-map) +(substitute-key-definition [f42] [C-S-f6] function-key-map) +(substitute-key-definition [f43] [C-S-f7] function-key-map) +(substitute-key-definition [f44] [C-S-f8] function-key-map) +(substitute-key-definition [f45] [C-S-f9] function-key-map) +(substitute-key-definition [f46] [C-S-f10] function-key-map) +(substitute-key-definition [f47] [C-S-f11] function-key-map) +(substitute-key-definition [f48] [C-S-f12] function-key-map) + +(substitute-key-definition [f49] [A-f1] function-key-map) +(substitute-key-definition [f50] [A-f2] function-key-map) +(substitute-key-definition [f51] [A-f3] function-key-map) +(substitute-key-definition [f52] [A-f4] function-key-map) +(substitute-key-definition [f53] [A-f5] function-key-map) +(substitute-key-definition [f54] [A-f6] function-key-map) +(substitute-key-definition [f55] [A-f7] function-key-map) +(substitute-key-definition [f56] [A-f8] function-key-map) +(substitute-key-definition [f57] [A-f9] function-key-map) +(substitute-key-definition [f58] [A-f10] function-key-map) +(substitute-key-definition [f59] [A-f11] function-key-map) +(substitute-key-definition [f60] [A-f12] function-key-map) + (define-key xterm-function-map "\e[A" [up]) (define-key xterm-function-map "\e[B" [down]) (define-key xterm-function-map "\e[C" [right]) @@ -194,66 +255,6 @@ (set-keymap-parent xterm-function-map (keymap-parent function-key-map)) (set-keymap-parent function-key-map xterm-function-map)) -;;; The terminal intialization C code file might have initialized -;;; function keys F13->F60 from the termcap/terminfo information. On -;;; a PC-style keyboard these keys correspond to -;;; MODIFIER-FUNCTION_KEY, where modifier is S-, C, A-, C-S-. The -;;; code here subsitutes the corresponding defintions in -;;; function-key-map. This substitution is needed because if a key -;;; definition if found in function-key-map, there are no further -;;; lookups in other keymaps. -(substitute-key-definition [f13] [S-f1] function-key-map) -(substitute-key-definition [f14] [S-f2] function-key-map) -(substitute-key-definition [f15] [S-f3] function-key-map) -(substitute-key-definition [f16] [S-f4] function-key-map) -(substitute-key-definition [f17] [S-f5] function-key-map) -(substitute-key-definition [f18] [S-f6] function-key-map) -(substitute-key-definition [f19] [S-f7] function-key-map) -(substitute-key-definition [f20] [S-f8] function-key-map) -(substitute-key-definition [f21] [S-f9] function-key-map) -(substitute-key-definition [f22] [S-f10] function-key-map) -(substitute-key-definition [f23] [S-f11] function-key-map) -(substitute-key-definition [f24] [S-f12] function-key-map) - -(substitute-key-definition [f25] [C-f1] function-key-map) -(substitute-key-definition [f26] [C-f2] function-key-map) -(substitute-key-definition [f27] [C-f3] function-key-map) -(substitute-key-definition [f28] [C-f4] function-key-map) -(substitute-key-definition [f29] [C-f5] function-key-map) -(substitute-key-definition [f30] [C-f6] function-key-map) -(substitute-key-definition [f31] [C-f7] function-key-map) -(substitute-key-definition [f32] [C-f8] function-key-map) -(substitute-key-definition [f33] [C-f9] function-key-map) -(substitute-key-definition [f34] [C-f10] function-key-map) -(substitute-key-definition [f35] [C-f11] function-key-map) -(substitute-key-definition [f36] [C-f12] function-key-map) - -(substitute-key-definition [f37] [C-S-f1] function-key-map) -(substitute-key-definition [f38] [C-S-f2] function-key-map) -(substitute-key-definition [f39] [C-S-f3] function-key-map) -(substitute-key-definition [f40] [C-S-f4] function-key-map) -(substitute-key-definition [f41] [C-S-f5] function-key-map) -(substitute-key-definition [f42] [C-S-f6] function-key-map) -(substitute-key-definition [f43] [C-S-f7] function-key-map) -(substitute-key-definition [f44] [C-S-f8] function-key-map) -(substitute-key-definition [f45] [C-S-f9] function-key-map) -(substitute-key-definition [f46] [C-S-f10] function-key-map) -(substitute-key-definition [f47] [C-S-f11] function-key-map) -(substitute-key-definition [f48] [C-S-f12] function-key-map) - -(substitute-key-definition [f49] [A-f1] function-key-map) -(substitute-key-definition [f50] [A-f2] function-key-map) -(substitute-key-definition [f51] [A-f3] function-key-map) -(substitute-key-definition [f52] [A-f4] function-key-map) -(substitute-key-definition [f53] [A-f5] function-key-map) -(substitute-key-definition [f54] [A-f6] function-key-map) -(substitute-key-definition [f55] [A-f7] function-key-map) -(substitute-key-definition [f56] [A-f8] function-key-map) -(substitute-key-definition [f57] [A-f9] function-key-map) -(substitute-key-definition [f58] [A-f10] function-key-map) -(substitute-key-definition [f59] [A-f11] function-key-map) -(substitute-key-definition [f60] [A-f12] function-key-map) - ;; Set up colors, for those versions of xterm that support it. (defvar xterm-standard-colors ;; The names in the comments taken from XTerm-col.ad in the xterm diff -r 6deb860255f3 -r b151ec53c504 lisp/textmodes/bibtex.el --- a/lisp/textmodes/bibtex.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/textmodes/bibtex.el Fri May 06 21:06:31 2005 +0000 @@ -776,8 +776,8 @@ :type '(repeat string)) (defcustom bibtex-summary-function 'bibtex-summary - "Function to call for generating a one-line summary of a BibTeX entry. -It takes one argument, the key of the entry. + "Function to call for generating a summary of current BibTeX entry. +It takes no arguments. Point must be at beginning of entry. Used by `bibtex-complete-crossref-cleanup' and `bibtex-copy-summary-as-kill'." :group 'bibtex :type '(choice (const :tag "Default" bibtex-summary) @@ -2550,25 +2550,24 @@ (save-excursion (if (and (stringp key) (bibtex-find-entry key t)) - (message "Ref: %s" (funcall bibtex-summary-function key))))) + (message "Ref: %s" (funcall bibtex-summary-function))))) (defun bibtex-copy-summary-as-kill () "Push summery of current BibTeX entry to kill ring. Use `bibtex-summary-function' to generate summary." (interactive) - (let ((key (save-excursion - (bibtex-beginning-of-entry) - (if (looking-at bibtex-entry-maybe-empty-head) - (bibtex-key-in-head) - (error "No key found"))))) - (kill-new (message "%s" (funcall bibtex-summary-function key))))) - -(defun bibtex-summary (key) - "Return summary of BibTeX entry KEY. + (save-excursion + (bibtex-beginning-of-entry) + (if (looking-at bibtex-entry-maybe-empty-head) + (kill-new (message "%s" (funcall bibtex-summary-function))) + (error "No entry found")))) + +(defun bibtex-summary () + "Return summary of current BibTeX entry. Used as default value of `bibtex-summary-function'." ;; It would be neat to customize this function. How? (save-excursion - (if (bibtex-find-entry key t) + (if (looking-at bibtex-entry-maybe-empty-head) (let* ((bibtex-autokey-name-case-convert 'identity) (bibtex-autokey-name-length 'infty) (bibtex-autokey-names 1) @@ -2594,7 +2593,7 @@ `((" " . ,names) (" " . ,year) (": " . ,title) (", " . ,journal) (" " . ,volume) (":" . ,pages)) "")) - (error "Key `%s' not found" key)))) + (error "Entry not found")))) (defun bibtex-pop (arg direction) "Fill current field from the ARGth same field's text in DIRECTION. @@ -2743,7 +2742,7 @@ entries. This is usually the case, if you have created a buffer completely with BibTeX mode and finished every new entry with \\[bibtex-clean-entry]. -For third party BibTeX files, call the function `bibtex-convert-alien' +For third party BibTeX files, call the command \\[bibtex-convert-alien] to fully take advantage of all features of BibTeX mode. @@ -3346,7 +3345,7 @@ Move point where the entry KEY should be placed. If `bibtex-maintain-sorted-entries' is non-nil, perform a binary search to look for place for KEY. This requires that buffer is sorted, -see \\[bibtex-validate].) +see `bibtex-validate'. Return t if preparation was successful or nil if entry KEY already exists." (let ((key (nth 0 index)) key-exist) @@ -3770,7 +3769,7 @@ "Reinsert the last BibTeX item. More precisely, reinsert the field or entry killed or yanked most recently. With argument N, reinsert the Nth most recently killed BibTeX item. -See also the command \\[bibtex-yank-pop]]." +See also the command \\[bibtex-yank-pop]." (interactive "*p") (bibtex-insert-kill (1- n)) (setq this-command 'bibtex-yank)) diff -r 6deb860255f3 -r b151ec53c504 lisp/textmodes/org.el --- a/lisp/textmodes/org.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/textmodes/org.el Fri May 06 21:06:31 2005 +0000 @@ -636,7 +636,7 @@ (defcustom org-cycle-hook '(org-optimize-window-after-visibility-change) "Hook that is run after `org-cycle' has changed the buffer visibility. The function(s) in this hook must accept a single argument which indicates -the new state that was set by the most recent `org-cycle' command. The +the new state that was set by the most recent `org-cycle' command. The argument is a symbol. After a global state change, it can have the values `overview', `content', or `all'. After a local state change, it can have the values `folded', `children', or `subtree'." @@ -677,8 +677,8 @@ (defcustom org-show-following-heading t "Non-nil means, show heading following match in `org-occur'. When doing an `org-occur' it is useful to show the headline which -follows the match, even if they do not match the regexp. This makes it -easier to edit directly inside the sparse tree. However, if you use +follows the match, even if they do not match the regexp. This makes it +easier to edit directly inside the sparse tree. However, if you use org-occur mainly as an overview, the following headlines are unnecessary clutter." :group 'org-structure @@ -712,7 +712,7 @@ "Non-nil means, keep link in list for entire session. The command `org-store-link' adds a link pointing to the current -location to an internal list. These links accumulate during a session. +location to an internal list. These links accumulate during a session. The command `org-insert-link' can be used to insert links into any Org-mode file (offering completion for all stored links). When this option is nil, every link which has been inserted once using \\[org-insert-link] @@ -1124,7 +1124,7 @@ :type 'boolean) (defcustom org-export-with-tables t - "If non-nil, lines starting with \"|\" define a table + "If non-nil, lines starting with \"|\" define a table. For example: | Name | Address | Birthday | @@ -1496,7 +1496,7 @@ (save-excursion (goto-char (point-min)) (insert " -*- mode: org -*-\n\n"))) - (run-hooks 'org-mode-hook) + (run-hooks 'org-mode-hook) ;FIXME: Should be run-mode-hooks. (unless org-inhibit-startup (if org-startup-with-deadline-check (call-interactively 'org-check-deadlines) @@ -1565,7 +1565,7 @@ (save-excursion (org-back-to-heading t) (- (match-end 0) (match-beginning 0)))) - + (defvar org-font-lock-keywords nil) (defun org-set-font-lock-defaults () @@ -1982,7 +1982,7 @@ (defun org-do-promote () "Promote the current heading higher up the tree. -If the region is active in t`ransient-mark-mode', promote all headings +If the region is active in `transient-mark-mode', promote all headings in the region." (interactive) (save-excursion @@ -2614,7 +2614,7 @@ While prompting, a calendar is popped up - you can also select the date with the mouse (button 1). The calendar shows a period of three -month. To scroll it to other months, use the keys `>' and `<'. +month. To scroll it to other months, use the keys `>' and `<'. If you don't like the calendar, turn it off with \(setq org-popup-calendar-for-date-prompt nil). @@ -3524,9 +3524,9 @@ "Get the (Emacs Calendar) diary entries for DATE." (let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*") (diary-display-hook '(fancy-diary-display)) - (list-diary-entries-hook + (list-diary-entries-hook (cons 'org-diary-default-entry list-diary-entries-hook)) - entries tod tods + entries (org-disable-diary t)) (save-excursion (save-window-excursion @@ -4367,8 +4367,7 @@ (org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position marker))) - (save-excursion - (set-buffer buffer) + (with-current-buffer buffer (widen) (goto-char pos) (if (not (org-at-timestamp-p)) @@ -4866,10 +4865,10 @@ ((fboundp 'gnus-group-name) (gnus-group-name)) (t "???")))) - (if (org-xor arg org-usenet-links-prefer-google) - (setq link (format "http://groups.google.com/groups?group=%s" - group)) - (setq link (concat "gnus:" group))))) + (setq link (concat (if (org-xor arg org-usenet-links-prefer-google) + "http://groups.google.com/groups?group=" + "gnus:") + group)))) ((memq major-mode '(gnus-summary-mode gnus-article-mode)) (and (eq major-mode 'gnus-article-mode) (gnus-article-show-summary)) @@ -4920,6 +4919,7 @@ (defun org-xor (a b) "Exclusive or." + ;; (if a (not b) b) (or (and a (not b)) (and b (not a)))) @@ -4958,7 +4958,7 @@ s) (defun org-insert-link (&optional complete-file) - "Insert a link. At the prompt, enter the link. + "Insert a link. At the prompt, enter the link. Completion can be used to select a link previously stored with `org-store-link'. When the empty string is entered (i.e. if you just @@ -5586,7 +5586,7 @@ (error "Not in table data field"))) (defvar org-table-clip nil - "Clipboard for table regions") + "Clipboard for table regions.") (defun org-table-blank-field () "Blank the current table field or active region." @@ -5827,7 +5827,7 @@ (org-table-move-row 'up)) (defun org-table-move-row (&optional up) - "Move the current table line down. With arg UP, move it up." + "Move the current table line down. With arg UP, move it up." (interactive "P") (let ((col (current-column)) (pos (point)) @@ -7662,7 +7662,7 @@ (buffer-substring (point-min) (point-max)))) (defun org-html-expand (string) - "Prepare STRING for HTML export. Applies all active conversions." + "Prepare STRING for HTML export. Applies all active conversions." ;; First check if there is a link in the line - if yes, apply conversions ;; only before the start of the link. (let* ((m (string-match org-link-regexp string)) @@ -7697,8 +7697,8 @@ as single character strings. The regexp returned will match the entire expression including the delimiters. It will also define a single group which contains the -match except for the outermost delimiters. The maximum depth of -stacked delimiters is N. Escaping delimiters is not possible." +match except for the outermost delimiters. The maximum depth of +stacked delimiters is N. Escaping delimiters is not possible." (let* ((nothing (concat "[^" "\\" left "\\" right "]*?")) (or "\\|") (re nothing) @@ -8549,7 +8549,7 @@ regexp))) (defun org-flag-heading (flag &optional entry) - "Flag the current heading. FLAG non-nil means make invisible. + "Flag the current heading. FLAG non-nil means make invisible. When ENTRY is non-nil, show the entire entry." (save-excursion (org-back-to-heading t) diff -r 6deb860255f3 -r b151ec53c504 lisp/tooltip.el --- a/lisp/tooltip.el Tue May 03 03:01:09 2005 +0000 +++ b/lisp/tooltip.el Fri May 06 21:06:31 2005 +0000 @@ -119,8 +119,10 @@ (defcustom tooltip-gud-tips-p nil "*Non-nil means show tooltips in GUD sessions. -This allows you to display a variable's value in a tooltip simply by -pointing at it with the mouse." +This allows you to display a variable's value in a tooltip simply +by pointing at it with the mouse. In the case of a C program +controlled by GDB, it shows the associated #define directives +when program is not executing." :type 'boolean :tag "GUD" :group 'tooltip) @@ -478,11 +480,10 @@ (window-buffer (let ((mouse (mouse-position))) (window-at (cadr mouse) (cddr mouse)))) - (when (boundp 'cc-define-alist) ; might be a Fortran program - (let ((define-elt (assoc expr cc-define-alist))) - (unless (null define-elt) - (tooltip-show (cdr define-elt)) - expr))))) + (let ((define-elt (assoc expr gdb-define-alist))) + (unless (null define-elt) + (tooltip-show (cdr define-elt)) + expr)))) (let ((cmd (tooltip-gud-print-command expr))) (unless (null cmd) ; CMD can be nil if unknown debugger (case gud-minor-mode diff -r 6deb860255f3 -r b151ec53c504 lispref/ChangeLog --- a/lispref/ChangeLog Tue May 03 03:01:09 2005 +0000 +++ b/lispref/ChangeLog Fri May 06 21:06:31 2005 +0000 @@ -1,3 +1,45 @@ +2005-05-05 Luc Teirlinck + + * variables.texi (Variable Aliases): Change description of + `define-obsolete-variable-alias'. + + * functions.texi (Functions): Add "Obsolete Functions" to menu. + (Defining Functions): Add xref. + (Obsolete Functions): New node. + (Function Safety): Standardize capitalization of section title. + + * frames.texi (Pop-Up Menus): Complete description of `x-popup-menu'. + (Dialog Boxes): Complete description of `x-popup-dialog'. + +2005-05-04 Richard M. Stallman + + * commands.texi (Interactive Codes): Fix Texinfo usage. + Document U more clearly. + +2005-05-01 Luc Teirlinck + + * variables.texi (Variable Aliases): `make-obsolete-variable' is a + function and not a macro. + + * frames.texi (Pop-Up Menus): Correct and clarify description of + `x-popup-menu'. + (Dialog Boxes): Clarify description of `x-popup-dialog'. + +2005-05-01 Richard M. Stallman + + * edebug.texi (Checking Whether to Stop): Fix previous change. + +2005-05-01 Luc Teirlinck + + * display.texi: Fix typos and Texinfo usage. + + * edebug.texi (Checking Whether to Stop): executing-macro -> + executing-kbd-macro. + +2005-05-01 Richard M. Stallman + + * display.texi (Invisible Text): Correct add-to-invisibility-spec. + 2005-04-30 Richard M. Stallman * files.texi (Magic File Names): Document `operations' property. @@ -1132,7 +1174,7 @@ * hooks.texi (Standard Hooks): `disabled-command-hook' has been renamed to `disabled-command-function'. - * commands.texi (Key Sequence Input): Remove unnecessary anchor, + * commands.texi (Key Sequence Input): Remove unnecessary anchor. (Command Loop Info): Replace reference to it. (Disabling Commands): `disabled-command-hook' has been renamed to `disabled-command-function'. diff -r 6deb860255f3 -r b151ec53c504 lispref/commands.texi --- a/lispref/commands.texi Tue May 03 03:01:09 2005 +0000 +++ b/lispref/commands.texi Fri May 06 21:06:31 2005 +0000 @@ -365,8 +365,9 @@ maps. The key sequence argument is represented as a string or vector. The cursor does not move into the echo area. Prompt. -If the key sequence is a down-event, the following up-event is discarded, -but can be read via the @code{U} code character. +If @samp{k} reads a key sequence that ends with a down-event, it also +reads and discards the following up-event. You can get access to that +up-event with the @samp{U} code character. This kind of input is used by commands such as @code{describe-key} and @code{global-set-key}. @@ -425,9 +426,10 @@ parentheses and brackets) do not do so here. Prompt. @item U -A key sequence or @code{nil}. May be used after a @code{k} or @code{K} -argument to get the up-event that was discarded in case the key -sequence read for that argument was a down-event. No I/O. +A key sequence or @code{nil}. Can be used after a @samp{k} or +@samp{K} argument to get the up-event that was discarded (if any) +after @samp{k} or @samp{K} read a down-event. If no up-event has been +discarded, @samp{U} provides @code{nil} as the argument. No I/O. @item v A variable declared to be a user option (i.e., satisfying the @@ -442,8 +444,9 @@ @item X @cindex evaluated expression argument -A Lisp form is read as with @kbd{x}, but then evaluated so that its -value becomes the argument for the command. Prompt. +A Lisp form's value. @samp{X} reads as @samp{x} does, then evaluates +the form so that its value becomes the argument for the command. +Prompt. @item z A coding system name (a symbol). If the user enters null input, the diff -r 6deb860255f3 -r b151ec53c504 lispref/display.texi --- a/lispref/display.texi Tue May 03 03:01:09 2005 +0000 +++ b/lispref/display.texi Fri May 06 21:06:31 2005 +0000 @@ -717,10 +717,9 @@ @defun add-to-invisibility-spec element This function adds the element @var{element} to -@code{buffer-invisibility-spec} (if it is not already present in that -list). If @code{buffer-invisibility-spec} was @code{t}, it changes to -a list, @code{(t)}, so that text whose @code{invisible} property -is @code{t} remains invisible. +@code{buffer-invisibility-spec}. If @code{buffer-invisibility-spec} +was @code{t}, it changes to a list, @code{(t)}, so that text whose +@code{invisible} property is @code{t} remains invisible. @end defun @defun remove-from-invisibility-spec element @@ -1143,9 +1142,9 @@ @var{end} whose property @var{name} has the value @var{value}. It can move the endpoints of the overlays in the region, or split them. -If @var{name} is omitted or nil, it means to delete all overlays in +If @var{name} is omitted or @code{nil}, it means to delete all overlays in the specified region. If @var{start} and/or @var{end} are omitted or -nil, that means the beginning and end of the buffer respectively. +@code{nil}, that means the beginning and end of the buffer respectively. Therefore, @code{(remove-overlays)} removes all the overlays in the current buffer. @end defun @@ -1557,7 +1556,7 @@ adding blank areas between the images. If the property value is not @code{t}, it is a height spec. A height -spec stands for a numeric height value; this heigh spec specifies the +spec stands for a numeric height value; this height spec specifies the actual line height, @var{line-height}. There are several ways to write a height spec; here's how each of them translates into a numeric height: @@ -1573,7 +1572,7 @@ is @var{ratio} times the height of face @var{face}. @var{ratio} can be any type of number, or @code{nil} which means a ratio of 1. If @var{face} is @code{t}, it refers to the current face. -@item (@code{nil} . @var{ratio}) +@item (nil . @var{ratio}) If the height spec is a cons of the format shown, the numeric height is @var{ratio} times the height of the contents of the line. @end table @@ -1584,7 +1583,7 @@ the line to achieve the total height @var{line-height}. Otherwise, @var{line-height} has no effect. - If you don't specify the @code{line-height} propery, the line's + If you don't specify the @code{line-height} property, the line's height consists of the contents' height plus the line spacing. There are several ways to specify the line spacing for different parts of Emacs text. @@ -2985,7 +2984,7 @@ @code{overlay-arrow-variable-list}. @defvar overlay-arrow-variable-list -This variable's value is a list of varibles, each of which specifies +This variable's value is a list of variables, each of which specifies the position of an overlay arrow. The variable @code{overlay-arrow-position} has its normal meaning because it is on this list. @@ -3161,7 +3160,7 @@ @noindent This illustrates that what matters is the property value for each character. If two consecutive characters have the same -object as the @code{display} property value, it's irrelevent +object as the @code{display} property value, it's irrelevant whether they got this property from a single call to @code{put-text-property} or from two different calls. diff -r 6deb860255f3 -r b151ec53c504 lispref/edebug.texi --- a/lispref/edebug.texi Tue May 03 03:01:09 2005 +0000 +++ b/lispref/edebug.texi Fri May 06 21:06:31 2005 +0000 @@ -955,9 +955,8 @@ @item The state of keyboard macro execution is saved and restored. While -Edebug is active, @code{executing-macro} is bound to -@code{edebug-continue-kbd-macro}. - +Edebug is active, @code{executing-kbd-macro} is bound to @code{nil} +unless @code{edebug-continue-kbd-macro} is non-@code{nil}. @end itemize diff -r 6deb860255f3 -r b151ec53c504 lispref/frames.texi --- a/lispref/frames.texi Tue May 03 03:01:09 2005 +0000 +++ b/lispref/frames.texi Fri May 06 21:06:31 2005 +0000 @@ -1360,8 +1360,9 @@ what selection the user makes. The argument @var{position} specifies where on the screen to put the -menu. It can be either a mouse button event (which says to put the menu -where the user actuated the button) or a list of this form: +top left corner of the menu. It can be either a mouse button event +(which says to put the menu where the user actuated the button) or a +list of this form: @example ((@var{xoffset} @var{yoffset}) @var{window}) @@ -1369,7 +1370,8 @@ @noindent where @var{xoffset} and @var{yoffset} are coordinates, measured in -pixels, counting from the top left corner of @var{window}'s frame. +pixels, counting from the top left corner of @var{window}. @var{window} +may be a window or a frame. If @var{position} is @code{t}, it means to use the current mouse position. If @var{position} is @code{nil}, it means to precompute the @@ -1377,8 +1379,13 @@ without actually displaying or popping up the menu. The argument @var{menu} says what to display in the menu. It can be a -keymap or a list of keymaps (@pxref{Menu Keymaps}). Alternatively, it -can have the following form: +keymap or a list of keymaps (@pxref{Menu Keymaps}). In this case, the +return value is the list of events corresponding to the user's choice. +(This list has more than one element if the choice occurred in a +submenu.) Note that @code{x-popup-menu} does not actually execute the +command bound to that sequence of events. + +Alternatively, @var{menu} can have the following form: @example (@var{title} @var{pane1} @var{pane2}...) @@ -1388,11 +1395,20 @@ where each pane is a list of form @example -(@var{title} (@var{line} . @var{item})...) +(@var{title} @var{item1} @var{item2}...) @end example -Each @var{line} should be a string, and each @var{item} should be the -value to return if that @var{line} is chosen. +Each item should normally be a cons cell @code{(@var{line} . @var{value})}, +where @var{line} is a string, and @var{value} is the value to return if +that @var{line} is chosen. An item can also be a string; this makes a +non-selectable line in the menu. + +If the user gets rid of the menu without making a valid choice, for +instance by clicking the mouse away from a valid choice or by typing +keyboard input, then this normally results in a quit and +@code{x-popup-menu} does not return. But if @var{position} is a mouse +button event (indicating that the user invoked the menu with the +mouse) then no quit occurs and @code{x-popup-menu} returns @code{nil}. @end defun @strong{Usage note:} Don't use @code{x-popup-menu} to display a menu @@ -1443,9 +1459,9 @@ The return value is @var{value} from the chosen alternative. -An element of the list may be just a string instead of a cons cell -@code{(@var{string} . @var{value})}. That makes a box that cannot -be selected. +As for @code{x-popup-menu}, an element of the list may be just a +string instead of a cons cell @code{(@var{string} . @var{value})}. +That makes a box that cannot be selected. If @code{nil} appears in the list, it separates the left-hand items from the right-hand items; items that precede the @code{nil} appear on the @@ -1455,12 +1471,16 @@ Dialog boxes always appear in the center of a frame; the argument @var{position} specifies which frame. The possible values are as in -@code{x-popup-menu}, but the precise coordinates don't matter; only the -frame matters. +@code{x-popup-menu}, but the precise coordinates or the individual +window don't matter; only the frame matters. In some configurations, Emacs cannot display a real dialog box; so instead it displays the same items in a pop-up menu in the center of the frame. + +If the user gets rid of the dialog box without making a valid choice, +for instance using the window manager, then this produces a quit and +@code{x-popup-dialog} does not return. @end defun @node Pointer Shapes diff -r 6deb860255f3 -r b151ec53c504 lispref/functions.texi --- a/lispref/functions.texi Tue May 03 03:01:09 2005 +0000 +++ b/lispref/functions.texi Fri May 06 21:06:31 2005 +0000 @@ -21,6 +21,7 @@ * Anonymous Functions:: Lambda expressions are functions with no names. * Function Cells:: Accessing or setting the function definition of a symbol. +* Obsolete Functions:: Declaring functions obsolete. * Inline Functions:: Defining functions that the compiler will open code. * Function Safety:: Determining whether a function is safe to call. * Related Topics:: Cross-references to specific Lisp primitives @@ -601,7 +602,7 @@ By contrast, in programs that manipulate function definitions for other purposes, it is better to use @code{fset}, which does not keep such -records. +records. @xref{Function Cells}. @end defun You cannot create a new primitive function with @code{defun} or @@ -1150,6 +1151,44 @@ a function defined by another package, it is cleaner to use @code{defadvice} (@pxref{Advising Functions}). +@node Obsolete Functions +@section Declaring Functions Obsolete + +You can use @code{make-obsolete} to declare a function obsolete. This +indicates that the function may be removed at some stage in the future. + +@defun make-obsolete function new &optional when +This function makes the byte compiler warn that the function +@var{function} is obsolete. If @var{new} is a symbol, the warning +message says to use @var{new} instead of @var{function}. @var{new} +does not need to be an alias for @var{function}; it can be a different +function with similar functionality. If @var{new} is a string, it is +the warning message. + +If provided, @var{when} should be a string indicating when the function +was first made obsolete---for example, a date or a release number. +@end defun + +You can define a function as an alias and declare it obsolete at the +same time using the macro @code{define-obsolete-function-alias}. + +@defmac define-obsolete-function-alias function new &optional when docstring +This macro marks the function @var{function} obsolete and also defines +it as an alias for the function @var{new}. A typical call has the form: + +@example +(define-obsolete-function-alias 'old-fun 'new-fun "22.1" "Doc.") +@end example + +@noindent +which is equivalent to the following two lines of code: + +@example +(defalias 'old-fun 'new-fun "Doc.") +(make-obsolete 'old-fun 'new-fun "22.1") +@end example +@end defmac + @node Inline Functions @section Inline Functions @cindex inline functions @@ -1186,7 +1225,7 @@ following the definition, just like macros. @node Function Safety -@section Determining whether a function is safe to call +@section Determining whether a Function is Safe to Call @cindex function safety @cindex safety of functions diff -r 6deb860255f3 -r b151ec53c504 lispref/variables.texi --- a/lispref/variables.texi Tue May 03 03:01:09 2005 +0000 +++ b/lispref/variables.texi Fri May 06 21:06:31 2005 +0000 @@ -1714,13 +1714,13 @@ This function returns @var{base-var}. @end defun -Variable aliases are convenient for replacing an old name for a + Variable aliases are convenient for replacing an old name for a variable with a new name. @code{make-obsolete-variable} declares that the old name is obsolete and therefore that it may be removed at some stage in the future. -@defmac make-obsolete-variable variable new &optional when -This macro makes the byte-compiler warn that the variable +@defun make-obsolete-variable variable new &optional when +This function makes the byte-compiler warn that the variable @var{variable} is obsolete. If @var{new} is a symbol, it is the variable's new name; then the warning message says to use @var{new} instead of @var{variable}. If @var{new} is a string, this is the @@ -1729,21 +1729,26 @@ If provided, @var{when} should be a string indicating when the variable was first made obsolete---for example, a date or a release number. -@end defmac +@end defun -You can make two variables synonyms and declare one obsolete at the + You can make two variables synonyms and declare one obsolete at the same time using the macro @code{define-obsolete-variable-alias}. @defmac define-obsolete-variable-alias variable new &optional when docstring This macro marks the variable @var{variable} as obsolete and also -makes it an alias for the variable @var{new}. +makes it an alias for the variable @var{new}. A typical call has the form: + +@example +(define-obsolete-variable-alias 'old-var 'new-var "22.1" "Doc.") +@end example -If provided, @var{when} should be a string indicating when -@var{variable} was first made obsolete. The optional argument -@var{docstring} specifies the documentation string for @var{variable}. -If @var{docstring} is omitted or nil, @var{variable} uses the -documentation string of @var{new} unless it already has one of its -own. +@noindent +which is equivalent to the following two lines of code: + +@example +(defvaralias 'oldvar 'newvar "Doc.") +(make-obsolete-variable 'old-var 'new-var "22.1") +@end example @end defmac @defun indirect-variable variable diff -r 6deb860255f3 -r b151ec53c504 src/ChangeLog --- a/src/ChangeLog Tue May 03 03:01:09 2005 +0000 +++ b/src/ChangeLog Fri May 06 21:06:31 2005 +0000 @@ -1,3 +1,85 @@ +2005-05-05 Luc Teirlinck + + * eval.c (Fdefvaralias): Doc fix. + + * xmenu.c (Fx_popup_menu, Fx_popup_dialog): Doc fixes. + +2005-05-05 Kim F. Storm + + * buffer.c (init_buffer_once): Set cursor_in_non_selected_windows + default value. + (syms_of_buffer): Add default-cursor-in-non-selected-windows. + Fix type of cursor-in-non-selected-windows. + +2005-05-03 Jan Dj,Ad(Brv + + * mac.c: #undef init_process so not to conflict with system headers. + +2005-05-02 Richard M. Stallman + + * buffer.c (syms_of_buffer): Define cursor-in-non-selected-windows. + + * buffer.h (struct buffer): Add cursor_in_non_selected_windows slot. + + * xdisp.c (Vcursor_in_non_selected_windows) + (Qcursor_in_non_selected_windows): Vars deleted. + (syms_of_xdisp): Don't initialize them. + (get_window_cursor_type): Use cursor_in_non_selected_windows + buffer slot. + +2005-05-02 Kim F. Storm + + * macros.c (executing_kbd_macro_index): Rename from + executing_macro_index. All uses changed. + (executing_kbd_macro_iterations): Rename from + executing_macro_iterations. All uses changed. + (executing_kbd_macro): Rename from executing_macro. + All uses changed. + (syms_of_macros): Rename Lisp var executing-macro-index to + executing-kbd-macro-index. + + * xdisp.c (move_it_in_display_line_to): Fix last change. + +2005-05-01 Luc Teirlinck + + * xmenu.c (Fx_popup_menu): Doc fix. + + * charset.c (syms_of_charset): Delete defsubr for Schars_in_region. + +2005-05-02 Jason Rumney + + * emacs.c (USAGE3, USAGE4): Keep strings below 2048 bytes. + +2005-05-02 Nozomu Ando + + * sysselect.h: Fix typo. + +2005-05-02 Nick Roberts + + * charset.c (Fchars_in_region): Remove as obsolete. + +2005-05-01 Kim F. Storm + + * xdisp.c (move_it_in_display_line_to): Stop if we move beyond + TO_CHARPOS. This may happen if last glyphs was an image or stretch + glyph. + +2005-05-01 Luc Teirlinck + + * dispnew.c (sit_for): Vexecuting_macro -> Vexecuting_kbd_macro. + +2005-05-01 Richard M. Stallman + + * xmenu.c [not HAVE_X_TOOLKIT] (xmenu_show): + If user cancels the menu, quit unless FOR_CLICK. + + * macros.c (Vexecuting_kbd_macro): Renamed from Vexecuting_macro. + All uses changed. + (syms_of_macros): Define only executing-kbd-macro, not executing-macro. + * keyboard.c: Change Vexecuting_macro to Vexecuting_kbd_macro. + * macros.h (Vexecuting_kbd_macro): Declare instead of Vexecuting_macro. + * commands.h (Vexecuting_kbd_macro): Likewise. + 2005-05-01 Thien-Thi Nguyen * sysdep.c (get_frame_size) [VMS]: Use a fresh i/o channel. diff -r 6deb860255f3 -r b151ec53c504 src/buffer.c --- a/src/buffer.c Tue May 03 03:01:09 2005 +0000 +++ b/src/buffer.c Fri May 06 21:06:31 2005 +0000 @@ -1,6 +1,6 @@ /* Buffer manipulation primitives for GNU Emacs. - Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99, - 2000, 01, 02, 03, 04, 2005 Free Software Foundation, Inc. + Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99, + 2000, 01, 02, 03, 04, 2005 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -4972,6 +4972,7 @@ buffer_defaults.direction_reversed = Qnil; buffer_defaults.cursor_type = Qt; buffer_defaults.extra_line_spacing = Qnil; + buffer_defaults.cursor_in_non_selected_windows = Qt; #ifdef DOS_NT buffer_defaults.buffer_file_type = Qnil; /* TEXT */ @@ -5068,6 +5069,7 @@ XSETFASTINT (buffer_local_flags.header_line_format, idx); ++idx; XSETFASTINT (buffer_local_flags.cursor_type, idx); ++idx; XSETFASTINT (buffer_local_flags.extra_line_spacing, idx); ++idx; + XSETFASTINT (buffer_local_flags.cursor_in_non_selected_windows, idx); ++idx; /* Need more room? */ if (idx >= MAX_PER_BUFFER_VARS) @@ -5259,6 +5261,11 @@ doc: /* Default value of `line-spacing' for buffers that don't override it. This is the same as (default-value 'line-spacing). */); + DEFVAR_LISP_NOPRO ("default-cursor-in-non-selected-windows", + &buffer_defaults.cursor_in_non_selected_windows, + doc: /* Default value of `cursor-in-non-selected-windows'. +This is the same as (default-value 'cursor-in-non-selected-windows). */); + DEFVAR_LISP_NOPRO ("default-abbrev-mode", &buffer_defaults.abbrev_mode, doc: /* Default value of `abbrev-mode' for buffers that do not override it. @@ -5938,6 +5945,11 @@ If value is a floating point number, it specifies the spacing relative to the default frame line height. */); + DEFVAR_PER_BUFFER ("cursor-in-non-selected-windows", + ¤t_buffer->cursor_in_non_selected_windows, Qnil, + doc: /* *Cursor type to display in non-selected windows. +t means to use hollow box cursor. See `cursor-type' for other values. */); + DEFVAR_LISP ("kill-buffer-query-functions", &Vkill_buffer_query_functions, doc: /* List of functions called with no args to query before killing a buffer. */); Vkill_buffer_query_functions = Qnil; diff -r 6deb860255f3 -r b151ec53c504 src/buffer.h --- a/src/buffer.h Tue May 03 03:01:09 2005 +0000 +++ b/src/buffer.h Fri May 06 21:06:31 2005 +0000 @@ -761,6 +761,11 @@ /* An integer > 0 means put that number of pixels below text lines in the display of this buffer. */ Lisp_Object extra_line_spacing; + + /* *Cursor type to display in non-selected windows. + t means to use hollow box cursor. + See `cursor-type' for other values. */ + Lisp_Object cursor_in_non_selected_windows; }; diff -r 6deb860255f3 -r b151ec53c504 src/charset.c --- a/src/charset.c Tue May 03 03:01:09 2005 +0000 +++ b/src/charset.c Fri May 06 21:06:31 2005 +0000 @@ -1431,22 +1431,6 @@ return CHARSET_TABLE_INFO (charset, CHARSET_DIRECTION_IDX); } -DEFUN ("chars-in-region", Fchars_in_region, Schars_in_region, 2, 2, 0, - doc: /* Return number of characters between BEG and END. */) - (beg, end) - Lisp_Object beg, end; -{ - int from, to; - - CHECK_NUMBER_COERCE_MARKER (beg); - CHECK_NUMBER_COERCE_MARKER (end); - - from = min (XFASTINT (beg), XFASTINT (end)); - to = max (XFASTINT (beg), XFASTINT (end)); - - return make_number (to - from); -} - /* Return the number of characters in the NBYTES bytes at PTR. This works by looking at the contents and checking for multibyte sequences. However, if the current buffer has enable-multibyte-characters = nil, @@ -1855,7 +1839,6 @@ defsubr (&Schar_width); defsubr (&Sstring_width); defsubr (&Schar_direction); - defsubr (&Schars_in_region); defsubr (&Sstring); defsubr (&Ssetup_special_charsets); diff -r 6deb860255f3 -r b151ec53c504 src/commands.h --- a/src/commands.h Tue May 03 03:01:09 2005 +0000 +++ b/src/commands.h Fri May 06 21:06:31 2005 +0000 @@ -76,11 +76,11 @@ /* Nonzero means ^G can quit instantly */ extern int immediate_quit; -extern Lisp_Object Vexecuting_macro; +extern Lisp_Object Vexecuting_kbd_macro; /* Nonzero if input is coming from the keyboard */ -#define INTERACTIVE (NILP (Vexecuting_macro) && !noninteractive) +#define INTERACTIVE (NILP (Vexecuting_kbd_macro) && !noninteractive) /* Set this nonzero to force reconsideration of mode line. */ diff -r 6deb860255f3 -r b151ec53c504 src/dispnew.c --- a/src/dispnew.c Tue May 03 03:01:09 2005 +0000 +++ b/src/dispnew.c Fri May 06 21:06:31 2005 +0000 @@ -6383,7 +6383,7 @@ { swallow_events (display); - if (detect_input_pending_run_timers (display) || !NILP (Vexecuting_macro)) + if (detect_input_pending_run_timers (display) || !NILP (Vexecuting_kbd_macro)) return Qnil; if (initial_display) diff -r 6deb860255f3 -r b151ec53c504 src/emacs.c --- a/src/emacs.c Tue May 03 03:01:09 2005 +0000 +++ b/src/emacs.c Fri May 06 21:06:31 2005 +0000 @@ -324,16 +324,16 @@ --xrm XRESOURCES set additional X resources\n\ --help display this help and exit\n\ --version output version information and exit\n\ -\n\ +\n" + +#define USAGE4 "\ You can generally also specify long option names with a single -; for\n\ example, -batch as well as --batch. You can use any unambiguous\n\ abbreviation for a --option.\n\ \n\ Various environment variables and window system resources also affect\n\ Emacs' operation. See the main documentation.\n\ -\n" - -#define USAGE4 "\ +\n\ Report bugs to %s. First, please see the Bugs\n\ section of the Emacs manual or the file BUGS.\n" diff -r 6deb860255f3 -r b151ec53c504 src/eval.c --- a/src/eval.c Tue May 03 03:01:09 2005 +0000 +++ b/src/eval.c Fri May 06 21:06:31 2005 +0000 @@ -725,7 +725,9 @@ doc: /* Make SYMBOL a variable alias for symbol ALIASED. Setting the value of SYMBOL will subsequently set the value of ALIASED, and getting the value of SYMBOL will return the value ALIASED has. -Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. +Third arg DOCSTRING, if non-nil, is documentation for SYMBOL. If it is +omitted or nil, SYMBOL gets the documentation string of ALIASED, or of the +variable at the end of the chain of aliases, if ALIASED is itself an alias. The return value is ALIASED. */) (symbol, aliased, docstring) Lisp_Object symbol, aliased, docstring; diff -r 6deb860255f3 -r b151ec53c504 src/keyboard.c --- a/src/keyboard.c Tue May 03 03:01:09 2005 +0000 +++ b/src/keyboard.c Fri May 06 21:06:31 2005 +0000 @@ -1162,21 +1162,21 @@ cancel_hourglass (); #endif - if (!NILP (executing_macro)) - { - if (executing_macro_iterations == 1) + if (!NILP (executing_kbd_macro)) + { + if (executing_kbd_macro_iterations == 1) sprintf (macroerror, "After 1 kbd macro iteration: "); else sprintf (macroerror, "After %d kbd macro iterations: ", - executing_macro_iterations); + executing_kbd_macro_iterations); } else *macroerror = 0; Vstandard_output = Qt; Vstandard_input = Qt; - Vexecuting_macro = Qnil; - executing_macro = Qnil; + Vexecuting_kbd_macro = Qnil; + executing_kbd_macro = Qnil; current_kboard->Vprefix_arg = Qnil; current_kboard->Vlast_prefix_arg = Qnil; cancel_echoing (); @@ -1273,7 +1273,7 @@ { Lisp_Object val; val = internal_catch (Qexit, command_loop_2, Qnil); - executing_macro = Qnil; + executing_kbd_macro = Qnil; return val; } else @@ -1285,7 +1285,7 @@ other reason. */ any_kboard_state (); internal_catch (Qtop_level, command_loop_2, Qnil); - executing_macro = Qnil; + executing_kbd_macro = Qnil; /* End of file in -batch run causes exit here. */ if (noninteractive) @@ -1438,7 +1438,7 @@ if (NILP (Vunread_command_events) && NILP (Vunread_input_method_events) && NILP (Vunread_post_input_method_events) - && NILP (Vexecuting_macro) + && NILP (Vexecuting_kbd_macro) && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) safe_run_hooks (Qpost_command_idle_hook); } @@ -1567,11 +1567,11 @@ } cmd = read_key_sequence_cmd; - if (!NILP (Vexecuting_macro)) + if (!NILP (Vexecuting_kbd_macro)) { if (!NILP (Vquit_flag)) { - Vexecuting_macro = Qt; + Vexecuting_kbd_macro = Qt; QUIT; /* Make some noise. */ /* Will return since macro now empty. */ } @@ -1670,7 +1670,7 @@ && EQ (current_buffer->selective_display, Qnil) && !detect_input_pending () && NILP (XWINDOW (selected_window)->column_number_displayed) - && NILP (Vexecuting_macro)) + && NILP (Vexecuting_kbd_macro)) direct_output_forward_char (1); goto directly_done; } @@ -1705,7 +1705,7 @@ && EQ (current_buffer->selective_display, Qnil) && !detect_input_pending () && NILP (XWINDOW (selected_window)->column_number_displayed) - && NILP (Vexecuting_macro)) + && NILP (Vexecuting_kbd_macro)) direct_output_forward_char (-1); goto directly_done; } @@ -1718,7 +1718,7 @@ = translate_char (Vtranslation_table_for_input, XFASTINT (last_command_char), 0, 0, 0); int value; - if (NILP (Vexecuting_macro) + if (NILP (Vexecuting_kbd_macro) && !EQ (minibuf_window, selected_window)) { if (!nonundocount || nonundocount >= 20) @@ -1740,7 +1740,7 @@ || !EQ (current_buffer->selective_display, Qnil) || detect_input_pending () || !NILP (XWINDOW (selected_window)->column_number_displayed) - || !NILP (Vexecuting_macro)); + || !NILP (Vexecuting_kbd_macro)); value = internal_self_insert (c, 0); @@ -1768,7 +1768,7 @@ int scount = SPECPDL_INDEX (); if (display_hourglass_p - && NILP (Vexecuting_macro)) + && NILP (Vexecuting_kbd_macro)) { record_unwind_protect (cancel_hourglass_unwind, Qnil); start_hourglass (); @@ -1786,7 +1786,7 @@ hourglass cursor anyway. But don't cancel the hourglass within a macro just because a command in the macro finishes. */ - if (NILP (Vexecuting_macro)) + if (NILP (Vexecuting_kbd_macro)) unbind_to (scount, Qnil); #endif } @@ -1812,7 +1812,7 @@ if (NILP (Vunread_command_events) && NILP (Vunread_input_method_events) && NILP (Vunread_post_input_method_events) - && NILP (Vexecuting_macro) + && NILP (Vexecuting_kbd_macro) && !NILP (sit_for (0, post_command_idle_delay, 0, 1, 1))) safe_run_hooks (Qpost_command_idle_hook); } @@ -2493,7 +2493,7 @@ this_command_key_count_reset = 0; - if (!NILP (Vexecuting_macro)) + if (!NILP (Vexecuting_kbd_macro)) { /* We set this to Qmacro; since that's not a frame, nobody will try to switch frames on us, and the selected window will @@ -2510,19 +2510,19 @@ /* Exit the macro if we are at the end. Also, some things replace the macro with t to force an early exit. */ - if (EQ (Vexecuting_macro, Qt) - || executing_macro_index >= XFASTINT (Flength (Vexecuting_macro))) + if (EQ (Vexecuting_kbd_macro, Qt) + || executing_kbd_macro_index >= XFASTINT (Flength (Vexecuting_kbd_macro))) { XSETINT (c, -1); goto exit; } - c = Faref (Vexecuting_macro, make_number (executing_macro_index)); - if (STRINGP (Vexecuting_macro) + c = Faref (Vexecuting_kbd_macro, make_number (executing_kbd_macro_index)); + if (STRINGP (Vexecuting_kbd_macro) && (XINT (c) & 0x80) && (XUINT (c) <= 0xff)) XSETFASTINT (c, CHAR_META | (XINT (c) & ~0x80)); - executing_macro_index++; + executing_kbd_macro_index++; goto from_macro; } @@ -9886,7 +9886,7 @@ /* If enabled, show which key runs this command. */ if (!NILP (Vsuggest_key_bindings) - && NILP (Vexecuting_macro) + && NILP (Vexecuting_kbd_macro) && SYMBOLP (function)) bindings = Fwhere_is_internal (function, Voverriding_local_map, Qt, Qnil, Qnil); diff -r 6deb860255f3 -r b151ec53c504 src/mac.c --- a/src/mac.c Tue May 03 03:01:09 2005 +0000 +++ b/src/mac.c Fri May 06 21:06:31 2005 +0000 @@ -27,6 +27,7 @@ #include "lisp.h" #include "process.h" +#undef init_process #include "systime.h" #include "sysselect.h" #include "blockinput.h" diff -r 6deb860255f3 -r b151ec53c504 src/macros.c --- a/src/macros.c Tue May 03 03:01:09 2005 +0000 +++ b/src/macros.c Fri May 06 21:06:31 2005 +0000 @@ -31,25 +31,25 @@ /* Kbd macro currently being executed (a string or vector). */ -Lisp_Object Vexecuting_macro; +Lisp_Object Vexecuting_kbd_macro; /* Index of next character to fetch from that macro. */ -EMACS_INT executing_macro_index; +EMACS_INT executing_kbd_macro_index; /* Number of successful iterations so far for innermost keyboard macro. This is not bound at each level, so after an error, it describes the innermost interrupted macro. */ -int executing_macro_iterations; +int executing_kbd_macro_iterations; /* This is the macro that was executing. This is not bound at each level, so after an error, it describes the innermost interrupted macro. We use it only as a kind of flag, so no need to protect it. */ -Lisp_Object executing_macro; +Lisp_Object executing_kbd_macro; extern Lisp_Object real_this_command; @@ -114,7 +114,7 @@ } /* Must convert meta modifier when copying string to vector. */ - cvt = STRINGP (current_kboard->Vlast_kbd_macro); + cvt = STRINGP (current_kboard->Vlast_kbd_macro); for (i = 0; i < len; i++) { Lisp_Object c; @@ -285,17 +285,17 @@ return Qnil; } -/* Restore Vexecuting_macro and executing_macro_index - called when - the unwind-protect in Fexecute_kbd_macro gets invoked. */ +/* Restore Vexecuting_kbd_macro and executing_kbd_macro_index. + Called when the unwind-protect in Fexecute_kbd_macro gets invoked. */ static Lisp_Object pop_kbd_macro (info) Lisp_Object info; { Lisp_Object tem; - Vexecuting_macro = XCAR (info); + Vexecuting_kbd_macro = XCAR (info); tem = XCDR (info); - executing_macro_index = XINT (XCAR (tem)); + executing_kbd_macro_index = XINT (XCAR (tem)); real_this_command = XCDR (tem); Frun_hooks (1, &Qkbd_macro_termination_hook); return Qnil; @@ -318,7 +318,7 @@ struct gcpro gcpro1, gcpro2; int success_count = 0; - executing_macro_iterations = 0; + executing_kbd_macro_iterations = 0; if (!NILP (count)) { @@ -330,17 +330,17 @@ if (!STRINGP (final) && !VECTORP (final)) error ("Keyboard macros must be strings or vectors"); - tem = Fcons (Vexecuting_macro, - Fcons (make_number (executing_macro_index), + tem = Fcons (Vexecuting_kbd_macro, + Fcons (make_number (executing_kbd_macro_index), real_this_command)); record_unwind_protect (pop_kbd_macro, tem); GCPRO2 (final, loopfunc); do { - Vexecuting_macro = final; - executing_macro = final; - executing_macro_index = 0; + Vexecuting_kbd_macro = final; + executing_kbd_macro = final; + executing_kbd_macro_index = 0; current_kboard->Vprefix_arg = Qnil; @@ -354,16 +354,16 @@ command_loop_1 (); - executing_macro_iterations = ++success_count; + executing_kbd_macro_iterations = ++success_count; QUIT; } while (--repeat - && (STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro))); + && (STRINGP (Vexecuting_kbd_macro) || VECTORP (Vexecuting_kbd_macro))); - executing_macro = Qnil; + executing_kbd_macro = Qnil; - real_this_command = Vexecuting_macro; + real_this_command = Vexecuting_kbd_macro; UNGCPRO; return unbind_to (pdlcount, Qnil); @@ -372,8 +372,8 @@ void init_macros () { - Vexecuting_macro = Qnil; - executing_macro = Qnil; + Vexecuting_kbd_macro = Qnil; + executing_kbd_macro = Qnil; } void @@ -396,15 +396,13 @@ The value is the symbol `append' while appending to the definition of an existing macro. */); - DEFVAR_LISP ("executing-macro", &Vexecuting_macro, - doc: /* Currently executing keyboard macro (string or vector); nil if none executing. */); + DEFVAR_LISP ("executing-kbd-macro", &Vexecuting_kbd_macro, + doc: /* Currently executing keyboard macro (string or vector). +This is nil when not executing a keyboard macro. */); - DEFVAR_INT ("executing-macro-index", &executing_macro_index, + DEFVAR_INT ("executing-kbd-macro-index", &executing_kbd_macro_index, doc: /* Index in currently executing keyboard macro; undefined if none executing. */); - DEFVAR_LISP_NOPRO ("executing-kbd-macro", &Vexecuting_macro, - doc: /* Currently executing keyboard macro (string or vector); nil if none executing. */); - DEFVAR_KBOARD ("last-kbd-macro", Vlast_kbd_macro, doc: /* Last kbd macro defined, as a string or vector; nil if none defined. */); } diff -r 6deb860255f3 -r b151ec53c504 src/macros.h --- a/src/macros.h Tue May 03 03:01:09 2005 +0000 +++ b/src/macros.h Fri May 06 21:06:31 2005 +0000 @@ -21,24 +21,24 @@ /* Kbd macro currently being executed (a string or vector). */ -extern Lisp_Object Vexecuting_macro; +extern Lisp_Object Vexecuting_kbd_macro; /* Index of next character to fetch from that macro. */ -extern EMACS_INT executing_macro_index; +extern EMACS_INT executing_kbd_macro_index; /* Number of successful iterations so far for innermost keyboard macro. This is not bound at each level, so after an error, it describes the innermost interrupted macro. */ -extern int executing_macro_iterations; +extern int executing_kbd_macro_iterations; /* This is the macro that was executing. This is not bound at each level, so after an error, it describes the innermost interrupted macro. */ -extern Lisp_Object executing_macro; +extern Lisp_Object executing_kbd_macro; /* Finish defining the current keyboard macro. */ diff -r 6deb860255f3 -r b151ec53c504 src/sysselect.h --- a/src/sysselect.h Tue May 03 03:01:09 2005 +0000 +++ b/src/sysselect.h Fri May 06 21:06:31 2005 +0000 @@ -18,7 +18,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifdef HAVE_SYS_SELECT +#ifdef HAVE_SYS_SELECT_H #include #endif diff -r 6deb860255f3 -r b151ec53c504 src/xdisp.c --- a/src/xdisp.c Tue May 03 03:01:09 2005 +0000 +++ b/src/xdisp.c Fri May 06 21:06:31 2005 +0000 @@ -612,12 +612,6 @@ static int message_cleared_p; -/* Non-zero means we want a hollow cursor in windows that are not - selected. Zero means there's no cursor in such windows. */ - -Lisp_Object Vcursor_in_non_selected_windows; -Lisp_Object Qcursor_in_non_selected_windows; - /* How to blink the default frame cursor off. */ Lisp_Object Vblink_cursor_alist; @@ -5864,6 +5858,16 @@ { int x, i, ascent = 0, descent = 0; + /* Stop if we move beyond TO_CHARPOS (after an image or stretch glyph). */ + if ((op & MOVE_TO_POS) != 0 + && BUFFERP (it->object) + && it->method == GET_FROM_BUFFER + && IT_CHARPOS (*it) > to_charpos) + { + result = MOVE_POS_MATCH_OR_ZV; + break; + } + /* Stop when ZV reached. We used to stop here when TO_CHARPOS reached as well, but that is too soon if this glyph does not fit on this line. So we handle it @@ -20131,7 +20135,7 @@ /* Use cursor-in-non-selected-windows for non-selected window or frame. */ if (non_selected) { - alt_cursor = Fbuffer_local_value (Qcursor_in_non_selected_windows, w->buffer); + alt_cursor = XBUFFER (w->buffer)->cursor_in_non_selected_windows; return get_specified_cursor_type (alt_cursor, width); } @@ -22496,8 +22500,6 @@ staticpro (&Qpoly); Qmessage_truncate_lines = intern ("message-truncate-lines"); staticpro (&Qmessage_truncate_lines); - Qcursor_in_non_selected_windows = intern ("cursor-in-non-selected-windows"); - staticpro (&Qcursor_in_non_selected_windows); Qgrow_only = intern ("grow-only"); staticpro (&Qgrow_only); Qinhibit_menubar_update = intern ("inhibit-menubar-update"); @@ -22791,12 +22793,6 @@ go back to their normal size. */); Vresize_mini_windows = Qgrow_only; - DEFVAR_LISP ("cursor-in-non-selected-windows", - &Vcursor_in_non_selected_windows, - doc: /* *Cursor type to display in non-selected windows. -t means to use hollow box cursor. See `cursor-type' for other values. */); - Vcursor_in_non_selected_windows = Qt; - DEFVAR_LISP ("blink-cursor-alist", &Vblink_cursor_alist, doc: /* Alist specifying how to blink the cursor off. Each element has the form (ON-STATE . OFF-STATE). Whenever the diff -r 6deb860255f3 -r b151ec53c504 src/xmenu.c --- a/src/xmenu.c Tue May 03 03:01:09 2005 +0000 +++ b/src/xmenu.c Fri May 06 21:06:31 2005 +0000 @@ -737,7 +737,7 @@ POSITION is a position specification. This is either a mouse button event or a list ((XOFFSET YOFFSET) WINDOW) where XOFFSET and YOFFSET are positions in pixels from the top left -corner of WINDOW's frame. (WINDOW may be a frame object instead of a window.) +corner of WINDOW. (WINDOW may be a window or a frame object.) This controls the position of the top left of the menu as a whole. If POSITION is t, it means to use the current mouse position. @@ -752,8 +752,11 @@ You can also use a list of keymaps as MENU. Then each keymap makes a separate pane. -When MENU is a keymap or a list of keymaps, the return value -is a list of events. + +When MENU is a keymap or a list of keymaps, the return value is the +list of events corresponding to the user's choice. Note that +`x-popup-menu' does not actually execute the command bound to that +sequence of events. Alternatively, you can specify a menu of multiple panes with a list of the form (TITLE PANE1 PANE2...), @@ -764,7 +767,14 @@ With this form of menu, the return value is VALUE from the chosen item. If POSITION is nil, don't display the menu at all, just precalculate the -cached information about equivalent key sequences. */) +cached information about equivalent key sequences. + +If the user gets rid of the menu without making a valid choice, for +instance by clicking the mouse away from a valid choice or by typing +keyboard input, then this normally results in a quit and +`x-popup-menu' does not return. But if POSITION is a mouse button +event (indicating that the user invoked the menu with the mouse) then +no quit occurs and `x-popup-menu' returns nil. */) (position, menu) Lisp_Object position, menu; { @@ -1002,7 +1012,11 @@ An ITEM may also be just a string--that makes a nonselectable item. An ITEM may also be nil--that means to put all preceding items on the left of the dialog box and all following items on the right. -\(By default, approximately half appear on each side.) */) +\(By default, approximately half appear on each side.) + +If the user gets rid of the dialog box without making a valid choice, +for instance using the window manager, then this produces a quit and +`x-popup-dialog' does not return. */) (position, contents) Lisp_Object position, contents; { @@ -2889,6 +2903,9 @@ } } } + else if (!for_click) + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); return Qnil; } @@ -3519,8 +3536,8 @@ entry = Qnil; break; case XM_NO_SELECT: - /* Make "Cancel" equivalent to C-g unless this menu was popped up by - a mouse press. */ + /* Make "Cancel" equivalent to C-g unless FOR_CLICK (which means + the menu was invoked with a mouse event as POSITION). */ if (! for_click) Fsignal (Qquit, Qnil); entry = Qnil;