Now on revision 110646. ------------------------------------------------------------ revno: 110646 fixes bug: http://debbugs.gnu.org/12706 committer: Paul Eggert branch nick: trunk timestamp: Wed 2012-10-24 05:12:23 +0000 message: Update manual for new time stamp format. These instances were missed the first time around. Problem reported by Glenn Morris in . * doc/lispintro/emacs-lisp-intro.texi (Files List): * doc/lispref/buffers.texi (Modification Time): * doc/lispref/files.texi (Testing Accessibility, File Attributes): * doc/lispref/intro.texi (Version Info): * doc/lispref/os.texi (Time of Day): * doc/misc/emacs-mime.texi (time-date): Update for new time stamp format (HIGH LOW MICROSEC PICOSEC). * doc/misc/emacs-mime.texi (time-date): Also, fix bogus time stamp and modernize a bit. diff: === modified file 'doc/lispintro/ChangeLog' --- doc/lispintro/ChangeLog 2012-10-17 03:44:00 +0000 +++ doc/lispintro/ChangeLog 2012-10-24 05:12:23 +0000 @@ -1,3 +1,8 @@ +2012-10-24 Paul Eggert + + * emacs-lisp-intro.texi (Files List): + Update manual for new time stamp format (Bug#12706). + 2012-10-17 Gregor Zattler (tiny change) * emacs-lisp-intro.texi (Narrowing advantages): === modified file 'doc/lispintro/emacs-lisp-intro.texi' --- doc/lispintro/emacs-lisp-intro.texi 2012-10-23 15:06:07 +0000 +++ doc/lispintro/emacs-lisp-intro.texi 2012-10-24 05:12:23 +0000 @@ -238,7 +238,7 @@ a division of the @hfill email: @email{sales@@fsf.org}@* Free Software Foundation, Inc. @hfill Tel: +1 (617) 542-5942@* 51 Franklin Street, Fifth Floor @hfill Fax: +1 (617) 542-2652@* -Boston, MA 02110-1301 USA +Boston, MA 02110-1301 USA @end iftex @ifnottex @@ -249,7 +249,7 @@ a division of the email: sales@@fsf.org Free Software Foundation, Inc. Tel: +1 (617) 542-5942 51 Franklin Street, Fifth Floor Fax: +1 (617) 542-2652 -Boston, MA 02110-1301 USA +Boston, MA 02110-1301 USA @end example @end ifnottex @@ -15680,11 +15680,11 @@ 100 @end group @group -(17733 259) -(17491 28834) -(17596 62124) -13157 -"-rw-rw-r--" +(20615 27034 579989 697000) +(17905 55681 0 0) +(20615 26327 734791 805000) +13188 +"-rw-r--r--" @end group @group nil === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-10-24 03:48:50 +0000 +++ doc/lispref/ChangeLog 2012-10-24 05:12:23 +0000 @@ -1,3 +1,14 @@ +2012-10-24 Paul Eggert + + Update manual for new time stamp format (Bug#12706). + * buffers.texi (Modification Time): + * files.texi (Testing Accessibility, File Attributes): + * intro.texi (Version Info): + * os.texi (Time of Day): + Update for new time stamp format (HIGH LOW MICROSEC PICOSEC). + These instances were missed the first time around. + Problem reported by Glenn Morris in . + 2012-10-24 Chong Yidong * keymaps.texi (Toolkit Differences): Node deleted. === modified file 'doc/lispref/buffers.texi' --- doc/lispref/buffers.texi 2012-09-23 10:46:50 +0000 +++ doc/lispref/buffers.texi 2012-10-24 05:12:23 +0000 @@ -634,7 +634,8 @@ @c Emacs 19 feature @defun visited-file-modtime This function returns the current buffer's recorded last file -modification time, as a list of the form @code{(@var{high} @var{low})}. +modification time, as a list of the form @code{(@var{high} @var{low} +@var{microsec} @var{picosec})}. (This is the same format that @code{file-attributes} uses to return time values; see @ref{File Attributes}.) @@ -664,9 +665,8 @@ visited file. If @var{time} is neither @code{nil} nor zero, it should have the form -@code{(@var{high} . @var{low})} or @code{(@var{high} @var{low})}, in -either case containing two integers, each of which holds 16 bits of the -time. +@code{(@var{high} @var{low} @var{microsec} @var{picosec})}, +the format used by @code{current-time} (@pxref{Time of Day}). This function is useful if the buffer was not read from the file normally, or if the file itself has been changed for some known benign @@ -1237,4 +1237,3 @@ @defun gap-size This function returns the current gap size of the current buffer. @end defun - === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2012-10-23 07:57:42 +0000 +++ doc/lispref/files.texi 2012-10-24 05:12:23 +0000 @@ -938,7 +938,7 @@ @end example You can use @code{file-attributes} to get a file's last modification -time as a list of two numbers. @xref{File Attributes}. +time as a list of four integers. @xref{File Attributes}. @end defun @node Kinds of Files @@ -1228,11 +1228,11 @@ @cindex modification time of file @item -The time of last modification as a list of two integers (as above). +The time of last modification as a list of four integers (as above). This is the last time when the file's contents were modified. @item -The time of last status change as a list of two integers (as above). +The time of last status change as a list of four integers (as above). This is the time of the last change to the file's access mode bits, its owner and group, and other information recorded in the filesystem for the file, beyond the file's contents. @@ -1275,9 +1275,9 @@ @group (file-attributes "files.texi" 'string) @result{} (nil 1 "lh" "users" - (19145 42977) - (19141 59576) - (18340 17300) + (20614 64019 50040 152000) + (20000 23 0 0) + (20614 64555 902289 872000) 122295 "-rw-rw-rw-" nil (5888 2 . 43978) (15479 . 46724)) @@ -1301,14 +1301,14 @@ @item "users" is in the group with name "users". -@item (19145 42977) -was last accessed on Oct 5 2009, at 10:01:37. - -@item (19141 59576) -last had its contents modified on Oct 2 2009, at 13:49:12. - -@item (18340 17300) -last had its status changed on Feb 2 2008, at 12:19:00. +@item (20614 64019 50040 152000) +was last accessed on October 23, 2012, at 20:12:03.050040152 UTC. + +@item (20000 23 0 0) +was last modified on July 15, 2001, at 08:53:43 UTC. + +@item (20614 64555 902289 872000) +last had its status changed on October 23, 2012, at 20:20:59.902289872 UTC. @item 122295 is 122295 bytes long. (It may not contain 122295 characters, though, === modified file 'doc/lispref/intro.texi' --- doc/lispref/intro.texi 2012-10-22 02:22:27 +0000 +++ doc/lispref/intro.texi 2012-10-24 05:12:23 +0000 @@ -493,13 +493,13 @@ @defvar emacs-build-time The value of this variable indicates the time at which Emacs was -built. It is a list of three integers, like the value of +built. It is a list of four integers, like the value of @code{current-time} (@pxref{Time of Day}). @example @group emacs-build-time - @result{} (18846 52016 156039) + @result{} (20614 63694 515336 438000) @end group @end example @end defvar === modified file 'doc/lispref/os.texi' --- doc/lispref/os.texi 2012-10-22 21:57:14 +0000 +++ doc/lispref/os.texi 2012-10-24 05:12:23 +0000 @@ -1199,7 +1199,7 @@ the number of picoseconds from the start of that microsecond to the specified time. - The return value of @code{current-time} represents time using three + The return value of @code{current-time} represents time using four integers, as do the timestamps in the return value of @code{file-attributes} (@pxref{Definition of file-attributes}). In function arguments, e.g.@: the @var{time-value} === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-10-23 07:52:18 +0000 +++ doc/misc/ChangeLog 2012-10-24 05:12:23 +0000 @@ -1,3 +1,9 @@ +2012-10-24 Paul Eggert + + Update manual for new time stamp format (Bug#12706). + * emacs-mime.texi (time-date): Update for new format. + Also, fix bogus time stamp and modernize a bit. + 2012-10-23 Glenn Morris * cl.texi: Include emacsver.texi. Use Emacs version number rather === modified file 'doc/misc/emacs-mime.texi' --- doc/misc/emacs-mime.texi 2012-01-19 07:21:25 +0000 +++ doc/misc/emacs-mime.texi 2012-10-24 05:12:23 +0000 @@ -1516,16 +1516,16 @@ @result{} 905595714.0 (seconds-to-time 905595714.0) -@result{} (13818 19266 0) +@result{} (13818 19266 0 0) (time-to-days '(13818 19266)) @result{} 729644 (days-to-time 729644) -@result{} (961933 65536) +@result{} (961933 512) (time-since '(13818 19266)) -@result{} (0 430) +@result{} (6797 9607 984839 247000) (time-less-p '(13818 19266) '(13818 19145)) @result{} nil @@ -1546,7 +1546,7 @@ (time-to-number-of-days (time-since (date-to-time "Mon, 01 Jan 2001 02:22:26 GMT"))) -@result{} 4.146122685185185 +@result{} 4314.095589286675 @end example And finally, we have @code{safe-date-to-time}, which does the same as @@ -1561,7 +1561,7 @@ 12:21:54 1998 +0200"}. @item time -An internal Emacs time. For instance: @code{(13818 26466)}. +An internal Emacs time. For instance: @code{(13818 26466 0 0)}. @item seconds A floating point representation of the internal Emacs time. For ------------------------------------------------------------ revno: 110645 fixes bug: http://debbugs.gnu.org/12628 committer: Chong Yidong branch nick: trunk timestamp: Wed 2012-10-24 11:48:50 +0800 message: Improve documentation of easy-menu-define. * lisp/emacs-lisp/easymenu.el (easy-menu-define): Doc fix. * doc/lispref/keymaps.texi (Toolkit Differences): Node deleted. (Easy Menu): New node. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-10-23 15:06:07 +0000 +++ doc/lispref/ChangeLog 2012-10-24 03:48:50 +0000 @@ -1,3 +1,8 @@ +2012-10-24 Chong Yidong + + * keymaps.texi (Toolkit Differences): Node deleted. + (Easy Menu): New node. + 2012-10-23 Stefan Monnier * hooks.texi (Standard Hooks): Clarify that -hooks is deprecated. === modified file 'doc/lispref/elisp.texi' --- doc/lispref/elisp.texi 2012-09-30 09:18:38 +0000 +++ doc/lispref/elisp.texi 2012-10-24 03:48:50 +0000 @@ -800,17 +800,14 @@ * Menu Bar:: How to customize the menu bar. * Tool Bar:: A tool bar is a row of images. * Modifying Menus:: How to add new items to a menu. +* Easy Menu:: A convenience macro for defining menus. Defining Menus -* Simple Menu Items:: A simple kind of menu key binding, - limited in capabilities. -* Extended Menu Items:: More powerful menu item definitions - let you specify keywords to enable - various features. +* Simple Menu Items:: A simple kind of menu key binding. +* Extended Menu Items:: More complex menu item definitions. * Menu Separators:: Drawing a horizontal line through a menu. * Alias Menu Items:: Using command aliases in menu items. -* Toolkit Differences:: Not all toolkits provide the same features. Major and Minor Modes === modified file 'doc/lispref/keymaps.texi' --- doc/lispref/keymaps.texi 2012-10-23 02:23:39 +0000 +++ doc/lispref/keymaps.texi 2012-10-24 03:48:50 +0000 @@ -1963,13 +1963,14 @@ feature. @menu -* Defining Menus:: How to make a keymap that defines a menu. -* Mouse Menus:: How users actuate the menu with the mouse. -* Keyboard Menus:: How users actuate the menu with the keyboard. -* Menu Example:: Making a simple menu. -* Menu Bar:: How to customize the menu bar. -* Tool Bar:: A tool bar is a row of images. -* Modifying Menus:: How to add new items to a menu. +* Defining Menus:: How to make a keymap that defines a menu. +* Mouse Menus:: How users actuate the menu with the mouse. +* Keyboard Menus:: How users actuate the menu with the keyboard. +* Menu Example:: Making a simple menu. +* Menu Bar:: How to customize the menu bar. +* Tool Bar:: A tool bar is a row of images. +* Modifying Menus:: How to add new items to a menu. +* Easy Menu:: A convenience macro for making menus. @end menu @node Defining Menus @@ -2015,17 +2016,12 @@ @code{define-key-after} (@pxref{Modifying Menus}). @menu -* Simple Menu Items:: A simple kind of menu key binding, - limited in capabilities. -* Extended Menu Items:: More powerful menu item definitions - let you specify keywords to enable - various features. +* Simple Menu Items:: A simple kind of menu key binding. +* Extended Menu Items:: More complex menu item definitions. * Menu Separators:: Drawing a horizontal line through a menu. * Alias Menu Items:: Using command aliases in menu items. -* Toolkit Differences:: Not all toolkits provide the same features. @end menu - @node Simple Menu Items @subsubsection Simple Menu Items @@ -2312,28 +2308,6 @@ causes menu items for @code{make-read-only} and @code{make-writable} to show the keyboard bindings for @code{read-only-mode}. -@node Toolkit Differences -@subsubsection Toolkit Differences - -The various toolkits with which you can build Emacs do not all support -the same set of features for menus. Some code works as expected with -one toolkit, but not under another. - -One example is menu actions or buttons in a top-level menu bar. The -following works with the Lucid toolkit or on MS Windows, but not with -GTK or Nextstep, where clicking on the item has no effect. - -@example -(defun menu-action-greet () - (interactive) - (message "Hello Emacs User!")) - -(defun top-level-menu () - (interactive) - (define-key lisp-interaction-mode-map [menu-bar m] - '(menu-item "Action Button" menu-action-greet))) -@end example - @node Mouse Menus @subsection Menus and the Mouse @@ -2813,3 +2787,125 @@ [work] '("Work" . work-command) 'break) @end example @end defun + +@node Easy Menu +@subsection Easy Menu + + The following macro provides a convenient way to define pop-up menus +and/or menu bar menus. + +@defmac easy-menu-define symbol maps doc menu +This macro defines a pop-up menu and/or menu bar submenu, whose +contents are given by @var{menu}. + +If @var{symbol} is non-@code{nil}, it should be a symbol; then this +macro defines @var{symbol} as a function for popping up the menu +(@pxref{Pop-Up Menus}), with @var{doc} as its documentation string. +@var{symbol} should not be quoted. + +Regardless of the value of @var{symbol}, if @var{maps} is a keymap, +the menu is added to that keymap, as a top-level menu for the menu bar +(@pxref{Menu Bar}). It can also be a list of keymaps, in which case +the menu is added separately to each of those keymaps. + +The first element of @var{menu} must be a string, which serves as the +menu label. It may be followed by any number of the following +keyword-argument pairs: + +@table @code +@item :filter @var{function} +@var{function} must be a function which, if called with one +argument---the list of the other menu items---returns the actual items +to be displayed in the menu. + +@item :visible @var{include} +@var{include} is an expression; if it evaluates to @code{nil}, the +menu is made invisible. @code{:included} is an alias for +@code{:visible}. + +@item :active @var{enable} +@var{enable} is an expression; if it evaluates to @code{nil}, the menu +is not selectable. @code{:enable} is an alias for @code{:active}. +@end table + +The remaining elements in @var{menu} are menu items. + +A menu item can be a vector of three elements, @code{[@var{name} +@var{callback} @var{enable}]}. @var{name} is the menu item name (a +string). @var{callback} is a command to run, or an expression to +evaluate, when the item is chosen. @var{enable} is an expression; if +it evaluates to @code{nil}, the item is disabled for selection. + +Alternatively, a menu item may have the form: + +@smallexample + [ @var{name} @var{callback} [ @var{keyword} @var{arg} ]... ] +@end smallexample + +@noindent +where @var{name} and @var{callback} have the same meanings as above, +and each optional @var{keyword} and @var{arg} pair should be one of +the following: + +@table @code +@item :keys @var{keys} +@var{keys} is a keyboard equivalent to the menu item (a string). This +is normally not needed, as keyboard equivalents are computed +automatically. @var{keys} is expanded with +@code{substitute-command-keys} before it is displayed (@pxref{Keys in +Documentation}). + +@item :key-sequence @var{keys} +@var{keys} is a hint for speeding up Emacs's first display of the +menu. It should be nil if you know that the menu item has no keyboard +equivalent; otherwise it should be a string or vector specifying a +keyboard equivalent for the menu item. + +@item :active @var{enable} +@var{enable} is an expression; if it evaluates to @code{nil}, the item +is make unselectable.. @code{:enable} is an alias for @code{:active}. + +@item :visible @var{include} +@var{include} is an expression; if it evaluates to @code{nil}, the +item is made invisible. @code{:included} is an alias for +@code{:visible}. + +@item :label @var{form} +@var{form} is an expression that is evaluated to obtain a value which +serves as the menu item's label (the default is @var{name}). + +@item :suffix @var{form} +@var{form} is an expression that is dynamically evaluated and whose +value is concatenated with the menu entry's label. + +@item :style @var{style} +@var{style} is a symbol describing the type of menu item; it should be +@code{toggle} (a checkbox), or @code{radio} (a radio button), or +anything else (meaning an ordinary menu item). + +@item :selected @var{selected} +@var{selected} is an expression; the checkbox or radio button is +selected whenever the expression's value is non-nil. + +@item :help @var{help} +@var{help} is a string describing the menu item. +@end table + +Alternatively, a menu item can be a string. Then that string appears +in the menu as unselectable text. A string consisting of dashes is +displayed as a separator (@pxref{Menu Separators}). + +Alternatively, a menu item can be a list with the same format as +@var{menu}. This is a submenu. +@end defmac + +Here is an example of using @code{easy-menu-define} to define a menu +similar to the one defined in the example in @ref{Menu Bar}: + +@example +(easy-menu-define words-menu global-map + "Menu for word navigation commands." + '("Words" + ["Forward word" forward-word] + ["Backward word" backward-word])) +@end example === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-24 03:18:32 +0000 +++ lisp/ChangeLog 2012-10-24 03:48:50 +0000 @@ -1,3 +1,7 @@ +2012-10-24 Chong Yidong + + * emacs-lisp/easymenu.el (easy-menu-define): Doc fix (Bug#12628). + 2012-10-24 Stefan Monnier * minibuffer.el (completion--all-sorted-completions-location): New var. === modified file 'lisp/emacs-lisp/easymenu.el' --- lisp/emacs-lisp/easymenu.el 2012-09-14 03:55:16 +0000 +++ lisp/emacs-lisp/easymenu.el 2012-10-24 03:48:50 +0000 @@ -44,110 +44,101 @@ ;;;###autoload (defmacro easy-menu-define (symbol maps doc menu) - "Define a menu bar submenu in maps MAPS, according to MENU. - -If SYMBOL is non-nil, store the menu keymap in the value of SYMBOL, -and define SYMBOL as a function to pop up the menu, with DOC as its doc string. -If SYMBOL is nil, just store the menu keymap into MAPS. - -The first element of MENU must be a string. It is the menu bar item name. -It may be followed by the following keyword argument pairs - - :filter FUNCTION - -FUNCTION is a function with one argument, the rest of menu items. -It returns the remaining items of the displayed menu. - - :visible INCLUDE - -INCLUDE is an expression; this menu is only visible if this -expression has a non-nil value. `:included' is an alias for `:visible'. - - :active ENABLE - -ENABLE is an expression; the menu is enabled for selection whenever -this expression's value is non-nil. `:enable' is an alias for `:active'. - -The rest of the elements in MENU, are menu items. - -A menu item is usually a vector of three elements: [NAME CALLBACK ENABLE] + "Define a pop-up menu and/or menu bar menu specified by MENU. +If SYMBOL is non-nil, define SYMBOL as a function to pop up the +submenu defined by MENU, with DOC as its doc string. + +MAPS, if non-nil, should be a keymap or a list of keymaps; add +the submenu defined by MENU to the keymap or each of the keymaps, +as a top-level menu bar item. + +The first element of MENU must be a string. It is the menu bar +item name. It may be followed by the following keyword argument +pairs: + + :filter FUNCTION + FUNCTION must be a function which, if called with one + argument---the list of the other menu items---returns the + items to actually display. + + :visible INCLUDE + INCLUDE is an expression. The menu is visible if the + expression evaluates to a non-nil value. `:included' is an + alias for `:visible'. + + :active ENABLE + ENABLE is an expression. The menu is enabled for selection + if the expression evaluates to a non-nil value. `:enable' is + an alias for `:active'. + +The rest of the elements in MENU are menu items. +A menu item can be a vector of three elements: + + [NAME CALLBACK ENABLE] NAME is a string--the menu item name. -CALLBACK is a command to run when the item is chosen, -or a list to evaluate when the item is chosen. +CALLBACK is a command to run when the item is chosen, or an +expression to evaluate when the item is chosen. -ENABLE is an expression; the item is enabled for selection -whenever this expression's value is non-nil. +ENABLE is an expression; the item is enabled for selection if the +expression evaluates to a non-nil value. Alternatively, a menu item may have the form: - [ NAME CALLBACK [ KEYWORD ARG ] ... ] - -Where KEYWORD is one of the symbols defined below. - - :keys KEYS - -KEYS is a string; a complex keyboard equivalent to this menu item. -This is normally not needed because keyboard equivalents are usually -computed automatically. -KEYS is expanded with `substitute-command-keys' before it is used. - - :key-sequence KEYS - -KEYS is nil, a string or a vector; nil or a keyboard equivalent to this -menu item. -This is a hint that will considerably speed up Emacs's first display of -a menu. Use `:key-sequence nil' when you know that this menu item has no -keyboard equivalent. - - :active ENABLE - -ENABLE is an expression; the item is enabled for selection whenever -this expression's value is non-nil. `:enable' is an alias for `:active'. - - :visible INCLUDE - -INCLUDE is an expression; this item is only visible if this -expression has a non-nil value. `:included' is an alias for `:visible'. - - :label FORM - -FORM is an expression that will be dynamically evaluated and whose -value will be used for the menu entry's text label (the default is NAME). - - :suffix FORM - -FORM is an expression that will be dynamically evaluated and whose -value will be concatenated to the menu entry's label. - - :style STYLE - -STYLE is a symbol describing the type of menu item. The following are -defined: - -toggle: A checkbox. - Prepend the name with `(*) ' or `( ) ' depending on if selected or not. -radio: A radio button. - Prepend the name with `[X] ' or `[ ] ' depending on if selected or not. -button: Surround the name with `[' and `]'. Use this for an item in the - menu bar itself. -anything else means an ordinary menu item. - - :selected SELECTED - -SELECTED is an expression; the checkbox or radio button is selected -whenever this expression's value is non-nil. - - :help HELP - -HELP is a string, the help to display for the menu item. - -A menu item can be a string. Then that string appears in the menu as -unselectable text. A string consisting solely of hyphens is displayed -as a solid horizontal line. - -A menu item can be a list with the same format as MENU. This is a submenu." + [ NAME CALLBACK [ KEYWORD ARG ]... ] + +where NAME and CALLBACK have the same meanings as above, and each +optional KEYWORD and ARG pair should be one of the following: + + :keys KEYS + KEYS is a string; a keyboard equivalent to the menu item. + This is normally not needed because keyboard equivalents are + usually computed automatically. KEYS is expanded with + `substitute-command-keys' before it is used. + + :key-sequence KEYS + KEYS is a hint for speeding up Emacs's first display of the + menu. It should be nil if you know that the menu item has no + keyboard equivalent; otherwise it should be a string or + vector specifying a keyboard equivalent for the menu item. + + :active ENABLE + ENABLE is an expression; the item is enabled for selection + whenever this expression's value is non-nil. `:enable' is an + alias for `:active'. + + :visible INCLUDE + INCLUDE is an expression; this item is only visible if this + expression has a non-nil value. `:included' is an alias for + `:visible'. + + :label FORM + FORM is an expression that is dynamically evaluated and whose + value serves as the menu item's label (the default is NAME). + + :suffix FORM + FORM is an expression that is dynamically evaluated and whose + value is concatenated with the menu entry's label. + + :style STYLE + STYLE is a symbol describing the type of menu item; it should + be `toggle' (a checkbox), or `radio' (a radio button), or any + other value (meaning an ordinary menu item). + + :selected SELECTED + SELECTED is an expression; the checkbox or radio button is + selected whenever the expression's value is non-nil. + + :help HELP + HELP is a string, the help to display for the menu item. + +Alternatively, a menu item can be a string. Then that string +appears in the menu as unselectable text. A string consisting +solely of dashes is displayed as a menu separator. + +Alternatively, a menu item can be a list with the same format as +MENU. This is a submenu." (declare (indent defun) (debug (symbolp body))) `(progn ,(if symbol `(defvar ,symbol nil ,doc)) ------------------------------------------------------------ revno: 110644 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12619 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-10-23 23:22:21 -0400 message: * minibuffer.el (completion--flush-all-sorted-completions): Fix typo. diff: === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2012-10-24 03:18:32 +0000 +++ lisp/minibuffer.el 2012-10-24 03:22:21 +0000 @@ -1054,7 +1054,7 @@ (cons (copy-marker (field-beginning)) (copy-marker (field-end)))) (setq completion-all-sorted-completions comps)) -(defun completion--flush-all-sorted-completions (&rest start end len) +(defun completion--flush-all-sorted-completions (&optional start end _len) (unless (and start end (or (> start (cdr completion--all-sorted-completions-location)) (< end (car completion--all-sorted-completions-location)))) ------------------------------------------------------------ revno: 110643 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12619 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-10-23 23:18:32 -0400 message: * lisp/minibuffer.el (completion--all-sorted-completions-location): New var. (completion--cache-all-sorted-completions) (completion--flush-all-sorted-completions): Use it. (completion-in-region, completion-in-region--postch) (completion-at-point, completion-help-at-point): Use markers in completion-in-region--data. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-23 19:07:44 +0000 +++ lisp/ChangeLog 2012-10-24 03:18:32 +0000 @@ -1,3 +1,12 @@ +2012-10-24 Stefan Monnier + + * minibuffer.el (completion--all-sorted-completions-location): New var. + (completion--cache-all-sorted-completions) + (completion--flush-all-sorted-completions): Use it. + (completion-in-region, completion-in-region--postch) + (completion-at-point, completion-help-at-point): Use markers in + completion-in-region--data (bug#12619). + 2012-10-23 Stefan Monnier * progmodes/compile.el (compilation-start): Try to handle common === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2012-10-19 18:59:36 +0000 +++ lisp/minibuffer.el 2012-10-24 03:18:32 +0000 @@ -871,6 +871,7 @@ (defvar completion-all-sorted-completions nil) (make-variable-buffer-local 'completion-all-sorted-completions) +(defvar-local completion--all-sorted-completions-location nil) (defvar completion-cycling nil) (defvar completion-fail-discreetly nil @@ -1048,14 +1049,19 @@ (defun completion--cache-all-sorted-completions (comps) (add-hook 'after-change-functions - 'completion--flush-all-sorted-completions nil t) + 'completion--flush-all-sorted-completions nil t) + (setq completion--all-sorted-completions-location + (cons (copy-marker (field-beginning)) (copy-marker (field-end)))) (setq completion-all-sorted-completions comps)) -(defun completion--flush-all-sorted-completions (&rest _ignore) - (remove-hook 'after-change-functions - 'completion--flush-all-sorted-completions t) - (setq completion-cycling nil) - (setq completion-all-sorted-completions nil)) +(defun completion--flush-all-sorted-completions (&rest start end len) + (unless (and start end + (or (> start (cdr completion--all-sorted-completions-location)) + (< end (car completion--all-sorted-completions-location)))) + (remove-hook 'after-change-functions + 'completion--flush-all-sorted-completions t) + (setq completion-cycling nil) + (setq completion-all-sorted-completions nil))) (defun completion--metadata (string base md-at-point table pred) ;; Like completion-metadata, but for the specific case of getting the @@ -1758,7 +1764,10 @@ (when completion-in-region-mode-predicate (completion-in-region-mode 1) (setq completion-in-region--data - (list (current-buffer) start end collection))) + (list (if (markerp start) start (copy-marker start)) + (copy-marker end) collection))) + ;; FIXME: `minibuffer-complete' should call `completion-in-region' rather + ;; than the other way around! (unwind-protect (call-interactively 'minibuffer-complete) (delete-overlay ol))))) @@ -1782,12 +1791,12 @@ (or unread-command-events ;Don't pop down the completions in the middle of ;mouse-drag-region/mouse-set-point. (and completion-in-region--data - (and (eq (car completion-in-region--data) + (and (eq (marker-buffer (nth 0 completion-in-region--data)) (current-buffer)) - (>= (point) (nth 1 completion-in-region--data)) + (>= (point) (nth 0 completion-in-region--data)) (<= (point) (save-excursion - (goto-char (nth 2 completion-in-region--data)) + (goto-char (nth 1 completion-in-region--data)) (line-end-position))) (funcall completion-in-region-mode--predicate))) (completion-in-region-mode -1))) @@ -1892,17 +1901,19 @@ (let ((res (run-hook-wrapped 'completion-at-point-functions #'completion--capf-wrapper 'all))) (pcase res - (`(,_ . ,(and (pred functionp) f)) (funcall f)) - (`(,hookfun . (,start ,end ,collection . ,plist)) - (let* ((completion-extra-properties plist) - (completion-in-region-mode-predicate - (lambda () - ;; We're still in the same completion field. - (eq (car-safe (funcall hookfun)) start)))) - (completion-in-region start end collection - (plist-get plist :predicate)))) - ;; Maybe completion already happened and the function returned t. - (_ (cdr res))))) + (`(,_ . ,(and (pred functionp) f)) (funcall f)) + (`(,hookfun . (,start ,end ,collection . ,plist)) + (unless (markerp start) (setq start (copy-marker start))) + (let* ((completion-extra-properties plist) + (completion-in-region-mode-predicate + (lambda () + ;; We're still in the same completion field. + (let ((newstart (car-safe (funcall hookfun)))) + (and newstart (= newstart start)))))) + (completion-in-region start end collection + (plist-get plist :predicate)))) + ;; Maybe completion already happened and the function returned t. + (_ (cdr res))))) (defun completion-help-at-point () "Display the completions on the text around point. @@ -1914,32 +1925,34 @@ (pcase res (`(,_ . ,(and (pred functionp) f)) (message "Don't know how to show completions for %S" f)) - (`(,hookfun . (,start ,end ,collection . ,plist)) - (let* ((minibuffer-completion-table collection) - (minibuffer-completion-predicate (plist-get plist :predicate)) - (completion-extra-properties plist) - (completion-in-region-mode-predicate - (lambda () - ;; We're still in the same completion field. - (eq (car-safe (funcall hookfun)) start))) - (ol (make-overlay start end nil nil t))) - ;; FIXME: We should somehow (ab)use completion-in-region-function or - ;; introduce a corresponding hook (plus another for word-completion, - ;; and another for force-completion, maybe?). - (overlay-put ol 'field 'completion) - (overlay-put ol 'priority 100) - (completion-in-region-mode 1) - (setq completion-in-region--data - (list (current-buffer) start end collection)) - (unwind-protect - (call-interactively 'minibuffer-completion-help) - (delete-overlay ol)))) - (`(,hookfun . ,_) - ;; The hook function already performed completion :-( - ;; Not much we can do at this point. - (message "%s already performed completion!" hookfun) - nil) - (_ (message "Nothing to complete at point"))))) + (`(,hookfun . (,start ,end ,collection . ,plist)) + (unless (markerp start) (setq start (copy-marker start))) + (let* ((minibuffer-completion-table collection) + (minibuffer-completion-predicate (plist-get plist :predicate)) + (completion-extra-properties plist) + (completion-in-region-mode-predicate + (lambda () + ;; We're still in the same completion field. + (let ((newstart (car-safe (funcall hookfun)))) + (and newstart (= newstart start))))) + (ol (make-overlay start end nil nil t))) + ;; FIXME: We should somehow (ab)use completion-in-region-function or + ;; introduce a corresponding hook (plus another for word-completion, + ;; and another for force-completion, maybe?). + (overlay-put ol 'field 'completion) + (overlay-put ol 'priority 100) + (completion-in-region-mode 1) + (setq completion-in-region--data + (list start (copy-marker end) collection)) + (unwind-protect + (call-interactively 'minibuffer-completion-help) + (delete-overlay ol)))) + (`(,hookfun . ,_) + ;; The hook function already performed completion :-( + ;; Not much we can do at this point. + (message "%s already performed completion!" hookfun) + nil) + (_ (message "Nothing to complete at point"))))) ;;; Key bindings. ------------------------------------------------------------ revno: 110642 committer: Bastien Guerry branch nick: trunk timestamp: Tue 2012-10-23 23:26:00 +0200 message: Fix last tiny change about text.texi. Thanks to Eli for his guidance. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-10-23 16:12:59 +0000 +++ doc/emacs/ChangeLog 2012-10-23 21:26:00 +0000 @@ -1,6 +1,7 @@ 2012-10-23 Bastien Guerry - * text.texi (Org Authoring): Change @ref to @pxref. + * text.texi (Org Authoring): Use a comma after @ref to avoid the + insertion of a period in the Info output. 2012-10-23 Stefan Monnier === modified file 'doc/emacs/text.texi' --- doc/emacs/text.texi 2012-10-23 16:12:59 +0000 +++ doc/emacs/text.texi 2012-10-23 21:26:00 +0000 @@ -1399,7 +1399,7 @@ #+end_example @end example - For further details, @pxref{Exporting,,,org, The Org Manual}, and + For further details, @ref{Exporting,,,org, The Org Manual}, and @ref{Publishing,,,org, The Org Manual}. @node TeX Mode ------------------------------------------------------------ revno: 110641 fixes bug: http://debbugs.gnu.org/12714 committer: Paul Eggert branch nick: trunk timestamp: Tue 2012-10-23 12:39:36 -0700 message: * configure.ac (_FORTIFY_SOURCE): Do not multiply define. This ports to Gentoo. Problem originally reported against coreutils, but Emacs has it too. diff: === modified file 'ChangeLog' --- ChangeLog 2012-10-23 17:33:22 +0000 +++ ChangeLog 2012-10-23 19:39:36 +0000 @@ -1,3 +1,9 @@ +2012-10-23 Paul Eggert + + * configure.ac (_FORTIFY_SOURCE): Do not multiply define (Bug#12714). + This ports to Gentoo. Problem originally reported against coreutils, + but Emacs has it too. + 2012-10-23 Glenn Morris * Makefile.in (emacs_transform): Remove. === modified file 'configure.ac' --- configure.ac 2012-10-21 07:23:34 +0000 +++ configure.ac 2012-10-23 19:39:36 +0000 @@ -743,7 +743,7 @@ AH_VERBATIM([FORTIFY_SOURCE], [/* Enable compile-time and run-time bounds-checking, and some warnings, without upsetting glibc 2.15+. */ - #if defined __OPTIMIZE__ && __OPTIMIZE__ + #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ # define _FORTIFY_SOURCE 2 #endif ]) ------------------------------------------------------------ revno: 110640 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12640 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-10-23 15:07:44 -0400 message: * lisp/progmodes/compile.el (compilation-start): Try to handle common quoting of `cd' argument. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-23 18:40:23 +0000 +++ lisp/ChangeLog 2012-10-23 19:07:44 +0000 @@ -1,5 +1,8 @@ 2012-10-23 Stefan Monnier + * progmodes/compile.el (compilation-start): Try to handle common + quoting of `cd' argument (bug#12640). + * vc/diff-mode.el (diff-hunk): `save-excursion' while refining (bug#12671). === modified file 'lisp/progmodes/compile.el' --- lisp/progmodes/compile.el 2012-10-14 07:40:05 +0000 +++ lisp/progmodes/compile.el 2012-10-23 19:07:44 +0000 @@ -1568,12 +1568,20 @@ ;; Then evaluate a cd command if any, but don't perform it yet, else ;; start-command would do it again through the shell: (cd "..") AND ;; sh -c "cd ..; make" - (cd (if (string-match "\\`\\s *cd\\(?:\\s +\\(\\S +?\\)\\)?\\s *[;&\n]" - command) - (if (match-end 1) - (substitute-env-vars (match-string 1 command)) - "~") - default-directory)) + (cd (cond + ((not (string-match "\\`\\s *cd\\(?:\\s +\\(\\S +?\\|'[^']*'\\|\"\\(?:[^\"`$\\]\\|\\\\.\\)*\"\\)\\)?\\s *[;&\n]" + command)) + default-directory) + ((not (match-end 1)) "~") + ((eq (aref command (match-beginning 1)) ?\') + (substring command (1+ (match-beginning 1)) + (1- (match-end 1)))) + ((eq (aref command (match-beginning 1)) ?\") + (replace-regexp-in-string + "\\\\\\(.\\)" "\\1" + (substring command (1+ (match-beginning 1)) + (1- (match-end 1))))) + (t (substitute-env-vars (match-string 1 command))))) (erase-buffer) ;; Select the desired mode. (if (not (eq mode t)) ------------------------------------------------------------ revno: 110639 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12671 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-10-23 14:40:23 -0400 message: * lisp/vc/diff-mode.el (diff-hunk): `save-excursion' while refining. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-23 17:49:24 +0000 +++ lisp/ChangeLog 2012-10-23 18:40:23 +0000 @@ -1,3 +1,8 @@ +2012-10-23 Stefan Monnier + + * vc/diff-mode.el (diff-hunk): `save-excursion' while refining + (bug#12671). + 2012-10-23 Glenn Morris * progmodes/gud.el (gud-menu-map): === modified file 'lisp/vc/diff-mode.el' --- lisp/vc/diff-mode.el 2012-10-02 03:49:28 +0000 +++ lisp/vc/diff-mode.el 2012-10-23 18:40:23 +0000 @@ -581,8 +581,9 @@ (with-local-quit (when (buffer-live-p buffer) (with-current-buffer buffer - (goto-char point) - (diff-refine-hunk)))))))))) + (save-excursion + (goto-char point) + (diff-refine-hunk))))))))))) (easy-mmode-define-navigation diff-file diff-file-header-re "file" diff-end-of-file) ------------------------------------------------------------ revno: 110638 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-23 13:49:24 -0400 message: * gud.el (gud-menu-map): Check gdb-active-process is bound. (Bug#12358) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-23 16:57:31 +0000 +++ lisp/ChangeLog 2012-10-23 17:49:24 +0000 @@ -1,3 +1,8 @@ +2012-10-23 Glenn Morris + + * progmodes/gud.el (gud-menu-map): + Check gdb-active-process is bound. (Bug#12358) + 2012-10-23 Stefan Monnier * repeat.el (repeat): Set real-this-command (bug#12232). === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2012-10-18 19:46:18 +0000 +++ lisp/progmodes/gud.el 2012-10-23 17:49:24 +0000 @@ -148,7 +148,8 @@ ([run] menu-item "Run" gud-run :enable (not gud-running) :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) - ([go] menu-item (if gdb-active-process "Continue" "Run") gud-go + ([go] menu-item (if (bound-and-true-p gdb-active-process) + "Continue" "Run") gud-go :visible (and (eq gud-minor-mode 'gdbmi) (gdb-show-run-p))) ([stop] menu-item "Stop" gud-stop-subjob @@ -178,7 +179,7 @@ '(gdbmi gdb dbx xdb jdb pdb))) ([pp] menu-item "Print S-expression" gud-pp :enable (and (not gud-running) - gdb-active-process) + (bound-and-true-p gdb-active-process)) :visible (and (string-equal (buffer-local-value 'gud-target-name gud-comint-buffer) "emacs") ------------------------------------------------------------ revno: 110637 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-23 13:33:22 -0400 message: Revert 2012-10-21 Makefile.in change (bug#12713) * Makefile.in (emacs_transform): Remove. (install-man): Revert 2012-10-21 change. diff: === modified file 'ChangeLog' --- ChangeLog 2012-10-21 01:35:46 +0000 +++ ChangeLog 2012-10-23 17:33:22 +0000 @@ -1,3 +1,8 @@ +2012-10-23 Glenn Morris + + * Makefile.in (emacs_transform): Remove. + (install-man): Revert 2012-10-21 change. (Bug#12713) + 2012-10-21 Glenn Morris * Makefile.in (install-etc): Don't install emacs22 icons. === modified file 'Makefile.in' --- Makefile.in 2012-10-21 01:35:46 +0000 +++ Makefile.in 2012-10-23 17:33:22 +0000 @@ -631,17 +631,14 @@ done ## Install those items from etc/ that need to end up elsewhere. - -# Like EMACS, but without EXEEXT. -emacs_transform = `echo emacs | sed '$(TRANSFORM)'` - install-etc: umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir} + dest=`echo emacs | sed '$(TRANSFORM)'`; \ tmp=etc/emacs.tmpdesktop; rm -f $${tmp}; \ - sed -e '/^Exec=emacs/ s/emacs/${emacs_transform}/' \ - -e '/^Icon=emacs/ s/emacs/${emacs_transform}/' \ + sed -e "/^Exec=emacs/ s/emacs/$${dest}/" \ + -e "/^Icon=emacs/ s/emacs/$${dest}/" \ ${srcdir}/etc/emacs.desktop > $${tmp}; \ - ${INSTALL_DATA} $${tmp} $(DESTDIR)${desktopdir}/${emacs_transform}.desktop; \ + ${INSTALL_DATA} $${tmp} $(DESTDIR)${desktopdir}/$${dest}.desktop; \ rm -f $${tmp} thisdir=`/bin/pwd`; \ cd ${iconsrcdir} || exit 1; umask 022 ; \ ------------------------------------------------------------ revno: 110636 committer: Eli Zaretskii branch nick: trunk timestamp: Tue 2012-10-23 19:09:55 +0200 message: Update lib-src/makefile.w32-in to follow revision 110608. lib-src/makefile.w32-in (lisp2): Add cp51932.el and eucjp-ms.el, to follow src/lisp.mk. diff: === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2012-10-21 01:19:46 +0000 +++ lib-src/ChangeLog 2012-10-23 17:09:55 +0000 @@ -1,3 +1,8 @@ +2012-10-23 Eli Zaretskii + + * makefile.w32-in (lisp2): Add cp51932.el and eucjp-ms.el, to + follow src/lisp.mk. + 2012-10-21 Glenn Morris * make-docfile.c (scan_lisp_file): Add cp51932.el and eucjp-ms.el. === modified file 'lib-src/makefile.w32-in' --- lib-src/makefile.w32-in 2012-10-20 10:01:19 +0000 +++ lib-src/makefile.w32-in 2012-10-23 17:09:55 +0000 @@ -229,6 +229,8 @@ $(lispsource)language/greek.elc \ $(lispsource)language/hebrew.elc \ $(lispsource)language/japanese.elc \ + $(lispsource)international/cp51932.el \ + $(lispsource)international/eucjp-ms.el \ $(lispsource)language/korean.elc \ $(lispsource)language/lao.elc \ $(lispsource)language/cham.elc \ ------------------------------------------------------------ revno: 110635 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-10-23 13:09:22 -0400 message: * checkdoc.el (checkdoc-comment-style-hooks): Typo. diff: === modified file 'lisp/emacs-lisp/checkdoc.el' --- lisp/emacs-lisp/checkdoc.el 2012-10-23 15:06:07 +0000 +++ lisp/emacs-lisp/checkdoc.el 2012-10-23 17:09:22 +0000 @@ -286,7 +286,7 @@ location of end of the documentation string.") (define-obsolete-variable-alias 'checkdoc-comment-style-hooks - checkdoc-comment-style-functions "24.3") + 'checkdoc-comment-style-functions "24.3") (defvar checkdoc-comment-style-functions nil "Hook run after the standard comment style check is completed. Must return nil if no errors are found, or a string describing the ------------------------------------------------------------ revno: 110634 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12232 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-10-23 12:57:31 -0400 message: * lisp/repeat.el (repeat): Set real-this-command. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-23 15:06:07 +0000 +++ lisp/ChangeLog 2012-10-23 16:57:31 +0000 @@ -1,5 +1,7 @@ 2012-10-23 Stefan Monnier + * repeat.el (repeat): Set real-this-command (bug#12232). + * htmlfontify.el (hfy-post-html-hook): * filesets.el (filesets-cache-fill-content-hook): * arc-mode.el (archive-extract-hook): === modified file 'lisp/repeat.el' --- lisp/repeat.el 2012-09-22 15:24:26 +0000 +++ lisp/repeat.el 2012-10-23 16:57:31 +0000 @@ -289,6 +289,10 @@ (interactive) (let ((repeat-message-function fun)) (setq this-command 'repeat) + ;; Beware: messing with `real-this-command' is *bad*, but we + ;; need it so `last-repeatable-command' can be recognized + ;; later (bug#12232). + (setq real-this-command 'repeat) (call-interactively 'repeat)))))) map))))) ------------------------------------------------------------ revno: 110633 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-23 09:26:52 -0700 message: Remove NEWS markup so that file-attributes etc get rechecked diff: === modified file 'etc/NEWS' --- etc/NEWS 2012-10-23 15:06:07 +0000 +++ etc/NEWS 2012-10-23 16:26:52 +0000 @@ -853,7 +853,7 @@ *** `current-time-string' no longer requires that its argument's year must be in the range 1000..9999. It now works with any year supported by the underlying C implementation. ---- + *** `current-time' now returns extended-format time stamps (HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds. PSEC is typically a multiple of 1000 on current machines. Other ------------------------------------------------------------ revno: 110632 committer: Bastien Guerry branch nick: trunk timestamp: Tue 2012-10-23 18:12:59 +0200 message: * text.texi (Org Authoring): Change @ref to @pxref. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-10-23 15:06:07 +0000 +++ doc/emacs/ChangeLog 2012-10-23 16:12:59 +0000 @@ -1,3 +1,7 @@ +2012-10-23 Bastien Guerry + + * text.texi (Org Authoring): Change @ref to @pxref. + 2012-10-23 Stefan Monnier * custom.texi (Hooks): Clarify that -hooks is deprecated. === modified file 'doc/emacs/text.texi' --- doc/emacs/text.texi 2012-06-17 05:13:40 +0000 +++ doc/emacs/text.texi 2012-10-23 16:12:59 +0000 @@ -1399,7 +1399,7 @@ #+end_example @end example - For further details, see @ref{Exporting,,,org, The Org Manual} and + For further details, @pxref{Exporting,,,org, The Org Manual}, and @ref{Publishing,,,org, The Org Manual}. @node TeX Mode ------------------------------------------------------------ revno: 110631 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Wed 2012-10-24 00:48:17 +0900 message: Make face-font-rescale-alist work correctly for non-ASCII fonts. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-23 02:39:13 +0000 +++ src/ChangeLog 2012-10-23 15:47:51 +0000 @@ -1,3 +1,11 @@ +2012-10-23 Kenichi Handa + + The following change is to make face-font-rescale-alist work + correctly for non-ASCII fonts. + + * font.c (font_open_entity): Don't handle Vface_font_rescale_alist. + (font_open_for_lface): Handle Vface_font_rescale_alist. + 2012-10-23 Chong Yidong * xfaces.c (Vfont_list_limit): Move unused variable to faces.el. === modified file 'src/font.c' --- src/font.c 2012-10-19 12:59:42 +0000 +++ src/font.c 2012-10-23 15:42:29 +0000 @@ -2816,14 +2816,11 @@ Lisp_Object objlist, size, val, font_object; struct font *font; int min_width, height; - int scaled_pixel_size = pixel_size; eassert (FONT_ENTITY_P (entity)); size = AREF (entity, FONT_SIZE_INDEX); if (XINT (size) != 0) - scaled_pixel_size = pixel_size = XINT (size); - else if (CONSP (Vface_font_rescale_alist)) - scaled_pixel_size = pixel_size * font_rescale_ratio (entity); + pixel_size = XINT (size); val = AREF (entity, FONT_TYPE_INDEX); for (driver_list = f->font_driver_list; @@ -2845,7 +2842,7 @@ } } - font_object = driver_list->driver->open (f, entity, scaled_pixel_size); + font_object = driver_list->driver->open (f, entity, pixel_size); if (!NILP (font_object)) ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size)); FONT_ADD_LOG ("open", entity, font_object); @@ -3230,31 +3227,36 @@ if (INTEGERP (AREF (entity, FONT_SIZE_INDEX)) && XINT (AREF (entity, FONT_SIZE_INDEX)) > 0) size = XINT (AREF (entity, FONT_SIZE_INDEX)); - else if (FONT_SPEC_P (spec) && ! NILP (AREF (spec, FONT_SIZE_INDEX))) - size = font_pixel_size (f, spec); else { - double pt; - if (INTEGERP (attrs[LFACE_HEIGHT_INDEX])) - pt = XINT (attrs[LFACE_HEIGHT_INDEX]); + if (FONT_SPEC_P (spec) && ! NILP (AREF (spec, FONT_SIZE_INDEX))) + size = font_pixel_size (f, spec); else { - struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID); - Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX]; - eassert (INTEGERP (height)); - pt = XINT (height); - } + double pt; + if (INTEGERP (attrs[LFACE_HEIGHT_INDEX])) + pt = XINT (attrs[LFACE_HEIGHT_INDEX]); + else + { + struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID); + Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX]; + eassert (INTEGERP (height)); + pt = XINT (height); + } - pt /= 10; - size = POINT_TO_PIXEL (pt, f->resy); + pt /= 10; + size = POINT_TO_PIXEL (pt, f->resy); #ifdef HAVE_NS - if (size == 0) - { - Lisp_Object ffsize = get_frame_param (f, Qfontsize); - size = NUMBERP (ffsize) ? POINT_TO_PIXEL (XINT (ffsize), f->resy) : 0; - } + if (size == 0) + { + Lisp_Object ffsize = get_frame_param (f, Qfontsize); + size = NUMBERP (ffsize) ? POINT_TO_PIXEL (XINT (ffsize), f->resy) : 0; + } #endif + } + size *= font_rescale_ratio (entity); } + return font_open_entity (f, entity, size); } ------------------------------------------------------------ revno: 110630 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2012-10-23 11:06:07 -0400 message: Cleanup uses of "-hooks". * doc/emacs/custom.texi (Hooks): * doc/lispref/hooks.texi (Standard Hooks): Clarify that -hooks is deprecated. * lisp/gnus/nndiary.el (nndiary-request-create-group-functions) (nndiary-request-update-info-functions) (nndiary-request-accept-article-functions): * lisp/gnus/gnus-start.el (gnus-subscribe-newsgroup-functions): * lisp/cedet/semantic/db-file.el (semanticdb-save-database-functions): * lisp/cedet/semantic/lex.el (semantic-lex-reset-functions): * lisp/cedet/semantic/edit.el (semantic-change-functions) (semantic-edits-new-change-functions) (semantic-edits-delete-change-functions) (semantic-edits-reparse-change-functions): * lisp/htmlfontify.el (hfy-post-html-hook): * lisp/filesets.el (filesets-cache-fill-content-hook): * lisp/arc-mode.el (archive-extract-hook): * lisp/progmodes/cc-mode.el (c-prepare-bug-report-hook): * lisp/net/rcirc.el (rcirc-sentinel-functions) (rcirc-receive-message-functions, rcirc-activity-functions) (rcirc-print-functions): * lisp/net/dbus.el (dbus-event-error-functions): * lisp/emacs-lisp/eieio.el (eieio-pre-method-execution-functions): * lisp/emacs-lisp/checkdoc.el (checkdoc-style-functions) (checkdoc-comment-style-functions): Don't use "-hooks" suffix. * lisp/term/sun.el (sun-raw-prefix-hooks): * lisp/mail/sendmail.el (mail-yank-hooks): * lisp/mh-e/mh-letter.el (mh-yank-hooks): Use make-obsolete-variable. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-10-23 02:23:39 +0000 +++ doc/emacs/ChangeLog 2012-10-23 15:06:07 +0000 @@ -1,3 +1,7 @@ +2012-10-23 Stefan Monnier + + * custom.texi (Hooks): Clarify that -hooks is deprecated. + 2012-10-23 Chong Yidong * kmacro.texi (Edit Keyboard Macro): Fix typo. === modified file 'doc/emacs/custom.texi' --- doc/emacs/custom.texi 2012-08-05 09:24:55 +0000 +++ doc/emacs/custom.texi 2012-10-23 15:06:07 +0000 @@ -838,7 +838,8 @@ @cindex abnormal hook A few hooks are @dfn{abnormal hooks}. Their names end in -@samp{-hooks} or @samp{-functions}, instead of @samp{-hook}. What +@samp{-functions}, instead of @samp{-hook} (some old code may also use +the deprecated suffix @samp{-hooks}). What makes these hooks abnormal is the way its functions are called---perhaps they are given arguments, or perhaps the values they return are used in some way. For example, @@ -1735,11 +1736,11 @@ @example (add-hook 'texinfo-mode-hook - '(lambda () - (define-key texinfo-mode-map "\C-cp" - 'backward-paragraph) - (define-key texinfo-mode-map "\C-cn" - 'forward-paragraph))) + (lambda () + (define-key texinfo-mode-map "\C-cp" + 'backward-paragraph) + (define-key texinfo-mode-map "\C-cn" + 'forward-paragraph))) @end example @node Modifier Keys === modified file 'doc/lispintro/emacs-lisp-intro.texi' --- doc/lispintro/emacs-lisp-intro.texi 2012-10-17 03:44:00 +0000 +++ doc/lispintro/emacs-lisp-intro.texi 2012-10-23 15:06:07 +0000 @@ -17909,10 +17909,10 @@ @group ;; Set calendar highlighting colors (setq calendar-load-hook - '(lambda () - (set-face-foreground 'diary-face "skyblue") - (set-face-background 'holiday-face "slate blue") - (set-face-foreground 'holiday-face "white"))) + (lambda () + (set-face-foreground 'diary-face "skyblue") + (set-face-background 'holiday-face "slate blue") + (set-face-foreground 'holiday-face "white"))) @end group @end smallexample @@ -20947,7 +20947,7 @@ @group (defun one-fiftieth (full-range) "Return list, each number one-fiftieth of previous." - (mapcar '(lambda (arg) (/ arg 50)) full-range)) + (mapcar (lambda (arg) (/ arg 50)) full-range)) @end group @end smallexample @@ -21168,7 +21168,7 @@ The whole expression looks like this: @smallexample -(mapcar '(lambda (arg) (/ arg 50)) full-range)) +(mapcar (lambda (arg) (/ arg 50)) full-range)) @end smallexample @xref{Mapping Functions, , Mapping Functions, elisp, The GNU Emacs @@ -21840,7 +21840,7 @@ @group (defun one-fiftieth (full-range) "Return list, each number of which is 1/50th previous." - (mapcar '(lambda (arg) (/ arg 50)) full-range)) + (mapcar (lambda (arg) (/ arg 50)) full-range)) @end group @end smallexample === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-10-23 07:57:42 +0000 +++ doc/lispref/ChangeLog 2012-10-23 15:06:07 +0000 @@ -1,3 +1,7 @@ +2012-10-23 Stefan Monnier + + * hooks.texi (Standard Hooks): Clarify that -hooks is deprecated. + 2012-10-23 Paul Eggert Fix outdated timestamp documentation in Elisp manual (bug#12706). === modified file 'doc/lispref/functions.texi' --- doc/lispref/functions.texi 2012-10-15 04:03:04 +0000 +++ doc/lispref/functions.texi 2012-10-23 15:06:07 +0000 @@ -978,7 +978,7 @@ @example @group (defun double-property (symbol prop) - (change-property symbol prop '(lambda (x) (* 2 x)))) + (change-property symbol prop (lambda (x) (* 2 x)))) @end group @end example === modified file 'doc/lispref/hooks.texi' --- doc/lispref/hooks.texi 2012-07-29 07:16:45 +0000 +++ doc/lispref/hooks.texi 2012-10-23 15:06:07 +0000 @@ -17,11 +17,11 @@ to put a new function on such a hook is to call @code{add-hook}. @xref{Hooks}, for more information about using hooks. -The variables whose names end in @samp{-hooks} or @samp{-functions} are -usually @dfn{abnormal hooks}; their values are lists of functions, but -these functions are called in a special way (they are passed arguments, -or their values are used). The variables whose names end in -@samp{-function} have single functions as their values. +The variables whose names end in @samp{-functions} are usually @dfn{abnormal +hooks} (some old code may also use the deprecated @samp{-hooks} suffix); their +values are lists of functions, but these functions are called in a special way +(they are passed arguments, or their return values are used). The variables +whose names end in @samp{-function} have single functions as their values. This is not an exhaustive list, it only covers the more general hooks. For example, every major mode defines a hook named === modified file 'doc/lispref/loading.texi' --- doc/lispref/loading.texi 2012-09-30 09:18:38 +0000 +++ doc/lispref/loading.texi 2012-10-23 15:06:07 +0000 @@ -897,8 +897,8 @@ Before restoring the previous definitions, @code{unload-feature} runs @code{remove-hook} to remove functions in the library from certain -hooks. These hooks include variables whose names end in @samp{hook} -or @samp{-hooks}, plus those listed in +hooks. These hooks include variables whose names end in @samp{-hook} +(or the deprecated suffix @samp{-hooks}), plus those listed in @code{unload-feature-special-hooks}, as well as @code{auto-mode-alist}. This is to prevent Emacs from ceasing to function because important hooks refer to functions that are no longer === modified file 'doc/lispref/modes.texi' --- doc/lispref/modes.texi 2012-06-17 05:13:40 +0000 +++ doc/lispref/modes.texi 2012-10-23 15:06:07 +0000 @@ -70,9 +70,9 @@ hook, but you must write the function to follow the hook's calling convention. - By convention, abnormal hook names end in @samp{-functions} or -@samp{-hooks}. If the variable's name ends in @samp{-function}, then -its value is just a single function, not a list of functions. + By convention, abnormal hook names end in @samp{-functions}. If the +variable's name ends in @samp{-function}, then its value is just a single +function, not a list of functions. @menu * Running Hooks:: How to run a hook. === modified file 'doc/misc/dbus.texi' --- doc/misc/dbus.texi 2012-04-23 05:44:49 +0000 +++ doc/misc/dbus.texi 2012-10-23 15:06:07 +0000 @@ -1981,7 +1981,7 @@ setting the variable @code{dbus-debug} to @code{t}. They can also be handled by a hook function. -@defvar dbus-event-error-hooks +@defvar dbus-event-error-functions This hook variable keeps a list of functions, which are called when a D-Bus error happens in the event handler. Every function must accept two arguments, the event and the error variable caught in @@ -1997,7 +1997,7 @@ (message "my-dbus-event-error-handler: %S %S" event error) (signal 'file-error (cdr error)))) -(add-hook 'dbus-event-error-hooks 'my-dbus-event-error-handler) +(add-hook 'dbus-event-error-functions 'my-dbus-event-error-handler) @end lisp @end defvar === modified file 'doc/misc/ede.texi' --- doc/misc/ede.texi 2012-10-05 05:57:24 +0000 +++ doc/misc/ede.texi 2012-10-23 15:06:07 +0000 @@ -1248,7 +1248,7 @@ @table @asis @item Step 1: -@code{find-file-hooks} calls @code{ede-turn-on-hook} on BUFFER. +@code{find-file-hook} calls @code{ede-turn-on-hook} on BUFFER. @item Step 2: @code{ede-turn-on-hook} turns on @code{ede-minor-mode} @item Step 3: === modified file 'doc/misc/ediff.texi' --- doc/misc/ediff.texi 2012-02-28 08:17:21 +0000 +++ doc/misc/ediff.texi 2012-10-23 15:06:07 +0000 @@ -1248,7 +1248,7 @@ place to do various cleanups, such as deleting the variant buffers. Ediff provides a function, @code{ediff-janitor}, as one such possible hook, which you can add to @code{ediff-cleanup-hook} with -@code{add-hooks}. +@code{add-hook}. @findex ediff-janitor This function kills buffers A, B, and, possibly, C, if these buffers aren't === modified file 'doc/misc/forms.texi' --- doc/misc/forms.texi 2012-05-07 23:02:28 +0000 +++ doc/misc/forms.texi 2012-10-23 15:06:07 +0000 @@ -170,8 +170,8 @@ @code{forms-format-list}, and the data file is updated. If the record has fields that aren't included in the display, they are not changed. -@vindex forms-mode-hooks -Entering Forms mode runs the normal hook @code{forms-mode-hooks} to +@vindex forms-mode-hook +Entering Forms mode runs the normal hook @code{forms-mode-hook} to perform user-defined customization. To save any modified data, you can use @kbd{C-x C-s} === modified file 'doc/misc/gnus.texi' --- doc/misc/gnus.texi 2012-07-29 08:18:29 +0000 +++ doc/misc/gnus.texi 2012-10-23 15:06:07 +0000 @@ -3148,7 +3148,7 @@ @lisp (gnus-summary-prepared-hook - '(lambda nil (local-set-key "d" (local-key-binding "n")))) + (lambda nil (local-set-key "d" (local-key-binding "n")))) @end lisp when the group is entered, the 'd' key will not mark the article as === modified file 'doc/misc/mh-e.texi' --- doc/misc/mh-e.texi 2012-07-29 08:18:29 +0000 +++ doc/misc/mh-e.texi 2012-10-23 15:06:07 +0000 @@ -429,7 +429,7 @@ MH-E uses normal hooks in nearly all cases, so you can assume that we are talking about normal hooks unless we explicitly mention that a hook is abnormal. We also follow the conventions described in that -section: the name of the abnormal hooks end in @code{-hooks} and all +section: the name of the abnormal hooks end in @code{-functions} and all the rest of the MH-E hooks end in @code{-hook}. You can add hooks with either @code{customize-option} or @code{add-hook}. @@ -3749,9 +3749,9 @@ @findex mh-search-p @kindex k -@vindex mh-kill-folder-suppress-prompt-hooks +@vindex mh-kill-folder-suppress-prompt-functions -The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal +The hook @code{mh-kill-folder-suppress-prompt-functions} is an abnormal hook run at the beginning of the command @kbd{k}. The hook functions are called with no arguments and should return a non-nil value to suppress the normal prompt when you remove a folder. This is useful === modified file 'doc/misc/sem-user.texi' --- doc/misc/sem-user.texi 2012-02-29 08:11:23 +0000 +++ doc/misc/sem-user.texi 2012-10-23 15:06:07 +0000 @@ -277,7 +277,7 @@ controlled by them. @end defvar -@deffn Option semanticdb-save-database-hooks +@deffn Option semanticdb-save-database-functions Abnormal hook run after a database is saved. Each function is called with one argument, the object representing the database recently written. === modified file 'doc/misc/tramp.texi' --- doc/misc/tramp.texi 2012-09-12 16:39:10 +0000 +++ doc/misc/tramp.texi 2012-10-23 15:06:07 +0000 @@ -3007,10 +3007,10 @@ @lisp (add-hook - 'find-file-hooks - '(lambda () - (when (file-remote-p default-directory) - (set (make-local-variable 'file-precious-flag) t)))) + 'find-file-hook + (lambda () + (when (file-remote-p default-directory) + (set (make-local-variable 'file-precious-flag) t)))) @end lisp @end itemize @@ -3126,7 +3126,7 @@ (setq mode-line-format (format-mode-line mode-line-format 'font-lock-warning-face)))) -(add-hook 'find-file-hooks 'my-mode-line-function) +(add-hook 'find-file-hook 'my-mode-line-function) (add-hook 'dired-mode-hook 'my-mode-line-function) @end lisp @end ifset @@ -3159,10 +3159,10 @@ (add-hook 'dired-mode-hook - '(lambda () - (setq - mode-line-buffer-identification - my-mode-line-buffer-identification))) + (lambda () + (setq + mode-line-buffer-identification + my-mode-line-buffer-identification))) @end lisp Since @value{emacsname} 23.1, the mode line contains an indication if @@ -3195,9 +3195,9 @@ @lisp (add-hook 'dired-before-readin-hook - '(lambda () - (when (file-remote-p default-directory) - (setq dired-actual-switches "-al")))) + (lambda () + (when (file-remote-p default-directory) + (setq dired-actual-switches "-al")))) @end lisp @end ifset @@ -3329,9 +3329,9 @@ (add-hook 'minibuffer-setup-hook - '(lambda () - (abbrev-mode 1) - (setq local-abbrev-table my-tramp-abbrev-table))) + (lambda () + (abbrev-mode 1) + (setq local-abbrev-table my-tramp-abbrev-table))) (defadvice minibuffer-complete (before my-minibuffer-complete activate) @@ -3398,7 +3398,7 @@ @ifset xemacs (recent-files-initialize) (add-hook - 'find-file-hooks + 'find-file-hook (lambda () (when (file-remote-p (buffer-file-name)) (recent-files-make-permanent))) === modified file 'etc/NEWS' --- etc/NEWS 2012-10-23 07:57:42 +0000 +++ etc/NEWS 2012-10-23 15:06:07 +0000 @@ -621,6 +621,29 @@ ** FIXME something happened to ses.el, 2012-04-17. +** Hooks renamed to avoid obsolete "-hooks" suffix: +*** semantic-lex-reset-hooks -> semantic-lex-reset-functions +*** semantic-change-hooks -> semantic-change-functions +*** semantic-edits-new-change-hooks -> semantic-edits-new-change-functions +*** semantic-edits-delete-change-hooks -> semantic-edits-delete-change-functions +*** semantic-edits-reparse-change-hooks -> semantic-edits-reparse-change-functions +*** semanticdb-save-database-hooks -> semanticdb-save-database-functions +*** c-prepare-bug-report-hooks -> c-prepare-bug-report-hook +*** rcirc-sentinel-hooks -> rcirc-sentinel-functions +*** rcirc-receive-message-hooks -> rcirc-receive-message-functions +*** rcirc-activity-hooks -> rcirc-activity-functions +*** rcirc-print-hooks -> rcirc-print-functions +*** dbus-event-error-hooks -> dbus-event-error-functions +*** eieio-pre-method-execution-hooks -> eieio-pre-method-execution-functions +*** checkdoc-style-hooks -> checkdoc-style-functions +*** checkdoc-comment-style-hooks -> checkdoc-comment-style-functions +*** archive-extract-hooks -> archive-extract-hook +*** filesets-cache-fill-content-hooks -> filesets-cache-fill-content-hook +*** hfy-post-html-hooks -> hfy-post-html-hook +*** nndiary-request-create-group-hooks -> nndiary-request-create-group-functions +*** nndiary-request-update-info-hooks -> nndiary-request-update-info-functions +*** nndiary-request-accept-article-hooks -> nndiary-request-accept-article-functions +*** gnus-subscribe-newsgroup-hooks -> gnus-subscribe-newsgroup-functions ** Obsolete packages: +++ === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-23 14:26:30 +0000 +++ lisp/ChangeLog 2012-10-23 15:06:07 +0000 @@ -1,7 +1,23 @@ +2012-10-23 Stefan Monnier + + * htmlfontify.el (hfy-post-html-hook): + * filesets.el (filesets-cache-fill-content-hook): + * arc-mode.el (archive-extract-hook): + * progmodes/cc-mode.el (c-prepare-bug-report-hook): + * net/rcirc.el (rcirc-sentinel-functions) + (rcirc-receive-message-functions, rcirc-activity-functions) + (rcirc-print-functions): + * net/dbus.el (dbus-event-error-functions): + * emacs-lisp/eieio.el (eieio-pre-method-execution-functions): + * emacs-lisp/checkdoc.el (checkdoc-style-functions) + (checkdoc-comment-style-functions): Don't use "-hooks" suffix. + * term/sun.el (sun-raw-prefix-hooks): + * mail/sendmail.el (mail-yank-hooks): Use make-obsolete-variable. + 2012-10-23 Michael Albinus - * net/tramp-smb.el (tramp-smb-maybe-open-connection): Set - `tramp-chunksize' to 1. This improves the performance. + * net/tramp-smb.el (tramp-smb-maybe-open-connection): + Set `tramp-chunksize' to 1. This improves the performance. (tramp-smb-wait-for-output): Add timeout to `tramp-accept-process-output' calls. === modified file 'lisp/arc-mode.el' --- lisp/arc-mode.el 2012-09-30 16:54:43 +0000 +++ lisp/arc-mode.el 2012-10-23 15:06:07 +0000 @@ -140,8 +140,10 @@ :type 'regexp :group 'archive) -(defcustom archive-extract-hooks nil - "Hooks to run when an archive member has been extracted." +(define-obsolete-variable-alias 'archive-extract-hooks + 'archive-extract-hook "24.3") +(defcustom archive-extract-hook nil + "Hook run when an archive member has been extracted." :type 'hook :group 'archive) ;; ------------------------------ @@ -1078,7 +1080,7 @@ ;; We will write out the archive ourselves if it is ;; part of another archive. (remove-hook 'write-contents-functions 'archive-write-file t)) - (run-hooks 'archive-extract-hooks) + (run-hooks 'archive-extract-hook) (if archive-read-only (message "Note: altering this archive is not implemented.")))) (archive-maybe-update t)) === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2012-10-16 15:17:21 +0000 +++ lisp/cedet/ChangeLog 2012-10-23 15:06:07 +0000 @@ -1,14 +1,23 @@ +2012-10-23 Stefan Monnier + + * semantic/db-file.el (semanticdb-save-database-functions): + * semantic/lex.el (semantic-lex-reset-functions): + * semantic/edit.el (semantic-change-functions) + (semantic-edits-new-change-functions) + (semantic-edits-delete-change-functions) + (semantic-edits-reparse-change-functions): Don't use "-hooks" suffix. + 2012-10-14 David Engster - * semantic.el (semantic-error-if-unparsed): New function. Raise - error if buffer was not parsed by Semantic (bug #12045). + * semantic.el (semantic-error-if-unparsed): New function. + Raise error if buffer was not parsed by Semantic (bug #12045). (navigate-menu, edit-menu, cedet-menu-map): Enable Semantic items only if buffer was parsed. Also, replace ':active' with ':enable' where necessary. * semantic/wisent/python.el - (semantic-python-get-system-include-path): Use - `python-shell-internal-send-string' if available to query Python + (semantic-python-get-system-include-path): + Use `python-shell-internal-send-string' if available to query Python for system paths. * semantic/senator.el (senator-next-tag, senator-previous-tag) @@ -57,8 +66,8 @@ 2012-10-06 Chong Yidong * semantic/bovine/grammar.el: - * semantic/wisent/grammar.el: Move from admin/grammars. Add - autoloads for bovine-grammar-mode and wisent-grammar-mode. + * semantic/wisent/grammar.el: Move from admin/grammars. + Add autoloads for bovine-grammar-mode and wisent-grammar-mode. 2012-10-02 Chong Yidong @@ -163,8 +172,8 @@ (-scheme, -makefile-misc, ede-proj-target-makefile-program) (-makefile-archive, -makefile-shared-object) (ede-proj-target-makefile-info, -grammar): New autoloads. - (ede-proj-project): Inherit from eieio-persistent-read. Specify - extension and header line. + (ede-proj-project): Inherit from eieio-persistent-read. + Specify extension and header line. (ede-proj-load, ede-proj-save): Replace with impl using eieio-persistent-read. @@ -176,27 +185,27 @@ (navigate-menu): Add menu item for Stickyfunc mode. * semantic/analyze/debug.el - (semantic-analyzer-debug-insert-include-summary): Before - dereferencing tableinner, make sure it has a value. + (semantic-analyzer-debug-insert-include-summary): + Before dereferencing tableinner, make sure it has a value. * semantic/analyze/refs.el (semantic-analyze-tag-references-default): When doing a lookup, specify noerror. (semantic--analyze-refs-full-lookup): Add optional noerror input argument. Pass to to full-lookup-simple. - (semantic-analyze-refs-impl, semantic-analyze-refs-proto): Ignore - :typemodifiers during compare. + (semantic-analyze-refs-impl, semantic-analyze-refs-proto): + Ignore :typemodifiers during compare. * semantic/bovine/c.el (semantic-lex-cpp-define): Specify limits to looking back for comment chars. (semantic--tag-similar-names-p, semantic--tag-similar-names-p-default) (semantic--tag-attribute-similar-p): New. (semantic-c-describe-environment): Handle list value of ede-object. - (semantic-lex-c-preprocessor-symbol-map-builtin): Add - __attribute_pure__. + (semantic-lex-c-preprocessor-symbol-map-builtin): + Add __attribute_pure__. - * semantic/bovine/scm.el (semantic-format-tag-prototype): Add - parent and color argument. Pass them through. + * semantic/bovine/scm.el (semantic-format-tag-prototype): + Add parent and color argument. Pass them through. * semantic/complete.el (semantic-collector-calculate-completions): Search for more matches if new prefix is a substring of old one. @@ -217,15 +226,15 @@ the (%d tags) extra string. (semanticdb-project-database): Specify :type for table. (semanticdb-create-table-for-file): Specify file-truename. - (semanticdb-synchronize, semanticdb-partial-synchronize): Restore - code that refreshes references to include files. + (semanticdb-synchronize, semanticdb-partial-synchronize): + Restore code that refreshes references to include files. * semantic/decorate/include.el (semantic-decoration-on-fileless-includes): New face. (semantic-decoration-on-fileless-include-map) (semantic-decoration-on-fileless-include-menu): New variables. - (semantic-decoration-on-includes-highlight-default): Support - includes that have a table, but are not associated with a file. + (semantic-decoration-on-includes-highlight-default): + Support includes that have a table, but are not associated with a file. (semantic-decoration-fileless-include-describe) (semantic-decoration-fileless-include-menu): New functions. (semantic-decoration-all-include-summary): Add arrows to indicate @@ -262,15 +271,15 @@ * semantic/tag.el (semantic-create-tag-proxy) (semantic-tag-set-proxy, semantic-tag-resolve-proxy): New. - * semantic/util.el (semantic-describe-buffer): Add - semantic-new-buffer-fcn-was-run. + * semantic/util.el (semantic-describe-buffer): + Add semantic-new-buffer-fcn-was-run. - * semantic/wisent/java-tags.el (semantic-get-local-variables): Add - `this' to the local variable context. + * semantic/wisent/java-tags.el (semantic-get-local-variables): + Add `this' to the local variable context. (semantic-analyze-split-name, semantic-analyze-unsplit-name): New. - * semantic/wisent/python.el (semantic-python-expand-tag): New - function. + * semantic/wisent/python.el (semantic-python-expand-tag): + New function. * srecode/compile.el (srecode-compile-templates): Add "framework" special variable support. @@ -280,7 +289,7 @@ (srecode-semantic-handle-:cpp): New functions. (srecode-semantic-apply-tag-to-dict): Move from cpp-mode function to c-mode function. - (srecode-c-apply-templates): Renamed from srecode-cpp-apply-templates. + (srecode-c-apply-templates): Rename from srecode-cpp-apply-templates. * srecode/dictionary.el (initialize-instance): Remove bogus error condition. @@ -293,8 +302,8 @@ * srecode/mode.el (srecode-minor-mode): Support the m3 menu. - * srecode/semantic.el (srecode-semantic-insert-tag): Support - system includes. + * srecode/semantic.el (srecode-semantic-insert-tag): + Support system includes. * srecode/srt-mode.el (srecode-font-lock-keywords): Update. @@ -325,8 +334,8 @@ * ede/proj-comp.el (ede-proj-makefile-insert-rules): Fix insertion of phony rule. - * ede/proj-elisp.el (ede-proj-target-elisp): Remove - ede-emacs-preload-compiler. + * ede/proj-elisp.el (ede-proj-target-elisp): + Remove ede-emacs-preload-compiler. (ede-proj-makefile-insert-rules, ede-proj-makefile-dependencies): New methods. (ede-emacs-compiler): Add 'require' macro to variables and pattern @@ -362,8 +371,8 @@ (semantic-cpp-lexer): Add semantic-lex-c-ifdef. (semantic-expand-c-tag): Check if tag is non-nil before adding it to return list - (semantic-expand-c-extern-C, semantic-expand-c-complex-type): New - functions, copied from semantic-expand-c-tag. + (semantic-expand-c-extern-C, semantic-expand-c-complex-type): + New functions, copied from semantic-expand-c-tag. (semantic-find-tags-included): New override which also searches for include tags inside of namespaces. (semantic-c-dereference-typedef): Use semantic-tag-prototype-p. @@ -371,16 +380,16 @@ * semantic/bovine/el.el: Remove emacs-lisp-mode-hook. - * semantic/complete.el (semantic-complete-post-command-hook): Exit - completion when user has deleted all characters from the prefix. + * semantic/complete.el (semantic-complete-post-command-hook): + Exit completion when user has deleted all characters from the prefix. (semantic-displayor-focus-request): Return to previous window when focussing tags. * semantic/db-el.el (semanticdb-normalize-one-tag): Make obsolete. (semanticdb-elisp-sym->tag): Use help-function-arglist instead. - * semantic/db-file.el (semanticdb-create-database): Use - semantic-tag-version instead of just semantic-version as the + * semantic/db-file.el (semanticdb-create-database): + Use semantic-tag-version instead of just semantic-version as the initializer for the :semantic-tag-version slot. * semantic/db-find.el (semanticdb-find-tags-by-class-method): @@ -394,11 +403,11 @@ (semanticdb-save-current-db, semanticdb-save-all-db): Only emit message when running interactively. - * semantic/decorate/mode.el (semantic-decoration-mode): Activate - decoration of includes by default. + * semantic/decorate/mode.el (semantic-decoration-mode): + Activate decoration of includes by default. - * semantic/doc.el (semantic-doc-snarf-comment-for-tag): Remove - comment delimiter at the end of the text. + * semantic/doc.el (semantic-doc-snarf-comment-for-tag): + Remove comment delimiter at the end of the text. * semantic/ede-grammar.el (semantic-ede-proj-target-grammar): Change aux- and pre-load-packages. @@ -412,16 +421,16 @@ (ede-proj-makefile-insert-rules): Add target specific EMACSFLAGS to raise max-specpdl-size and max-lisp-eval-depth. - * semantic/find.el (semantic-find-tags-included): Make - overridable. + * semantic/find.el (semantic-find-tags-included): + Make overridable. * semantic/fw.el (semantic-alias-obsolete) (semantic-varalias-obsolete): Use byte-compile-warn. (semantic-find-file-noselect): Disable font lock by calling global-font-lock-mode. - * semantic/grammar.el (semantic-grammar-create-package): Fix - message. + * semantic/grammar.el (semantic-grammar-create-package): + Fix message. (semantic-grammar-batch-build-one-package): When generating parsers in batch-mode, ignore version control and make sure we do not use cached versions. @@ -433,16 +442,16 @@ (semantic-lex-spp-lex-text-string): Instead of only setting the lexer, call the major mode's setup function. - * semantic/scope.el (semantic-analyze-scoped-types-default): Use - semantic-tag-prototype-p. + * semantic/scope.el (semantic-analyze-scoped-types-default): + Use semantic-tag-prototype-p. (semantic-analyze-scope-nested-tags-default): Make sure we don't return tags we already have in scopetypes. * semantic/symref/filter.el (semantic-symref-test-count-hits-in-tag): Restore. - * semantic/wisent/comp.el (wisent-BITS-PER-WORD): Use - most-positive-fixnum if available. + * semantic/wisent/comp.el (wisent-BITS-PER-WORD): + Use most-positive-fixnum if available. * semantic/wisent/javascript.el (semantic-tag-protection) (semantic-analyze-scope-calculate-access) @@ -477,8 +486,8 @@ 2012-10-01 Jan Moringen * semantic/idle.el - (semantic-idle-breadcrumbs--display-in-header-line): Escape - %-characters to avoid erroneous expansion in header line. + (semantic-idle-breadcrumbs--display-in-header-line): + Escape %-characters to avoid erroneous expansion in header line. (semantic-idle-breadcrumbs--display-in-mode-line): Likewise. * semantic/wisent/python.el (wisent-python-reconstitute-function-tag) @@ -514,8 +523,8 @@ * semantic/wisent/python.el (wisent-python-string-start-re) (wisent-python-string-re, wisent-python-forward-string) - (wisent-python-forward-line,wisent-python-lex-string): New - variables. + (wisent-python-forward-line,wisent-python-lex-string): + New variables. (wisent-python-forward-balanced-expression): New function. 2012-10-01 Pete Beardmore @@ -528,16 +537,16 @@ (semantic-displayor-tooltip-mode) (semantic-displayor-tooltip-initial-max-tags) (semantic-displayor-tooltip-max-tags): New defcustoms. - (semantic-displayor-tooltip): Use new variables as initforms. Use - new slot `mode' instead of `force-show'. Rename `max-tags' to + (semantic-displayor-tooltip): Use new variables as initforms. + Use new slot `mode' instead of `force-show'. Rename `max-tags' to `max-tags-initial'. (semantic-displayor-show-request): Display completions according to new modes, and make variable names clearer. (semantic-displayor-tooltip::semantic-displayor-scroll-request): Use new max-tags-initial slot. - * semantic/idle.el (semantic-idle-local-symbol-highlight): Make - sure there actually is a tag at point. + * semantic/idle.el (semantic-idle-local-symbol-highlight): + Make sure there actually is a tag at point. (semantic-idle-completion-list-default): Report errors as messages if semantic-idle-scheduler-verbose-flag is non-nil. @@ -548,13 +557,13 @@ 2012-10-01 Alex Ott - * semantic/idle.el (semantic-idle-scheduler-enabled-p): Fix - file-checking. + * semantic/idle.el (semantic-idle-scheduler-enabled-p): + Fix file-checking. 2012-10-01 Darren Hoo (tiny change) - * semantic/db-find.el (semanticdb-find-default-throttle): Make - buffer-local. + * semantic/db-find.el (semanticdb-find-default-throttle): + Make buffer-local. (semanticdb-strip-find-results): Check for existing :filename attribute, so that file information from GNU Global is not lost. @@ -1001,7 +1010,7 @@ (ede-customize-forms-menu): Prevent error if there is no project. (ede-load-project-file): Set ede-constructing to the thing being constructed, instead of t. - (ede-project-force-load): Deleted. + (ede-project-force-load): Delete. * ede/base.el: * ede/auto.el: @@ -1011,7 +1020,7 @@ (autoconf-parameters-for-macro): Parse multiline parameters of macros. Optionally ignore case and at bol for macro. (autoconf-parameter-strip): Use greedy match for newlines. - (autoconf-new-automake-string): Deleted. + (autoconf-new-automake-string): Delete. (autoconf-new-program): Use SRecode to fill an empty file. * ede/cpp-root.el (ede-create-lots-of-projects-under-dir): @@ -1046,7 +1055,7 @@ (project-am-scan-for-targets): Scan also over project-am-meta-type-alist. (ede-system-include-path): Simple implementation. - (ede-find-target): Deleted. EDE core takes care of this. + (ede-find-target): Delete. EDE core takes care of this. (ede-buffer-mine): Create the searched filename as relative. (project-am-load): Simplify, using autoconf-edit. (project-am-extract-package-info): Fix separators. @@ -1063,7 +1072,7 @@ (ede-proj-target-makefile-objectcode): Quote initforms. Support lex and yacc. - * ede/proj-prog.el (ede-proj-makefile-insert-rules): Removed. + * ede/proj-prog.el (ede-proj-makefile-insert-rules): Remove. (ede-proj-makefile-insert-variables): New, add LDDEPS. (ede-proj-makefile-insert-automake-post-variables): Add LDADD variable. Use ldlibs-local slot. Add a -l to ldlibs strings. @@ -1158,7 +1167,7 @@ * semantic/util.el (semantic-hack-search) (semantic-recursive-find-nonterminal-by-name) - (semantic-current-tag-interactive): Deleted. + (semantic-current-tag-interactive): Delete. (semantic-describe-buffer): Fix expand-nonterminal. Add lex-syntax-mods, type relation separator char, and command separation char. @@ -1191,7 +1200,7 @@ (semantic-idle-truncate-long-summaries): New option. * semantic/ia.el (semantic-ia-cache) - (semantic-ia-get-completions): Deleted. Callers changed. + (semantic-ia-get-completions): Delete. Callers changed. (semantic-ia-show-variants): New command. (semantic-ia-show-doc): If doc is empty, don't make a temp buffer. (semantic-ia-show-summary): If there isn't anything to show, say so. === modified file 'lisp/cedet/semantic/db-file.el' --- lisp/cedet/semantic/db-file.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/semantic/db-file.el 2012-10-23 15:06:07 +0000 @@ -70,7 +70,9 @@ :group 'semanticdb :type nil) -(defcustom semanticdb-save-database-hooks nil +(define-obsolete-variable-alias 'semanticdb-save-database-hooks + 'semanticdb-save-database-functions "24.3") +(defcustom semanticdb-save-database-functions nil "Abnormal hook run after a database is saved. Each function is called with one argument, the object representing the database recently written." @@ -251,7 +253,7 @@ (message "Save Error: %S: %s" (car (cdr foo)) objname) (error "%S" (car (cdr foo)))))))) - (run-hook-with-args 'semanticdb-save-database-hooks + (run-hook-with-args 'semanticdb-save-database-functions (or DB semanticdb-current-database)) ;;(message "Saving tag summary for %s...done" objname) ) === modified file 'lisp/cedet/semantic/edit.el' --- lisp/cedet/semantic/edit.el 2012-01-19 07:21:25 +0000 +++ lisp/cedet/semantic/edit.el 2012-10-23 15:06:07 +0000 @@ -72,7 +72,9 @@ For language specific hooks, make sure you define this as a local hook.") -(defvar semantic-change-hooks +(define-obsolete-variable-alias 'semantic-change-hooks + 'semantic-change-functions "24.3") +(defvar semantic-change-functions '(semantic-edits-change-function-handle-changes) "Abnormal hook run when semantic detects a change in a buffer. Each hook function must take three arguments, identical to the @@ -89,11 +91,15 @@ For language specific hooks, make sure you define this as a local hook. Not used yet; part of the next generation reparse mechanism.") -(defvar semantic-edits-new-change-hooks nil +(define-obsolete-variable-alias 'semantic-edits-new-change-hooks + 'semantic-edits-new-change-functions "24.3") +(defvar semantic-edits-new-change-functions nil "Abnormal hook run when a new change is found. Functions must take one argument representing an overlay on that change.") -(defvar semantic-edits-delete-change-hooks nil +(define-obsolete-variable-alias 'semantic-edits-delete-change-hooks + 'semantic-edits-delete-change-functions "24.3") +(defvar semantic-edits-delete-change-functions nil "Abnormal hook run before a change overlay is deleted. Deleted changes occur when multiple changes are merged. Functions must take one argument representing an overlay being deleted.") @@ -104,7 +110,9 @@ will be moved. Functions must take one argument representing an overlay being moved.") -(defvar semantic-edits-reparse-change-hooks nil +(define-obsolete-variable-alias 'semantic-edits-reparse-change-hooks + 'semantic-edits-reparse-change-functions "24.3") +(defvar semantic-edits-reparse-change-functions nil "Abnormal hook run after a change results in a reparse. Functions are called before the overlay is deleted, and after the incremental reparse.") @@ -133,7 +141,7 @@ (setq semantic-unmatched-syntax-cache-check t) (let ((inhibit-point-motion-hooks t) ) - (run-hook-with-args 'semantic-change-hooks start end length) + (run-hook-with-args 'semantic-change-functions start end length) )) (defun semantic-changes-in-region (start end &optional buffer) @@ -168,7 +176,7 @@ ;; function will be removed from the list of active change ;; functions. (condition-case nil - (run-hook-with-args 'semantic-edits-new-change-hooks o) + (run-hook-with-args 'semantic-edits-new-change-functions o) (error nil))) (let ((tmp changes-in-change)) ;; Find greatest bounds of all changes @@ -188,7 +196,7 @@ ;; Delete other changes. They are now all bound here. (while changes-in-change (condition-case nil - (run-hook-with-args 'semantic-edits-delete-change-hooks + (run-hook-with-args 'semantic-edits-delete-change-functions (car changes-in-change)) (error nil)) (semantic-overlay-delete (car changes-in-change)) @@ -198,7 +206,7 @@ (defsubst semantic-edits-flush-change (change) "Flush the CHANGE overlay." (condition-case nil - (run-hook-with-args 'semantic-edits-delete-change-hooks + (run-hook-with-args 'semantic-edits-delete-change-functions change) (error nil)) (semantic-overlay-delete change)) === modified file 'lisp/cedet/semantic/lex.el' --- lisp/cedet/semantic/lex.el 2012-10-01 18:10:29 +0000 +++ lisp/cedet/semantic/lex.el 2012-10-23 15:06:07 +0000 @@ -729,7 +729,9 @@ start position of the block, and STREAM is the list of tokens in that block.") -(defvar semantic-lex-reset-hooks nil +(define-obsolete-variable-alias 'semantic-lex-reset-hooks + 'semantic-lex-reset-functions "24.3") +(defvar semantic-lex-reset-functions nil "Abnormal hook used by major-modes to reset lexical analyzers. Hook functions are called with START and END values for the current lexical pass. Should be set with `add-hook', specifying @@ -771,7 +773,7 @@ ;; Make sure the state of block parsing starts over. (setq semantic-lex-block-streams nil) ;; Allow specialty reset items. - (run-hook-with-args 'semantic-lex-reset-hooks start end) + (run-hook-with-args 'semantic-lex-reset-functions start end) ;; Lexing state. (let* (;(starttime (current-time)) (starting-position (point)) === modified file 'lisp/emacs-lisp/checkdoc.el' --- lisp/emacs-lisp/checkdoc.el 2012-05-04 23:16:47 +0000 +++ lisp/emacs-lisp/checkdoc.el 2012-10-23 15:06:07 +0000 @@ -124,7 +124,7 @@ ;; Adding your own checks: ;; ;; You can experiment with adding your own checks by setting the -;; hooks `checkdoc-style-hooks' and `checkdoc-comment-style-hooks'. +;; hooks `checkdoc-style-functions' and `checkdoc-comment-style-hooks'. ;; Return a string which is the error you wish to report. The cursor ;; position should be preserved. ;; @@ -274,17 +274,21 @@ :type 'boolean) ;;;###autoload(put 'checkdoc-arguments-in-order-flag 'safe-local-variable 'booleanp) -(defvar checkdoc-style-hooks nil - "Hooks called after the standard style check is completed. -All hooks must return nil or a string representing the error found. +(define-obsolete-variable-alias 'checkdoc-style-hooks + 'checkdoc-style-functions "24.3") +(defvar checkdoc-style-functions nil + "Hook run after the standard style check is completed. +All functions must return nil or a string representing the error found. Useful for adding new user implemented commands. Each hook is called with two parameters, (DEFUNINFO ENDPOINT). DEFUNINFO is the return value of `checkdoc-defun-info'. ENDPOINT is the location of end of the documentation string.") -(defvar checkdoc-comment-style-hooks nil - "Hooks called after the standard comment style check is completed. +(define-obsolete-variable-alias 'checkdoc-comment-style-hooks + checkdoc-comment-style-functions "24.3") +(defvar checkdoc-comment-style-functions nil + "Hook run after the standard comment style check is completed. Must return nil if no errors are found, or a string describing the problem discovered. This is useful for adding additional checks.") @@ -1843,7 +1847,7 @@ ;; and reliance on the Ispell program. (checkdoc-ispell-docstring-engine e) ;; User supplied checks - (save-excursion (checkdoc-run-hooks 'checkdoc-style-hooks fp e)) + (save-excursion (checkdoc-run-hooks 'checkdoc-style-functions fp e)) ;; Done! ))) @@ -2353,7 +2357,7 @@ err (or ;; Generic Full-file checks (should be comment related) - (checkdoc-run-hooks 'checkdoc-comment-style-hooks) + (checkdoc-run-hooks 'checkdoc-comment-style-functions) err)) ;; Done with full file comment checks err))) === modified file 'lisp/emacs-lisp/eieio.el' --- lisp/emacs-lisp/eieio.el 2012-10-14 01:42:48 +0000 +++ lisp/emacs-lisp/eieio.el 2012-10-23 15:06:07 +0000 @@ -2066,7 +2066,9 @@ During executions, the list is first generated, then as each next method is called, the next method is popped off the stack.") -(defvar eieio-pre-method-execution-hooks nil +(define-obsolete-variable-alias 'eieio-pre-method-execution-hooks + 'eieio-pre-method-execution-functions "24.3") +(defvar eieio-pre-method-execution-functions nil "Abnormal hook run just before an EIEIO method is executed. The hook function must accept one argument, the list of forms about to be executed.") @@ -2172,7 +2174,7 @@ (eieiomt-method-list method method-primary nil))) ) - (run-hook-with-args 'eieio-pre-method-execution-hooks + (run-hook-with-args 'eieio-pre-method-execution-functions primarymethodlist) ;; Now loop through all occurrences forms which we must execute @@ -2277,7 +2279,7 @@ ;; Do the regular implementation here. - (run-hook-with-args 'eieio-pre-method-execution-hooks + (run-hook-with-args 'eieio-pre-method-execution-functions lambdas) (setq lastval (apply (car lambdas) newargs)) === modified file 'lisp/filesets.el' --- lisp/filesets.el 2012-09-17 05:41:04 +0000 +++ lisp/filesets.el 2012-10-23 15:06:07 +0000 @@ -403,8 +403,10 @@ (sexp :tag "Other" :value nil))) :group 'filesets) -(defcustom filesets-cache-fill-content-hooks nil - "Hooks to run when writing the contents of filesets' cache file. +(define-obsolete-variable-alias 'filesets-cache-fill-content-hooks + 'filesets-cache-fill-content-hook "24.3") +(defcustom filesets-cache-fill-content-hook nil + "Hook run when writing the contents of filesets' cache file. The hook is called with the cache file as current buffer and the cursor at the last position. I.e. each hook has to make sure that the cursor is @@ -2414,7 +2416,7 @@ (when filesets-cache-hostname-flag (insert (format "(setq filesets-cache-hostname %S)" (system-name))) (newline 2)) - (run-hooks 'filesets-cache-fill-content-hooks) + (run-hooks 'filesets-cache-fill-content-hook) (write-file filesets-menu-cache-file)) (setq filesets-has-changed-flag nil) (setq filesets-update-cache-file-flag nil))) === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2012-10-17 03:44:00 +0000 +++ lisp/gnus/ChangeLog 2012-10-23 15:06:07 +0000 @@ -1,3 +1,11 @@ +2012-10-23 Stefan Monnier + + * nndiary.el (nndiary-request-create-group-functions) + (nndiary-request-update-info-functions) + (nndiary-request-accept-article-functions): + * gnus-start.el (gnus-subscribe-newsgroup-functions): Don't use + "-hooks" suffix. + 2012-10-17 Kazuhiro Ito (tiny change) * starttls.el (starttls-extra-arguments): Doc fix. @@ -110,7 +118,7 @@ 2012-09-05 Martin Stjernholm - * gnus-demon.el (gnus-demon-init): Fixed regression when IDLE is t and + * gnus-demon.el (gnus-demon-init): Fix regression when IDLE is t and TIME is set. 2012-09-05 Juri Linkov @@ -571,7 +579,7 @@ * gnus.el: Register gnus-registry functions. * gnus-registry.el (gnus-try-warping-via-registry): - Moved here and indent. + Move here and indent. * gnus-int.el (gnus-warp-to-article): Check whether the registry is enabled before warping. @@ -703,7 +711,7 @@ (message-multi-smtp-send-mail): Respect the X-Message-SMTP-Method header to implement multi-SMTP functionality. - * gnus-agent.el (gnus-agent-send-mail-function): Removed. + * gnus-agent.el (gnus-agent-send-mail-function): Remove. (gnus-agentize): Don't set it. (gnus-agent-send-mail): Don't use it. @@ -844,8 +852,8 @@ 2012-06-10 Lars Magne Ingebrigtsen - * gnus-group.el (gnus-group-get-new-news): Respect - `gnus-group-use-permanent-levels', as documented (bug#11638). + * gnus-group.el (gnus-group-get-new-news): + Respect `gnus-group-use-permanent-levels', as documented (bug#11638). 2012-06-10 Dave Abrahams @@ -985,7 +993,7 @@ (shr-insert): Allow the natural width to be computed for tables again. (shr-tag-table-1): Rework how the natural widths are computed by rendering the table a third time. - (shr-natural-width): Removed. + (shr-natural-width): Remove. (shr-buffer-width): New function. (shr-expand-newlines): Use it. @@ -1396,8 +1404,8 @@ 2012-01-04 Wolfgang Jenkner (tiny change) - * gnus-agent.el (gnus-agent-load-local): Recompute - gnus-agent-article-local on changing method. + * gnus-agent.el (gnus-agent-load-local): + Recompute gnus-agent-article-local on changing method. 2012-01-04 Lars Magne Ingebrigtsen @@ -1689,8 +1697,8 @@ 2011-09-27 Daiki Ueno - * plstore.el (plstore-select-keys, plstore-encrypt-to): Clarify - documentation. + * plstore.el (plstore-select-keys, plstore-encrypt-to): + Clarify documentation. 2011-09-27 Lars Magne Ingebrigtsen === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2012-07-24 22:17:17 +0000 +++ lisp/gnus/gnus-start.el 2012-10-23 15:06:07 +0000 @@ -291,7 +291,9 @@ function (repeat function))) -(defcustom gnus-subscribe-newsgroup-hooks nil +(define-obsolete-variable-alias 'gnus-subscribe-newsgroup-hooks + 'gnus-subscribe-newsgroup-functions "24.3") +(defcustom gnus-subscribe-newsgroup-functions nil "*Hooks run after you subscribe to a new group. The hooks will be called with new group's name as argument." :version "22.1" @@ -639,7 +641,7 @@ gnus-level-killed (gnus-group-entry (or next "dummy.group"))) (gnus-request-update-group-status newsgroup 'subscribe) (gnus-message 5 "Subscribe newsgroup: %s" newsgroup) - (run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup) + (run-hook-with-args 'gnus-subscribe-newsgroup-functions newsgroup) t)) (defun gnus-read-active-file-p () === modified file 'lisp/gnus/nndiary.el' --- lisp/gnus/nndiary.el 2012-01-19 07:21:25 +0000 +++ lisp/gnus/nndiary.el 2012-10-23 15:06:07 +0000 @@ -179,22 +179,28 @@ :group 'nndiary) -(defcustom nndiary-request-create-group-hooks nil - "*Hooks to run after `nndiary-request-create-group' is executed. -The hooks will be called with the full group name as argument." - :group 'nndiary - :type 'hook) - -(defcustom nndiary-request-update-info-hooks nil - "*Hooks to run after `nndiary-request-update-info-group' is executed. -The hooks will be called with the full group name as argument." - :group 'nndiary - :type 'hook) - -(defcustom nndiary-request-accept-article-hooks nil - "*Hooks to run before accepting an article. +(define-obsolete-variable-alias 'nndiary-request-create-group-hooks + 'nndiary-request-create-group-functions "24.3") +(defcustom nndiary-request-create-group-functions nil + "*Hook run after `nndiary-request-create-group' is executed. +The hook functions will be called with the full group name as argument." + :group 'nndiary + :type 'hook) + +(define-obsolete-variable-alias 'nndiary-request-update-info-hooks + 'nndiary-request-update-info-functions "24.3") +(defcustom nndiary-request-update-info-functions nil + "*Hook run after `nndiary-request-update-info-group' is executed. +The hook functions will be called with the full group name as argument." + :group 'nndiary + :type 'hook) + +(define-obsolete-variable-alias 'nndiary-request-accept-article-hooks + 'nndiary-request-accept-article-functions "24.3") +(defcustom nndiary-request-accept-article-functions nil + "*Hook run before accepting an article. Executed near the beginning of `nndiary-request-accept-article'. -The hooks will be called with the article in the current buffer." +The hook functions will be called with the article in the current buffer." :group 'nndiary :type 'hook) @@ -541,7 +547,7 @@ (setcar active (apply 'min articles)) (setcdr active (apply 'max articles)))) (nnmail-save-active nndiary-group-alist nndiary-active-file) - (run-hook-with-args 'nndiary-request-create-group-hooks + (run-hook-with-args 'nndiary-request-create-group-functions (gnus-group-prefixed-name group (list "nndiary" server))) t)) @@ -633,7 +639,7 @@ (deffoo nndiary-request-accept-article (group &optional server last) (nndiary-possibly-change-directory group server) (nnmail-check-syntax) - (run-hooks 'nndiary-request-accept-article-hooks) + (run-hooks 'nndiary-request-accept-article-functions) (when (nndiary-schedule) (let (result) (when nnmail-cache-accepted-message-ids @@ -804,7 +810,7 @@ (gnus-info-set-read info (gnus-update-read-articles (gnus-info-group info) unread t))) )) - (run-hook-with-args 'nndiary-request-update-info-hooks + (run-hook-with-args 'nndiary-request-update-info-functions (gnus-info-group info)) t)) === modified file 'lisp/htmlfontify.el' --- lisp/htmlfontify.el 2012-09-25 04:13:02 +0000 +++ lisp/htmlfontify.el 2012-10-23 15:06:07 +0000 @@ -249,7 +249,8 @@ :tag "init-kludge-hooks" :type '(hook)) -(defcustom hfy-post-html-hooks nil +(define-obsolete-variable-alias 'hfy-post-html-hooks 'hfy-post-html-hook "24.3") +(defcustom hfy-post-html-hook nil "List of functions to call after creating and filling the HTML buffer. These functions will be called with the HTML buffer as the current buffer." :group 'htmlfontify @@ -1786,7 +1787,7 @@ ;;(message "inserting footer") (insert (funcall hfy-page-footer file))) ;; call any post html-generation hooks: - (run-hooks 'hfy-post-html-hooks) + (run-hooks 'hfy-post-html-hook) ;; return the html buffer (set-buffer-modified-p nil) html-buffer)) === modified file 'lisp/mail/sendmail.el' --- lisp/mail/sendmail.el 2012-09-25 04:13:02 +0000 +++ lisp/mail/sendmail.el 2012-10-23 15:06:07 +0000 @@ -243,15 +243,14 @@ :type 'integer :group 'sendmail) -;; FIXME make it really obsolete. (defvar mail-yank-hooks nil "Obsolete hook for modifying a citation just inserted in the mail buffer. Each hook function can find the citation between (point) and (mark t). And each hook function should leave point and mark around the citation text as modified. - This is a normal hook, misnamed for historical reasons. -It is semi-obsolete and mail agents should no longer use it.") +It is obsolete and mail agents should no longer use it.") +(make-obsolete-variable 'mail-yank-hooks 'mail-citation-hook "19.34") ;;;###autoload (defcustom mail-citation-hook nil === modified file 'lisp/mh-e/ChangeLog' --- lisp/mh-e/ChangeLog 2012-08-28 16:01:59 +0000 +++ lisp/mh-e/ChangeLog 2012-10-23 15:06:07 +0000 @@ -1,3 +1,7 @@ +2012-10-23 Stefan Monnier + + * mh-letter.el (mh-yank-hooks): Use make-obsolete-variable. + 2012-04-25 Stefan Monnier * mh-utils.el (minibuffer-completing-file-name): Don't declare, unused. === modified file 'lisp/mh-e/mh-e.el' --- lisp/mh-e/mh-e.el 2012-01-19 07:21:25 +0000 +++ lisp/mh-e/mh-e.el 2012-10-23 15:06:07 +0000 @@ -3189,7 +3189,9 @@ :group 'mh-letter :package-version '(MH-E . "8.0")) -(defcustom-mh mh-kill-folder-suppress-prompt-hooks '(mh-search-p) +(define-obsolete-variable-alias 'mh-kill-folder-suppress-prompt-hooks + 'mh-kill-folder-suppress-prompt-functions "24.3") +(defcustom-mh mh-kill-folder-suppress-prompt-functions '(mh-search-p) "Abnormal hook run at the beginning of \\\\[mh-kill-folder]. The hook functions are called with no arguments and should return === modified file 'lisp/mh-e/mh-letter.el' --- lisp/mh-e/mh-letter.el 2012-01-19 07:21:25 +0000 +++ lisp/mh-e/mh-letter.el 2012-10-23 15:06:07 +0000 @@ -66,8 +66,9 @@ And each hook function should leave point and mark around the citation text as modified. -This is a normal hook, misnamed for historical reasons. It is -semi-obsolete and is only used if `mail-citation-hook' is nil.") +This is a normal hook, misnamed for historical reasons. +It is obsolete and is only used if `mail-citation-hook' is nil.") +(make-obsolete-variable 'mh-yank-hooks 'mail-citation-hook "19.34") === modified file 'lisp/net/dbus.el' --- lisp/net/dbus.el 2012-08-15 16:29:11 +0000 +++ lisp/net/dbus.el 2012-10-23 15:06:07 +0000 @@ -152,7 +152,9 @@ (dbus-error (when dbus-debug (signal (car err) (cdr err)))))) (font-lock-add-keywords 'emacs-lisp-mode '("\\")) -(defvar dbus-event-error-hooks nil +(define-obsolete-variable-alias 'dbus-event-error-hooks + 'dbus-event-error-functions "24.3") +(defvar dbus-event-error-functions nil "Functions to be called when a D-Bus error happens in the event handler. Every function must accept two arguments, the event and the error variable caught in `condition-case' by `dbus-error'.") @@ -947,7 +949,7 @@ (dbus-method-error-internal (nth 1 event) (nth 4 event) (nth 3 event) (cadr err)))) ;; Propagate D-Bus error messages. - (run-hook-with-args 'dbus-event-error-hooks event err) + (run-hook-with-args 'dbus-event-error-functions event err) (when (or dbus-debug (= dbus-message-type-error (nth 2 event))) (signal (car err) (cdr err)))))) === modified file 'lisp/net/rcirc.el' --- lisp/net/rcirc.el 2012-08-28 16:01:59 +0000 +++ lisp/net/rcirc.el 2012-10-23 15:06:07 +0000 @@ -300,7 +300,9 @@ :type '(repeat string) :group 'rcirc) -(defcustom rcirc-print-hooks nil +(define-obsolete-variable-alias 'rcirc-print-hooks + 'rcirc-print-functions "24.3") +(defcustom rcirc-print-functions nil "Hook run after text is printed. Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT." :type 'hook @@ -647,7 +649,9 @@ "] " text))))) -(defvar rcirc-sentinel-hooks nil +(define-obsolete-variable-alias 'rcirc-sentinel-hooks + 'rcirc-sentinel-functions "24.3") +(defvar rcirc-sentinel-functions nil "Hook functions called when the process sentinel is called. Functions are called with PROCESS and SENTINEL arguments.") @@ -664,7 +668,7 @@ sentinel (process-status process)) (not rcirc-target)) (rcirc-disconnect-buffer))) - (run-hook-with-args 'rcirc-sentinel-hooks process sentinel)))) + (run-hook-with-args 'rcirc-sentinel-functions process sentinel)))) (defun rcirc-disconnect-buffer (&optional buffer) (with-current-buffer (or buffer (current-buffer)) @@ -684,7 +688,9 @@ (process-list)) ps)) -(defvar rcirc-receive-message-hooks nil +(define-obsolete-variable-alias 'rcirc-receive-message-hooks + 'rcirc-receive-message-functions "24.3") +(defvar rcirc-receive-message-functions nil "Hook functions run when a message is received from server. Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.") (defun rcirc-filter (process output) @@ -738,7 +744,7 @@ (if (not (fboundp handler)) (rcirc-handler-generic process cmd sender args text) (funcall handler process sender args text)) - (run-hook-with-args 'rcirc-receive-message-hooks + (run-hook-with-args 'rcirc-receive-message-functions process cmd sender args text))) (message "UNHANDLED: %s" text))) @@ -1625,7 +1631,7 @@ (rcirc-log process sender response target text)) (sit-for 0) ; displayed text before hook - (run-hook-with-args 'rcirc-print-hooks + (run-hook-with-args 'rcirc-print-functions process sender response target text))))) (defun rcirc-generate-log-filename (process target) @@ -1927,7 +1933,9 @@ (key-description (this-command-keys)) " for low priority activity.")))))))) -(defvar rcirc-activity-hooks nil +(define-obsolete-variable-alias 'rcirc-activity-hooks + 'rcirc-activity-functions "24.3") +(defvar rcirc-activity-functions nil "Hook to be run when there is channel activity. Functions are called with a single argument, the buffer with the @@ -1950,7 +1958,7 @@ (unless (and (equal rcirc-activity old-activity) (member type old-types)) (rcirc-update-activity-string))))) - (run-hook-with-args 'rcirc-activity-hooks buffer)) + (run-hook-with-args 'rcirc-activity-functions buffer)) (defun rcirc-clear-activity (buffer) "Clear the BUFFER activity." === modified file 'lisp/progmodes/cc-mode.el' --- lisp/progmodes/cc-mode.el 2012-05-26 02:34:16 +0000 +++ lisp/progmodes/cc-mode.el 2012-10-23 15:06:07 +0000 @@ -1703,7 +1703,9 @@ (message "Using CC Mode version %s" c-version) (c-keep-region-active)) -(defvar c-prepare-bug-report-hooks nil) +(define-obsolete-variable-alias 'c-prepare-bug-report-hooks + 'c-prepare-bug-report-hook "24.3") +(defvar c-prepare-bug-report-hook nil) ;; Dynamic variables used by reporter. (defvar reporter-prompt-for-summary-p) @@ -1770,7 +1772,7 @@ lookup-syntax-properties)) vars) (lambda () - (run-hooks 'c-prepare-bug-report-hooks) + (run-hooks 'c-prepare-bug-report-hook) (insert (format "Buffer Style: %s\nc-emacs-features: %s\n" style c-features))))))) === modified file 'lisp/subr.el' --- lisp/subr.el 2012-10-23 01:18:47 +0000 +++ lisp/subr.el 2012-10-23 15:06:07 +0000 @@ -1260,12 +1260,10 @@ (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) -(make-obsolete-variable 'x-sent-selection-hooks - 'x-sent-selection-functions "22.1") +(define-obsolete-variable-alias 'x-lost-selection-hooks + 'x-lost-selection-functions "22.1") +(define-obsolete-variable-alias 'x-sent-selection-hooks + 'x-sent-selection-functions "22.1") ;; This was introduced in 21.4 for pre-unicode unification. That ;; usage was rendered obsolete in 23.1 which uses Unicode internally. === modified file 'lisp/term/sun.el' --- lisp/term/sun.el 2012-01-19 07:21:25 +0000 +++ lisp/term/sun.el 2012-10-23 15:06:07 +0000 @@ -123,6 +123,7 @@ (defvar sun-raw-prefix-hooks nil "List of forms to evaluate after setting sun-raw-prefix.") +(make-obsolete-variable 'sun-raw-prefix-hooks 'term-setup-hook "21.1") === modified file 'lisp/vc/ediff-mult.el' --- lisp/vc/ediff-mult.el 2012-01-19 07:21:25 +0000 +++ lisp/vc/ediff-mult.el 2012-10-23 15:06:07 +0000 @@ -217,8 +217,9 @@ :type 'hook :group 'ediff-mult) -(defcustom ediff-before-session-group-setup-hooks nil - "Hooks to run before Ediff arranges the window for group-level operations. +(defcustom ediff-before-session-group-setup-hooks + nil ;FIXME: Bad name (should be -hook or -functions) and never run?? + "Hook run before Ediff arranges the window for group-level operations. It is used by commands such as `ediff-directories'. This hook can be used to save the previous window config, which can be restored on `ediff-quit', `ediff-suspend', or `ediff-quit-session-group-hook'." ------------------------------------------------------------ revno: 110629 committer: Michael Albinus + + * net/tramp-smb.el (tramp-smb-maybe-open-connection): Set + `tramp-chunksize' to 1. This improves the performance. + (tramp-smb-wait-for-output): Add timeout to + `tramp-accept-process-output' calls. + 2012-10-23 Chong Yidong * faces.el (font-list-limit): Define as an obsolete variable. === modified file 'lisp/net/tramp-smb.el' --- lisp/net/tramp-smb.el 2012-10-09 12:49:02 +0000 +++ lisp/net/tramp-smb.el 2012-10-23 14:26:30 +0000 @@ -1677,11 +1677,11 @@ (tramp-set-connection-property vec "smbserver-version" smbserver-version)))) - ;; Set chunksize. Otherwise, `tramp-send-string' might - ;; try it itself. + ;; Set chunksize to 1. smbclient reads its input + ;; character by character; if we send the string + ;; at once, it is read painfully slow. (tramp-set-connection-property p "smb-share" share) - (tramp-set-connection-property - p "chunksize" tramp-chunksize)) + (tramp-set-connection-property p "chunksize" 1)) ;; Check for the error reason. If it was due to wrong ;; password, reestablish the connection. We cannot @@ -1717,7 +1717,7 @@ (while (and (not found) (not err) (memq (process-status p) '(run open))) ;; Accept pending output. - (tramp-accept-process-output p) + (tramp-accept-process-output p 0.1) ;; Search for prompt. (goto-char (point-min)) @@ -1731,7 +1731,7 @@ (while (and (not found) (memq (process-status p) '(run open))) ;; Accept pending output. - (tramp-accept-process-output p) + (tramp-accept-process-output p 0.1) ;; Search for prompt. (goto-char (point-min)) ------------------------------------------------------------ revno: 110628 fixes bug: http://debbugs.gnu.org/12706 committer: Paul Eggert branch nick: trunk timestamp: Tue 2012-10-23 00:57:42 -0700 message: Fix outdated timestamp documentation in Elisp manual. * doc/lispref/files.texi (File Attributes): * doc/lispref/text.texi (Undo): Time stamp resolution is now 1 picosecond, not 1 second. * etc/NEWS: Document increased precision in undo list. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-10-23 02:39:13 +0000 +++ doc/lispref/ChangeLog 2012-10-23 07:57:42 +0000 @@ -1,3 +1,10 @@ +2012-10-23 Paul Eggert + + Fix outdated timestamp documentation in Elisp manual (bug#12706). + * files.texi (File Attributes): + * text.texi (Undo): + Time stamp resolution is now 1 picosecond, not 1 second. + 2012-10-23 Chong Yidong * display.texi (Font Lookup): Remove font-list-limit. === modified file 'doc/lispref/files.texi' --- doc/lispref/files.texi 2012-10-01 02:07:14 +0000 +++ doc/lispref/files.texi 2012-10-23 07:57:42 +0000 @@ -1220,9 +1220,8 @@ The file's @acronym{GID}, likewise. @item -The time of last access, as a list of two integers. -The first integer has the high-order 16 bits of time, -the second has the low 16 bits. (This is similar to the +The time of last access, as a list of four integers @code{(@var{sec-high} +@var{sec-low} @var{microsec} @var{picosec})}. (This is similar to the value of @code{current-time}; see @ref{Time of Day}.) Note that on some FAT-based filesystems, only the date of last access is recorded, so this time will always hold the midnight of the day of last access. === modified file 'doc/lispref/text.texi' --- doc/lispref/text.texi 2012-09-18 05:14:42 +0000 +++ doc/lispref/text.texi 2012-10-23 07:57:42 +0000 @@ -1233,11 +1233,12 @@ positive, point was at the beginning of the deleted text, otherwise it was at the end. -@item (t @var{high} . @var{low}) +@item (t @var{sec-high} @var{sec-low} @var{microsec} @var{picosec}) This kind of element indicates that an unmodified buffer became -modified. The elements @var{high} and @var{low} are two integers, each -recording 16 bits of the visited file's modification time as of when it -was previously visited or saved. @code{primitive-undo} uses those +modified. The list @code{(@var{sec-high} @var{sec-low} @var{microsec} +@var{picosec})} represents the visited file's modification time as of +when it was previously visited or saved, using the same format as +@code{current-time}; see @ref{Time of Day}. @code{primitive-undo} uses those values to determine whether to mark the buffer as unmodified once again; it does so only if the file's modification time matches those numbers. === modified file 'etc/ChangeLog' --- etc/ChangeLog 2012-10-21 01:35:46 +0000 +++ etc/ChangeLog 2012-10-23 07:57:42 +0000 @@ -1,3 +1,8 @@ +2012-10-23 Paul Eggert + + Fix outdated timestamp documentation in Elisp manual (bug#12706). + * NEWS: Document increased precision in undo list. + 2012-10-21 Glenn Morris * images/icons/hicolor/32x32/apps/emacs22.png: === modified file 'etc/NEWS' --- etc/NEWS 2012-10-23 02:39:13 +0000 +++ etc/NEWS 2012-10-23 07:57:42 +0000 @@ -843,6 +843,9 @@ The PSECS slot is new, and uses picosecond resolution. It can be accessed via the new timer--psecs accessor. +*** Last-modified time stamps in undo lists now are of the form +(t HI-SECS LO-SECS USECS PSECS) instead of (t HI-SECS . LO-SECS). + +++ ** Floating point functions now always return special values like NaN, instead of signaling errors, if given invalid args, e.g. (log -1.0). ------------------------------------------------------------ revno: 110627 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-23 00:52:18 -0700 message: ChangeLog fix diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-10-23 07:43:39 +0000 +++ doc/misc/ChangeLog 2012-10-23 07:52:18 +0000 @@ -10,7 +10,6 @@ (Installation): Remove long-irrelevant node. (Program Structure, Predicates, Control Structure): Start updating for cl-lib namespace. - * Makefile.in ($(buildinfodir)/cl$(INFO_EXT), cl.dvi, cl.pdf): Depend on emacsver.texi. ------------------------------------------------------------ revno: 110626 committer: Glenn Morris branch nick: trunk timestamp: Tue 2012-10-23 00:43:39 -0700 message: Start updating cl.texi for cl-lib changes * doc/misc/cl.texi: Include emacsver.texi. Use Emacs version number rather than unchanging cl.el version number. End all menu descriptions with a period. Do not use @dfn{CL} for every instance of "CL". (Overview): Remove no-runtime caveat, and note about foo* names. (Usage): Use cl-lib rather than cl. (Organization, Naming Conventions): Update for cl-lib.el. (Installation): Remove long-irrelevant node. (Program Structure, Predicates, Control Structure): Start updating for cl-lib namespace. * doc/misc/Makefile.in ($(buildinfodir)/cl$(INFO_EXT), cl.dvi, cl.pdf): Depend on emacsver.texi. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2012-10-09 12:51:21 +0000 +++ doc/misc/ChangeLog 2012-10-23 07:43:39 +0000 @@ -1,3 +1,19 @@ +2012-10-23 Glenn Morris + + * cl.texi: Include emacsver.texi. Use Emacs version number rather + than unchanging cl.el version number. + End all menu descriptions with a period. + Do not use @dfn{CL} for every instance of "CL". + (Overview): Remove no-runtime caveat, and note about foo* names. + (Usage): Use cl-lib rather than cl. + (Organization, Naming Conventions): Update for cl-lib.el. + (Installation): Remove long-irrelevant node. + (Program Structure, Predicates, Control Structure): + Start updating for cl-lib namespace. + + * Makefile.in ($(buildinfodir)/cl$(INFO_EXT), cl.dvi, cl.pdf): + Depend on emacsver.texi. + 2012-10-09 Michael Albinus * trampver.texi: Update release number. === modified file 'doc/misc/Makefile.in' --- doc/misc/Makefile.in 2012-10-06 01:42:02 +0000 +++ doc/misc/Makefile.in 2012-10-23 07:43:39 +0000 @@ -237,12 +237,12 @@ $(ENVADD) $(TEXI2PDF) ${srcdir}/cc-mode.texi cl : $(buildinfodir)/cl$(INFO_EXT) -$(buildinfodir)/cl$(INFO_EXT): ${srcdir}/cl.texi +$(buildinfodir)/cl$(INFO_EXT): ${srcdir}/cl.texi $(emacsdir)/emacsver.texi $(mkinfodir) $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/cl.texi -cl.dvi: ${srcdir}/cl.texi +cl.dvi: ${srcdir}/cl.texi $(emacsdir)/emacsver.texi $(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi -cl.pdf: ${srcdir}/cl.texi +cl.pdf: ${srcdir}/cl.texi $(emacsdir)/emacsver.texi $(ENVADD) $(TEXI2PDF) ${srcdir}/cl.texi dbus : $(buildinfodir)/dbus$(INFO_EXT) === modified file 'doc/misc/cl.texi' --- doc/misc/cl.texi 2012-10-05 07:38:05 +0000 +++ doc/misc/cl.texi 2012-10-23 07:43:39 +0000 @@ -1,6 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename ../../info/cl @settitle Common Lisp Extensions +@include emacsver.texi @copying This file documents the GNU Emacs Common Lisp emulation package. @@ -34,7 +35,7 @@ @sp 4 @center For GNU Emacs Lisp @sp 1 -@center Version 2.02 +@center as distributed with Emacs @value{EMACSVER} @sp 5 @center Dave Gillespie @center daveg@@synaptics.com @@ -53,23 +54,23 @@ @end ifnottex @menu -* Overview:: Installation, usage, etc. -* Program Structure:: Arglists, @code{eval-when}, @code{defalias} -* Predicates:: @code{typep} and @code{equalp} -* Control Structure:: @code{setf}, @code{do}, @code{loop}, etc. -* Macros:: Destructuring, @code{define-compiler-macro} -* Declarations:: @code{proclaim}, @code{declare}, etc. -* Symbols:: Property lists, @code{gensym} -* Numbers:: Predicates, functions, random numbers -* Sequences:: Mapping, functions, searching, sorting -* Lists:: @code{caddr}, @code{sublis}, @code{member*}, @code{assoc*}, etc. -* Structures:: @code{defstruct} -* Assertions:: @code{check-type}, @code{assert}, @code{ignore-errors}. +* Overview:: Basics, usage, etc. +* Program Structure:: Arglists, @code{cl-eval-when}, @code{defalias}. +* Predicates:: @code{cl-typep} and @code{cl-equalp}. +* Control Structure:: @code{setf}, @code{cl-do}, @code{cl-loop}, etc. +* Macros:: Destructuring, @code{cl-define-compiler-macro}. +* Declarations:: @code{cl-proclaim}, @code{cl-declare}, etc. +* Symbols:: Property lists, @code{cl-gensym}. +* Numbers:: Predicates, functions, random numbers. +* Sequences:: Mapping, functions, searching, sorting. +* Lists:: @code{cl-caddr}, @code{cl-sublis}, @code{cl-member}, @code{cl-assoc}, etc. +* Structures:: @code{cl-defstruct}. +* Assertions:: @code{cl-check-type}, @code{cl-assert}, @code{ignore-errors}. -* Efficiency Concerns:: Hints and techniques -* Common Lisp Compatibility:: All known differences with Steele -* Old CL Compatibility:: All known differences with old cl.el -* Porting Common Lisp:: Hints for porting Common Lisp code +* Efficiency Concerns:: Hints and techniques. +* Common Lisp Compatibility:: All known differences with Steele. +* Old CL Compatibility:: All known differences with old cl.el. +* Porting Common Lisp:: Hints for porting Common Lisp code. * GNU Free Documentation License:: The license for this documentation. * Function Index:: @@ -92,21 +93,11 @@ they write have grown more ambitious, it has become clear that Emacs Lisp could benefit from many of the conveniences of Common Lisp. -The @dfn{CL} package adds a number of Common Lisp functions and +The @code{CL} package adds a number of Common Lisp functions and control structures to Emacs Lisp. While not a 100% complete -implementation of Common Lisp, @dfn{CL} adds enough functionality +implementation of Common Lisp, @code{CL} adds enough functionality to make Emacs Lisp programming significantly more convenient. -@strong{Please note:} the @dfn{CL} functions are not standard parts of -the Emacs Lisp name space, so it is legitimate for users to define -them with other, conflicting meanings. To avoid conflicting with -those user activities, we have a policy that packages installed in -Emacs must not load @dfn{CL} at run time. (It is ok for them to load -@dfn{CL} at compile time only, with @code{eval-when-compile}, and use -the macros it provides.) If you are writing packages that you plan to -distribute and invite widespread use for, you might want to observe -the same rule. - Some Common Lisp features have been omitted from this package for various reasons: @@ -119,152 +110,131 @@ @item Other features cannot be implemented without modification to the Emacs Lisp interpreter itself, such as multiple return values, -lexical scoping, case-insensitive symbols, and complex numbers. -The @dfn{CL} package generally makes no attempt to emulate these +case-insensitive symbols, and complex numbers. +The @code{CL} package generally makes no attempt to emulate these features. -@item -Some features conflict with existing things in Emacs Lisp. For -example, Emacs's @code{assoc} function is incompatible with the -Common Lisp @code{assoc}. In such cases, this package usually -adds the suffix @samp{*} to the function name of the Common -Lisp version of the function (e.g., @code{assoc*}). @end itemize -The package described here was written by Dave Gillespie, -@file{daveg@@synaptics.com}. It is a total rewrite of the original +The package described here was originally written by Dave Gillespie, +@file{daveg@@synaptics.com}, as a total rewrite of an earlier 1986 @file{cl.el} package by Cesar Quiroz. Most features of the -Quiroz package have been retained; any incompatibilities are +Quiroz package were retained; any incompatibilities are noted in the descriptions below. Care has been taken in this version to ensure that each function is defined efficiently, concisely, and with minimal impact on the rest of the Emacs -environment. +environment. Stefan Monnier added the file @file{cl-lib.el} and +rationalized the namespace for Emacs 24.3. @menu -* Usage:: How to use the CL package -* Organization:: The package's five component files -* Installation:: Compiling and installing CL -* Naming Conventions:: Notes on CL function names +* Usage:: How to use the CL package. +* Organization:: The package's five component files. +* Naming Conventions:: Notes on CL function names. @end menu @node Usage @section Usage @noindent -Lisp code that uses features from the @dfn{CL} package should -include at the beginning: +The @code{CL} package is distributed with Emacs, so there is no need +to install any additional files in order to start using it. Lisp code +that uses features from the @code{CL} package should simply include at +the beginning: @example -(require 'cl) +(require 'cl-lib) @end example @noindent -It is safe to arrange to load @dfn{CL} at all times, e.g., -in your @file{.emacs} file. But it's a good idea, for portability, -to @code{(require 'cl)} in your code even if you do this. +You may wish to add such a statement to your init file, if you +make frequent use of CL features. @node Organization @section Organization @noindent -The Common Lisp package is organized into four files: +The Common Lisp package is organized into four main files: @table @file -@item cl.el -This is the ``main'' file, which contains basic functions -and information about the package. This file is relatively -compact---about 700 lines. +@item cl-lib.el +This is the main file, which contains basic functions +and information about the package. This file is relatively compact. @item cl-extra.el This file contains the larger, more complex or unusual functions. It is kept separate so that packages which only want to use Common -Lisp fundamentals like the @code{cadr} function won't need to pay +Lisp fundamentals like the @code{cl-incf} function won't need to pay the overhead of loading the more advanced functions. @item cl-seq.el This file contains most of the advanced functions for operating -on sequences or lists, such as @code{delete-if} and @code{assoc*}. +on sequences or lists, such as @code{cl-delete-if} and @code{cl-assoc}. @item cl-macs.el -This file contains the features of the packages which are macros -instead of functions. Macros expand when the caller is compiled, -not when it is run, so the macros generally only need to be -present when the byte-compiler is running (or when the macros are -used in uncompiled code such as a @file{.emacs} file). Most of -the macros of this package are isolated in @file{cl-macs.el} so -that they won't take up memory unless you are compiling. +This file contains the features that are macros instead of functions. +Macros expand when the caller is compiled, not when it is run, so the +macros generally only need to be present when the byte-compiler is +running (or when the macros are used in uncompiled code). Most of the +macros of this package are isolated in @file{cl-macs.el} so that they +won't take up memory unless you are compiling. @end table -The file @file{cl.el} includes all necessary @code{autoload} +The file @file{cl-lib.el} includes all necessary @code{autoload} commands for the functions and macros in the other three files. -All you have to do is @code{(require 'cl)}, and @file{cl.el} +All you have to do is @code{(require 'cl-lib)}, and @file{cl-lib.el} will take care of pulling in the other files when they are needed. -There is another file, @file{cl-compat.el}, which defines some -routines from the older @file{cl.el} package that are not otherwise +There is another file, @file{cl.el}, which was the main entry point +to the CL package prior to Emacs 24.3. Nowadays, it is replaced +by @file{cl-lib.el}. The two provide the same features, but use +different function names (in fact, @file{cl.el} just defines aliases +to the @file{cl-lib.el} definitions). In particular, the old @file{cl.el} +does not use a clean namespace. For this reason, Emacs has a policy +that packages distributed with Emacs must not load @code{cl} at run time. +(It is ok for them to load @code{cl} at @emph{compile} time, with +@code{eval-when-compile}, and use the macros it provides.) There is +no such restriction on the use of @code{cl-lib}. New code should use +@code{cl-lib} rather than @code{cl}. @xref{Naming Conventions}. + +There is one more file, @file{cl-compat.el}, which defines some +routines from the older CL package that are not otherwise present in the new package. This includes internal routines like @code{setelt} and @code{zip-lists}, deprecated features like @code{defkeyword}, and an emulation of the old-style multiple-values feature. This file is obsolete and should not be used in new code. @xref{Old CL Compatibility}. -@node Installation -@section Installation - -@noindent -The @dfn{CL} package is distributed with Emacs, so there is no need -to install anything. - -If you do need to install it, just put the byte-compiled files -@file{cl.elc}, @file{cl-extra.elc}, @file{cl-seq.elc}, -@file{cl-macs.elc}, and (if necessary) @file{cl-compat.elc} into a -directory on your @code{load-path}. Also, format the @file{cl.texi} -file and put the resulting Info files into a directory in your -@code{Info-directory-list}. - @node Naming Conventions @section Naming Conventions @noindent Except where noted, all functions defined by this package have the -same names and calling conventions as their Common Lisp counterparts. - -Following is a complete list of functions whose names were changed -from Common Lisp, usually to avoid conflicts with Emacs. In each -case, a @samp{*} has been appended to the Common Lisp name to obtain -the Emacs name: - -@example -defun* defsubst* defmacro* function* -member* assoc* rassoc* get* -remove* delete* mapcar* sort* -floor* ceiling* truncate* round* -mod* rem* random* -@end example +same calling conventions as their Common Lisp counterparts, and +names that are those of Common Lisp plus a @samp{cl-} prefix. Internal function and variable names in the package are prefixed -by @code{cl-}. Here is a complete list of functions @emph{not} -prefixed by @code{cl-} which were not taken from Common Lisp: +by @code{cl--}. Here is a complete list of functions prefixed by +@code{cl-} that were not taken from Common Lisp: +@c FIXME lexical-let lexical-let* @example -floatp-safe lexical-let lexical-let* -callf callf2 letf letf* -defsubst* +cl-callf cl-callf2 cl-defsubst +cl-floatp-safe cl-letf cl-letf* @end example -The following simple functions and macros are defined in @file{cl.el}; +The following simple functions and macros are defined in @file{cl-lib.el}; they do not cause other components like @file{cl-extra} to be loaded. @example -floatp-safe endp -evenp oddp plusp minusp -caaar .. cddddr -list* ldiff rest first .. tenth -copy-list subst mapcar* [2] -adjoin [3] acons pairlis pop [4] -push [4] pushnew [3,4] incf [4] decf [4] -proclaim declaim +cl-floatp-safe cl-endp +cl-evenp cl-oddp cl-plusp cl-minusp +cl-caaar .. cl-cddddr +cl-list* cl-ldiff cl-rest cl-first .. cl-tenth +cl-copy-list cl-subst cl-mapcar [2] +cl-adjoin [3] cl-acons cl-pairlis +cl-pushnew [3,4] cl-incf [4] cl-decf [4] +cl-proclaim cl-declaim @end example @noindent @@ -281,13 +251,13 @@ @chapter Program Structure @noindent -This section describes features of the @dfn{CL} package which have to +This section describes features of the @code{CL} package that have to do with programs as a whole: advanced argument lists for functions, -and the @code{eval-when} construct. +and the @code{cl-eval-when} construct. @menu -* Argument Lists:: @code{&key}, @code{&aux}, @code{defun*}, @code{defmacro*}. -* Time of Evaluation:: The @code{eval-when} construct. +* Argument Lists:: @code{&key}, @code{&aux}, @code{cl-defun}, @code{cl-defmacro}. +* Time of Evaluation:: The @code{cl-eval-when} construct. @end menu @iftex @@ -309,26 +279,26 @@ Instead, this package defines alternates for several Lisp forms which you must use if you need Common Lisp argument lists. -@defspec defun* name arglist body... +@defspec cl-defun name arglist body... This form is identical to the regular @code{defun} form, except that @var{arglist} is allowed to be a full Common Lisp argument list. Also, the function body is enclosed in an implicit block called @var{name}; @pxref{Blocks and Exits}. @end defspec -@defspec defsubst* name arglist body... -This is just like @code{defun*}, except that the function that +@defspec cl-defsubst name arglist body... +This is just like @code{cl-defun}, except that the function that is defined is automatically proclaimed @code{inline}, i.e., calls to it may be expanded into in-line code by the byte compiler. This is analogous to the @code{defsubst} form; -@code{defsubst*} uses a different method (compiler macros) which +@code{cl-defsubst} uses a different method (compiler macros) which works in all versions of Emacs, and also generates somewhat more -efficient inline expansions. In particular, @code{defsubst*} +efficient inline expansions. In particular, @code{cl-defsubst} arranges for the processing of keyword arguments, default values, etc., to be done at compile-time whenever possible. @end defspec -@defspec defmacro* name arglist body... +@defspec cl-defmacro name arglist body... This is identical to the regular @code{defmacro} form, except that @var{arglist} is allowed to be a full Common Lisp argument list. The @code{&environment} keyword is supported as @@ -339,19 +309,19 @@ @var{name}. @end defspec -@defspec function* symbol-or-lambda +@defspec cl-function symbol-or-lambda This is identical to the regular @code{function} form, except that if the argument is a @code{lambda} form then that form may use a full Common Lisp argument list. @end defspec -Also, all forms (such as @code{defsetf} and @code{flet}) defined +Also, all forms (such as @code{cl-flet} and @code{cl-labels}) defined in this package that include @var{arglist}s in their syntax allow full Common Lisp argument lists. -Note that it is @emph{not} necessary to use @code{defun*} in -order to have access to most @dfn{CL} features in your function. -These features are always present; @code{defun*}'s only +Note that it is @emph{not} necessary to use @code{cl-defun} in +order to have access to most @code{CL} features in your function. +These features are always present; @code{cl-defun}'s only difference from @code{defun} is its more flexible argument lists and its implicit block. @@ -401,7 +371,7 @@ positionally in the argument list. For example, @example -(defun* foo (a &optional b &key c d (e 17))) +(cl-defun foo (a &optional b &key c d (e 17))) @end example @noindent @@ -427,7 +397,7 @@ simply the variable name prefixed with a colon. For example, @example -(defun* bar (&key (a 1) ((baz b) 4))) +(cl-defun bar (&key (a 1) ((baz b) 4))) @end example @noindent @@ -453,16 +423,16 @@ in the call. For example: @smallexample -(defun* find-thing (thing &rest rest &key need &allow-other-keys) - (or (apply 'member* thing thing-list :allow-other-keys t rest) +(cl-defun find-thing (thing &rest rest &key need &allow-other-keys) + (or (apply 'cl-member thing thing-list :allow-other-keys t rest) (if need (error "Thing not found")))) @end smallexample @noindent This function takes a @code{:need} keyword argument, but also accepts other keyword arguments which are passed on to the -@code{member*} function. @code{allow-other-keys} is used to -keep both @code{find-thing} and @code{member*} from complaining +@code{cl-member} function. @code{allow-other-keys} is used to +keep both @code{find-thing} and @code{cl-member} from complaining about each others' keywords in the arguments. The fifth section of the argument list consists of @dfn{auxiliary @@ -473,17 +443,17 @@ matter of stylistic taste: @example -(defun* foo (a b &aux (c (+ a b)) d) +(cl-defun foo (a b &aux (c (+ a b)) d) @var{body}) -(defun* foo (a b) +(cl-defun foo (a b) (let ((c (+ a b)) d) @var{body})) @end example Argument lists support @dfn{destructuring}. In Common Lisp, destructuring is only allowed with @code{defmacro}; this package -allows it with @code{defun*} and other argument lists as well. +allows it with @code{cl-defun} and other argument lists as well. In destructuring, any argument variable (@var{var} in the above diagram) can be replaced by a list of variables, or more generally, a recursive argument list. The corresponding argument value must @@ -491,7 +461,7 @@ For example: @example -(defmacro* dolist ((var listform &optional resultform) +(cl-defmacro dolist ((var listform &optional resultform) &rest body) ...) @end example @@ -532,21 +502,21 @@ at compile-time so that later parts of the file can refer to the macros that are defined. -@defspec eval-when (situations...) forms... +@defspec cl-eval-when (situations...) forms... This form controls when the body @var{forms} are evaluated. The @var{situations} list may contain any set of the symbols @code{compile}, @code{load}, and @code{eval} (or their long-winded ANSI equivalents, @code{:compile-toplevel}, @code{:load-toplevel}, and @code{:execute}). -The @code{eval-when} form is handled differently depending on +The @code{cl-eval-when} form is handled differently depending on whether or not it is being compiled as a top-level form. Specifically, it gets special treatment if it is being compiled by a command such as @code{byte-compile-file} which compiles files or buffers of code, and it appears either literally at the top level of the file or inside a top-level @code{progn}. -For compiled top-level @code{eval-when}s, the body @var{forms} are +For compiled top-level @code{cl-eval-when}s, the body @var{forms} are executed at compile-time if @code{compile} is in the @var{situations} list, and the @var{forms} are written out to the file (to be executed at load-time) if @code{load} is in the @var{situations} list. @@ -554,11 +524,11 @@ For non-compiled-top-level forms, only the @code{eval} situation is relevant. (This includes forms executed by the interpreter, forms compiled with @code{byte-compile} rather than @code{byte-compile-file}, -and non-top-level forms.) The @code{eval-when} acts like a +and non-top-level forms.) The @code{cl-eval-when} acts like a @code{progn} if @code{eval} is specified, and like @code{nil} (ignoring the body @var{forms}) if not. -The rules become more subtle when @code{eval-when}s are nested; +The rules become more subtle when @code{cl-eval-when}s are nested; consult Steele (second edition) for the gruesome details (and some gruesome examples). @@ -566,13 +536,13 @@ @example ;; Top-level forms in foo.el: -(eval-when (compile) (setq foo1 'bar)) -(eval-when (load) (setq foo2 'bar)) -(eval-when (compile load) (setq foo3 'bar)) -(eval-when (eval) (setq foo4 'bar)) -(eval-when (eval compile) (setq foo5 'bar)) -(eval-when (eval load) (setq foo6 'bar)) -(eval-when (eval compile load) (setq foo7 'bar)) +(cl-eval-when (compile) (setq foo1 'bar)) +(cl-eval-when (load) (setq foo2 'bar)) +(cl-eval-when (compile load) (setq foo3 'bar)) +(cl-eval-when (eval) (setq foo4 'bar)) +(cl-eval-when (eval compile) (setq foo5 'bar)) +(cl-eval-when (eval load) (setq foo6 'bar)) +(cl-eval-when (eval compile load) (setq foo7 'bar)) @end example When @file{foo.el} is compiled, these variables will be set during @@ -595,18 +565,18 @@ foo4 foo5 foo6 foo7 ; `eval' @end example -If these seven @code{eval-when}s had been, say, inside a @code{defun}, +If these seven @code{cl-eval-when}s had been, say, inside a @code{defun}, then the first three would have been equivalent to @code{nil} and the last four would have been equivalent to the corresponding @code{setq}s. -Note that @code{(eval-when (load eval) @dots{})} is equivalent +Note that @code{(cl-eval-when (load eval) @dots{})} is equivalent to @code{(progn @dots{})} in all contexts. The compiler treats certain top-level forms, like @code{defmacro} (sort-of) and @code{require}, as if they were wrapped in @code{(eval-when (compile load eval) @dots{})}. @end defspec -Emacs includes two special forms related to @code{eval-when}. +Emacs includes two special forms related to @code{cl-eval-when}. One of these, @code{eval-when-compile}, is not quite equivalent to any @code{eval-when} construct and is described below. @@ -625,7 +595,7 @@ This form is similar to the @samp{#.} syntax of true Common Lisp. @end defspec -@defspec load-time-value form +@defspec cl-load-time-value form The @var{form} is evaluated at load-time; at execution time, this form acts like a quoted constant of the resulting value. @@ -633,12 +603,12 @@ this, but ANSI Common Lisp replaced it with @code{load-time-value} and gave it more well-defined semantics. -In a compiled file, @code{load-time-value} arranges for @var{form} +In a compiled file, @code{cl-load-time-value} arranges for @var{form} to be evaluated when the @file{.elc} file is loaded and then used as if it were a quoted constant. In code compiled by @code{byte-compile} rather than @code{byte-compile-file}, the effect is identical to @code{eval-when-compile}. In uncompiled -code, both @code{eval-when-compile} and @code{load-time-value} +code, both @code{eval-when-compile} and @code{cl-load-time-value} act exactly like @code{progn}. @example @@ -649,7 +619,7 @@ (eval-when-compile (current-time-string)) ;; or '#.(current-time-string) in real Common Lisp ", and loaded on: " - (load-time-value (current-time-string)))) + (cl-load-time-value (current-time-string)))) @end example @noindent @@ -676,21 +646,21 @@ facts are true or false. @menu -* Type Predicates:: @code{typep}, @code{deftype}, and @code{coerce} -* Equality Predicates:: @code{equalp} +* Type Predicates:: @code{cl-typep}, @code{cl-deftype}, and @code{cl-coerce}. +* Equality Predicates:: @code{cl-equalp}. @end menu @node Type Predicates @section Type Predicates @noindent -The @dfn{CL} package defines a version of the Common Lisp @code{typep} +The @code{CL} package defines a version of the Common Lisp @code{typep} predicate. -@defun typep object type +@defun cl-typep object type Check if @var{object} is of type @var{type}, where @var{type} is a (quoted) type name of the sort used by Common Lisp. For example, -@code{(typep foo 'integer)} is equivalent to @code{(integerp foo)}. +@code{(cl-typep foo 'integer)} is equivalent to @code{(integerp foo)}. @end defun The @var{type} argument to the above function is either a symbol @@ -705,18 +675,18 @@ @item The type symbol @code{t} stands for the union of all types. -@code{(typep @var{object} t)} is always true. Likewise, the +@code{(cl-typep @var{object} t)} is always true. Likewise, the type symbol @code{nil} stands for nothing at all, and -@code{(typep @var{object} nil)} is always false. +@code{(cl-typep @var{object} nil)} is always false. @item The type symbol @code{null} represents the symbol @code{nil}. -Thus @code{(typep @var{object} 'null)} is equivalent to +Thus @code{(cl-typep @var{object} 'null)} is equivalent to @code{(null @var{object})}. @item The type symbol @code{atom} represents all objects that are not cons -cells. Thus @code{(typep @var{object} 'atom)} is equivalent to +cells. Thus @code{(cl-typep @var{object} 'atom)} is equivalent to @code{(atom @var{object})}. @item @@ -728,7 +698,7 @@ integers in the range from 0 to 255. @item -The type symbol @code{float} uses the @code{floatp-safe} predicate +The type symbol @code{float} uses the @code{cl-floatp-safe} predicate defined by this package rather than @code{floatp}, so it will work correctly even in Emacs versions without floating-point support. @@ -750,7 +720,7 @@ represents all objects that are integers or non-negative floats. @item -Lists beginning with @code{member} or @code{member*} represent +Lists beginning with @code{member} or @code{cl-member} represent objects @code{eql} to any of the following values. For example, @code{(member 1 2 3 4)} is equivalent to @code{(integer 1 4)}, and @code{(member nil)} is equivalent to @code{null}. @@ -762,9 +732,9 @@ @end itemize The following function and macro (not technically predicates) are -related to @code{typep}. +related to @code{cl-typep}. -@defun coerce object type +@defun cl-coerce object type This function attempts to convert @var{object} to the specified @var{type}. If @var{object} is already of that type as determined by @code{typep}, it is simply returned. Otherwise, certain types of @@ -774,28 +744,28 @@ @code{character}, then strings of length one and symbols with one-character names can be coerced. If @var{type} is @code{float}, then integers can be coerced in versions of Emacs that support -floats. In all other circumstances, @code{coerce} signals an +floats. In all other circumstances, @code{cl-coerce} signals an error. @end defun -@defspec deftype name arglist forms... +@defspec cl-deftype name arglist forms... This macro defines a new type called @var{name}. It is similar to @code{defmacro} in many ways; when @var{name} is encountered as a type name, the body @var{forms} are evaluated and should return a type specifier that is equivalent to the type. The @var{arglist} is a Common Lisp argument list of the sort accepted -by @code{defmacro*}. The type specifier @samp{(@var{name} @var{args}...)} +by @code{cl-defmacro}. The type specifier @samp{(@var{name} @var{args}...)} is expanded by calling the expander with those arguments; the type symbol @samp{@var{name}} is expanded by calling the expander with no arguments. The @var{arglist} is processed the same as for -@code{defmacro*} except that optional arguments without explicit +@code{cl-defmacro} except that optional arguments without explicit defaults use @code{*} instead of @code{nil} as the ``default'' default. Some examples: @example -(deftype null () '(satisfies null)) ; predefined -(deftype list () '(or null cons)) ; predefined -(deftype unsigned-byte (&optional bits) +(cl-deftype null () '(satisfies null)) ; predefined +(cl-deftype list () '(or null cons)) ; predefined +(cl-deftype unsigned-byte (&optional bits) (list 'integer 0 (if (eq bits '*) bits (1- (lsh 1 bits))))) (unsigned-byte 8) @equiv{} (integer 0 255) (unsigned-byte) @equiv{} (integer 0 *) @@ -808,21 +778,21 @@ not implement @code{unsigned-byte} by default. @end defspec -The @code{typecase} and @code{check-type} macros also use type -names. @xref{Conditionals}. @xref{Assertions}. The @code{map}, -@code{concatenate}, and @code{merge} functions take type-name +The @code{cl-typecase} and @code{cl-check-type} macros also use type +names. @xref{Conditionals}. @xref{Assertions}. The @code{cl-map}, +@code{cl-concatenate}, and @code{cl-merge} functions take type-name arguments to specify the type of sequence to return. @xref{Sequences}. @node Equality Predicates @section Equality Predicates @noindent -This package defines the Common Lisp predicate @code{equalp}. +This package defines the Common Lisp predicate @code{cl-equalp}. -@defun equalp a b +@defun cl-equalp a b This function is a more flexible version of @code{equal}. In particular, it compares strings case-insensitively, and it compares -numbers without regard to type (so that @code{(equalp 3 3.0)} is +numbers without regard to type (so that @code{(cl-equalp 3 3.0)} is true). Vectors and conses are compared recursively. All other objects are compared as if by @code{equal}. @@ -831,15 +801,15 @@ @emph{characters} case-insensitively, which would be impractical in this package since Emacs does not distinguish between integers and characters. In keeping with the idea that strings are less -vector-like in Emacs Lisp, this package's @code{equalp} also will +vector-like in Emacs Lisp, this package's @code{cl-equalp} also will not compare strings against vectors of integers. @end defun Also note that the Common Lisp functions @code{member} and @code{assoc} use @code{eql} to compare elements, whereas Emacs Lisp follows the MacLisp tradition and uses @code{equal} for these two functions. -In Emacs, use @code{member*} and @code{assoc*} to get functions -which use @code{eql} for comparisons. +In Emacs, use @code{memq} (or @code{cl-member}) and @code{assq} (or +@code{cl-assoc}) to get functions which use @code{eql} for comparisons. @node Control Structure @chapter Control Structure @@ -847,28 +817,32 @@ @noindent The features described in the following sections implement various advanced control structures, including the powerful +@c FIXME setf is now in gv.el, not cl. @code{setf} facility and a number of looping and conditional constructs. +@c FIXME setf, push are standard now. +@c lexical-let is obsolete; flet is not cl-flet. +@c values is not cl-values. @menu -* Assignment:: The @code{psetq} form -* Generalized Variables:: @code{setf}, @code{incf}, @code{push}, etc. -* Variable Bindings:: @code{progv}, @code{lexical-let}, @code{flet}, @code{macrolet} -* Conditionals:: @code{case}, @code{typecase} -* Blocks and Exits:: @code{block}, @code{return}, @code{return-from} -* Iteration:: @code{do}, @code{dotimes}, @code{dolist}, @code{do-symbols} -* Loop Facility:: The Common Lisp @code{loop} macro -* Multiple Values:: @code{values}, @code{multiple-value-bind}, etc. +* Assignment:: The @code{cl-psetq} form. +* Generalized Variables:: @code{setf}, @code{cl-incf}, @code{push}, etc. +* Variable Bindings:: @code{cl-progv}, @code{lexical-let}, @code{flet}, @code{cl-macrolet}. +* Conditionals:: @code{cl-case}, @code{cl-typecase}. +* Blocks and Exits:: @code{cl-block}, @code{cl-return}, @code{cl-return-from}. +* Iteration:: @code{cl-do}, @code{cl-dotimes}, @code{cl-dolist}, @code{cl-do-symbols}. +* Loop Facility:: The Common Lisp @code{cl-loop} macro. +* Multiple Values:: @code{values}, @code{cl-multiple-value-bind}, etc. @end menu @node Assignment @section Assignment @noindent -The @code{psetq} form is just like @code{setq}, except that multiple +The @code{cl-psetq} form is just like @code{setq}, except that multiple assignments are done in parallel rather than sequentially. -@defspec psetq [symbol form]@dots{} +@defspec cl-psetq [symbol form]@dots{} This special form (actually a macro) is used to assign to several variables simultaneously. Given only one @var{symbol} and @var{form}, it has the same effect as @code{setq}. Given several @var{symbol} @@ -883,21 +857,22 @@ y ; @r{@code{y} was computed after @code{x} was set.} @result{} 15 (setq x 2 y 3) -(psetq x (+ x y) y (* x y)) +(cl-psetq x (+ x y) y (* x y)) x @result{} 5 y ; @r{@code{y} was computed before @code{x} was set.} @result{} 6 @end example -The simplest use of @code{psetq} is @code{(psetq x y y x)}, which -exchanges the values of two variables. (The @code{rotatef} form +The simplest use of @code{cl-psetq} is @code{(cl-psetq x y y x)}, which +exchanges the values of two variables. (The @code{cl-rotatef} form provides an even more convenient way to swap two variables; @pxref{Modify Macros}.) -@code{psetq} always returns @code{nil}. +@code{cl-psetq} always returns @code{nil}. @end defspec +@c FIXME now in gv.el. @node Generalized Variables @section Generalized Variables @@ -922,9 +897,9 @@ is a set of forms that can be generalized variables in Lisp. @menu -* Basic Setf:: @code{setf} and place forms -* Modify Macros:: @code{incf}, @code{push}, @code{rotatef}, @code{letf}, @code{callf}, etc. -* Customizing Setf:: @code{define-modify-macro}, @code{defsetf}, @code{define-setf-method} +* Basic Setf:: @code{setf} and place forms. +* Modify Macros:: @code{cl-incf}, @code{push}, @code{cl-rotatef}, @code{letf}, @code{cl-callf}, etc. +* Customizing Setf:: @code{define-modify-macro}, @code{defsetf}, @code{define-setf-method}. @end menu @node Basic Setf @@ -1107,7 +1082,7 @@ useful even when the @var{place} is just a variable name. @defspec psetf [place form]@dots{} -This macro is to @code{setf} what @code{psetq} is to @code{setq}: +This macro is to @code{setf} what @code{cl-psetq} is to @code{setq}: When several @var{place}s and @var{form}s are involved, the assignments take place in parallel rather than sequentially. Specifically, all subforms are evaluated from left to right, then @@ -1533,10 +1508,10 @@ are also related to variable bindings. @menu -* Dynamic Bindings:: The @code{progv} form -* Lexical Bindings:: @code{lexical-let} and lexical closures -* Function Bindings:: @code{flet} and @code{labels} -* Macro Bindings:: @code{macrolet} and @code{symbol-macrolet} +* Dynamic Bindings:: The @code{progv} form. +* Lexical Bindings:: @code{lexical-let} and lexical closures. +* Function Bindings:: @code{flet} and @code{labels}. +* Macro Bindings:: @code{macrolet} and @code{symbol-macrolet}. @end menu @node Dynamic Bindings @@ -1563,7 +1538,7 @@ @subsection Lexical Bindings @noindent -The @dfn{CL} package defines the following macro which +The @code{CL} package defines the following macro which more closely follows the Common Lisp @code{let} form: @defspec lexical-let (bindings@dots{}) forms@dots{} @@ -1984,7 +1959,7 @@ loop. @defspec loop forms@dots{} -The @dfn{CL} package supports both the simple, old-style meaning of +The @code{CL} package supports both the simple, old-style meaning of @code{loop} and the extremely powerful and flexible feature known as the @dfn{Loop Facility} or @dfn{Loop Macro}. This more advanced facility is discussed in the following section; @pxref{Loop Facility}. @@ -2026,7 +2001,7 @@ each iteration of the loop, the @var{end-test} is evaluated; if true, the loop is finished. Otherwise, the body @var{forms} are evaluated, then each @var{var} is set to the associated @var{step} -expression (as if by a @code{psetq} form) and the next iteration +expression (as if by a @code{cl-psetq} form) and the next iteration begins. Once the @var{end-test} becomes true, the @var{result} forms are evaluated (with the @var{var}s still bound to their values) to produce the result returned by @code{do}. @@ -2065,7 +2040,7 @@ This is to @code{do} what @code{let*} is to @code{let}. In particular, the initial values are bound as if by @code{let*} rather than @code{let}, and the steps are assigned as if by -@code{setq} rather than @code{psetq}. +@code{setq} rather than @code{cl-psetq}. Here is another way to write the above loop: @@ -2133,12 +2108,12 @@ with an easy-to-use but very powerful and expressive syntax. @menu -* Loop Basics:: @code{loop} macro, basic clause structure -* Loop Examples:: Working examples of @code{loop} macro -* For Clauses:: Clauses introduced by @code{for} or @code{as} +* Loop Basics:: @code{loop} macro, basic clause structure. +* Loop Examples:: Working examples of @code{loop} macro. +* For Clauses:: Clauses introduced by @code{for} or @code{as}. * Iteration Clauses:: @code{repeat}, @code{while}, @code{thereis}, etc. * Accumulation Clauses:: @code{collect}, @code{sum}, @code{maximize}, etc. -* Other Clauses:: @code{with}, @code{if}, @code{initially}, @code{finally} +* Other Clauses:: @code{with}, @code{if}, @code{initially}, @code{finally}. @end menu @node Loop Basics @@ -2546,7 +2521,7 @@ treated sequentially (as if by @code{let*} and @code{setq}). You can instead use the word @code{and} to link the clauses, in which case they are processed in parallel (as if by @code{let} -and @code{psetq}). +and @code{cl-psetq}). @example (loop for x below 5 for y = nil then x collect (list x y)) @@ -3177,8 +3152,8 @@ missing from Emacs Lisp. @menu -* Property Lists:: @code{get*}, @code{remprop}, @code{getf}, @code{remf} -* Creating Symbols:: @code{gensym}, @code{gentemp} +* Property Lists:: @code{get*}, @code{remprop}, @code{getf}, @code{remf}. +* Creating Symbols:: @code{gensym}, @code{gentemp}. @end menu @node Property Lists @@ -3321,8 +3296,8 @@ @menu * Predicates on Numbers:: @code{plusp}, @code{oddp}, @code{floatp-safe}, etc. * Numerical Functions:: @code{abs}, @code{floor*}, etc. -* Random Numbers:: @code{random*}, @code{make-random-state} -* Implementation Parameters:: @code{most-positive-float} +* Random Numbers:: @code{random*}, @code{make-random-state}. +* Implementation Parameters:: @code{most-positive-float}. @end menu @iftex @@ -3614,11 +3589,11 @@ @code{length}; this package defines most of the rest. @menu -* Sequence Basics:: Arguments shared by all sequence functions +* Sequence Basics:: Arguments shared by all sequence functions. * Mapping over Sequences:: @code{mapcar*}, @code{mapcan}, @code{map}, @code{every}, etc. * Sequence Functions:: @code{subseq}, @code{remove*}, @code{substitute}, etc. * Searching Sequences:: @code{find}, @code{position}, @code{count}, @code{search}, etc. -* Sorting Sequences:: @code{sort*}, @code{stable-sort}, @code{merge} +* Sorting Sequences:: @code{sort*}, @code{stable-sort}, @code{merge}. @end menu @node Sequence Basics @@ -4101,7 +4076,7 @@ * List Functions:: @code{caddr}, @code{first}, @code{list*}, etc. * Substitution of Expressions:: @code{subst}, @code{sublis}, etc. * Lists as Sets:: @code{member*}, @code{adjoin}, @code{union}, etc. -* Association Lists:: @code{assoc*}, @code{rassoc*}, @code{acons}, @code{pairlis} +* Association Lists:: @code{assoc*}, @code{rassoc*}, @code{acons}, @code{pairlis}. @end menu @node List Functions @@ -5045,7 +5020,7 @@ @appendixsec The @code{cl-compat} package @noindent -The @dfn{CL} package includes emulations of some features of the +The @code{CL} package includes emulations of some features of the old @file{cl.el}, in the form of a compatibility package @code{cl-compat}. This file is obsolete and may be removed in future, so it should not be used in new code. @@ -5066,7 +5041,7 @@ The @code{cl-compat} file defines the keyword functions @code{keywordp}, @code{keyword-of}, and @code{defkeyword}, -which are not defined by the new @dfn{CL} package because the +which are not defined by the new @code{CL} package because the use of keywords as data is discouraged. The @code{build-klist} mechanism for parsing keyword arguments ------------------------------------------------------------ revno: 110625 committer: Chong Yidong branch nick: trunk timestamp: Tue 2012-10-23 10:39:13 +0800 message: Make unused variable font-list-limit obsolete, and move it out of C. * display.texi (Font Lookup): Remove font-list-limit. * lisp/startup.el (command-line): * lisp/cus-start.el: Don't refer to font-list-limit. * lisp/faces.el (font-list-limit): Define as an obsolete variable. * xfaces.c (Vfont_list_limit): Move unused variable to faces.el. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-10-23 02:23:39 +0000 +++ doc/lispref/ChangeLog 2012-10-23 02:39:13 +0000 @@ -1,5 +1,7 @@ 2012-10-23 Chong Yidong + * display.texi (Font Lookup): Remove font-list-limit. + * keymaps.texi (Key Sequences): Avoid referring to Edit Macro mode (Bug#12529). === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2012-10-13 01:18:52 +0000 +++ doc/lispref/display.texi 2012-10-23 02:39:13 +0000 @@ -2944,14 +2944,6 @@ encoding of the font. @end defun -@defopt font-list-limit -This variable specifies maximum number of fonts to consider in font -matching. The function @code{x-family-fonts} will not return more -than that many fonts, and font selection will consider only that many -fonts when searching a matching font for face attributes. The default -is 100. -@end defopt - @node Fontsets @subsection Fontsets === modified file 'etc/NEWS' --- etc/NEWS 2012-10-15 21:00:19 +0000 +++ etc/NEWS 2012-10-23 02:39:13 +0000 @@ -890,6 +890,7 @@ *** `window-system-version' *** `dired-pop-to-buffer' (use `dired-mark-pop-up') *** `query-replace-interactive' +*** `font-list-limit' (has had no effect since Emacs < 23) * Changes in Emacs 24.3 on non-free operating systems === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-10-23 02:17:36 +0000 +++ lisp/ChangeLog 2012-10-23 02:39:13 +0000 @@ -1,5 +1,10 @@ 2012-10-23 Chong Yidong + * faces.el (font-list-limit): Define as an obsolete variable. + + * startup.el (command-line): + * cus-start.el: Don't refer to font-list-limit. + * newcomment.el (comment-normalize-vars): Doc fix (Bug#12583). 2012-10-23 Stefan Monnier === modified file 'lisp/cus-start.el' --- lisp/cus-start.el 2012-10-08 07:18:02 +0000 +++ lisp/cus-start.el 2012-10-23 02:39:13 +0000 @@ -487,7 +487,6 @@ (hourglass-delay cursor number) ;; xfaces.c - (font-list-limit display integer) (scalable-fonts-allowed display boolean "22.1") ;; xfns.c (x-bitmap-file-path installation === modified file 'lisp/faces.el' --- lisp/faces.el 2012-10-07 22:31:58 +0000 +++ lisp/faces.el 2012-10-23 02:39:13 +0000 @@ -2572,6 +2572,12 @@ (car fonts)) (cdr (assq 'font (frame-parameters (selected-frame)))))) +(defcustom font-list-limit 100 + "This variable is obsolete and has no effect." + :type 'integer + :group 'display) +(make-obsolete-variable 'font-list-limit nil "24.3") + (provide 'faces) ;;; faces.el ends here === modified file 'lisp/startup.el' --- lisp/startup.el 2012-10-07 22:31:58 +0000 +++ lisp/startup.el 2012-10-23 02:39:13 +0000 @@ -971,7 +971,6 @@ (not (eq 0 (cdr tool-bar-lines))))))) (let ((old-scalable-fonts-allowed scalable-fonts-allowed) - (old-font-list-limit font-list-limit) (old-face-ignored-fonts face-ignored-fonts)) ;; Run the site-start library if it exists. The point of this file is @@ -1162,7 +1161,6 @@ ;; face realization, clear the face cache so that new faces will ;; be realized. (unless (and (eq scalable-fonts-allowed old-scalable-fonts-allowed) - (eq font-list-limit old-font-list-limit) (eq face-ignored-fonts old-face-ignored-fonts)) (clear-face-cache))) === modified file 'src/ChangeLog' --- src/ChangeLog 2012-10-21 18:48:11 +0000 +++ src/ChangeLog 2012-10-23 02:39:13 +0000 @@ -1,3 +1,7 @@ +2012-10-23 Chong Yidong + + * xfaces.c (Vfont_list_limit): Move unused variable to faces.el. + 2012-10-21 Jan Djärv * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement === modified file 'src/xfaces.c' --- src/xfaces.c 2012-10-20 21:30:51 +0000 +++ src/xfaces.c 2012-10-23 02:39:13 +0000 @@ -371,8 +371,6 @@ static Lisp_Object Qscalable_fonts_allowed; -#define DEFAULT_FONT_LIST_LIMIT 100 - /* The symbols `foreground-color' and `background-color' which can be used as part of a `face' property. This is for compatibility with Emacs 20.2. */ @@ -6600,12 +6598,6 @@ defsubr (&Sdump_colors); #endif - DEFVAR_LISP ("font-list-limit", Vfont_list_limit, - doc: /* Limit for font matching. -If an integer > 0, font matching functions won't load more than -that number of fonts when searching for a matching font. */); - Vfont_list_limit = make_number (DEFAULT_FONT_LIST_LIMIT); - DEFVAR_LISP ("face-new-frame-defaults", Vface_new_frame_defaults, doc: /* List of global face definitions (for internal use only.) */); Vface_new_frame_defaults = Qnil; ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.