diff options
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Makefile.in | 5 | ||||
| -rw-r--r-- | doc/emacs/ChangeLog | 10 | ||||
| -rw-r--r-- | doc/emacs/dired.texi | 86 | ||||
| -rw-r--r-- | doc/emacs/mule.texi | 16 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 21 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 8 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 21 | ||||
| -rw-r--r-- | doc/misc/cl.texi | 327 | ||||
| -rw-r--r-- | etc/NEWS | 98 | ||||
| -rw-r--r-- | lisp/ChangeLog | 20 | ||||
| -rw-r--r-- | lisp/dired.el | 16 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-loaddefs.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 2 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 2 | ||||
| -rw-r--r-- | lisp/time.el | 19 | ||||
| -rw-r--r-- | nt/ChangeLog | 4 | ||||
| -rw-r--r-- | nt/config.nt | 4 | ||||
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/emacs.c | 4 | ||||
| -rw-r--r-- | src/sysdep.c | 2 | ||||
| -rw-r--r-- | src/term.c | 2 |
23 files changed, 310 insertions, 381 deletions
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-10-24 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * Makefile.in (install-etc, install-man): | ||
| 4 | Don't apply program transform to standard file suffixes. | ||
| 5 | |||
| 1 | 2012-10-23 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2012-10-23 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * configure.ac (_FORTIFY_SOURCE): Do not multiply define (Bug#12714). | 8 | * configure.ac (_FORTIFY_SOURCE): Do not multiply define (Bug#12714). |
diff --git a/Makefile.in b/Makefile.in index 5c5d30fb63f..20d680e06ab 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -622,7 +622,7 @@ install-man: | |||
| 622 | thisdir=`/bin/pwd`; \ | 622 | thisdir=`/bin/pwd`; \ |
| 623 | cd ${mansrcdir}; \ | 623 | cd ${mansrcdir}; \ |
| 624 | for page in *.1; do \ | 624 | for page in *.1; do \ |
| 625 | dest=`echo "$${page}" | sed '$(TRANSFORM)'`; \ | 625 | dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \ |
| 626 | (cd $${thisdir}; \ | 626 | (cd $${thisdir}; \ |
| 627 | ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \ | 627 | ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \ |
| 628 | ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \ | 628 | ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \ |
| @@ -647,7 +647,8 @@ install-etc: | |||
| 647 | ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \ | 647 | ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \ |
| 648 | for icon in $${dir}/emacs[.-]*; do \ | 648 | for icon in $${dir}/emacs[.-]*; do \ |
| 649 | [ -r $${icon} ] || continue ; \ | 649 | [ -r $${icon} ] || continue ; \ |
| 650 | dest=`echo "$${icon}" | sed -e 's|.*/||' -e '$(TRANSFORM)'` ; \ | 650 | ext=`echo "$${icon}" | sed -e 's|.*\.||'`; \ |
| 651 | dest=`echo "$${icon}" | sed -e 's|.*/||' -e "s|\.$${ext}$$||" -e '$(TRANSFORM)'`.$${ext} ; \ | ||
| 651 | ( cd $${thisdir}; \ | 652 | ( cd $${thisdir}; \ |
| 652 | ${INSTALL_DATA} ${iconsrcdir}/$${icon} $(DESTDIR)${icondir}/$${dir}/$${dest} ) \ | 653 | ${INSTALL_DATA} ${iconsrcdir}/$${icon} $(DESTDIR)${icondir}/$${dir}/$${dest} ) \ |
| 653 | || exit 1; \ | 654 | || exit 1; \ |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 9a71ed5b272..b911153f080 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2012-10-24 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * mule.texi (Text Coding): set-buffer-file-coding-system can now | ||
| 4 | be invoked from the mode line. | ||
| 5 | |||
| 6 | * dired.texi (Dired Deletion, Marks vs Flags): Document Emacs 24.3 | ||
| 7 | changes to the mark and unmark commands. | ||
| 8 | (Comparison in Dired): Document chages to dired-diff. Remove M-=, | ||
| 9 | which is no longer bound to dired-backup-diff. | ||
| 10 | |||
| 1 | 2012-10-23 Bastien Guerry <bzg@gnu.org> | 11 | 2012-10-23 Bastien Guerry <bzg@gnu.org> |
| 2 | 12 | ||
| 3 | * text.texi (Org Authoring): Use a comma after @ref to avoid the | 13 | * text.texi (Org Authoring): Use a comma after @ref to avoid the |
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 0dcded78364..8babbcb89ea 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi | |||
| @@ -167,13 +167,14 @@ deletion, then delete the files that were flagged. | |||
| 167 | 167 | ||
| 168 | @table @kbd | 168 | @table @kbd |
| 169 | @item d | 169 | @item d |
| 170 | Flag this file for deletion. | 170 | Flag this file for deletion (@code{dired-flag-file-deletion}). |
| 171 | @item u | 171 | @item u |
| 172 | Remove deletion flag on this line. | 172 | Remove the deletion flag (@code{dired-unmark}). |
| 173 | @item @key{DEL} | 173 | @item @key{DEL} |
| 174 | Move point to previous line and remove the deletion flag on that line. | 174 | Move point to previous line and remove the deletion flag on that line |
| 175 | (@code{dired-unmark-backward}). | ||
| 175 | @item x | 176 | @item x |
| 176 | Delete the files that are flagged for deletion. | 177 | Delete files flagged for deletion (@code{dired-do-flagged-delete}). |
| 177 | @end table | 178 | @end table |
| 178 | 179 | ||
| 179 | @kindex d @r{(Dired)} | 180 | @kindex d @r{(Dired)} |
| @@ -182,8 +183,12 @@ Delete the files that are flagged for deletion. | |||
| 182 | the file and typing @kbd{d} (@code{dired-flag-file-deletion}). The | 183 | the file and typing @kbd{d} (@code{dired-flag-file-deletion}). The |
| 183 | deletion flag is visible as a @samp{D} at the beginning of the line. | 184 | deletion flag is visible as a @samp{D} at the beginning of the line. |
| 184 | This command moves point to the next line, so that repeated @kbd{d} | 185 | This command moves point to the next line, so that repeated @kbd{d} |
| 185 | commands flag successive files. A numeric argument serves as a repeat | 186 | commands flag successive files. A numeric prefix argument serves as a |
| 186 | count. | 187 | repeat count; a negative count means to flag preceding files. |
| 188 | |||
| 189 | If the region is active, the @kbd{d} command flags all files in the | ||
| 190 | region for deletion; in this case, the command does not move point, | ||
| 191 | and ignores any prefix argument. | ||
| 187 | 192 | ||
| 188 | @kindex u @r{(Dired deletion)} | 193 | @kindex u @r{(Dired deletion)} |
| 189 | @kindex DEL @r{(Dired)} | 194 | @kindex DEL @r{(Dired)} |
| @@ -194,14 +199,17 @@ can remove deletion flags using the commands @kbd{u} and @key{DEL}. | |||
| 194 | @kbd{u} (@code{dired-unmark}) works just like @kbd{d}, but removes | 199 | @kbd{u} (@code{dired-unmark}) works just like @kbd{d}, but removes |
| 195 | flags rather than making flags. @key{DEL} | 200 | flags rather than making flags. @key{DEL} |
| 196 | (@code{dired-unmark-backward}) moves upward, removing flags; it is | 201 | (@code{dired-unmark-backward}) moves upward, removing flags; it is |
| 197 | like @kbd{u} with argument @minus{}1. | 202 | like @kbd{u} with argument @minus{}1. A numeric prefix argument to |
| 203 | either command serves as a repeat count, with a negative count meaning | ||
| 204 | to unflag in the opposite direction. If the region is active, these | ||
| 205 | commands instead unflag all files in the region, without moving point. | ||
| 198 | 206 | ||
| 199 | @kindex x @r{(Dired)} | 207 | @kindex x @r{(Dired)} |
| 200 | @findex dired-do-flagged-delete | 208 | @findex dired-do-flagged-delete |
| 201 | To delete the flagged files, type @kbd{x} | 209 | To delete flagged files, type @kbd{x} |
| 202 | (@code{dired-do-flagged-delete}). This command first displays a list | 210 | (@code{dired-do-flagged-delete}). This command displays a list of all |
| 203 | of all the file names flagged for deletion, and requests confirmation | 211 | the file names flagged for deletion, and requests confirmation with |
| 204 | with @kbd{yes}. If you confirm, Dired deletes the flagged files, then | 212 | @kbd{yes}. If you confirm, Dired deletes the flagged files, then |
| 205 | deletes their lines from the text of the Dired buffer. The Dired | 213 | deletes their lines from the text of the Dired buffer. The Dired |
| 206 | buffer, with somewhat fewer lines, remains selected. | 214 | buffer, with somewhat fewer lines, remains selected. |
| 207 | 215 | ||
| @@ -387,10 +395,11 @@ and unflag files.) | |||
| 387 | @kindex m @r{(Dired)} | 395 | @kindex m @r{(Dired)} |
| 388 | @kindex * m @r{(Dired)} | 396 | @kindex * m @r{(Dired)} |
| 389 | @findex dired-mark | 397 | @findex dired-mark |
| 390 | Mark the current file with @samp{*} (@code{dired-mark}). With a numeric | 398 | Mark the current file with @samp{*} (@code{dired-mark}). If the |
| 391 | argument @var{n}, mark the next @var{n} files starting with the current | 399 | region is active, mark all files in the region instead; otherwise, if |
| 392 | file. (If @var{n} is negative, mark the previous @minus{}@var{n} | 400 | a numeric argument @var{n} is supplied, mark the next @var{n} files |
| 393 | files.) | 401 | instead, starting with the current file (if @var{n} is negative, mark |
| 402 | the previous @minus{}@var{n} files). | ||
| 394 | 403 | ||
| 395 | @item * * | 404 | @item * * |
| 396 | @kindex * * @r{(Dired)} | 405 | @kindex * * @r{(Dired)} |
| @@ -426,7 +435,11 @@ and @file{..} (@code{dired-mark-subdir-files}). | |||
| 426 | @kindex u @r{(Dired)} | 435 | @kindex u @r{(Dired)} |
| 427 | @kindex * u @r{(Dired)} | 436 | @kindex * u @r{(Dired)} |
| 428 | @findex dired-unmark | 437 | @findex dired-unmark |
| 429 | Remove any mark on this line (@code{dired-unmark}). | 438 | Remove any mark on this line (@code{dired-unmark}). If the region is |
| 439 | active, unmark all files in the region instead; otherwise, if a | ||
| 440 | numeric argument @var{n} is supplied, unmark the next @var{n} files | ||
| 441 | instead, starting with the current file (if @var{n} is negative, | ||
| 442 | unmark the previous @minus{}@var{n} files). | ||
| 430 | 443 | ||
| 431 | @item @key{DEL} | 444 | @item @key{DEL} |
| 432 | @itemx * @key{DEL} | 445 | @itemx * @key{DEL} |
| @@ -434,7 +447,11 @@ Remove any mark on this line (@code{dired-unmark}). | |||
| 434 | @findex dired-unmark-backward | 447 | @findex dired-unmark-backward |
| 435 | @cindex unmarking files (in Dired) | 448 | @cindex unmarking files (in Dired) |
| 436 | Move point to previous line and remove any mark on that line | 449 | Move point to previous line and remove any mark on that line |
| 437 | (@code{dired-unmark-backward}). | 450 | (@code{dired-unmark-backward}). If the region is active, unmark all |
| 451 | files in the region instead; otherwise, if a numeric argument @var{n} | ||
| 452 | is supplied, unmark the @var{n} preceding files instead, starting with | ||
| 453 | the current file (if @var{n} is negative, unmark the next | ||
| 454 | @minus{}@var{n} files). | ||
| 438 | 455 | ||
| 439 | @item * ! | 456 | @item * ! |
| 440 | @itemx U | 457 | @itemx U |
| @@ -936,32 +953,19 @@ default. | |||
| 936 | @cindex file comparison (in Dired) | 953 | @cindex file comparison (in Dired) |
| 937 | @cindex compare files (in Dired) | 954 | @cindex compare files (in Dired) |
| 938 | 955 | ||
| 939 | Here are two Dired commands that compare specified files using | ||
| 940 | @code{diff}. They show the output in a buffer using Diff mode | ||
| 941 | (@pxref{Comparing Files}). | ||
| 942 | |||
| 943 | @table @kbd | ||
| 944 | @item = | ||
| 945 | @findex dired-diff | 956 | @findex dired-diff |
| 946 | @kindex = @r{(Dired)} | 957 | @kindex = @r{(Dired)} |
| 947 | Compare the current file (the file at point) with another file (the | 958 | The @kbd{=} (@code{dired-diff}) command compares the current file |
| 948 | file at the mark) using the @code{diff} program (@code{dired-diff}). | 959 | (the file at point) with another file (read using the minibuffer) |
| 949 | The file at the mark is the first argument of @code{diff}, and the | 960 | using the @command{diff} program. The file specified with the |
| 950 | file at point is the second argument. This refers to the ordinary | 961 | minibuffer is the first argument of @command{diff}, and file at point |
| 951 | Emacs mark, not Dired marks; use @kbd{C-@key{SPC}} | 962 | is the second argument. The output of the @command{diff} program is |
| 952 | (@code{set-mark-command}) to set the mark at the first file's line | 963 | shown in a buffer using Diff mode (@pxref{Comparing Files}). |
| 953 | (@pxref{Setting Mark}). | 964 | |
| 954 | 965 | If the region is active, the default for the file read using the | |
| 955 | @findex dired-backup-diff | 966 | minibuffer is the file at the mark (i.e.@: the ordinary Emacs mark, |
| 956 | @kindex M-= @r{(Dired)} | 967 | not a Dired mark; @pxref{Setting Mark}). Otherwise, if the file at |
| 957 | @item M-= | 968 | point has a backup file (@pxref{Backup}), that is the default. |
| 958 | Compare the current file with its latest backup file | ||
| 959 | (@code{dired-backup-diff}). If the current file is itself a backup, | ||
| 960 | compare it with the file it is a backup of; this way, you can compare | ||
| 961 | a file with any one of its backups. | ||
| 962 | |||
| 963 | The backup file is the first file given to @code{diff}. | ||
| 964 | @end table | ||
| 965 | 969 | ||
| 966 | @node Subdirectories in Dired | 970 | @node Subdirectories in Dired |
| 967 | @section Subdirectories in Dired | 971 | @section Subdirectories in Dired |
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 1dfae79c788..d7ed6cc488f 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -1040,12 +1040,16 @@ decoding it using coding system @var{right} instead. | |||
| 1040 | @findex set-buffer-file-coding-system | 1040 | @findex set-buffer-file-coding-system |
| 1041 | The command @kbd{C-x @key{RET} f} | 1041 | The command @kbd{C-x @key{RET} f} |
| 1042 | (@code{set-buffer-file-coding-system}) sets the file coding system for | 1042 | (@code{set-buffer-file-coding-system}) sets the file coding system for |
| 1043 | the current buffer---in other words, it says which coding system to | 1043 | the current buffer (i.e.@: the coding system to use when saving or |
| 1044 | use when saving or reverting the visited file. You specify which | 1044 | reverting the file). You specify which coding system using the |
| 1045 | coding system using the minibuffer. If you specify a coding system | 1045 | minibuffer. You can also invoke this command by clicking with |
| 1046 | that cannot handle all of the characters in the buffer, Emacs warns | 1046 | @kbd{Mouse-3} on the coding system indicator in the mode line |
| 1047 | you about the troublesome characters when you actually save the | 1047 | (@pxref{Mode Line}). |
| 1048 | buffer. | 1048 | |
| 1049 | If you specify a coding system that cannot handle all the characters | ||
| 1050 | in the buffer, Emacs will warn you about the troublesome characters, | ||
| 1051 | and ask you to choose another coding system, when you try to save the | ||
| 1052 | buffer (@pxref{Output Coding}). | ||
| 1049 | 1053 | ||
| 1050 | @cindex specify end-of-line conversion | 1054 | @cindex specify end-of-line conversion |
| 1051 | You can also use this command to specify the end-of-line conversion | 1055 | You can also use this command to specify the end-of-line conversion |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index bed74bb688a..25dee5212e5 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -11,6 +11,12 @@ | |||
| 11 | 11 | ||
| 12 | 2012-10-24 Chong Yidong <cyd@gnu.org> | 12 | 2012-10-24 Chong Yidong <cyd@gnu.org> |
| 13 | 13 | ||
| 14 | * minibuf.texi (Text from Minibuffer): Document read-regexp | ||
| 15 | changes. | ||
| 16 | |||
| 17 | * nonascii.texi (Selecting a Representation): Document | ||
| 18 | set-buffer-multibyte changes. | ||
| 19 | |||
| 14 | * keymaps.texi (Toolkit Differences): Node deleted. | 20 | * keymaps.texi (Toolkit Differences): Node deleted. |
| 15 | (Easy Menu): New node. | 21 | (Easy Menu): New node. |
| 16 | 22 | ||
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 39b4fca3b25..79c83144f77 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -211,22 +211,25 @@ This function works by calling the | |||
| 211 | @end smallexample | 211 | @end smallexample |
| 212 | @end defun | 212 | @end defun |
| 213 | 213 | ||
| 214 | @defun read-regexp prompt &optional default | 214 | @defun read-regexp prompt &optional default history |
| 215 | This function reads a regular expression as a string from the | 215 | This function reads a regular expression as a string from the |
| 216 | minibuffer and returns it. The argument @var{prompt} is used as in | 216 | minibuffer and returns it. The argument @var{prompt} is used as in |
| 217 | @code{read-from-minibuffer}. The keymap used is | 217 | @code{read-from-minibuffer}. |
| 218 | @code{minibuffer-local-map}, and @code{regexp-history} is used as the | ||
| 219 | history list (@pxref{Minibuffer History, regexp-history}). | ||
| 220 | 218 | ||
| 221 | The optional argument @var{default} specifies a default value to | 219 | The optional argument @var{default} specifies a default value to |
| 222 | return if the user enters null input; it should be a string, or | 220 | return if the user enters null input; it should be a string, or |
| 223 | @code{nil}, which is equivalent to an empty string. | 221 | @code{nil}, which is equivalent to an empty string. |
| 224 | 222 | ||
| 225 | In addition, @code{read-regexp} collects a few useful candidates for | 223 | The optional argument @var{history}, if non-@code{nil}, is a symbol |
| 226 | input and passes them to @code{read-from-minibuffer}, to make them | 224 | specifying a minibuffer history list to use (@pxref{Minibuffer |
| 227 | available to the user as the ``future minibuffer history list'' | 225 | History}). If it is omitted or @code{nil}, the history list defaults |
| 228 | (@pxref{Minibuffer History, future list,, emacs, The GNU Emacs | 226 | to @code{regexp-history}. |
| 229 | Manual}). These candidates are: | 227 | |
| 228 | @code{read-regexp} also collects a few useful candidates for input and | ||
| 229 | passes them to @code{read-from-minibuffer}, to make them available to | ||
| 230 | the user as the ``future minibuffer history list'' (@pxref{Minibuffer | ||
| 231 | History, future list,, emacs, The GNU Emacs Manual}). These | ||
| 232 | candidates are: | ||
| 230 | 233 | ||
| 231 | @itemize @minus | 234 | @itemize @minus |
| 232 | @item | 235 | @item |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 2f6f516c587..e384d40176e 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -241,8 +241,12 @@ representation is in use. It also adjusts various data in the buffer | |||
| 241 | (including overlays, text properties and markers) so that they cover the | 241 | (including overlays, text properties and markers) so that they cover the |
| 242 | same text as they did before. | 242 | same text as they did before. |
| 243 | 243 | ||
| 244 | You cannot use @code{set-buffer-multibyte} on an indirect buffer, | 244 | This function signals an error if the buffer is narrowed, since the |
| 245 | because indirect buffers always inherit the representation of the | 245 | narrowing might have occurred in the middle of multibyte character |
| 246 | sequences. | ||
| 247 | |||
| 248 | This function also signals an error if the buffer is an indirect | ||
| 249 | buffer. An indirect buffer always inherits the representation of its | ||
| 246 | base buffer. | 250 | base buffer. |
| 247 | @end defun | 251 | @end defun |
| 248 | 252 | ||
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 76859e09d42..ec46ab5eb05 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,5 +1,26 @@ | |||
| 1 | 2012-10-25 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * cl.texi: Don't mess with the TeX section number counter. | ||
| 4 | Use Texinfo recommended convention for quotes+punctuation. | ||
| 5 | (Overview, Sequence Functions): Rephrase for better line-breaking. | ||
| 6 | (Time of Evaluation, Type Predicates, Modify Macros, Function Bindings) | ||
| 7 | (Macro Bindings, Conditionals, Iteration, Loop Basics) | ||
| 8 | (Random Numbers, Mapping over Sequences, Structures) | ||
| 9 | (Porting Common Lisp): Further updates for cl-lib namespace. | ||
| 10 | (Modify Macros, Declarations, Macro Bindings, Structures): | ||
| 11 | Break long lines in examples. | ||
| 12 | (Dynamic Bindings): Update for changed progv behavior. | ||
| 13 | (Loop Examples, Efficiency Concerns): Markup fixes. | ||
| 14 | (Structures): Remove TeX margin change. | ||
| 15 | (Declarations): Fix typos. | ||
| 16 | |||
| 1 | 2012-10-24 Glenn Morris <rgm@gnu.org> | 17 | 2012-10-24 Glenn Morris <rgm@gnu.org> |
| 2 | 18 | ||
| 19 | * cl.texi (Overview, Multiple Values, Creating Symbols) | ||
| 20 | (Numerical Functions): Say less/nothing about the original cl.el. | ||
| 21 | (Old CL Compatibility): Remove. | ||
| 22 | (Assertions): Remove ignore-errors (standard Elisp for some time). | ||
| 23 | |||
| 3 | * cl.texi (Basic Setf, Macros, Declarations, Symbols, Numbers) | 24 | * cl.texi (Basic Setf, Macros, Declarations, Symbols, Numbers) |
| 4 | (Sequences, Lists, Structures, Assertions, Efficiency Concerns) | 25 | (Sequences, Lists, Structures, Assertions, Efficiency Concerns) |
| 5 | (Efficiency Concerns, Efficiency Concerns) | 26 | (Efficiency Concerns, Efficiency Concerns) |
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 5908e94be02..9200958a1b5 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi | |||
| @@ -65,11 +65,10 @@ developing GNU and promoting software freedom.'' | |||
| 65 | * Sequences:: Mapping, functions, searching, sorting. | 65 | * Sequences:: Mapping, functions, searching, sorting. |
| 66 | * Lists:: @code{cl-caddr}, @code{cl-sublis}, @code{cl-member}, @code{cl-assoc}, etc. | 66 | * Lists:: @code{cl-caddr}, @code{cl-sublis}, @code{cl-member}, @code{cl-assoc}, etc. |
| 67 | * Structures:: @code{cl-defstruct}. | 67 | * Structures:: @code{cl-defstruct}. |
| 68 | * Assertions:: @code{cl-check-type}, @code{cl-assert}, @code{ignore-errors}. | 68 | * Assertions:: @code{cl-check-type}, @code{cl-assert}. |
| 69 | 69 | ||
| 70 | * Efficiency Concerns:: Hints and techniques. | 70 | * Efficiency Concerns:: Hints and techniques. |
| 71 | * Common Lisp Compatibility:: All known differences with Steele. | 71 | * Common Lisp Compatibility:: All known differences with Steele. |
| 72 | * Old CL Compatibility:: All known differences with old cl.el. | ||
| 73 | * Porting Common Lisp:: Hints for porting Common Lisp code. | 72 | * Porting Common Lisp:: Hints for porting Common Lisp code. |
| 74 | 73 | ||
| 75 | * GNU Free Documentation License:: The license for this documentation. | 74 | * GNU Free Documentation License:: The license for this documentation. |
| @@ -116,19 +115,16 @@ features. | |||
| 116 | 115 | ||
| 117 | @end itemize | 116 | @end itemize |
| 118 | 117 | ||
| 119 | The package described here was originally written by Dave Gillespie, | 118 | This package was originally written by Dave Gillespie, |
| 120 | @file{daveg@@synaptics.com}, as a total rewrite of an earlier | 119 | @file{daveg@@synaptics.com}, as a total rewrite of an earlier 1986 |
| 121 | 1986 @file{cl.el} package by Cesar Quiroz. Most features of the | 120 | @file{cl.el} package by Cesar Quiroz. Care has been taken to ensure |
| 122 | Quiroz package were retained; any incompatibilities are | 121 | that each function is defined efficiently, concisely, and with minimal |
| 123 | noted in the descriptions below. Care has been taken in this | 122 | impact on the rest of the Emacs environment. Stefan Monnier added the |
| 124 | version to ensure that each function is defined efficiently, | 123 | file @file{cl-lib.el} and rationalized the namespace for Emacs 24.3. |
| 125 | concisely, and with minimal impact on the rest of the Emacs | ||
| 126 | environment. Stefan Monnier added the file @file{cl-lib.el} and | ||
| 127 | rationalized the namespace for Emacs 24.3. | ||
| 128 | 124 | ||
| 129 | @menu | 125 | @menu |
| 130 | * Usage:: How to use the CL package. | 126 | * Usage:: How to use the CL package. |
| 131 | * Organization:: The package's five component files. | 127 | * Organization:: The package's component files. |
| 132 | * Naming Conventions:: Notes on CL function names. | 128 | * Naming Conventions:: Notes on CL function names. |
| 133 | @end menu | 129 | @end menu |
| 134 | 130 | ||
| @@ -198,12 +194,9 @@ no such restriction on the use of @code{cl-lib}. New code should use | |||
| 198 | @code{cl-lib} rather than @code{cl}. @xref{Naming Conventions}. | 194 | @code{cl-lib} rather than @code{cl}. @xref{Naming Conventions}. |
| 199 | 195 | ||
| 200 | There is one more file, @file{cl-compat.el}, which defines some | 196 | There is one more file, @file{cl-compat.el}, which defines some |
| 201 | routines from the older CL package that are not otherwise | 197 | routines from the older Quiroz CL package that are not otherwise |
| 202 | present in the new package. This includes internal routines | 198 | present in the new package. This file is obsolete and should not be |
| 203 | like @code{setelt} and @code{zip-lists}, deprecated features | 199 | used in new code. |
| 204 | like @code{defkeyword}, and an emulation of the old-style | ||
| 205 | multiple-values feature. This file is obsolete and should not be used | ||
| 206 | in new code. @xref{Old CL Compatibility}. | ||
| 207 | 200 | ||
| 208 | @node Naming Conventions | 201 | @node Naming Conventions |
| 209 | @section Naming Conventions | 202 | @section Naming Conventions |
| @@ -260,10 +253,6 @@ and the @code{cl-eval-when} construct. | |||
| 260 | * Time of Evaluation:: The @code{cl-eval-when} construct. | 253 | * Time of Evaluation:: The @code{cl-eval-when} construct. |
| 261 | @end menu | 254 | @end menu |
| 262 | 255 | ||
| 263 | @iftex | ||
| 264 | @secno=1 | ||
| 265 | @end iftex | ||
| 266 | |||
| 267 | @node Argument Lists | 256 | @node Argument Lists |
| 268 | @section Argument Lists | 257 | @section Argument Lists |
| 269 | 258 | ||
| @@ -572,16 +561,16 @@ last four would have been equivalent to the corresponding @code{setq}s. | |||
| 572 | Note that @code{(cl-eval-when (load eval) @dots{})} is equivalent | 561 | Note that @code{(cl-eval-when (load eval) @dots{})} is equivalent |
| 573 | to @code{(progn @dots{})} in all contexts. The compiler treats | 562 | to @code{(progn @dots{})} in all contexts. The compiler treats |
| 574 | certain top-level forms, like @code{defmacro} (sort-of) and | 563 | certain top-level forms, like @code{defmacro} (sort-of) and |
| 575 | @code{require}, as if they were wrapped in @code{(eval-when | 564 | @code{require}, as if they were wrapped in @code{(cl-eval-when |
| 576 | (compile load eval) @dots{})}. | 565 | (compile load eval) @dots{})}. |
| 577 | @end defspec | 566 | @end defspec |
| 578 | 567 | ||
| 579 | Emacs includes two special forms related to @code{cl-eval-when}. | 568 | Emacs includes two special forms related to @code{cl-eval-when}. |
| 580 | One of these, @code{eval-when-compile}, is not quite equivalent to | 569 | One of these, @code{eval-when-compile}, is not quite equivalent to |
| 581 | any @code{eval-when} construct and is described below. | 570 | any @code{cl-eval-when} construct and is described below. |
| 582 | 571 | ||
| 583 | The other form, @code{(eval-and-compile @dots{})}, is exactly | 572 | The other form, @code{(eval-and-compile @dots{})}, is exactly |
| 584 | equivalent to @samp{(eval-when (compile load eval) @dots{})} and | 573 | equivalent to @samp{(cl-eval-when (compile load eval) @dots{})} and |
| 585 | so is not itself defined by this package. | 574 | so is not itself defined by this package. |
| 586 | 575 | ||
| 587 | @defspec eval-when-compile forms... | 576 | @defspec eval-when-compile forms... |
| @@ -653,10 +642,6 @@ facts are true or false. | |||
| 653 | @node Type Predicates | 642 | @node Type Predicates |
| 654 | @section Type Predicates | 643 | @section Type Predicates |
| 655 | 644 | ||
| 656 | @noindent | ||
| 657 | The @code{CL} package defines a version of the Common Lisp @code{typep} | ||
| 658 | predicate. | ||
| 659 | |||
| 660 | @defun cl-typep object type | 645 | @defun cl-typep object type |
| 661 | Check if @var{object} is of type @var{type}, where @var{type} is a | 646 | Check if @var{object} is of type @var{type}, where @var{type} is a |
| 662 | (quoted) type name of the sort used by Common Lisp. For example, | 647 | (quoted) type name of the sort used by Common Lisp. For example, |
| @@ -737,7 +722,7 @@ related to @code{cl-typep}. | |||
| 737 | @defun cl-coerce object type | 722 | @defun cl-coerce object type |
| 738 | This function attempts to convert @var{object} to the specified | 723 | This function attempts to convert @var{object} to the specified |
| 739 | @var{type}. If @var{object} is already of that type as determined by | 724 | @var{type}. If @var{object} is already of that type as determined by |
| 740 | @code{typep}, it is simply returned. Otherwise, certain types of | 725 | @code{cl-typep}, it is simply returned. Otherwise, certain types of |
| 741 | conversions will be made: If @var{type} is any sequence type | 726 | conversions will be made: If @var{type} is any sequence type |
| 742 | (@code{string}, @code{list}, etc.) then @var{object} will be | 727 | (@code{string}, @code{list}, etc.) then @var{object} will be |
| 743 | converted to that type if possible. If @var{type} is | 728 | converted to that type if possible. If @var{type} is |
| @@ -1109,7 +1094,8 @@ does, which means the above form is @emph{not} equivalent to the | |||
| 1109 | ``obvious'' expansion, | 1094 | ``obvious'' expansion, |
| 1110 | 1095 | ||
| 1111 | @example | 1096 | @example |
| 1112 | (setf (aref vec (cl-incf i)) (1+ (aref vec (cl-incf i)))) ; Wrong! | 1097 | (setf (aref vec (cl-incf i)) |
| 1098 | (1+ (aref vec (cl-incf i)))) ; wrong! | ||
| 1113 | @end example | 1099 | @end example |
| 1114 | 1100 | ||
| 1115 | @noindent | 1101 | @noindent |
| @@ -1134,6 +1120,7 @@ This macro decrements the number stored in @var{place} by one, or | |||
| 1134 | by @var{x} if specified. | 1120 | by @var{x} if specified. |
| 1135 | @end defspec | 1121 | @end defspec |
| 1136 | 1122 | ||
| 1123 | @c FIXME move to lispref, add generalized variables. | ||
| 1137 | @defspec pop place | 1124 | @defspec pop place |
| 1138 | This macro removes and returns the first element of the list stored | 1125 | This macro removes and returns the first element of the list stored |
| 1139 | in @var{place}. It is analogous to @code{(prog1 (car @var{place}) | 1126 | in @var{place}. It is analogous to @code{(prog1 (car @var{place}) |
| @@ -1141,17 +1128,18 @@ in @var{place}. It is analogous to @code{(prog1 (car @var{place}) | |||
| 1141 | to evaluate all subforms only once. | 1128 | to evaluate all subforms only once. |
| 1142 | @end defspec | 1129 | @end defspec |
| 1143 | 1130 | ||
| 1131 | @c FIXME move to lispref, add generalized variables. | ||
| 1144 | @defspec push x place | 1132 | @defspec push x place |
| 1145 | This macro inserts @var{x} at the front of the list stored in | 1133 | This macro inserts @var{x} at the front of the list stored in |
| 1146 | @var{place}. It is analogous to @code{(setf @var{place} (cons | 1134 | @var{place}. It is analogous to @code{(setf @var{place} (cons |
| 1147 | @var{x} @var{place}))}, except for evaluation of the subforms. | 1135 | @var{x} @var{place}))}, except for evaluation of the subforms. |
| 1148 | @end defspec | 1136 | @end defspec |
| 1149 | 1137 | ||
| 1150 | @defspec pushnew x place @t{&key :test :test-not :key} | 1138 | @defspec cl-pushnew x place @t{&key :test :test-not :key} |
| 1151 | This macro inserts @var{x} at the front of the list stored in | 1139 | This macro inserts @var{x} at the front of the list stored in |
| 1152 | @var{place}, but only if @var{x} was not @code{eql} to any | 1140 | @var{place}, but only if @var{x} was not @code{eql} to any |
| 1153 | existing element of the list. The optional keyword arguments | 1141 | existing element of the list. The optional keyword arguments |
| 1154 | are interpreted in the same way as for @code{adjoin}. | 1142 | are interpreted in the same way as for @code{cl-adjoin}. |
| 1155 | @xref{Lists as Sets}. | 1143 | @xref{Lists as Sets}. |
| 1156 | @end defspec | 1144 | @end defspec |
| 1157 | 1145 | ||
| @@ -1175,9 +1163,9 @@ except that the subforms of @var{a}, @var{b}, and @var{c} are actually | |||
| 1175 | evaluated only once each and in the apparent order. | 1163 | evaluated only once each and in the apparent order. |
| 1176 | @end defspec | 1164 | @end defspec |
| 1177 | 1165 | ||
| 1178 | @defspec rotatef place@dots{} | 1166 | @defspec cl-rotatef place@dots{} |
| 1179 | This macro rotates the @var{place}s left by one in circular fashion. | 1167 | This macro rotates the @var{place}s left by one in circular fashion. |
| 1180 | Thus, @code{(rotatef @var{a} @var{b} @var{c} @var{d})} is equivalent to | 1168 | Thus, @code{(cl-rotatef @var{a} @var{b} @var{c} @var{d})} is equivalent to |
| 1181 | 1169 | ||
| 1182 | @example | 1170 | @example |
| 1183 | (psetf @var{a} @var{b} | 1171 | (psetf @var{a} @var{b} |
| @@ -1187,8 +1175,8 @@ Thus, @code{(rotatef @var{a} @var{b} @var{c} @var{d})} is equivalent to | |||
| 1187 | @end example | 1175 | @end example |
| 1188 | 1176 | ||
| 1189 | @noindent | 1177 | @noindent |
| 1190 | except for the evaluation of subforms. @code{rotatef} always | 1178 | except for the evaluation of subforms. @code{cl-rotatef} always |
| 1191 | returns @code{nil}. Note that @code{(rotatef @var{a} @var{b})} | 1179 | returns @code{nil}. Note that @code{(cl-rotatef @var{a} @var{b})} |
| 1192 | conveniently exchanges @var{a} and @var{b}. | 1180 | conveniently exchanges @var{a} and @var{b}. |
| 1193 | @end defspec | 1181 | @end defspec |
| 1194 | 1182 | ||
| @@ -1247,40 +1235,40 @@ If the symbol is not bound on entry, it is simply made unbound by | |||
| 1247 | @code{makunbound} or @code{fmakunbound} on exit. | 1235 | @code{makunbound} or @code{fmakunbound} on exit. |
| 1248 | @end defspec | 1236 | @end defspec |
| 1249 | 1237 | ||
| 1250 | @defspec letf* (bindings@dots{}) forms@dots{} | 1238 | @defspec cl-letf* (bindings@dots{}) forms@dots{} |
| 1251 | This macro is to @code{letf} what @code{let*} is to @code{let}: | 1239 | This macro is to @code{letf} what @code{let*} is to @code{let}: |
| 1252 | It does the bindings in sequential rather than parallel order. | 1240 | It does the bindings in sequential rather than parallel order. |
| 1253 | @end defspec | 1241 | @end defspec |
| 1254 | 1242 | ||
| 1255 | @defspec callf @var{function} @var{place} @var{args}@dots{} | 1243 | @defspec cl-callf @var{function} @var{place} @var{args}@dots{} |
| 1256 | This is the ``generic'' modify macro. It calls @var{function}, | 1244 | This is the ``generic'' modify macro. It calls @var{function}, |
| 1257 | which should be an unquoted function name, macro name, or lambda. | 1245 | which should be an unquoted function name, macro name, or lambda. |
| 1258 | It passes @var{place} and @var{args} as arguments, and assigns the | 1246 | It passes @var{place} and @var{args} as arguments, and assigns the |
| 1259 | result back to @var{place}. For example, @code{(cl-incf @var{place} | 1247 | result back to @var{place}. For example, @code{(cl-incf @var{place} |
| 1260 | @var{n})} is the same as @code{(callf + @var{place} @var{n})}. | 1248 | @var{n})} is the same as @code{(cl-callf + @var{place} @var{n})}. |
| 1261 | Some more examples: | 1249 | Some more examples: |
| 1262 | 1250 | ||
| 1263 | @example | 1251 | @example |
| 1264 | (callf abs my-number) | 1252 | (cl-callf abs my-number) |
| 1265 | (callf concat (buffer-name) "<" (int-to-string n) ">") | 1253 | (cl-callf concat (buffer-name) "<" (number-to-string n) ">") |
| 1266 | (callf union happy-people (list joe bob) :test 'same-person) | 1254 | (cl-callf cl-union happy-people (list joe bob) :test 'same-person) |
| 1267 | @end example | 1255 | @end example |
| 1268 | 1256 | ||
| 1269 | @xref{Customizing Setf}, for @code{define-modify-macro}, a way | 1257 | @xref{Customizing Setf}, for @code{define-modify-macro}, a way |
| 1270 | to create even more concise notations for modify macros. Note | 1258 | to create even more concise notations for modify macros. Note |
| 1271 | again that @code{callf} is an extension to standard Common Lisp. | 1259 | again that @code{cl-callf} is an extension to standard Common Lisp. |
| 1272 | @end defspec | 1260 | @end defspec |
| 1273 | 1261 | ||
| 1274 | @defspec callf2 @var{function} @var{arg1} @var{place} @var{args}@dots{} | 1262 | @defspec cl-callf2 @var{function} @var{arg1} @var{place} @var{args}@dots{} |
| 1275 | This macro is like @code{callf}, except that @var{place} is | 1263 | This macro is like @code{cl-callf}, except that @var{place} is |
| 1276 | the @emph{second} argument of @var{function} rather than the | 1264 | the @emph{second} argument of @var{function} rather than the |
| 1277 | first. For example, @code{(push @var{x} @var{place})} is | 1265 | first. For example, @code{(push @var{x} @var{place})} is |
| 1278 | equivalent to @code{(callf2 cons @var{x} @var{place})}. | 1266 | equivalent to @code{(cl-callf2 cons @var{x} @var{place})}. |
| 1279 | @end defspec | 1267 | @end defspec |
| 1280 | 1268 | ||
| 1281 | The @code{callf} and @code{callf2} macros serve as building | 1269 | The @code{cl-callf} and @code{cl-callf2} macros serve as building |
| 1282 | blocks for other macros like @code{cl-incf}, @code{pushnew}, and | 1270 | blocks for other macros like @code{cl-incf}, @code{cl-pushnew}, and |
| 1283 | @code{define-modify-macro}. The @code{letf} and @code{letf*} | 1271 | @code{define-modify-macro}. The @code{letf} and @code{cl-letf*} |
| 1284 | macros are used in the processing of symbol macros; | 1272 | macros are used in the processing of symbol macros; |
| 1285 | @pxref{Macro Bindings}. | 1273 | @pxref{Macro Bindings}. |
| 1286 | 1274 | ||
| @@ -1494,10 +1482,6 @@ or otherwise declared; in newer Common Lisps, this would not be | |||
| 1494 | an error since the function @code{(setf @var{func})} might be | 1482 | an error since the function @code{(setf @var{func})} might be |
| 1495 | defined later. | 1483 | defined later. |
| 1496 | 1484 | ||
| 1497 | @iftex | ||
| 1498 | @secno=4 | ||
| 1499 | @end iftex | ||
| 1500 | |||
| 1501 | @node Variable Bindings | 1485 | @node Variable Bindings |
| 1502 | @section Variable Bindings | 1486 | @section Variable Bindings |
| 1503 | 1487 | ||
| @@ -1530,7 +1514,7 @@ set of variables computed at run-time. The expressions | |||
| 1530 | of symbols and values, respectively. The symbols are bound to the | 1514 | of symbols and values, respectively. The symbols are bound to the |
| 1531 | corresponding values for the duration of the body @var{form}s. | 1515 | corresponding values for the duration of the body @var{form}s. |
| 1532 | If @var{values} is shorter than @var{symbols}, the last few symbols | 1516 | If @var{values} is shorter than @var{symbols}, the last few symbols |
| 1533 | are made unbound (as if by @code{makunbound}) inside the body. | 1517 | are bound to @code{nil}. |
| 1534 | If @var{symbols} is shorter than @var{values}, the excess values | 1518 | If @var{symbols} is shorter than @var{values}, the excess values |
| 1535 | are ignored. | 1519 | are ignored. |
| 1536 | @end defspec | 1520 | @end defspec |
| @@ -1661,7 +1645,7 @@ This form establishes @code{let}-style bindings on the function | |||
| 1661 | cells of symbols rather than on the value cells. Each @var{binding} | 1645 | cells of symbols rather than on the value cells. Each @var{binding} |
| 1662 | must be a list of the form @samp{(@var{name} @var{arglist} | 1646 | must be a list of the form @samp{(@var{name} @var{arglist} |
| 1663 | @var{forms}@dots{})}, which defines a function exactly as if | 1647 | @var{forms}@dots{})}, which defines a function exactly as if |
| 1664 | it were a @code{defun*} form. The function @var{name} is defined | 1648 | it were a @code{cl-defun} form. The function @var{name} is defined |
| 1665 | accordingly for the duration of the body of the @code{flet}; then | 1649 | accordingly for the duration of the body of the @code{flet}; then |
| 1666 | the old function definition, or lack thereof, is restored. | 1650 | the old function definition, or lack thereof, is restored. |
| 1667 | 1651 | ||
| @@ -1729,7 +1713,7 @@ function, or a use of its name quoted by @code{quote} or | |||
| 1729 | @subsection Macro Bindings | 1713 | @subsection Macro Bindings |
| 1730 | 1714 | ||
| 1731 | @noindent | 1715 | @noindent |
| 1732 | These forms create local macros and ``symbol macros.'' | 1716 | These forms create local macros and ``symbol macros''. |
| 1733 | 1717 | ||
| 1734 | @defspec cl-macrolet (bindings@dots{}) forms@dots{} | 1718 | @defspec cl-macrolet (bindings@dots{}) forms@dots{} |
| 1735 | This form is analogous to @code{flet}, but for macros instead of | 1719 | This form is analogous to @code{flet}, but for macros instead of |
| @@ -1765,7 +1749,7 @@ I.e., @code{(setq foo 4)} in the above would be equivalent to | |||
| 1765 | @code{(setf foo 4)}, which in turn expands to @code{(setf (car bar) 4)}. | 1749 | @code{(setf foo 4)}, which in turn expands to @code{(setf (car bar) 4)}. |
| 1766 | 1750 | ||
| 1767 | Likewise, a @code{let} or @code{let*} binding a symbol macro is | 1751 | Likewise, a @code{let} or @code{let*} binding a symbol macro is |
| 1768 | treated like a @code{letf} or @code{letf*}. This differs from true | 1752 | treated like a @code{letf} or @code{cl-letf*}. This differs from true |
| 1769 | Common Lisp, where the rules of lexical scoping cause a @code{let} | 1753 | Common Lisp, where the rules of lexical scoping cause a @code{let} |
| 1770 | binding to shadow a @code{cl-symbol-macrolet} binding. In this package, | 1754 | binding to shadow a @code{cl-symbol-macrolet} binding. In this package, |
| 1771 | only @code{lexical-let} and @code{lexical-let*} will shadow a symbol | 1755 | only @code{lexical-let} and @code{lexical-let*} will shadow a symbol |
| @@ -1779,8 +1763,9 @@ expansion of another macro: | |||
| 1779 | (cl-defmacro my-dolist ((x list) &rest body) | 1763 | (cl-defmacro my-dolist ((x list) &rest body) |
| 1780 | (let ((var (gensym))) | 1764 | (let ((var (gensym))) |
| 1781 | (list 'cl-loop 'for var 'on list 'do | 1765 | (list 'cl-loop 'for var 'on list 'do |
| 1782 | (cl-list* 'cl-symbol-macrolet (list (list x (list 'car var))) | 1766 | (cl-list* 'cl-symbol-macrolet |
| 1783 | body)))) | 1767 | (list (list x (list 'car var))) |
| 1768 | body)))) | ||
| 1784 | 1769 | ||
| 1785 | (setq mylist '(1 2 3 4)) | 1770 | (setq mylist '(1 2 3 4)) |
| 1786 | (my-dolist (x mylist) (cl-incf x)) | 1771 | (my-dolist (x mylist) (cl-incf x)) |
| @@ -1834,7 +1819,7 @@ of the form | |||
| 1834 | where @var{keylist} is a list of key values. If there is exactly | 1819 | where @var{keylist} is a list of key values. If there is exactly |
| 1835 | one value, and it is not a cons cell or the symbol @code{nil} or | 1820 | one value, and it is not a cons cell or the symbol @code{nil} or |
| 1836 | @code{t}, then it can be used by itself as a @var{keylist} without | 1821 | @code{t}, then it can be used by itself as a @var{keylist} without |
| 1837 | being enclosed in a list. All key values in the @code{case} form | 1822 | being enclosed in a list. All key values in the @code{cl-case} form |
| 1838 | must be distinct. The final clauses may use @code{t} in place of | 1823 | must be distinct. The final clauses may use @code{t} in place of |
| 1839 | a @var{keylist} to indicate a default clause that should be taken | 1824 | a @var{keylist} to indicate a default clause that should be taken |
| 1840 | if none of the other clauses match. (The symbol @code{otherwise} | 1825 | if none of the other clauses match. (The symbol @code{otherwise} |
| @@ -2005,7 +1990,7 @@ evaluated, then each @var{var} is set to the associated @var{step} | |||
| 2005 | expression (as if by a @code{cl-psetq} form) and the next iteration | 1990 | expression (as if by a @code{cl-psetq} form) and the next iteration |
| 2006 | begins. Once the @var{end-test} becomes true, the @var{result} | 1991 | begins. Once the @var{end-test} becomes true, the @var{result} |
| 2007 | forms are evaluated (with the @var{var}s still bound to their | 1992 | forms are evaluated (with the @var{var}s still bound to their |
| 2008 | values) to produce the result returned by @code{do}. | 1993 | values) to produce the result returned by @code{cl-do}. |
| 2009 | 1994 | ||
| 2010 | The entire @code{cl-do} loop is enclosed in an implicit @code{nil} | 1995 | The entire @code{cl-do} loop is enclosed in an implicit @code{nil} |
| 2011 | block, so that you can use @code{(cl-return)} to break out of the | 1996 | block, so that you can use @code{(cl-return)} to break out of the |
| @@ -2013,7 +1998,7 @@ loop at any time. | |||
| 2013 | 1998 | ||
| 2014 | If there are no @var{result} forms, the loop returns @code{nil}. | 1999 | If there are no @var{result} forms, the loop returns @code{nil}. |
| 2015 | If a given @var{var} has no @var{step} form, it is bound to its | 2000 | If a given @var{var} has no @var{step} form, it is bound to its |
| 2016 | @var{init} value but not otherwise modified during the @code{do} | 2001 | @var{init} value but not otherwise modified during the @code{cl-do} |
| 2017 | loop (unless the code explicitly modifies it); this case is just | 2002 | loop (unless the code explicitly modifies it); this case is just |
| 2018 | a shorthand for putting a @code{(let ((@var{var} @var{init})) @dots{})} | 2003 | a shorthand for putting a @code{(let ((@var{var} @var{init})) @dots{})} |
| 2019 | around the loop. If @var{init} is also omitted it defaults to | 2004 | around the loop. If @var{init} is also omitted it defaults to |
| @@ -2105,7 +2090,7 @@ that they are either too simple and limited, such as Common Lisp's | |||
| 2105 | obscure, like Common Lisp's @code{do} loop. | 2090 | obscure, like Common Lisp's @code{do} loop. |
| 2106 | 2091 | ||
| 2107 | To remedy this, recent versions of Common Lisp have added a new | 2092 | To remedy this, recent versions of Common Lisp have added a new |
| 2108 | construct called the ``Loop Facility'' or ``@code{loop} macro,'' | 2093 | construct called the ``Loop Facility'' or ``@code{loop} macro'', |
| 2109 | with an easy-to-use but very powerful and expressive syntax. | 2094 | with an easy-to-use but very powerful and expressive syntax. |
| 2110 | 2095 | ||
| 2111 | @menu | 2096 | @menu |
| @@ -2167,7 +2152,7 @@ them to return a value by using an accumulation clause like | |||
| 2167 | @code{collect}, an end-test clause like @code{always}, or an | 2152 | @code{collect}, an end-test clause like @code{always}, or an |
| 2168 | explicit @code{return} clause to jump out of the implicit block. | 2153 | explicit @code{return} clause to jump out of the implicit block. |
| 2169 | (Because the loop body is enclosed in an implicit block, you can | 2154 | (Because the loop body is enclosed in an implicit block, you can |
| 2170 | also use regular Lisp @code{return} or @code{return-from} to | 2155 | also use regular Lisp @code{cl-return} or @code{cl-return-from} to |
| 2171 | break out of the loop.) | 2156 | break out of the loop.) |
| 2172 | @end defspec | 2157 | @end defspec |
| 2173 | 2158 | ||
| @@ -2191,7 +2176,7 @@ language. | |||
| 2191 | 2176 | ||
| 2192 | @noindent | 2177 | @noindent |
| 2193 | This loop iterates over all Emacs buffers, using the list | 2178 | This loop iterates over all Emacs buffers, using the list |
| 2194 | returned by @code{buffer-list}. For each buffer @code{buf}, | 2179 | returned by @code{buffer-list}. For each buffer @var{buf}, |
| 2195 | it calls @code{buffer-file-name} and collects the results into | 2180 | it calls @code{buffer-file-name} and collects the results into |
| 2196 | a list, which is then returned from the @code{cl-loop} construct. | 2181 | a list, which is then returned from the @code{cl-loop} construct. |
| 2197 | The result is a list of the file names of all the buffers in | 2182 | The result is a list of the file names of all the buffers in |
| @@ -2824,6 +2809,7 @@ Of course, @code{return} is generally used inside an @code{if} or | |||
| 2824 | the loop would never get to ``loop'' more than once. | 2809 | the loop would never get to ``loop'' more than once. |
| 2825 | 2810 | ||
| 2826 | The clause @samp{return @var{form}} is equivalent to | 2811 | The clause @samp{return @var{form}} is equivalent to |
| 2812 | @c FIXME cl-do, cl-return? | ||
| 2827 | @samp{do (return @var{form})} (or @code{return-from} if the loop | 2813 | @samp{do (return @var{form})} (or @code{return-from} if the loop |
| 2828 | was named). The @code{return} clause is implemented a bit more | 2814 | was named). The @code{return} clause is implemented a bit more |
| 2829 | efficiently, though. | 2815 | efficiently, though. |
| @@ -2875,13 +2861,6 @@ It then sets the @var{var}s to these respective values, as if by | |||
| 2875 | in @code{cl-multiple-value-bind}. | 2861 | in @code{cl-multiple-value-bind}. |
| 2876 | @end defspec | 2862 | @end defspec |
| 2877 | 2863 | ||
| 2878 | The older Quiroz package attempted a more faithful (but still | ||
| 2879 | imperfect) emulation of Common Lisp multiple values. The old | ||
| 2880 | method ``usually'' simulated true multiple values quite well, | ||
| 2881 | but under certain circumstances would leave spurious return | ||
| 2882 | values in memory where a later, unrelated @code{cl-multiple-value-bind} | ||
| 2883 | form would see them. | ||
| 2884 | |||
| 2885 | Since a perfect emulation is not feasible in Emacs Lisp, this | 2864 | Since a perfect emulation is not feasible in Emacs Lisp, this |
| 2886 | package opts to keep it as simple and predictable as possible. | 2865 | package opts to keep it as simple and predictable as possible. |
| 2887 | 2866 | ||
| @@ -3074,7 +3053,8 @@ and declare it inline all at once. | |||
| 3074 | 3053 | ||
| 3075 | @example | 3054 | @example |
| 3076 | (cl-declaim (inline foo bar)) | 3055 | (cl-declaim (inline foo bar)) |
| 3077 | (cl-eval-when (compile load eval) (cl-proclaim '(inline foo bar))) | 3056 | (cl-eval-when (compile load eval) |
| 3057 | (cl-proclaim '(inline foo bar))) | ||
| 3078 | (defsubst foo (...) ...) ; instead of defun | 3058 | (defsubst foo (...) ...) ; instead of defun |
| 3079 | @end example | 3059 | @end example |
| 3080 | 3060 | ||
| @@ -3104,16 +3084,15 @@ The word @code{optimize} is followed by any number of lists like | |||
| 3104 | @code{(speed 3)} or @code{(safety 2)}. Common Lisp defines several | 3084 | @code{(speed 3)} or @code{(safety 2)}. Common Lisp defines several |
| 3105 | optimization ``qualities''; this package ignores all but @code{speed} | 3085 | optimization ``qualities''; this package ignores all but @code{speed} |
| 3106 | and @code{safety}. The value of a quality should be an integer from | 3086 | and @code{safety}. The value of a quality should be an integer from |
| 3107 | 0 to 3, with 0 meaning ``unimportant'' and 3 meaning ``very important.'' | 3087 | 0 to 3, with 0 meaning ``unimportant'' and 3 meaning ``very important''. |
| 3108 | The default level for both qualities is 1. | 3088 | The default level for both qualities is 1. |
| 3109 | 3089 | ||
| 3110 | In this package, with the optimizing compiler, the | 3090 | In this package, with the optimizing compiler, the |
| 3111 | @c FIXME does not exist? | 3091 | @code{speed} quality is tied to the @code{byte-optimize} |
| 3112 | @code{speed} quality is tied to the @code{byte-compile-optimize} | ||
| 3113 | flag, which is set to @code{nil} for @code{(speed 0)} and to | 3092 | flag, which is set to @code{nil} for @code{(speed 0)} and to |
| 3114 | @code{t} for higher settings; and the @code{safety} quality is | 3093 | @code{t} for higher settings; and the @code{safety} quality is |
| 3115 | tied to the @code{byte-compile-delete-errors} flag, which is | 3094 | tied to the @code{byte-compile-delete-errors} flag, which is |
| 3116 | set to @code{t} for @code{(safety 3)} and to @code{nil} for all | 3095 | set to @code{nil} for @code{(safety 3)} and to @code{t} for all |
| 3117 | lower settings. (The latter flag controls whether the compiler | 3096 | lower settings. (The latter flag controls whether the compiler |
| 3118 | is allowed to optimize out code whose only side-effect could | 3097 | is allowed to optimize out code whose only side-effect could |
| 3119 | be to signal an error, e.g., rewriting @code{(progn foo bar)} to | 3098 | be to signal an error, e.g., rewriting @code{(progn foo bar)} to |
| @@ -3138,7 +3117,7 @@ automatically be unset after the enclosing form is done.) | |||
| 3138 | This declaration controls what sorts of warnings are generated | 3117 | This declaration controls what sorts of warnings are generated |
| 3139 | by the byte compiler. Again, only the optimizing compiler | 3118 | by the byte compiler. Again, only the optimizing compiler |
| 3140 | generates warnings. The word @code{warn} is followed by any | 3119 | generates warnings. The word @code{warn} is followed by any |
| 3141 | number of ``warning qualities,'' similar in form to optimization | 3120 | number of ``warning qualities'', similar in form to optimization |
| 3142 | qualities. The currently supported warning types are | 3121 | qualities. The currently supported warning types are |
| 3143 | @code{redefine}, @code{callargs}, @code{unresolved}, and | 3122 | @code{redefine}, @code{callargs}, @code{unresolved}, and |
| 3144 | @code{free-vars}; in the current system, a value of 0 will | 3123 | @code{free-vars}; in the current system, a value of 0 will |
| @@ -3240,10 +3219,6 @@ whereas if it occurs later, this simply uses @code{setcdr} to splice | |||
| 3240 | out the property and value cells. | 3219 | out the property and value cells. |
| 3241 | @end defspec | 3220 | @end defspec |
| 3242 | 3221 | ||
| 3243 | @iftex | ||
| 3244 | @secno=2 | ||
| 3245 | @end iftex | ||
| 3246 | |||
| 3247 | @node Creating Symbols | 3222 | @node Creating Symbols |
| 3248 | @section Creating Symbols | 3223 | @section Creating Symbols |
| 3249 | 3224 | ||
| @@ -3282,12 +3257,11 @@ exists, the function keeps incrementing the counter and trying | |||
| 3282 | again until a new symbol is generated. | 3257 | again until a new symbol is generated. |
| 3283 | @end defun | 3258 | @end defun |
| 3284 | 3259 | ||
| 3285 | The Quiroz @file{cl.el} package also defined a @code{defkeyword} | 3260 | This package automatically creates all keywords that are called for by |
| 3286 | form for creating self-quoting keyword symbols. This package | 3261 | @code{&key} argument specifiers, and discourages the use of keywords |
| 3287 | automatically creates all keywords that are called for by | 3262 | as data unrelated to keyword arguments, so the related function |
| 3288 | @code{&key} argument specifiers, and discourages the use of | 3263 | @code{defkeyword} (to create self-quoting keyword symbols) is not |
| 3289 | keywords as data unrelated to keyword arguments, so the | 3264 | provided. |
| 3290 | @code{defkeyword} form has been discontinued. | ||
| 3291 | 3265 | ||
| 3292 | @node Numbers | 3266 | @node Numbers |
| 3293 | @chapter Numbers | 3267 | @chapter Numbers |
| @@ -3303,10 +3277,6 @@ which were left out of Emacs Lisp. | |||
| 3303 | * Implementation Parameters:: @code{cl-most-positive-float}. | 3277 | * Implementation Parameters:: @code{cl-most-positive-float}. |
| 3304 | @end menu | 3278 | @end menu |
| 3305 | 3279 | ||
| 3306 | @iftex | ||
| 3307 | @secno=1 | ||
| 3308 | @end iftex | ||
| 3309 | |||
| 3310 | @node Predicates on Numbers | 3280 | @node Predicates on Numbers |
| 3311 | @section Predicates on Numbers | 3281 | @section Predicates on Numbers |
| 3312 | 3282 | ||
| @@ -3340,10 +3310,6 @@ number. On systems that support floating-point, this is equivalent | |||
| 3340 | to @code{floatp}. On other systems, this always returns @code{nil}. | 3310 | to @code{floatp}. On other systems, this always returns @code{nil}. |
| 3341 | @end defun | 3311 | @end defun |
| 3342 | 3312 | ||
| 3343 | @iftex | ||
| 3344 | @secno=3 | ||
| 3345 | @end iftex | ||
| 3346 | |||
| 3347 | @node Numerical Functions | 3313 | @node Numerical Functions |
| 3348 | @section Numerical Functions | 3314 | @section Numerical Functions |
| 3349 | 3315 | ||
| @@ -3426,17 +3392,6 @@ This function returns the same value as the second return value | |||
| 3426 | of @code{cl-truncate}. | 3392 | of @code{cl-truncate}. |
| 3427 | @end defun | 3393 | @end defun |
| 3428 | 3394 | ||
| 3429 | @c FIXME this stuff is probably no longer of interest to anyone. | ||
| 3430 | These definitions are compatible with those in the Quiroz | ||
| 3431 | @file{cl.el} package, except that | ||
| 3432 | @c this package appends @samp{*} to certain function names to avoid | ||
| 3433 | @c conflicts with existing Emacs functions, and that | ||
| 3434 | the mechanism for returning multiple values is different. | ||
| 3435 | |||
| 3436 | @iftex | ||
| 3437 | @secno=8 | ||
| 3438 | @end iftex | ||
| 3439 | |||
| 3440 | @node Random Numbers | 3395 | @node Random Numbers |
| 3441 | @section Random Numbers | 3396 | @section Random Numbers |
| 3442 | 3397 | ||
| @@ -3454,7 +3409,7 @@ The @var{state} argument should be a @code{random-state} object | |||
| 3454 | which holds the state of the random number generator. The | 3409 | which holds the state of the random number generator. The |
| 3455 | function modifies this state object as a side effect. If | 3410 | function modifies this state object as a side effect. If |
| 3456 | @var{state} is omitted, it defaults to the variable | 3411 | @var{state} is omitted, it defaults to the variable |
| 3457 | @code{*random-state*}, which contains a pre-initialized | 3412 | @code{cl--random-state}, which contains a pre-initialized |
| 3458 | @code{random-state} object. | 3413 | @code{random-state} object. |
| 3459 | @end defun | 3414 | @end defun |
| 3460 | 3415 | ||
| @@ -3704,7 +3659,7 @@ just like @code{cl-mapcar}, but it returns a sequence of type | |||
| 3704 | @var{result-type} rather than a list. @var{result-type} must | 3659 | @var{result-type} rather than a list. @var{result-type} must |
| 3705 | be one of the following symbols: @code{vector}, @code{string}, | 3660 | be one of the following symbols: @code{vector}, @code{string}, |
| 3706 | @code{list} (in which case the effect is the same as for | 3661 | @code{list} (in which case the effect is the same as for |
| 3707 | @code{mapcar*}), or @code{nil} (in which case the results are | 3662 | @code{cl-mapcar}), or @code{nil} (in which case the results are |
| 3708 | thrown away and @code{cl-map} returns @code{nil}). | 3663 | thrown away and @code{cl-map} returns @code{nil}). |
| 3709 | @end defun | 3664 | @end defun |
| 3710 | 3665 | ||
| @@ -3935,9 +3890,10 @@ by returning a changed copy of the sequence. | |||
| 3935 | @findex cl-substitute-if-not | 3890 | @findex cl-substitute-if-not |
| 3936 | @findex cl-nsubstitute-if | 3891 | @findex cl-nsubstitute-if |
| 3937 | @findex cl-nsubstitute-if-not | 3892 | @findex cl-nsubstitute-if-not |
| 3938 | The @code{cl-substitute-if}, @code{cl-substitute-if-not}, @code{cl-nsubstitute-if}, | 3893 | The functions @code{cl-substitute-if}, @code{cl-substitute-if-not}, |
| 3939 | and @code{cl-nsubstitute-if-not} functions are defined similarly. For | 3894 | @code{cl-nsubstitute-if}, and @code{cl-nsubstitute-if-not} are defined |
| 3940 | these, a @var{predicate} is given in place of the @var{old} argument. | 3895 | similarly. For these, a @var{predicate} is given in place of the |
| 3896 | @var{old} argument. | ||
| 3941 | 3897 | ||
| 3942 | @node Searching Sequences | 3898 | @node Searching Sequences |
| 3943 | @section Searching Sequences | 3899 | @section Searching Sequences |
| @@ -4166,10 +4122,6 @@ specified test. The @code{:key} function, if specified, is | |||
| 4166 | applied to the elements of both trees. @xref{Sequences}. | 4122 | applied to the elements of both trees. @xref{Sequences}. |
| 4167 | @end defun | 4123 | @end defun |
| 4168 | 4124 | ||
| 4169 | @iftex | ||
| 4170 | @secno=3 | ||
| 4171 | @end iftex | ||
| 4172 | |||
| 4173 | @node Substitution of Expressions | 4125 | @node Substitution of Expressions |
| 4174 | @section Substitution of Expressions | 4126 | @section Substitution of Expressions |
| 4175 | 4127 | ||
| @@ -4405,7 +4357,7 @@ You can create a new @code{person} by calling @code{make-person}, | |||
| 4405 | which takes keyword arguments @code{:name}, @code{:age}, and | 4357 | which takes keyword arguments @code{:name}, @code{:age}, and |
| 4406 | @code{:sex} to specify the initial values of these slots in the | 4358 | @code{:sex} to specify the initial values of these slots in the |
| 4407 | new object. (Omitting any of these arguments leaves the corresponding | 4359 | new object. (Omitting any of these arguments leaves the corresponding |
| 4408 | slot ``undefined,'' according to the Common Lisp standard; in Emacs | 4360 | slot ``undefined'', according to the Common Lisp standard; in Emacs |
| 4409 | Lisp, such uninitialized slots are filled with @code{nil}.) | 4361 | Lisp, such uninitialized slots are filled with @code{nil}.) |
| 4410 | 4362 | ||
| 4411 | Given a @code{person}, @code{(copy-person @var{p})} makes a new | 4363 | Given a @code{person}, @code{(copy-person @var{p})} makes a new |
| @@ -4486,10 +4438,6 @@ enclosed in lists.) | |||
| 4486 | The following structure options are recognized. | 4438 | The following structure options are recognized. |
| 4487 | 4439 | ||
| 4488 | @table @code | 4440 | @table @code |
| 4489 | @iftex | ||
| 4490 | @itemmax=0 in | ||
| 4491 | @advance@leftskip-.5@tableindent | ||
| 4492 | @end iftex | ||
| 4493 | @item :conc-name | 4441 | @item :conc-name |
| 4494 | The argument is a symbol whose print name is used as the prefix for | 4442 | The argument is a symbol whose print name is used as the prefix for |
| 4495 | the names of slot accessor functions. The default is the name of | 4443 | the names of slot accessor functions. The default is the name of |
| @@ -4529,7 +4477,8 @@ option. | |||
| 4529 | (cl-defstruct | 4477 | (cl-defstruct |
| 4530 | (person | 4478 | (person |
| 4531 | (:constructor nil) ; no default constructor | 4479 | (:constructor nil) ; no default constructor |
| 4532 | (:constructor new-person (name sex &optional (age 0))) | 4480 | (:constructor new-person |
| 4481 | (name sex &optional (age 0))) | ||
| 4533 | (:constructor new-hound (&key (name "Rover") | 4482 | (:constructor new-hound (&key (name "Rover") |
| 4534 | (dog-years 0) | 4483 | (dog-years 0) |
| 4535 | &aux (age (* 7 dog-years)) | 4484 | &aux (age (* 7 dog-years)) |
| @@ -4540,7 +4489,7 @@ option. | |||
| 4540 | The first constructor here takes its arguments positionally rather | 4489 | The first constructor here takes its arguments positionally rather |
| 4541 | than by keyword. (In official Common Lisp terminology, constructors | 4490 | than by keyword. (In official Common Lisp terminology, constructors |
| 4542 | that work By Order of Arguments instead of by keyword are called | 4491 | that work By Order of Arguments instead of by keyword are called |
| 4543 | ``BOA constructors.'' No, I'm not making this up.) For example, | 4492 | ``BOA constructors''. No, I'm not making this up.) For example, |
| 4544 | @code{(new-person "Jane" 'female)} generates a person whose slots | 4493 | @code{(new-person "Jane" 'female)} generates a person whose slots |
| 4545 | are @code{"Jane"}, 0, and @code{female}, respectively. | 4494 | are @code{"Jane"}, 0, and @code{female}, respectively. |
| 4546 | 4495 | ||
| @@ -4566,7 +4515,7 @@ ever generated.) | |||
| 4566 | 4515 | ||
| 4567 | In true Common Lisp, @code{typep} is always able to recognize a | 4516 | In true Common Lisp, @code{typep} is always able to recognize a |
| 4568 | structure object even if @code{:predicate} was used. In this | 4517 | structure object even if @code{:predicate} was used. In this |
| 4569 | package, @code{typep} simply looks for a function called | 4518 | package, @code{cl-typep} simply looks for a function called |
| 4570 | @code{@var{typename}-p}, so it will work for structure types | 4519 | @code{@var{typename}-p}, so it will work for structure types |
| 4571 | only if they used the default predicate name. | 4520 | only if they used the default predicate name. |
| 4572 | 4521 | ||
| @@ -4752,18 +4701,6 @@ must be a @var{place} suitable for use by @code{setf}, because | |||
| 4752 | user to modify @var{place}. | 4701 | user to modify @var{place}. |
| 4753 | @end defspec | 4702 | @end defspec |
| 4754 | 4703 | ||
| 4755 | The following error-related macro is also defined: | ||
| 4756 | |||
| 4757 | @c FIXME standard for some time. | ||
| 4758 | @defspec ignore-errors forms@dots{} | ||
| 4759 | This executes @var{forms} exactly like a @code{progn}, except that | ||
| 4760 | errors are ignored during the @var{forms}. More precisely, if | ||
| 4761 | an error is signaled then @code{ignore-errors} immediately | ||
| 4762 | aborts execution of the @var{forms} and returns @code{nil}. | ||
| 4763 | If the @var{forms} complete successfully, @code{ignore-errors} | ||
| 4764 | returns the result of the last @var{form}. | ||
| 4765 | @end defspec | ||
| 4766 | |||
| 4767 | @node Efficiency Concerns | 4704 | @node Efficiency Concerns |
| 4768 | @appendix Efficiency Concerns | 4705 | @appendix Efficiency Concerns |
| 4769 | 4706 | ||
| @@ -4811,7 +4748,7 @@ This function takes a single Lisp form as an argument and inserts | |||
| 4811 | a nicely formatted copy of it in the current buffer (which must be | 4748 | a nicely formatted copy of it in the current buffer (which must be |
| 4812 | in Lisp mode so that indentation works properly). It also expands | 4749 | in Lisp mode so that indentation works properly). It also expands |
| 4813 | all Lisp macros which appear in the form. The easiest way to use | 4750 | all Lisp macros which appear in the form. The easiest way to use |
| 4814 | this function is to go to the @code{*scratch*} buffer and type, say, | 4751 | this function is to go to the @file{*scratch*} buffer and type, say, |
| 4815 | 4752 | ||
| 4816 | @example | 4753 | @example |
| 4817 | (cl-prettyexpand '(loop for x below 10 collect x)) | 4754 | (cl-prettyexpand '(loop for x below 10 collect x)) |
| @@ -4971,110 +4908,6 @@ special, distinct type. Also, the @code{:type} slot option is ignored. | |||
| 4971 | 4908 | ||
| 4972 | The second argument of @code{cl-check-type} is treated differently. | 4909 | The second argument of @code{cl-check-type} is treated differently. |
| 4973 | 4910 | ||
| 4974 | @c FIXME Time to remove this? | ||
| 4975 | @node Old CL Compatibility | ||
| 4976 | @appendix Old CL Compatibility | ||
| 4977 | |||
| 4978 | @noindent | ||
| 4979 | Following is a list of all known incompatibilities between this package | ||
| 4980 | and the older Quiroz @file{cl.el} package. | ||
| 4981 | |||
| 4982 | This package's emulation of multiple return values in functions is | ||
| 4983 | incompatible with that of the older package. That package attempted | ||
| 4984 | to come as close as possible to true Common Lisp multiple return | ||
| 4985 | values; unfortunately, it could not be 100% reliable and so was prone | ||
| 4986 | to occasional surprises if used freely. This package uses a simpler | ||
| 4987 | method, namely replacing multiple values with lists of values, which | ||
| 4988 | is more predictable though more noticeably different from Common Lisp. | ||
| 4989 | |||
| 4990 | The @code{defkeyword} form and @code{keywordp} function are not | ||
| 4991 | implemented in this package. | ||
| 4992 | |||
| 4993 | @ignore | ||
| 4994 | The @code{member}, @code{floor}, @code{ceiling}, @code{truncate}, | ||
| 4995 | @code{round}, @code{mod}, and @code{rem} functions are suffixed | ||
| 4996 | by @samp{*} in this package to avoid collision with existing | ||
| 4997 | functions in Emacs. The older package simply | ||
| 4998 | redefined these functions, overwriting the built-in meanings and | ||
| 4999 | causing serious portability problems. (Some more | ||
| 5000 | recent versions of the Quiroz package changed the names to | ||
| 5001 | @code{cl-member}, etc.; this package defines the latter names as | ||
| 5002 | aliases for @code{member*}, etc.) | ||
| 5003 | @end ignore | ||
| 5004 | |||
| 5005 | Certain functions in the old package which were buggy or inconsistent | ||
| 5006 | with the Common Lisp standard are incompatible with the conforming | ||
| 5007 | versions in this package. For example, @code{eql} and @code{member} | ||
| 5008 | were synonyms for @code{eq} and @code{memq} in that package, @code{setf} | ||
| 5009 | failed to preserve correct order of evaluation of its arguments, etc. | ||
| 5010 | |||
| 5011 | Finally, unlike the older package, this package is careful to | ||
| 5012 | prefix all of its internal names with @code{cl--}. Except for a | ||
| 5013 | few functions which are explicitly defined as additional features | ||
| 5014 | (such as @code{cl-floatp-safe} and @code{letf}), this package does not | ||
| 5015 | export any non-@samp{cl-} symbols which are not also part of Common | ||
| 5016 | Lisp. | ||
| 5017 | |||
| 5018 | @ifinfo | ||
| 5019 | @example | ||
| 5020 | |||
| 5021 | @end example | ||
| 5022 | @end ifinfo | ||
| 5023 | @appendixsec The @code{cl-compat} package | ||
| 5024 | |||
| 5025 | @noindent | ||
| 5026 | The @code{CL} package includes emulations of some features of the | ||
| 5027 | old @file{cl.el}, in the form of a compatibility package | ||
| 5028 | @code{cl-compat}. This file is obsolete and may be removed in future, | ||
| 5029 | so it should not be used in new code. | ||
| 5030 | |||
| 5031 | The old package defined a number of internal routines without | ||
| 5032 | @code{cl-} prefixes or other annotations. Call to these routines | ||
| 5033 | may have crept into existing Lisp code. @code{cl-compat} | ||
| 5034 | provides emulations of the following internal routines: | ||
| 5035 | @code{pair-with-newsyms}, @code{zip-lists}, @code{unzip-lists}, | ||
| 5036 | @code{reassemble-arglists}, @code{duplicate-symbols-p}, | ||
| 5037 | @code{safe-idiv}. | ||
| 5038 | |||
| 5039 | Some @code{setf} forms translated into calls to internal | ||
| 5040 | functions that user code might call directly. The functions | ||
| 5041 | @code{setnth}, @code{setnthcdr}, and @code{setelt} fall in | ||
| 5042 | this category; they are defined by @code{cl-compat}, but the | ||
| 5043 | best fix is to change to use @code{setf} properly. | ||
| 5044 | |||
| 5045 | The @code{cl-compat} file defines the keyword functions | ||
| 5046 | @code{keywordp}, @code{keyword-of}, and @code{defkeyword}, | ||
| 5047 | which are not defined by the new @code{CL} package because the | ||
| 5048 | use of keywords as data is discouraged. | ||
| 5049 | |||
| 5050 | The @code{build-klist} mechanism for parsing keyword arguments | ||
| 5051 | is emulated by @code{cl-compat}; the @code{with-keyword-args} | ||
| 5052 | macro is not, however, and in any case it's best to change to | ||
| 5053 | use the more natural keyword argument processing offered by | ||
| 5054 | @code{defun*}. | ||
| 5055 | |||
| 5056 | Multiple return values are treated differently by the two | ||
| 5057 | Common Lisp packages. The old package's method was more | ||
| 5058 | compatible with true Common Lisp, though it used heuristics | ||
| 5059 | that caused it to report spurious multiple return values in | ||
| 5060 | certain cases. The @code{cl-compat} package defines a set | ||
| 5061 | of multiple-value macros that are compatible with the old | ||
| 5062 | CL package; again, they are heuristic in nature, but they | ||
| 5063 | are guaranteed to work in any case where the old package's | ||
| 5064 | macros worked. To avoid name collision with the ``official'' | ||
| 5065 | multiple-value facilities, the ones in @code{cl-compat} have | ||
| 5066 | capitalized names: @code{Values}, @code{Values-list}, | ||
| 5067 | @code{Multiple-value-bind}, etc. | ||
| 5068 | |||
| 5069 | The functions @code{cl-floor}, @code{cl-ceiling}, @code{cl-truncate}, | ||
| 5070 | and @code{cl-round} are defined by @code{cl-compat} to use the | ||
| 5071 | old-style multiple-value mechanism, just as they did in the old | ||
| 5072 | package. The newer @code{floor*} and friends return their two | ||
| 5073 | results in a list rather than as multiple values. Note that | ||
| 5074 | older versions of the old package used the unadorned names | ||
| 5075 | @code{floor}, @code{ceiling}, etc.; @code{cl-compat} cannot use | ||
| 5076 | these names because they conflict with Emacs built-ins. | ||
| 5077 | |||
| 5078 | @node Porting Common Lisp | 4911 | @node Porting Common Lisp |
| 5079 | @appendix Porting Common Lisp | 4912 | @appendix Porting Common Lisp |
| 5080 | 4913 | ||
| @@ -5135,8 +4968,8 @@ in @code{map-odd-elements} by the time the @code{(+ a x)} function | |||
| 5135 | is called. | 4968 | is called. |
| 5136 | 4969 | ||
| 5137 | (This package avoids such problems in its own mapping functions | 4970 | (This package avoids such problems in its own mapping functions |
| 5138 | by using names like @code{cl-x} instead of @code{x} internally; | 4971 | by using names like @code{cl--x} instead of @code{x} internally; |
| 5139 | as long as you don't use the @code{cl-} prefix for your own | 4972 | as long as you don't use this prefix for your own |
| 5140 | variables no collision can occur.) | 4973 | variables no collision can occur.) |
| 5141 | 4974 | ||
| 5142 | @xref{Lexical Bindings}, for a description of the @code{lexical-let} | 4975 | @xref{Lexical Bindings}, for a description of the @code{lexical-let} |
| @@ -5181,7 +5014,7 @@ Lisp, they are totally distinct in Emacs Lisp. Common Lisp | |||
| 5181 | programs which refer to a symbol by the full name sometimes | 5014 | programs which refer to a symbol by the full name sometimes |
| 5182 | and the short name other times will not port cleanly to Emacs. | 5015 | and the short name other times will not port cleanly to Emacs. |
| 5183 | 5016 | ||
| 5184 | Emacs Lisp does have a concept of ``obarrays,'' which are | 5017 | Emacs Lisp does have a concept of ``obarrays'', which are |
| 5185 | package-like collections of symbols, but this feature is not | 5018 | package-like collections of symbols, but this feature is not |
| 5186 | strong enough to be used as a true package mechanism. | 5019 | strong enough to be used as a true package mechanism. |
| 5187 | 5020 | ||
| @@ -5201,10 +5034,10 @@ codes provide such features as paragraph filling, case | |||
| 5201 | conversion, and even loops and conditionals. | 5034 | conversion, and even loops and conditionals. |
| 5202 | 5035 | ||
| 5203 | While it would have been possible to implement most of Common | 5036 | While it would have been possible to implement most of Common |
| 5204 | Lisp @code{format} in this package (under the name @code{format*}, | 5037 | Lisp @code{format} in this package (under the name @code{cl-format}, |
| 5205 | of course), it was not deemed worthwhile. It would have required | 5038 | of course), it was not deemed worthwhile. It would have required |
| 5206 | a huge amount of code to implement even a decent subset of | 5039 | a huge amount of code to implement even a decent subset of |
| 5207 | @code{format*}, yet the functionality it would provide over | 5040 | @code{cl-format}, yet the functionality it would provide over |
| 5208 | Emacs Lisp's @code{format} would rarely be useful. | 5041 | Emacs Lisp's @code{format} would rarely be useful. |
| 5209 | 5042 | ||
| 5210 | @item | 5043 | @item |
| @@ -77,19 +77,10 @@ links between the various manuals. | |||
| 77 | you want them. | 77 | you want them. |
| 78 | 78 | ||
| 79 | --- | 79 | --- |
| 80 | ** On Mac OS X, configure no longer automatically adds the Fink /sw | ||
| 81 | directories to the search path. You must add them yourself if you want them. | ||
| 82 | |||
| 83 | --- | ||
| 84 | ** The standalone scripts rcs-checkin and vcdiff have been removed | 80 | ** The standalone scripts rcs-checkin and vcdiff have been removed |
| 85 | (from the bin and libexec directories, respectively). The former is | 81 | (from the bin and libexec directories, respectively). The former is |
| 86 | no longer relevant, the latter is replaced by lisp (in vc-sccs.el). | 82 | no longer relevant, the latter is replaced by lisp (in vc-sccs.el). |
| 87 | 83 | ||
| 88 | --- | ||
| 89 | ** The native Windows user interface is available for Cygwin. Passing | ||
| 90 | --with-w32 will configure a Cygwin emacs to use the Windows user | ||
| 91 | interface instead of the default, X11. | ||
| 92 | |||
| 93 | 84 | ||
| 94 | * Startup Changes in Emacs 24.3 | 85 | * Startup Changes in Emacs 24.3 |
| 95 | 86 | ||
| @@ -104,26 +95,19 @@ been adding them there, put them somewhere else, eg site-lisp. | |||
| 104 | 95 | ||
| 105 | * Changes in Emacs 24.3 | 96 | * Changes in Emacs 24.3 |
| 106 | 97 | ||
| 107 | ** minibuffer-electric-default-mode can rewrite (default ...) to [...]. | ||
| 108 | Just set minibuffer-eldef-shorten-default to t before enabling the mode. | ||
| 109 | |||
| 110 | +++ | 98 | +++ |
| 111 | ** Most y-or-n prompts now allow you to scroll the selected window. | 99 | ** Most y-or-n prompts now allow you to scroll the selected window. |
| 112 | Typing C-v or M-v at a y-or-n prompt scrolls forward or backward | 100 | Typing C-v or M-v at a y-or-n prompt scrolls forward or backward |
| 113 | respectively, without exiting from the prompt. | 101 | respectively, without exiting from the prompt. |
| 114 | 102 | ||
| 115 | --- | ||
| 116 | ** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the | ||
| 117 | next and previous path separator, respectively. | ||
| 118 | |||
| 119 | ** Mode line changes | 103 | ** Mode line changes |
| 120 | --- | 104 | --- |
| 121 | *** New option `mode-line-default-help-echo' specifies the help text | 105 | *** New option `mode-line-default-help-echo' specifies the help text |
| 122 | (shown in a tooltip or in the echo area) for any part of the mode line | 106 | (shown in a tooltip or in the echo area) for any part of the mode line |
| 123 | that does not have its own specialized help text. | 107 | that does not have its own specialized help text. |
| 124 | 108 | +++ | |
| 125 | *** You can now click mouse-3 in the coding system indicator to | 109 | *** You can now click mouse-3 in the coding system indicator to invoke |
| 126 | invokes `set-buffer-file-coding-system'. | 110 | `set-buffer-file-coding-system'. |
| 127 | 111 | ||
| 128 | ** Help changes | 112 | ** Help changes |
| 129 | 113 | ||
| @@ -139,6 +123,14 @@ correctly. To disable this, set `help-enable-auto-load' to nil. | |||
| 139 | even after their associated libraries have been loaded (and the | 123 | even after their associated libraries have been loaded (and the |
| 140 | autoloads have been redefined as functions). | 124 | autoloads have been redefined as functions). |
| 141 | 125 | ||
| 126 | ** Minibuffer changes | ||
| 127 | --- | ||
| 128 | *** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the | ||
| 129 | next and previous path separator, respectively. | ||
| 130 | |||
| 131 | *** minibuffer-electric-default-mode can rewrite (default ...) to [...]. | ||
| 132 | Just set minibuffer-eldef-shorten-default to t before enabling the mode. | ||
| 133 | |||
| 142 | ** ImageMagick support, if available, is automatically enabled. | 134 | ** ImageMagick support, if available, is automatically enabled. |
| 143 | It is no longer necessary to call `imagemagick-register-types' | 135 | It is no longer necessary to call `imagemagick-register-types' |
| 144 | explicitly to install ImageMagick image types; that function is called | 136 | explicitly to install ImageMagick image types; that function is called |
| @@ -204,9 +196,7 @@ The PCL-CVS commands are still available via the keyboard. | |||
| 204 | --- | 196 | --- |
| 205 | *** New input method `vietnamese-vni'. | 197 | *** New input method `vietnamese-vni'. |
| 206 | 198 | ||
| 207 | ** NextStep/OSX port changes. | 199 | ** Nextstep (GNUstep / Mac OS X) port changes |
| 208 | --- | ||
| 209 | *** OSX 10.4 or newer is required to build Emacs. | ||
| 210 | --- | 200 | --- |
| 211 | *** Fullscreen and frame parameter fullscreen is supported. | 201 | *** Fullscreen and frame parameter fullscreen is supported. |
| 212 | --- | 202 | --- |
| @@ -331,6 +321,7 @@ The difference is that it relies on the `lexical-binding' machinery (as opposed | |||
| 331 | to the `lexical-let' machinery used previously) to capture definitions in | 321 | to the `lexical-let' machinery used previously) to capture definitions in |
| 332 | closures, so such closures will only work if `lexical-binding' is in use. | 322 | closures, so such closures will only work if `lexical-binding' is in use. |
| 333 | 323 | ||
| 324 | +++ | ||
| 334 | *** `progv' was rewritten to use the `let' machinery. | 325 | *** `progv' was rewritten to use the `let' machinery. |
| 335 | A side effect is that vars without corresponding value are bound to nil | 326 | A side effect is that vars without corresponding value are bound to nil |
| 336 | rather than making them unbound. | 327 | rather than making them unbound. |
| @@ -340,15 +331,15 @@ rather than making them unbound. | |||
| 340 | *** New option `compilation-always-kill'. | 331 | *** New option `compilation-always-kill'. |
| 341 | 332 | ||
| 342 | ** Customize | 333 | ** Customize |
| 343 | 334 | --- | |
| 344 | *** `custom-reset-button-menu' now defaults to t. | 335 | *** `custom-reset-button-menu' now defaults to t. |
| 345 | 336 | --- | |
| 346 | *** Non-option variables are never matched in `customize-apropos' and | 337 | *** Non-option variables are never matched in `customize-apropos' and |
| 347 | `customize-apropos-options' (i.e. the prefix argument does nothing for | 338 | `customize-apropos-options' (i.e. the prefix argument does nothing for |
| 348 | these commands now). | 339 | these commands now). |
| 349 | 340 | ||
| 350 | ** Desktop | 341 | ** Desktop |
| 351 | 342 | --- | |
| 352 | *** `desktop-path' no longer includes the "." directory. Desktop | 343 | *** `desktop-path' no longer includes the "." directory. Desktop |
| 353 | files are now located in ~/.emacs.d by default. | 344 | files are now located in ~/.emacs.d by default. |
| 354 | 345 | ||
| @@ -402,22 +393,23 @@ whitespace problems introduced by the diff. | |||
| 402 | *** `dired-do-async-shell-command' executes each file sequentially | 393 | *** `dired-do-async-shell-command' executes each file sequentially |
| 403 | if the command ends in `;' (when operating on multiple files). | 394 | if the command ends in `;' (when operating on multiple files). |
| 404 | Otherwise, it executes the command on each file in parallel. | 395 | Otherwise, it executes the command on each file in parallel. |
| 405 | 396 | --- | |
| 406 | *** Typing M-n in the minibuffer of `dired-do-chmod', `dired-do-chgrp', | 397 | *** Typing M-n in the minibuffer of `dired-do-chmod', `dired-do-chgrp', |
| 407 | `dired-do-chown', `dired-do-touch' pulls the file attributes of the | 398 | `dired-do-chown', `dired-do-touch' pulls the file attributes of the |
| 408 | file at point. | 399 | file at point. |
| 409 | 400 | +++ | |
| 410 | *** When the region is active, `m' (`dired-mark'), `u' (`dired-unmark'), | 401 | *** When the region is active, `m' (`dired-mark'), `u' (`dired-unmark'), |
| 411 | `DEL' (`dired-unmark-backward'), `d' (`dired-flag-file-deletion') | 402 | `DEL' (`dired-unmark-backward'), `d' (`dired-flag-file-deletion') |
| 412 | mark/unmark/flag all files in the active region. | 403 | mark/unmark/flag all files in the active region. |
| 413 | 404 | +++ | |
| 414 | *** The minibuffer default for `=' (`dired-diff) has changed. | 405 | *** The minibuffer default for `=' (`dired-diff) has changed. |
| 415 | It is now the backup file for the file at point, if one exists. | 406 | It is now the backup file for the file at point, if one exists. |
| 416 | In Transient Mark mode the default is the file at the active mark. | 407 | In Transient Mark mode the default is the file at the active mark. |
| 417 | 408 | +++ | |
| 418 | *** `M-=' is no longer bound to `dired-backup-diff' in Dired buffers. | 409 | *** `M-=' is no longer bound to `dired-backup-diff' in Dired buffers. |
| 419 | The global binding for `M-=', `count-words-region' is in effect. | 410 | The global binding for `M-=', `count-words-region' is in effect. |
| 420 | 411 | ||
| 412 | --- | ||
| 421 | ** Ediff now uses the same color scheme as Diff mode. | 413 | ** Ediff now uses the same color scheme as Diff mode. |
| 422 | 414 | ||
| 423 | ** erc will look up server/channel names via auth-source and use the | 415 | ** erc will look up server/channel names via auth-source and use the |
| @@ -428,9 +420,9 @@ See `flymake-fringe-indicator-position', `flymake-error-bitmap' and | |||
| 428 | `flymake-warning-bitmap'. | 420 | `flymake-warning-bitmap'. |
| 429 | 421 | ||
| 430 | ** Follow mode | 422 | ** Follow mode |
| 431 | 423 | --- | |
| 432 | *** The obsolete variable `follow-mode-off-hook' has been removed. | 424 | *** The obsolete variable `follow-mode-off-hook' has been removed. |
| 433 | 425 | --- | |
| 434 | *** Follow mode no longer works by using advice. | 426 | *** Follow mode no longer works by using advice. |
| 435 | The option `follow-intercept-processes' has been removed. | 427 | The option `follow-intercept-processes' has been removed. |
| 436 | 428 | ||
| @@ -673,6 +665,7 @@ gnus-notifications.el, mm-archive.el | |||
| 673 | 665 | ||
| 674 | * Incompatible Lisp Changes in Emacs 24.3 | 666 | * Incompatible Lisp Changes in Emacs 24.3 |
| 675 | 667 | ||
| 668 | +++ | ||
| 676 | ** set-buffer-multibyte now signals an error in narrowed buffers. | 669 | ** set-buffer-multibyte now signals an error in narrowed buffers. |
| 677 | 670 | ||
| 678 | +++ | 671 | +++ |
| @@ -772,9 +765,18 @@ systems), or based on memory allocations. | |||
| 772 | ** CL-style generalized variables are now in core Elisp. | 765 | ** CL-style generalized variables are now in core Elisp. |
| 773 | `setf' is autoloaded; `push' and `pop' accept generalized variables. | 766 | `setf' is autoloaded; `push' and `pop' accept generalized variables. |
| 774 | 767 | ||
| 768 | +++ | ||
| 775 | ** `defun' also accepts a (declare DECLS) form, like `defmacro'. | 769 | ** `defun' also accepts a (declare DECLS) form, like `defmacro'. |
| 776 | The interpretation of the DECLS is determined by `defun-declarations-alist'. | 770 | The interpretation of the DECLS is determined by `defun-declarations-alist'. |
| 777 | 771 | ||
| 772 | ** Minibuffer | ||
| 773 | +++ | ||
| 774 | *** `read-regexp' has a new argument HISTORY; the first argument PROMPT | ||
| 775 | of `read-regexp' accepts a string ending with a colon and space, and its | ||
| 776 | second argument DEFAULTS can be a list of strings accessible via M-n | ||
| 777 | in the minibuffer ahead of other hard-coded useful regexp-related values. | ||
| 778 | More commands use `read-regexp' now to read their regexp arguments. | ||
| 779 | |||
| 778 | ** Completion | 780 | ** Completion |
| 779 | 781 | ||
| 780 | *** New function `completion-table-with-quoting' to handle completion | 782 | *** New function `completion-table-with-quoting' to handle completion |
| @@ -797,14 +799,6 @@ to work out which code is doing something. | |||
| 797 | *** New var `inhibit-debugger', automatically set to prevent accidental | 799 | *** New var `inhibit-debugger', automatically set to prevent accidental |
| 798 | recursive invocations. | 800 | recursive invocations. |
| 799 | 801 | ||
| 800 | ** Minibuffer | ||
| 801 | |||
| 802 | *** `read-regexp' has a new argument HISTORY; the first argument PROMPT | ||
| 803 | of `read-regexp' accepts a string ending with a colon and space, and its | ||
| 804 | second argument DEFAULTS can be a list of strings accessible via M-n | ||
| 805 | in the minibuffer ahead of other hard-coded useful regexp-related values. | ||
| 806 | More commands use `read-regexp' now to read their regexp arguments. | ||
| 807 | |||
| 808 | ** Window changes | 802 | ** Window changes |
| 809 | 803 | ||
| 810 | *** The functions get-lru-window, get-mru-window and get-largest-window | 804 | *** The functions get-lru-window, get-mru-window and get-largest-window |
| @@ -921,20 +915,32 @@ See the "Face Attributes" section of the Elisp manual. | |||
| 921 | 915 | ||
| 922 | * Changes in Emacs 24.3 on non-free operating systems | 916 | * Changes in Emacs 24.3 on non-free operating systems |
| 923 | 917 | ||
| 924 | +++ | 918 | --- |
| 925 | ** On MS Windows, you can pass --without-libxml2 to configure.bat to omit | 919 | ** Cygwin builds can use the native MS Windows user interface. |
| 926 | support for libxml2, even if its presence is detected. | 920 | Pass --with-w32 to configure. The default remains the X11 interface. |
| 927 | |||
| 928 | ** When invoked with the -nw switch to run on the Windows text-mode terminal, | ||
| 929 | Emacs now supports mouse highlight, help-echo (in the echo area), and | ||
| 930 | `mouse-autoselect-window'. | ||
| 931 | 921 | ||
| 932 | ** Two new functions are available in Cygwin builds: | 922 | ** Two new functions are available in Cygwin builds: |
| 933 | `cygwin-convert-path-from-windows' and `cygwin-convert-path-to-windows'. | 923 | `cygwin-convert-path-from-windows' and `cygwin-convert-path-to-windows'. |
| 934 | These functions allow Lisp code to access the Cygwin file-name mapping | 924 | These functions allow Lisp code to access the Cygwin file-name mapping |
| 935 | machinery to convert between Cygwin and Windows-native file names. | 925 | machinery to convert between Cygwin and Windows-native file names. |
| 936 | 926 | ||
| 927 | ** When invoked with the -nw switch to run on the Windows text-mode terminal, | ||
| 928 | Emacs now supports mouse highlight, help-echo (in the echo area), and | ||
| 929 | `mouse-autoselect-window'. | ||
| 930 | |||
| 937 | ** On MS Windows Vista and later Emacs now supports symbolic links. | 931 | ** On MS Windows Vista and later Emacs now supports symbolic links. |
| 932 | |||
| 933 | +++ | ||
| 934 | ** On MS Windows, you can pass --without-libxml2 to configure.bat to omit | ||
| 935 | support for libxml2, even if its presence is detected. | ||
| 936 | |||
| 937 | --- | ||
| 938 | ** On Mac OS X, the Nextstep port requires OS X 10.4 or later. | ||
| 939 | |||
| 940 | --- | ||
| 941 | ** On Mac OS X, configure no longer automatically adds the Fink /sw | ||
| 942 | directories to the search path. You must add them yourself if you want them. | ||
| 943 | |||
| 938 | 944 | ||
| 939 | * Changes in Emacs 24.2 | 945 | * Changes in Emacs 24.2 |
| 940 | 946 | ||
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b709c76c74..1150b68fe0f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,25 @@ | |||
| 1 | 2012-10-25 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/cl-macs.el (cl-progv): Doc fix. | ||
| 4 | |||
| 5 | 2012-10-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 6 | |||
| 7 | * minibuffer.el (minibuffer-force-complete): Use one more marker | ||
| 8 | for the temporary-overlay-map command (bug#12619). | ||
| 9 | |||
| 1 | 2012-10-24 Chong Yidong <cyd@gnu.org> | 10 | 2012-10-24 Chong Yidong <cyd@gnu.org> |
| 2 | 11 | ||
| 12 | * time.el (display-time-world-mode): Derive from special-mode. | ||
| 13 | (display-time-world): Use display-buffer (Bug#12708). | ||
| 14 | (display-time-world-mode-map): Variable deleted. | ||
| 15 | (display-time-world-display): Wrap the final delete-char inside | ||
| 16 | inhibit-read-only. | ||
| 17 | |||
| 18 | 2012-10-24 Chong Yidong <cyd@gnu.org> | ||
| 19 | |||
| 20 | * dired.el (dired-mark, dired-unmark, dired-flag-file-deletion): | ||
| 21 | Doc fix. | ||
| 22 | |||
| 3 | * emacs-lisp/easymenu.el (easy-menu-define): Doc fix (Bug#12628). | 23 | * emacs-lisp/easymenu.el (easy-menu-define): Doc fix (Bug#12628). |
| 4 | 24 | ||
| 5 | 2012-10-24 Stefan Monnier <monnier@iro.umontreal.ca> | 25 | 2012-10-24 Stefan Monnier <monnier@iro.umontreal.ca> |
diff --git a/lisp/dired.el b/lisp/dired.el index a4bc16caebf..9094ce08f0a 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3107,10 +3107,11 @@ argument or confirmation)." | |||
| 3107 | (forward-line 1)))) | 3107 | (forward-line 1)))) |
| 3108 | 3108 | ||
| 3109 | (defun dired-mark (arg) | 3109 | (defun dired-mark (arg) |
| 3110 | "Mark the current (or next ARG) files. | 3110 | "Mark the file at point in the Dired buffer. |
| 3111 | If the region is active, mark all files in the region. | ||
| 3112 | Otherwise, with a prefix arg, mark files on the next ARG lines. | ||
| 3113 | |||
| 3111 | If on a subdir headerline, mark all its files except `.' and `..'. | 3114 | If on a subdir headerline, mark all its files except `.' and `..'. |
| 3112 | If the region is active in Transient Mark mode, mark all files | ||
| 3113 | in the active region. | ||
| 3114 | 3115 | ||
| 3115 | Use \\[dired-unmark-all-files] to remove all marks | 3116 | Use \\[dired-unmark-all-files] to remove all marks |
| 3116 | and \\[dired-unmark] on a subdir to remove the marks in | 3117 | and \\[dired-unmark] on a subdir to remove the marks in |
| @@ -3136,7 +3137,10 @@ this subdir." | |||
| 3136 | (function (lambda () (delete-char 1) (insert dired-marker-char)))))))) | 3137 | (function (lambda () (delete-char 1) (insert dired-marker-char)))))))) |
| 3137 | 3138 | ||
| 3138 | (defun dired-unmark (arg) | 3139 | (defun dired-unmark (arg) |
| 3139 | "Unmark the current (or next ARG) files. | 3140 | "Unmark the file at point in the Dired buffer. |
| 3141 | If the region is active, unmark all files in the region. | ||
| 3142 | Otherwise, with a prefix arg, unmark files on the next ARG lines. | ||
| 3143 | |||
| 3140 | If looking at a subdir, unmark all its files except `.' and `..'. | 3144 | If looking at a subdir, unmark all its files except `.' and `..'. |
| 3141 | If the region is active in Transient Mark mode, unmark all files | 3145 | If the region is active in Transient Mark mode, unmark all files |
| 3142 | in the active region." | 3146 | in the active region." |
| @@ -3146,7 +3150,9 @@ in the active region." | |||
| 3146 | 3150 | ||
| 3147 | (defun dired-flag-file-deletion (arg) | 3151 | (defun dired-flag-file-deletion (arg) |
| 3148 | "In Dired, flag the current line's file for deletion. | 3152 | "In Dired, flag the current line's file for deletion. |
| 3149 | With prefix arg, repeat over several lines. | 3153 | If the region is active, flag all files in the region. |
| 3154 | Otherwise, with a prefix arg, flag files on the next ARG lines. | ||
| 3155 | |||
| 3150 | If on a subdir headerline, flag all its files except `.' and `..'. | 3156 | If on a subdir headerline, flag all its files except `.' and `..'. |
| 3151 | If the region is active in Transient Mark mode, flag all files | 3157 | If the region is active in Transient Mark mode, flag all files |
| 3152 | in the active region." | 3158 | in the active region." |
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 22e22a386f8..684ea42b157 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el | |||
| @@ -260,7 +260,7 @@ Remove from SYMBOL's plist the property PROPNAME and its value. | |||
| 260 | ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when | 260 | ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when |
| 261 | ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp | 261 | ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp |
| 262 | ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) | 262 | ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) |
| 263 | ;;;;;; "cl-macs" "cl-macs.el" "d257add5929b6a681d1c3f6642f5c648") | 263 | ;;;;;; "cl-macs" "cl-macs.el" "366e9efa4e3e7a81b2253e503611b23a") |
| 264 | ;;; Generated autoloads from cl-macs.el | 264 | ;;; Generated autoloads from cl-macs.el |
| 265 | 265 | ||
| 266 | (autoload 'cl--compiler-macro-list* "cl-macs" "\ | 266 | (autoload 'cl--compiler-macro-list* "cl-macs" "\ |
| @@ -485,7 +485,7 @@ before assigning any symbols SYM to the corresponding values. | |||
| 485 | Bind SYMBOLS to VALUES dynamically in BODY. | 485 | Bind SYMBOLS to VALUES dynamically in BODY. |
| 486 | The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists. | 486 | The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists. |
| 487 | Each symbol in the first list is bound to the corresponding value in the | 487 | Each symbol in the first list is bound to the corresponding value in the |
| 488 | second list (or made unbound if VALUES is shorter than SYMBOLS); then the | 488 | second list (or to nil if VALUES is shorter than SYMBOLS); then the |
| 489 | BODY forms are executed and their result is returned. This is much like | 489 | BODY forms are executed and their result is returned. This is much like |
| 490 | a `let' form, except that the list of symbols can be computed at run-time. | 490 | a `let' form, except that the list of symbols can be computed at run-time. |
| 491 | 491 | ||
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 9f147b70c8c..555b31493fe 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -1603,7 +1603,7 @@ before assigning any symbols SYM to the corresponding values. | |||
| 1603 | "Bind SYMBOLS to VALUES dynamically in BODY. | 1603 | "Bind SYMBOLS to VALUES dynamically in BODY. |
| 1604 | The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists. | 1604 | The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists. |
| 1605 | Each symbol in the first list is bound to the corresponding value in the | 1605 | Each symbol in the first list is bound to the corresponding value in the |
| 1606 | second list (or made unbound if VALUES is shorter than SYMBOLS); then the | 1606 | second list (or to nil if VALUES is shorter than SYMBOLS); then the |
| 1607 | BODY forms are executed and their result is returned. This is much like | 1607 | BODY forms are executed and their result is returned. This is much like |
| 1608 | a `let' form, except that the list of symbols can be computed at run-time." | 1608 | a `let' form, except that the list of symbols can be computed at run-time." |
| 1609 | (declare (indent 2) (debug (form form body))) | 1609 | (declare (indent 2) (debug (form form body))) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 27050042b83..4267fe4db4f 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1114,7 +1114,7 @@ Repeated uses step through the possible completions." | |||
| 1114 | ;; FIXME: Need to deal with the extra-size issue here as well. | 1114 | ;; FIXME: Need to deal with the extra-size issue here as well. |
| 1115 | ;; FIXME: ~/src/emacs/t<M-TAB>/lisp/minibuffer.el completes to | 1115 | ;; FIXME: ~/src/emacs/t<M-TAB>/lisp/minibuffer.el completes to |
| 1116 | ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el. | 1116 | ;; ~/src/emacs/trunk/ and throws away lisp/minibuffer.el. |
| 1117 | (let* ((start (field-beginning)) | 1117 | (let* ((start (copy-marker (field-beginning))) |
| 1118 | (end (field-end)) | 1118 | (end (field-end)) |
| 1119 | ;; (md (completion--field-metadata start)) | 1119 | ;; (md (completion--field-metadata start)) |
| 1120 | (all (completion-all-sorted-completions)) | 1120 | (all (completion-all-sorted-completions)) |
diff --git a/lisp/time.el b/lisp/time.el index fe3cdbb57be..7473994ffa5 100644 --- a/lisp/time.el +++ b/lisp/time.el | |||
| @@ -206,12 +206,6 @@ a string to display as the label of that TIMEZONE's time." | |||
| 206 | :type 'integer | 206 | :type 'integer |
| 207 | :version "23.1") | 207 | :version "23.1") |
| 208 | 208 | ||
| 209 | (defvar display-time-world-mode-map | ||
| 210 | (let ((map (make-sparse-keymap))) | ||
| 211 | (define-key map "q" 'kill-this-buffer) | ||
| 212 | map) | ||
| 213 | "Keymap of Display Time World mode.") | ||
| 214 | |||
| 215 | ;;;###autoload | 209 | ;;;###autoload |
| 216 | (defun display-time () | 210 | (defun display-time () |
| 217 | "Enable display of time, load level, and mail flag in mode lines. | 211 | "Enable display of time, load level, and mail flag in mode lines. |
| @@ -523,7 +517,7 @@ runs the normal hook `display-time-hook' after each update." | |||
| 523 | 'display-time-event-handler))) | 517 | 'display-time-event-handler))) |
| 524 | 518 | ||
| 525 | 519 | ||
| 526 | (define-derived-mode display-time-world-mode nil "World clock" | 520 | (define-derived-mode display-time-world-mode special-mode "World clock" |
| 527 | "Major mode for buffer that displays times in various time zones. | 521 | "Major mode for buffer that displays times in various time zones. |
| 528 | See `display-time-world'." | 522 | See `display-time-world'." |
| 529 | (setq show-trailing-whitespace nil)) | 523 | (setq show-trailing-whitespace nil)) |
| @@ -549,8 +543,8 @@ See `display-time-world'." | |||
| 549 | (setenv "TZ" old-tz)) | 543 | (setenv "TZ" old-tz)) |
| 550 | (setq fmt (concat "%-" (int-to-string max-width) "s %s\n")) | 544 | (setq fmt (concat "%-" (int-to-string max-width) "s %s\n")) |
| 551 | (dolist (timedata (nreverse result)) | 545 | (dolist (timedata (nreverse result)) |
| 552 | (insert (format fmt (car timedata) (cdr timedata))))) | 546 | (insert (format fmt (car timedata) (cdr timedata)))) |
| 553 | (delete-char -1)) | 547 | (delete-char -1))) |
| 554 | 548 | ||
| 555 | ;;;###autoload | 549 | ;;;###autoload |
| 556 | (defun display-time-world () | 550 | (defun display-time-world () |
| @@ -562,10 +556,9 @@ To turn off the world time display, go to that window and type `q'." | |||
| 562 | (not (get-buffer display-time-world-buffer-name))) | 556 | (not (get-buffer display-time-world-buffer-name))) |
| 563 | (run-at-time t display-time-world-timer-second 'display-time-world-timer)) | 557 | (run-at-time t display-time-world-timer-second 'display-time-world-timer)) |
| 564 | (with-current-buffer (get-buffer-create display-time-world-buffer-name) | 558 | (with-current-buffer (get-buffer-create display-time-world-buffer-name) |
| 565 | (display-time-world-display display-time-world-list)) | 559 | (display-time-world-display display-time-world-list) |
| 566 | (pop-to-buffer display-time-world-buffer-name) | 560 | (display-buffer display-time-world-buffer-name) |
| 567 | (fit-window-to-buffer) | 561 | (display-time-world-mode))) |
| 568 | (display-time-world-mode)) | ||
| 569 | 562 | ||
| 570 | (defun display-time-world-timer () | 563 | (defun display-time-world-timer () |
| 571 | (if (get-buffer display-time-world-buffer-name) | 564 | (if (get-buffer display-time-world-buffer-name) |
diff --git a/nt/ChangeLog b/nt/ChangeLog index 94d2ce18551..c915ee40bb6 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-10-24 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * config.nt: Sync with autogen/config.in. | ||
| 4 | |||
| 1 | 2012-10-17 Eli Zaretskii <eliz@gnu.org> | 5 | 2012-10-17 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * inc/pwd.h (getuid, geteuid): Add prototypes. | 7 | * inc/pwd.h (getuid, geteuid): Add prototypes. |
diff --git a/nt/config.nt b/nt/config.nt index 4582928cb5a..4dc7ede188b 100644 --- a/nt/config.nt +++ b/nt/config.nt | |||
| @@ -148,7 +148,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 148 | 148 | ||
| 149 | /* Enable compile-time and run-time bounds-checking, and some warnings, | 149 | /* Enable compile-time and run-time bounds-checking, and some warnings, |
| 150 | without upsetting glibc 2.15+. */ | 150 | without upsetting glibc 2.15+. */ |
| 151 | #if defined __OPTIMIZE__ && __OPTIMIZE__ | 151 | #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ |
| 152 | # define _FORTIFY_SOURCE 2 | 152 | # define _FORTIFY_SOURCE 2 |
| 153 | #endif | 153 | #endif |
| 154 | 154 | ||
| @@ -701,7 +701,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 701 | Mac OS X. */ | 701 | Mac OS X. */ |
| 702 | #undef HAVE_NS | 702 | #undef HAVE_NS |
| 703 | 703 | ||
| 704 | /* Define to use native Windows GUI. */ | 704 | /* Define to use native MS Windows GUI. */ |
| 705 | #define HAVE_NTGUI 1 | 705 | #define HAVE_NTGUI 1 |
| 706 | 706 | ||
| 707 | /* Define to 1 if libotf has OTF_get_variation_glyphs. */ | 707 | /* Define to 1 if libotf has OTF_get_variation_glyphs. */ |
diff --git a/src/ChangeLog b/src/ChangeLog index e59a286110d..835c550b426 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-10-25 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Don't assume process IDs fit in int. | ||
| 4 | * emacs.c (shut_down_emacs) [!DOS_NT]: | ||
| 5 | * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]: | ||
| 6 | * term.c (dissociate_if_controlling_tty) [!DOS_NT]: | ||
| 7 | Use pid_t, not int, to store process IDs, as 'int' | ||
| 8 | is not wide enough on a few platforms (e.g., AIX and IRIX). | ||
| 9 | |||
| 1 | 2012-10-23 Kenichi Handa <handa@gnu.org> | 10 | 2012-10-23 Kenichi Handa <handa@gnu.org> |
| 2 | 11 | ||
| 3 | The following change is to make face-font-rescale-alist work | 12 | The following change is to make face-font-rescale-alist work |
diff --git a/src/emacs.c b/src/emacs.c index 269920025bc..168eb35d3a3 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1909,8 +1909,8 @@ shut_down_emacs (int sig, Lisp_Object stuff) | |||
| 1909 | /* If we are controlling the terminal, reset terminal modes. */ | 1909 | /* If we are controlling the terminal, reset terminal modes. */ |
| 1910 | #ifndef DOS_NT | 1910 | #ifndef DOS_NT |
| 1911 | { | 1911 | { |
| 1912 | int pgrp = EMACS_GETPGRP (0); | 1912 | pid_t pgrp = EMACS_GETPGRP (0); |
| 1913 | int tpgrp = tcgetpgrp (0); | 1913 | pid_t tpgrp = tcgetpgrp (0); |
| 1914 | if ((tpgrp != -1) && tpgrp == pgrp) | 1914 | if ((tpgrp != -1) && tpgrp == pgrp) |
| 1915 | { | 1915 | { |
| 1916 | reset_all_sys_modes (); | 1916 | reset_all_sys_modes (); |
diff --git a/src/sysdep.c b/src/sysdep.c index 35beeaa7202..c7174e91612 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -452,7 +452,7 @@ sys_suspend (void) | |||
| 452 | #if defined (SIGTSTP) && !defined (MSDOS) | 452 | #if defined (SIGTSTP) && !defined (MSDOS) |
| 453 | 453 | ||
| 454 | { | 454 | { |
| 455 | int pgrp = EMACS_GETPGRP (0); | 455 | pid_t pgrp = EMACS_GETPGRP (0); |
| 456 | EMACS_KILLPG (pgrp, SIGTSTP); | 456 | EMACS_KILLPG (pgrp, SIGTSTP); |
| 457 | } | 457 | } |
| 458 | 458 | ||
diff --git a/src/term.c b/src/term.c index f7c87b7608d..74b02b0af27 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -2919,7 +2919,7 @@ static void | |||
| 2919 | dissociate_if_controlling_tty (int fd) | 2919 | dissociate_if_controlling_tty (int fd) |
| 2920 | { | 2920 | { |
| 2921 | #ifndef DOS_NT | 2921 | #ifndef DOS_NT |
| 2922 | int pgid = tcgetpgrp (fd); /* If tcgetpgrp succeeds, fd is the ctty. */ | 2922 | pid_t pgid = tcgetpgrp (fd); /* If tcgetpgrp succeeds, fd is the ctty. */ |
| 2923 | if (pgid != -1) | 2923 | if (pgid != -1) |
| 2924 | { | 2924 | { |
| 2925 | #if defined (USG5) | 2925 | #if defined (USG5) |