aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2020-04-20 07:50:19 -0700
committerGlenn Morris2020-04-20 07:50:19 -0700
commit477b9eaf45da1ebc4f2117d69df3571f0bf61e47 (patch)
tree4600314923713c339c41cd450f50e64c3f16a8aa
parent80f04b5d7c817977a365a999693443c4e04e5223 (diff)
parent05089a4d65831c5e873956f5f2d92a3d5672d405 (diff)
downloademacs-477b9eaf45da1ebc4f2117d69df3571f0bf61e47.tar.gz
emacs-477b9eaf45da1ebc4f2117d69df3571f0bf61e47.zip
Merge from origin/emacs-27
05089a4d65 (origin/emacs-27) Tweak wording re constant variables a1040861f1 Tweak setcar-related wording 751510f865 * lisp/image-mode.el: Add prefix key 's' and reduce depend... 9261a219ec * doc/emacs/windows.texi (Window Convenience): Decribe mor... e1d42da0d6 Fix mutability glitches reported by Drew Adams 5805df74f5 Improve mutability doc dca35b31d0 Improve mutability documentation 81e7d7f111 Document that quoting yields constants 5734339f40 * doc/lispref/keymaps.texi (Extended Menu Items, Easy Menu... 14a570afae Remove #' and function quoting from lambda forms in manual d5ec18c66b * src/regex-emacs.c (re_match_2_internal): Rework comment ... 4df8a61117 Add new node "Image Mode" to Emacs Manual. d7d5ee6c57 ; Fix a typo in cmdargs.texi (bug#40701) 5e9db48fbe * doc/lispref/display.texi (Customizing Bitmaps): Fix typo. eebfb72c90 Document constant vs mutable objects better 6c187ed6b0 Improve documentation of 'sort-lines' 52288f4b66 Mention 'spam-stat-process-directory-age' in the documenta... 067b070598 ; Fix some typos and doc issues (bug#40695) # Conflicts: # etc/NEWS
-rw-r--r--ChangeLog.316
-rw-r--r--admin/notes/bug-triage2
-rw-r--r--doc/emacs/cmdargs.texi2
-rw-r--r--doc/emacs/dired.texi3
-rw-r--r--doc/emacs/emacs.texi3
-rw-r--r--doc/emacs/files.texi9
-rw-r--r--doc/emacs/fixit.texi30
-rw-r--r--doc/emacs/frames.texi5
-rw-r--r--doc/emacs/misc.texi2
-rw-r--r--doc/emacs/windows.texi20
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi32
-rw-r--r--doc/lispref/abbrevs.texi6
-rw-r--r--doc/lispref/backups.texi2
-rw-r--r--doc/lispref/display.texi6
-rw-r--r--doc/lispref/edebug.texi2
-rw-r--r--doc/lispref/elisp.texi1
-rw-r--r--doc/lispref/eval.texi15
-rw-r--r--doc/lispref/functions.texi4
-rw-r--r--doc/lispref/help.texi56
-rw-r--r--doc/lispref/keymaps.texi33
-rw-r--r--doc/lispref/lists.texi68
-rw-r--r--doc/lispref/objects.texi48
-rw-r--r--doc/lispref/os.texi2
-rw-r--r--doc/lispref/sequences.texi51
-rw-r--r--doc/lispref/strings.texi18
-rw-r--r--doc/lispref/syntax.texi6
-rw-r--r--doc/lispref/text.texi13
-rw-r--r--doc/misc/gnus.texi7
-rw-r--r--etc/NEWS.2766
-rw-r--r--lib/ieee754.in.h4
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
-rw-r--r--lisp/emacs-lisp/checkdoc.el2
-rw-r--r--lisp/emacs-lisp/cl-macs.el8
-rw-r--r--lisp/emacs-lisp/elp.el2
-rw-r--r--lisp/emacs-lisp/generator.el32
-rw-r--r--lisp/emacs-lisp/gv.el2
-rw-r--r--lisp/emacs-lisp/lisp-mode.el2
-rw-r--r--lisp/image-mode.el76
-rw-r--r--lisp/image/exif.el4
-rw-r--r--lisp/international/mule-util.el2
-rw-r--r--lisp/json.el2
-rw-r--r--lisp/minibuffer.el4
-rw-r--r--lisp/obsolete/cl.el2
-rw-r--r--lisp/sort.el3
-rw-r--r--lisp/startup.el8
-rw-r--r--lisp/subr.el6
-rw-r--r--lisp/textmodes/ispell.el10
-rw-r--r--src/eval.c2
-rw-r--r--src/lread.c2
-rw-r--r--src/regex-emacs.c8
-rw-r--r--src/syntax.c4
-rw-r--r--test/lisp/jsonrpc-tests.el4
-rw-r--r--test/src/thread-tests.el2
53 files changed, 420 insertions, 301 deletions
diff --git a/ChangeLog.3 b/ChangeLog.3
index c5bc7b3120d..7f6000fc556 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -11660,7 +11660,7 @@
11660 Mention the Emacs exit code in batch mode 11660 Mention the Emacs exit code in batch mode
11661 11661
11662 * doc/lispref/os.texi (Batch Mode): Mention what the exit code is 11662 * doc/lispref/os.texi (Batch Mode): Mention what the exit code is
11663 if an error is signalled (bug#31552). 11663 if an error is signaled (bug#31552).
11664 11664
116652019-10-12 Kaushal Modi <kaushal.modi@gmail.com> 116652019-10-12 Kaushal Modi <kaushal.modi@gmail.com>
11666 11666
@@ -15059,7 +15059,7 @@
15059 15059
15060 * lisp/image/exif.el (exif-parse-buffer): New function. 15060 * lisp/image/exif.el (exif-parse-buffer): New function.
15061 (exif-orientation): Ditto. 15061 (exif-orientation): Ditto.
15062 (exif-error): New error symbol, and adjust all error signalling to 15062 (exif-error): New error symbol, and adjust all error signaling to
15063 only use that signal. 15063 only use that signal.
15064 15064
150652019-09-22 Andreas Schwab <schwab@linux-m68k.org> 150652019-09-22 Andreas Schwab <schwab@linux-m68k.org>
@@ -25100,7 +25100,7 @@
25100 25100
25101 * lisp/json.el (json-read): Try to clarify what's returned (bug#34242). 25101 * lisp/json.el (json-read): Try to clarify what's returned (bug#34242).
25102 (json-encode): Refer to `json-read' about what the input is and 25102 (json-encode): Refer to `json-read' about what the input is and
25103 say what error is signalled. 25103 say what error is signaled.
25104 25104
251052019-07-09 Lars Ingebrigtsen <larsi@gnus.org> 251052019-07-09 Lars Ingebrigtsen <larsi@gnus.org>
25106 25106
@@ -26971,7 +26971,7 @@
26971 help-C-file-name shouldn't error out if we can't find the name 26971 help-C-file-name shouldn't error out if we can't find the name
26972 26972
26973 * lisp/help-fns.el (help-C-file-name): Make help-C-file-name 26973 * lisp/help-fns.el (help-C-file-name): Make help-C-file-name
26974 return nil instead of signalling an error if we can't find the 26974 return nil instead of signaling an error if we can't find the
26975 file name (bug#17250). 26975 file name (bug#17250).
26976 26976
269772019-06-26 Stefan Monnier <monnier@iro.umontreal.ca> 269772019-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -34107,7 +34107,7 @@
34107 Remove unused internal function completion-pcm--optimize-pattern 34107 Remove unused internal function completion-pcm--optimize-pattern
34108 34108
34109 * lisp/minibuffer.el (completion-pcm--optimize-pattern): Remove 34109 * lisp/minibuffer.el (completion-pcm--optimize-pattern): Remove
34110 unused internal function (that signalled a compilation warning). 34110 unused internal function (that signaled a compilation warning).
34111 34111
341122019-05-16 Stefan Monnier <monnier@iro.umontreal.ca> 341122019-05-16 Stefan Monnier <monnier@iro.umontreal.ca>
34113 34113
@@ -40134,10 +40134,10 @@
40134 40134
401352019-03-30 Mattias Engdegård <mattiase@acm.org> 401352019-03-30 Mattias Engdegård <mattiase@acm.org>
40136 40136
40137 Release regexp before signalling overflow error 40137 Release regexp before signaling overflow error
40138 40138
40139 * src/search.c (looking_at_1, search_buffer_re): Unfreeze the regexp 40139 * src/search.c (looking_at_1, search_buffer_re): Unfreeze the regexp
40140 buffer before signalling a matcher overflow, since the error 40140 buffer before signaling a matcher overflow, since the error
40141 processing may require quite some regexp use as well (Bug#34910). 40141 processing may require quite some regexp use as well (Bug#34910).
40142 40142
401432019-03-30 Mattias Engdegård <mattiase@acm.org> 401432019-03-30 Mattias Engdegård <mattiase@acm.org>
@@ -88604,7 +88604,7 @@
88604 Tweak Fdocumentation's error for an undefined function 88604 Tweak Fdocumentation's error for an undefined function
88605 88605
88606 * src/doc.c (Fdocumentation): Restore the pre-25 behavior 88606 * src/doc.c (Fdocumentation): Restore the pre-25 behavior
88607 of signalling a void-function error for an undefined function. 88607 of signaling a void-function error for an undefined function.
88608 This seems cleaner than Emacs 25's "invalid-function: nil" error, 88608 This seems cleaner than Emacs 25's "invalid-function: nil" error,
88609 which was (probably) an unintended consequence of changes to 88609 which was (probably) an unintended consequence of changes to
88610 Findirect_function. 88610 Findirect_function.
diff --git a/admin/notes/bug-triage b/admin/notes/bug-triage
index 2974eee1792..87fb471c708 100644
--- a/admin/notes/bug-triage
+++ b/admin/notes/bug-triage
@@ -81,7 +81,7 @@ the ones that are not reproducible on the current release.
81* New bug triage process 81* New bug triage process
82 82
83The goal of the new bug triage process is similar to the backlog triage process, 83The goal of the new bug triage process is similar to the backlog triage process,
84except that the focus is on prioritizing the bug, and making sure it is has 84except that the focus is on prioritizing the bug, and making sure it has
85necessary information for others to act on. 85necessary information for others to act on.
86 86
87For each new bug, ask the following questions: 87For each new bug, ask the following questions:
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 9303b0b8dd1..2c131165244 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -340,7 +340,7 @@ initialization file (@pxref{Resources}).
340@opindex --quick 340@opindex --quick
341Start Emacs with minimum customizations. This is similar to using 341Start Emacs with minimum customizations. This is similar to using
342@samp{-q}, @samp{--no-site-file}, @samp{--no-site-lisp}, 342@samp{-q}, @samp{--no-site-file}, @samp{--no-site-lisp},
343@samp{--no-x-resources}, and @samp{--no-splash} together.. 343@samp{--no-x-resources}, and @samp{--no-splash} together.
344 344
345@item -daemon 345@item -daemon
346@opindex -daemon 346@opindex -daemon
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index fba4389094f..d5144141803 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -1416,7 +1416,8 @@ C-c}.
1416 1416
1417 Image-Dired is a facility for browsing image files. It provides viewing 1417 Image-Dired is a facility for browsing image files. It provides viewing
1418the images either as thumbnails or in full size, either inside Emacs 1418the images either as thumbnails or in full size, either inside Emacs
1419or through an external viewer. 1419or through an external viewer. This is different from Image mode
1420(@pxref{Image Mode}) for visiting an image file in the Emacs buffer.
1420 1421
1421@kindex C-t d @r{(Image-Dired)} 1422@kindex C-t d @r{(Image-Dired)}
1422@findex image-dired-display-thumbs 1423@findex image-dired-display-thumbs
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 6ef4ca63ae7..60f2be9a513 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -455,7 +455,8 @@ File Handling
455* Remote Files:: Accessing files on other machines. 455* Remote Files:: Accessing files on other machines.
456* Quoted File Names:: Quoting special characters in file names. 456* Quoted File Names:: Quoting special characters in file names.
457* File Name Cache:: Completion against a list of files you often use. 457* File Name Cache:: Completion against a list of files you often use.
458* File Conveniences:: Convenience Features for Finding Files. 458* File Conveniences:: Convenience features for finding files.
459* Image Mode:: Viewing image files.
459* Filesets:: Handling sets of files. 460* Filesets:: Handling sets of files.
460 461
461Saving Files 462Saving Files
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index a89b16b3f6d..7d57555ce33 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -38,7 +38,8 @@ on file directories.
38* Remote Files:: Accessing files on other machines. 38* Remote Files:: Accessing files on other machines.
39* Quoted File Names:: Quoting special characters in file names. 39* Quoted File Names:: Quoting special characters in file names.
40* File Name Cache:: Completion against a list of files you often use. 40* File Name Cache:: Completion against a list of files you often use.
41* File Conveniences:: Convenience Features for Finding Files. 41* File Conveniences:: Convenience features for finding files.
42* Image Mode:: Viewing image files.
42* Filesets:: Handling sets of files. 43* Filesets:: Handling sets of files.
43@end menu 44@end menu
44 45
@@ -2088,8 +2089,7 @@ of the cache with the @code{file-cache-display} command.
2088@section Convenience Features for Finding Files 2089@section Convenience Features for Finding Files
2089 2090
2090 In this section, we introduce some convenient facilities for finding 2091 In this section, we introduce some convenient facilities for finding
2091recently-opened files, reading file names from a buffer, and viewing 2092recently-opened files, reading file names from a buffer.
2092image files.
2093 2093
2094@findex recentf-mode 2094@findex recentf-mode
2095@vindex recentf-mode 2095@vindex recentf-mode
@@ -2108,6 +2108,9 @@ point. Partial Completion mode offers other features extending
2108@code{find-file}, which can be used with @code{ffap}. 2108@code{find-file}, which can be used with @code{ffap}.
2109@xref{Completion Options}. 2109@xref{Completion Options}.
2110 2110
2111@node Image Mode
2112@section Viewing Image Files
2113
2111@findex image-mode 2114@findex image-mode
2112@findex image-toggle-display 2115@findex image-toggle-display
2113@findex image-next-file 2116@findex image-next-file
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index 2c268f14fb7..5046146dda6 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -204,8 +204,8 @@ sentences and paragraphs, respectively. These commands work like
204 A numeric argument to a transpose command serves as a repeat count: it 204 A numeric argument to a transpose command serves as a repeat count: it
205tells the transpose command to move the character (or word or 205tells the transpose command to move the character (or word or
206expression or line) before or containing point across several other 206expression or line) before or containing point across several other
207characters (or words or expressions or lines). For example, @kbd{C-u 207characters (or words or expressions or lines). For example, @w{@kbd{C-u
2083 C-t} moves the character before point forward across three other 2083 C-t}} moves the character before point forward across three other
209characters. It would change @samp{f@point{}oobar} into 209characters. It would change @samp{f@point{}oobar} into
210@samp{oobf@point{}ar}. This is equivalent to repeating @kbd{C-t} 210@samp{oobf@point{}ar}. This is equivalent to repeating @kbd{C-t}
211three times. @kbd{C-u - 4 M-t} moves the word before point backward 211three times. @kbd{C-u - 4 M-t} moves the word before point backward
@@ -307,10 +307,10 @@ region; @pxref{Disabled Transient Mark}.)
307@cindex spell-checking the active region 307@cindex spell-checking the active region
308 Similarly, the command @kbd{M-x ispell} performs spell-checking in 308 Similarly, the command @kbd{M-x ispell} performs spell-checking in
309the region if one is active, or in the entire buffer otherwise. The 309the region if one is active, or in the entire buffer otherwise. The
310commands @kbd{M-x ispell-buffer} and @kbd{M-x ispell-region} 310commands @w{@kbd{M-x ispell-buffer}} and @w{@kbd{M-x ispell-region}}
311explicitly perform spell-checking on the entire buffer or the region 311explicitly perform spell-checking on the entire buffer or the region
312respectively. To check spelling in an email message you are writing, 312respectively. To check spelling in an email message you are writing,
313use @kbd{M-x ispell-message}; that command checks the whole buffer, 313use @w{@kbd{M-x ispell-message}}; that command checks the whole buffer,
314except for material that is indented or appears to be cited from other 314except for material that is indented or appears to be cited from other
315messages. @xref{Sending Mail}. 315messages. @xref{Sending Mail}.
316 316
@@ -368,8 +368,8 @@ wildcard.
368@item C-g 368@item C-g
369@itemx X 369@itemx X
370Quit interactive spell-checking, leaving point at the word that was 370Quit interactive spell-checking, leaving point at the word that was
371being checked. You can restart checking again afterward with @kbd{C-u 371being checked. You can restart checking again afterward with @w{@kbd{C-u
372M-$}. 372M-$}}.
373 373
374@item x 374@item x
375Quit interactive spell-checking and move point back to where it was 375Quit interactive spell-checking and move point back to where it was
@@ -387,8 +387,8 @@ Show the list of options.
387(@code{ispell-complete-word}) performs in-buffer completion based on 387(@code{ispell-complete-word}) performs in-buffer completion based on
388spelling correction. Insert the beginning of a word, and then type 388spelling correction. Insert the beginning of a word, and then type
389@kbd{M-@key{TAB}}; this shows a list of completions. (If your 389@kbd{M-@key{TAB}}; this shows a list of completions. (If your
390window manager intercepts @kbd{M-@key{TAB}}, type @kbd{@key{ESC} 390window manager intercepts @kbd{M-@key{TAB}}, type @w{@kbd{@key{ESC}
391@key{TAB}} or @kbd{C-M-i}.) Each completion is listed with a digit or 391@key{TAB}}} or @kbd{C-M-i}.) Each completion is listed with a digit or
392character; type that digit or character to choose it. 392character; type that digit or character to choose it.
393 393
394@cindex @code{ispell} program 394@cindex @code{ispell} program
@@ -396,7 +396,7 @@ character; type that digit or character to choose it.
396 Once started, the spell-checker subprocess continues 396 Once started, the spell-checker subprocess continues
397to run, waiting for something to do, so that subsequent spell-checking 397to run, waiting for something to do, so that subsequent spell-checking
398commands complete more quickly. If you want to get rid of the 398commands complete more quickly. If you want to get rid of the
399process, use @kbd{M-x ispell-kill-ispell}. This is not usually 399process, use @w{@kbd{M-x ispell-kill-ispell}}. This is not usually
400necessary, since the process uses no processor time except when you do 400necessary, since the process uses no processor time except when you do
401spelling correction. 401spelling correction.
402 402
@@ -409,7 +409,7 @@ the standard dictionary and your personal dictionary. The standard
409dictionary is specified by the variable @code{ispell-local-dictionary} 409dictionary is specified by the variable @code{ispell-local-dictionary}
410or, if that is @code{nil}, by the variable @code{ispell-dictionary}. 410or, if that is @code{nil}, by the variable @code{ispell-dictionary}.
411If both are @code{nil}, the spelling program's default dictionary is 411If both are @code{nil}, the spelling program's default dictionary is
412used. The command @kbd{M-x ispell-change-dictionary} sets the 412used. The command @w{@kbd{M-x ispell-change-dictionary}} sets the
413standard dictionary for the buffer and then restarts the subprocess, 413standard dictionary for the buffer and then restarts the subprocess,
414so that it will use a different standard dictionary. Your personal 414so that it will use a different standard dictionary. Your personal
415dictionary is specified by the variable 415dictionary is specified by the variable
@@ -431,8 +431,8 @@ dictionary.
431@findex flyspell-mode 431@findex flyspell-mode
432 Flyspell mode is a minor mode that performs automatic spell-checking 432 Flyspell mode is a minor mode that performs automatic spell-checking
433of the text you type as you type it. When it finds a word that it 433of the text you type as you type it. When it finds a word that it
434does not recognize, it highlights that word. Type @kbd{M-x 434does not recognize, it highlights that word. Type @w{@kbd{M-x
435flyspell-mode} to toggle Flyspell mode in the current buffer. To 435flyspell-mode}} to toggle Flyspell mode in the current buffer. To
436enable Flyspell mode in all text mode buffers, add 436enable Flyspell mode in all text mode buffers, add
437@code{flyspell-mode} to @code{text-mode-hook}. @xref{Hooks}. Note 437@code{flyspell-mode} to @code{text-mode-hook}. @xref{Hooks}. Note
438that, as Flyspell mode needs to check each word across which you move, 438that, as Flyspell mode needs to check each word across which you move,
@@ -448,14 +448,14 @@ it with @kbd{mouse-2} (@code{flyspell-correct-word}) to display a menu
448of possible corrections and actions. In addition, @kbd{C-.} or 448of possible corrections and actions. In addition, @kbd{C-.} or
449@kbd{@key{ESC}-@key{TAB}} (@code{flyspell-auto-correct-word}) will 449@kbd{@key{ESC}-@key{TAB}} (@code{flyspell-auto-correct-word}) will
450propose various successive corrections for the word at point, and 450propose various successive corrections for the word at point, and
451@kbd{C-c $} (@code{flyspell-correct-word-before-point}) will pop up a 451@w{@kbd{C-c $}} (@code{flyspell-correct-word-before-point}) will pop up a
452menu of possible corrections. Of course, you can always correct the 452menu of possible corrections. Of course, you can always correct the
453misspelled word by editing it manually in any way you like. 453misspelled word by editing it manually in any way you like.
454 454
455@findex flyspell-prog-mode 455@findex flyspell-prog-mode
456 Flyspell Prog mode works just like ordinary Flyspell mode, except 456 Flyspell Prog mode works just like ordinary Flyspell mode, except
457that it only checks words in comments and string constants. This 457that it only checks words in comments and string constants. This
458feature is useful for editing programs. Type @kbd{M-x 458feature is useful for editing programs. Type @w{@kbd{M-x
459flyspell-prog-mode} to enable or disable this mode in the current 459flyspell-prog-mode}} to enable or disable this mode in the current
460buffer. To enable this mode in all programming mode buffers, add 460buffer. To enable this mode in all programming mode buffers, add
461@code{flyspell-prog-mode} to @code{prog-mode-hook} (@pxref{Hooks}). 461@code{flyspell-prog-mode} to @code{prog-mode-hook} (@pxref{Hooks}).
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 7a583b96bbd..94218424d37 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -227,8 +227,9 @@ left. If you'd like to reverse the direction of horizontal scrolling,
227customize the variable @code{mouse-wheel-flip-direction} to a 227customize the variable @code{mouse-wheel-flip-direction} to a
228non-@code{nil} value. 228non-@code{nil} value.
229 229
230When the mouse pointer is over an image, scrolling the mouse wheel 230When the mouse pointer is over an image in Image mode, @pxref{Image Mode},
231with the @key{Ctrl} modifier scales the image under the mouse pointer. 231scrolling the mouse wheel with the @key{Ctrl} modifier scales the image
232under the mouse pointer.
232 233
233 234
234@node Word and Line Mouse 235@node Word and Line Mouse
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 294430aa183..a15aa17a66f 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -2883,7 +2883,7 @@ if there is an active region (@pxref{Mark}), the default URL comes
2883from the region instead, after removing any whitespace from it. The 2883from the region instead, after removing any whitespace from it. The
2884command then creates a new buffer with the embedded browser showing 2884command then creates a new buffer with the embedded browser showing
2885the specified URL. The buffer is put in the Xwidget-WebKit mode 2885the specified URL. The buffer is put in the Xwidget-WebKit mode
2886(similar to Image mode, @pxref{File Conveniences}), which provides 2886(similar to Image mode, @pxref{Image Mode}), which provides
2887one-key commands for scrolling the widget, changing its size, and 2887one-key commands for scrolling the widget, changing its size, and
2888reloading it. Type @w{@kbd{C-h b}} in that buffer to see the key 2888reloading it. Type @w{@kbd{C-h b}} in that buffer to see the key
2889bindings. 2889bindings.
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index 2e07a98f57d..910ef8fd88d 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -586,13 +586,25 @@ buffer. @xref{Follow Mode}.
586@cindex directional window selection 586@cindex directional window selection
587@findex windmove-right 587@findex windmove-right
588@findex windmove-default-keybindings 588@findex windmove-default-keybindings
589@findex windmove-display-default-keybindings
590@findex windmove-delete-default-keybindings
591@findex windmove-swap-states-in-direction
589 The Windmove package defines commands for moving directionally 592 The Windmove package defines commands for moving directionally
590between neighboring windows in a frame. @kbd{M-x windmove-right} 593between neighboring windows in a frame. @kbd{M-x windmove-right}
591selects the window immediately to the right of the currently selected 594selects the window immediately to the right of the currently selected
592one, and similarly for the left, up, and down 595one, and similarly for the left, up, and down counterparts.
593counterparts. @w{@kbd{M-x windmove-default-keybindings}} binds these 596@w{@kbd{M-x windmove-default-keybindings}} binds these commands to
594commands to @kbd{S-right} etc.; doing so disables shift selection for 597@kbd{S-right} etc.; doing so disables shift selection for those keys
595those keys (@pxref{Shift Selection}). 598(@pxref{Shift Selection}). In the same way as keybindings can be
599defined for commands that select windows directionally, you can use
600@w{@kbd{M-x windmove-display-default-keybindings}} to define
601keybindings for commands that specify in what direction to display the
602window for the buffer that the next command is going to display.
603Also there is @w{@kbd{M-x windmove-delete-default-keybindings}} to
604define keybindings for commands that delete windows directionally, and
605@w{@kbd{M-x windmove-swap-states-in-direction}} that define
606keybindings for commands that swap the window contents of the selected
607window with the window in the specified direction.
596 608
597 The command @kbd{M-x compare-windows} lets you compare the text 609 The command @kbd{M-x compare-windows} lets you compare the text
598shown in different windows. @xref{Comparing Files}. 610shown in different windows. @xref{Comparing Files}.
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 1726936de10..7484ce57607 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -2329,7 +2329,7 @@ area.
2329 2329
2330@cindex @samp{bind} defined 2330@cindex @samp{bind} defined
2331There are several ways by which a variable can be given a value. One of 2331There are several ways by which a variable can be given a value. One of
2332the ways is to use either the function @code{set} or the function 2332the ways is to use either the function @code{set} or the special form
2333@code{setq}. Another way is to use @code{let} (@pxref{let}). (The 2333@code{setq}. Another way is to use @code{let} (@pxref{let}). (The
2334jargon for this process is to @dfn{bind} a variable to a value.) 2334jargon for this process is to @dfn{bind} a variable to a value.)
2335 2335
@@ -4517,7 +4517,7 @@ number; it will be printed as the character with that @sc{ascii} code.
4517 4517
4518@item setq 4518@item setq
4519@itemx set 4519@itemx set
4520The @code{setq} function sets the value of its first argument to the 4520The @code{setq} special form sets the value of its first argument to the
4521value of the second argument. The first argument is automatically 4521value of the second argument. The first argument is automatically
4522quoted by @code{setq}. It does the same for succeeding pairs of 4522quoted by @code{setq}. It does the same for succeeding pairs of
4523arguments. Another function, @code{set}, takes only two arguments and 4523arguments. Another function, @code{set}, takes only two arguments and
@@ -7317,11 +7317,21 @@ which leave the original list as it was. One way to find out how this
7317works is to experiment. We will start with the @code{setcar} function. 7317works is to experiment. We will start with the @code{setcar} function.
7318 7318
7319@need 1200 7319@need 1200
7320@cindex constant lists
7321@cindex mutable lists
7320First, we can make a list and then set the value of a variable to the 7322First, we can make a list and then set the value of a variable to the
7321list, using the @code{setq} function. Here is a list of animals: 7323list, using the @code{setq} special form. Because we intend to use
7324@code{setcar} to change the list, this @code{setq} should not use the
7325quoted form @code{'(antelope giraffe lion tiger)}, as that would yield
7326a list that is part of the program and bad things could happen if we
7327tried to change part of the program while running it. Generally
7328speaking an Emacs Lisp program's components should be constant (or
7329unchanged) while the program is running. So we instead construct an
7330animal list that is @dfn{mutable} (or changeable) by using the
7331@code{list} function, as follows:
7322 7332
7323@smallexample 7333@smallexample
7324(setq animals '(antelope giraffe lion tiger)) 7334(setq animals (list 'antelope 'giraffe 'lion 'tiger))
7325@end smallexample 7335@end smallexample
7326 7336
7327@noindent 7337@noindent
@@ -7398,7 +7408,7 @@ To see how this works, set the value of the variable to a list of
7398domesticated animals by evaluating the following expression: 7408domesticated animals by evaluating the following expression:
7399 7409
7400@smallexample 7410@smallexample
7401(setq domesticated-animals '(horse cow sheep goat)) 7411(setq domesticated-animals (list 'horse 'cow 'sheep 'goat))
7402@end smallexample 7412@end smallexample
7403 7413
7404@need 1200 7414@need 1200
@@ -8846,7 +8856,7 @@ and then find the value of @code{trees}:
8846 8856
8847@smallexample 8857@smallexample
8848@group 8858@group
8849(setq trees '(maple oak pine birch)) 8859(setq trees (list 'maple 'oak 'pine 'birch))
8850 @result{} (maple oak pine birch) 8860 @result{} (maple oak pine birch)
8851@end group 8861@end group
8852 8862
@@ -9366,7 +9376,7 @@ For example:
9366 9376
9367@smallexample 9377@smallexample
9368@group 9378@group
9369(setq triple '(1 2 3)) 9379(setq triple (list 1 2 3))
9370 9380
9371(setcar triple '37) 9381(setcar triple '37)
9372 9382
@@ -9547,7 +9557,7 @@ part of which is the address of the next pair. The very last box
9547points to the symbol @code{nil}, which marks the end of the list. 9557points to the symbol @code{nil}, which marks the end of the list.
9548 9558
9549@need 1200 9559@need 1200
9550When a variable is set to a list with a function such as @code{setq}, 9560When a variable is set to a list with an operation such as @code{setq},
9551it stores the address of the first box in the variable. Thus, 9561it stores the address of the first box in the variable. Thus,
9552evaluation of the expression 9562evaluation of the expression
9553 9563
@@ -17092,7 +17102,7 @@ reminders.
17092 17102
17093@cindex Mail aliases 17103@cindex Mail aliases
17094@noindent 17104@noindent
17095This @code{setq} command sets the value of the variable 17105This @code{setq} sets the value of the variable
17096@code{mail-aliases} to @code{t}. Since @code{t} means true, the line 17106@code{mail-aliases} to @code{t}. Since @code{t} means true, the line
17097says, in effect, ``Yes, use mail aliases.'' 17107says, in effect, ``Yes, use mail aliases.''
17098 17108
@@ -17130,8 +17140,8 @@ The following turns off Indent Tabs mode:
17130@end smallexample 17140@end smallexample
17131 17141
17132Note that this line uses @code{setq-default} rather than the 17142Note that this line uses @code{setq-default} rather than the
17133@code{setq} command that we have seen before. The @code{setq-default} 17143@code{setq} that we have seen before; @code{setq-default}
17134command sets values only in buffers that do not have their own local 17144sets values only in buffers that do not have their own local
17135values for the variable. 17145values for the variable.
17136 17146
17137@ifinfo 17147@ifinfo
diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi
index 6689b560c78..575be187d3f 100644
--- a/doc/lispref/abbrevs.texi
+++ b/doc/lispref/abbrevs.texi
@@ -370,9 +370,9 @@ definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}.
370 (funcall expand)))) 370 (funcall expand))))
371 371
372(add-hook 'foo-mode-hook 372(add-hook 'foo-mode-hook
373 #'(lambda () 373 (lambda ()
374 (add-function :around (local 'abbrev-expand-function) 374 (add-function :around (local 'abbrev-expand-function)
375 #'foo-mode-abbrev-expand-function))) 375 #'foo-mode-abbrev-expand-function)))
376@end smallexample 376@end smallexample
377 377
378@node Standard Abbrev Tables 378@node Standard Abbrev Tables
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi
index b7318a99b8f..4ed1a10fcf6 100644
--- a/doc/lispref/backups.texi
+++ b/doc/lispref/backups.texi
@@ -807,7 +807,7 @@ If you just want to automatically auto-revert every
807 807
808@example 808@example
809(setq-local buffer-stale-function 809(setq-local buffer-stale-function
810 #'(lambda (&optional noconfirm) 'fast)) 810 (lambda (&optional noconfirm) 'fast))
811@end example 811@end example
812 812
813@noindent 813@noindent
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 132a3c85354..e01cfedc4b8 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -4358,7 +4358,7 @@ height.
4358@end defun 4358@end defun
4359 4359
4360@defun destroy-fringe-bitmap bitmap 4360@defun destroy-fringe-bitmap bitmap
4361This function destroy the fringe bitmap identified by @var{bitmap}. 4361This function destroys the fringe bitmap identified by @var{bitmap}.
4362If @var{bitmap} identifies a standard fringe bitmap, it actually 4362If @var{bitmap} identifies a standard fringe bitmap, it actually
4363restores the standard definition of that bitmap, instead of 4363restores the standard definition of that bitmap, instead of
4364eliminating it entirely. 4364eliminating it entirely.
@@ -6926,7 +6926,7 @@ end of the buffer continues from the other end. If
6926is displayed. Any button with a non-@code{nil} @code{skip} property 6926is displayed. Any button with a non-@code{nil} @code{skip} property
6927is skipped over. Returns the button found, and signals an error if no 6927is skipped over. Returns the button found, and signals an error if no
6928buttons can be found. If @var{no-error} in non-@code{nil}, return nil 6928buttons can be found. If @var{no-error} in non-@code{nil}, return nil
6929instead of signalling the error. 6929instead of signaling the error.
6930@end deffn 6930@end deffn
6931 6931
6932@deffn Command backward-button n &optional wrap display-message 6932@deffn Command backward-button n &optional wrap display-message
@@ -6938,7 +6938,7 @@ end of the buffer continues from the other end. If
6938is displayed. Any button with a non-@code{nil} @code{skip} property 6938is displayed. Any button with a non-@code{nil} @code{skip} property
6939is skipped over. Returns the button found, and signals an error if no 6939is skipped over. Returns the button found, and signals an error if no
6940buttons can be found. If @var{no-error} in non-@code{nil}, return nil 6940buttons can be found. If @var{no-error} in non-@code{nil}, return nil
6941instead of signalling the error. 6941instead of signaling the error.
6942@end deffn 6942@end deffn
6943 6943
6944@defun next-button pos &optional count-current 6944@defun next-button pos &optional count-current
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index cfef5c12d1e..5970e7cf801 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -858,7 +858,7 @@ to a non-@code{nil} value.
858 Here is an example of code that creates a circular structure: 858 Here is an example of code that creates a circular structure:
859 859
860@example 860@example
861(setq a '(x y)) 861(setq a (list 'x 'y))
862(setcar a a) 862(setcar a a)
863@end example 863@end example
864 864
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index cfd96f7aa68..bba1b63115f 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -297,6 +297,7 @@ Lisp Data Types
297* Circular Objects:: Read syntax for circular structure. 297* Circular Objects:: Read syntax for circular structure.
298* Type Predicates:: Tests related to types. 298* Type Predicates:: Tests related to types.
299* Equality Predicates:: Tests of equality between any two objects. 299* Equality Predicates:: Tests of equality between any two objects.
300* Constants and Mutability:: Whether an object's value can change.
300 301
301Programming Types 302Programming Types
302 303
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index f6f36ed3427..021604c5142 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -158,6 +158,12 @@ contents unchanged.
158@end group 158@end group
159@end example 159@end example
160 160
161 A self-evaluating form yields constant conses, vectors and strings, and you
162should not attempt to modify their contents via @code{setcar}, @code{aset} or
163similar operations. The Lisp interpreter might unify the constants
164yielded by your program's self-evaluating forms, so that these
165constants might share structure. @xref{Constants and Mutability}.
166
161 It is common to write numbers, characters, strings, and even vectors 167 It is common to write numbers, characters, strings, and even vectors
162in Lisp code, taking advantage of the fact that they self-evaluate. 168in Lisp code, taking advantage of the fact that they self-evaluate.
163However, it is quite unusual to do this for types that lack a read 169However, it is quite unusual to do this for types that lack a read
@@ -558,6 +564,8 @@ and vectors.)
558 564
559@defspec quote object 565@defspec quote object
560This special form returns @var{object}, without evaluating it. 566This special form returns @var{object}, without evaluating it.
567The returned value is a constant, and should not be modified.
568@xref{Constants and Mutability}.
561@end defspec 569@end defspec
562 570
563@cindex @samp{'} for quoting 571@cindex @samp{'} for quoting
@@ -612,10 +620,12 @@ only part of a list, while computing and substituting other parts.
612 620
613 @dfn{Backquote constructs} allow you to quote a list, but 621 @dfn{Backquote constructs} allow you to quote a list, but
614selectively evaluate elements of that list. In the simplest case, it 622selectively evaluate elements of that list. In the simplest case, it
615is identical to the special form @code{quote} 623is identical to the special form
616@iftex 624@iftex
625@code{quote}.
617@end iftex 626@end iftex
618@ifnottex 627@ifnottex
628@code{quote}
619(described in the previous section; @pxref{Quoting}). 629(described in the previous section; @pxref{Quoting}).
620@end ifnottex 630@end ifnottex
621For example, these two forms yield identical results: 631For example, these two forms yield identical results:
@@ -693,6 +703,9 @@ Here are some examples:
693@end group 703@end group
694@end example 704@end example
695 705
706If a subexpression of a backquote construct has no substitutions or
707splices, it acts like @code{quote} in that it yields constant conses,
708vectors and strings that should not be modified.
696 709
697@node Eval 710@node Eval
698@section Eval 711@section Eval
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 5cf67ba6473..bc8ec0ef1b0 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -970,7 +970,7 @@ string.
970@end group 970@end group
971 971
972@group 972@group
973(mapconcat (function (lambda (x) (format "%c" (1+ x)))) 973(mapconcat (lambda (x) (format "%c" (1+ x)))
974 "HAL-8000" 974 "HAL-8000"
975 "") 975 "")
976 @result{} "IBM.9111" 976 @result{} "IBM.9111"
@@ -2287,7 +2287,7 @@ function) as a generalized variable. @var{setter} can be a symbol in which
2287case it will be passed to @code{gv-define-simple-setter}, or it can be of the 2287case it will be passed to @code{gv-define-simple-setter}, or it can be of the
2288form @code{(lambda (@var{arg}) @var{body})} in which case that function will 2288form @code{(lambda (@var{arg}) @var{body})} in which case that function will
2289additionally have access to the macro (or function)'s arguments and it will 2289additionally have access to the macro (or function)'s arguments and it will
2290passed to @code{gv-define-setter}. 2290be passed to @code{gv-define-setter}.
2291 2291
2292@end table 2292@end table
2293 2293
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index eea1fd2e8f1..9b3c4fcb23d 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -175,49 +175,47 @@ All symbols that have PATTERN in their name are described
175in the *Help* buffer." 175in the *Help* buffer."
176 (interactive "sDescribe symbols matching: ") 176 (interactive "sDescribe symbols matching: ")
177 (let ((describe-func 177 (let ((describe-func
178 (function 178 (lambda (s)
179 (lambda (s)
180@end group 179@end group
181@group 180@group
182 ;; @r{Print description of symbol.} 181 ;; @r{Print description of symbol.}
183 (if (fboundp s) ; @r{It is a function.} 182 (if (fboundp s) ; @r{It is a function.}
184 (princ 183 (princ
185 (format "%s\t%s\n%s\n\n" s 184 (format "%s\t%s\n%s\n\n" s
186 (if (commandp s) 185 (if (commandp s)
187 (let ((keys (where-is-internal s))) 186 (let ((keys (where-is-internal s)))
188 (if keys 187 (if keys
189 (concat 188 (concat
190 "Keys: " 189 "Keys: "
191 (mapconcat 'key-description 190 (mapconcat 'key-description
192 keys " ")) 191 keys " "))
193 "Keys: none")) 192 "Keys: none"))
194 "Function") 193 "Function")
195@end group 194@end group
196@group 195@group
197 (or (documentation s) 196 (or (documentation s)
198 "not documented")))) 197 "not documented"))))
199 198
200 (if (boundp s) ; @r{It is a variable.} 199 (if (boundp s) ; @r{It is a variable.}
201@end group 200@end group
202@group 201@group
203 (princ 202 (princ
204 (format "%s\t%s\n%s\n\n" s 203 (format "%s\t%s\n%s\n\n" s
205 (if (custom-variable-p s) 204 (if (custom-variable-p s)
206 "Option " "Variable") 205 "Option " "Variable")
207@end group 206@end group
208@group 207@group
209 (or (documentation-property 208 (or (documentation-property
210 s 'variable-documentation) 209 s 'variable-documentation)
211 "not documented"))))))) 210 "not documented"))))))
212 sym-list) 211 sym-list)
213@end group 212@end group
214 213
215@group 214@group
216 ;; @r{Build a list of symbols that match pattern.} 215 ;; @r{Build a list of symbols that match pattern.}
217 (mapatoms (function 216 (mapatoms (lambda (sym)
218 (lambda (sym) 217 (if (string-match pattern (symbol-name sym))
219 (if (string-match pattern (symbol-name sym)) 218 (setq sym-list (cons sym sym-list)))))
220 (setq sym-list (cons sym sym-list))))))
221@end group 219@end group
222 220
223@group 221@group
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 2c90d208c02..130ff0d8671 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -1441,10 +1441,10 @@ Here is an example showing a keymap before and after substitution:
1441 1441
1442@smallexample 1442@smallexample
1443@group 1443@group
1444(setq map '(keymap 1444(setq map (list 'keymap
1445 (?1 . olddef-1) 1445 (cons ?1 olddef-1)
1446 (?2 . olddef-2) 1446 (cons ?2 olddef-2)
1447 (?3 . olddef-1))) 1447 (cons ?3 olddef-1)))
1448@result{} (keymap (49 . olddef-1) (50 . olddef-2) (51 . olddef-1)) 1448@result{} (keymap (49 . olddef-1) (50 . olddef-2) (51 . olddef-1))
1449@end group 1449@end group
1450 1450
@@ -2226,14 +2226,11 @@ right value for selecting that button. Clicking on the button should
2226set the variable so that the button you clicked on becomes selected. 2226set the variable so that the button you clicked on becomes selected.
2227 2227
2228@item :key-sequence @var{key-sequence} 2228@item :key-sequence @var{key-sequence}
2229This property specifies which key sequence is likely to be bound to the 2229This property specifies which key sequence to display as keyboard equivalent.
2230same command invoked by this menu item. If you specify a correct key 2230Before Emacs displays @var{key-sequence} in the menu, it verifies that
2231sequence, that sequence will be preferred over others. 2231@var{key-sequence} is really equivalent to this menu item, so it only
2232 2232has an effect if you specify a correct key sequence.
2233If you specify an incorrect key sequence, it has no effect; before Emacs 2233Specifying @code{nil} for @var{key-sequence} is equivalent to the
2234displays @var{key-sequence} in the menu, it verifies that
2235@var{key-sequence} is really equivalent to this menu item. Specifying
2236@code{nil} for @var{key-sequence} is equivalent to the
2237@code{:key-sequence} attribute being absent. 2234@code{:key-sequence} attribute being absent.
2238 2235
2239@item :keys @var{string} 2236@item :keys @var{string}
@@ -2916,17 +2913,17 @@ the following:
2916 2913
2917@table @code 2914@table @code
2918@item :keys @var{keys} 2915@item :keys @var{keys}
2919@var{keys} is a keyboard equivalent to the menu item (a string). This 2916@var{keys} is a string to display as keyboard equivalent to the menu item.
2920is normally not needed, as keyboard equivalents are computed 2917This is normally not needed, as keyboard equivalents are computed
2921automatically. @var{keys} is expanded with 2918automatically. @var{keys} is expanded with
2922@code{substitute-command-keys} before it is displayed (@pxref{Keys in 2919@code{substitute-command-keys} before it is displayed (@pxref{Keys in
2923Documentation}). 2920Documentation}).
2924 2921
2925@item :key-sequence @var{keys} 2922@item :key-sequence @var{keys}
2926@var{keys} is a hint for speeding up Emacs's first display of the 2923@var{keys} is a hint indicating which key sequence to display as
2927menu. It should be @code{nil} if you know that the menu item has no keyboard 2924keyboard equivalent, in case the command is bound to several key sequences.
2928equivalent; otherwise it should be a string or vector specifying a 2925It has no effect if @var{keys} is not bound to same command as this
2929keyboard equivalent for the menu item. 2926menu item.
2930 2927
2931@item :active @var{enable} 2928@item :active @var{enable}
2932@var{enable} is an expression; if it evaluates to @code{nil}, the item 2929@var{enable} is an expression; if it evaluates to @code{nil}, the item
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 27fa5385e35..1125af7bec3 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -866,10 +866,15 @@ foo ;; @r{@code{foo} was changed.}
866@node Modifying Lists 866@node Modifying Lists
867@section Modifying Existing List Structure 867@section Modifying Existing List Structure
868@cindex destructive list operations 868@cindex destructive list operations
869@cindex mutable lists
869 870
870 You can modify the @sc{car} and @sc{cdr} contents of a cons cell with the 871 You can modify the @sc{car} and @sc{cdr} contents of a cons cell with the
871primitives @code{setcar} and @code{setcdr}. These are destructive 872primitives @code{setcar} and @code{setcdr}. These are destructive
872operations because they change existing list structure. 873operations because they change existing list structure.
874Destructive operations should be applied only to mutable lists,
875that is, lists constructed via @code{cons}, @code{list} or similar
876operations. Lists created by quoting are constants and should not be
877changed by destructive operations. @xref{Constants and Mutability}.
873 878
874@cindex CL note---@code{rplaca} vs @code{setcar} 879@cindex CL note---@code{rplaca} vs @code{setcar}
875@quotation 880@quotation
@@ -906,7 +911,7 @@ value @var{object}. For example:
906 911
907@example 912@example
908@group 913@group
909(setq x '(1 2)) 914(setq x (list 1 2)) ; @r{Create a mutable list.}
910 @result{} (1 2) 915 @result{} (1 2)
911@end group 916@end group
912@group 917@group
@@ -926,8 +931,8 @@ these lists. Here is an example:
926 931
927@example 932@example
928@group 933@group
929;; @r{Create two lists that are partly shared.} 934;; @r{Create two mutable lists that are partly shared.}
930(setq x1 '(a b c)) 935(setq x1 (list 'a 'b 'c))
931 @result{} (a b c) 936 @result{} (a b c)
932(setq x2 (cons 'z (cdr x1))) 937(setq x2 (cons 'z (cdr x1)))
933 @result{} (z b c) 938 @result{} (z b c)
@@ -1017,11 +1022,11 @@ reached via the @sc{cdr}.
1017 1022
1018@example 1023@example
1019@group 1024@group
1020(setq x '(1 2 3)) 1025(setq x (list 1 2 3)) ; @r{Create a mutable list.}
1021 @result{} (1 2 3) 1026 @result{} (1 2 3)
1022@end group 1027@end group
1023@group 1028@group
1024(setcdr x '(4)) 1029(setcdr x '(4)) ; @r{Modify the list's tail to be a constant list.}
1025 @result{} (4) 1030 @result{} (4)
1026@end group 1031@end group
1027@group 1032@group
@@ -1037,7 +1042,7 @@ the @sc{cdr} of the first cons cell:
1037 1042
1038@example 1043@example
1039@group 1044@group
1040(setq x1 '(a b c)) 1045(setq x1 (list 'a 'b 'c))
1041 @result{} (a b c) 1046 @result{} (a b c)
1042(setcdr x1 (cdr (cdr x1))) 1047(setcdr x1 (cdr (cdr x1)))
1043 @result{} (c) 1048 @result{} (c)
@@ -1069,7 +1074,7 @@ of this list.
1069 1074
1070@example 1075@example
1071@group 1076@group
1072(setq x1 '(a b c)) 1077(setq x1 (list 'a 'b 'c))
1073 @result{} (a b c) 1078 @result{} (a b c)
1074(setcdr x1 (cons 'd (cdr x1))) 1079(setcdr x1 (cons 'd (cdr x1)))
1075 @result{} (d b c) 1080 @result{} (d b c)
@@ -1130,11 +1135,11 @@ Unlike @code{append} (@pxref{Building Lists}), the @var{lists} are
1130 1135
1131@example 1136@example
1132@group 1137@group
1133(setq x '(1 2 3)) 1138(setq x (list 1 2 3)) ; @r{Create a mutable list.}
1134 @result{} (1 2 3) 1139 @result{} (1 2 3)
1135@end group 1140@end group
1136@group 1141@group
1137(nconc x '(4 5)) 1142(nconc x '(4 5)) ; @r{Modify the list's tail to be a constant list.}
1138 @result{} (1 2 3 4 5) 1143 @result{} (1 2 3 4 5)
1139@end group 1144@end group
1140@group 1145@group
@@ -1150,7 +1155,7 @@ list:
1150 1155
1151@example 1156@example
1152@group 1157@group
1153(setq x '(1 2 3)) 1158(setq x (list 1 2 3))
1154 @result{} (1 2 3) 1159 @result{} (1 2 3)
1155@end group 1160@end group
1156@group 1161@group
@@ -1163,11 +1168,13 @@ x
1163@end group 1168@end group
1164@end example 1169@end example
1165 1170
1166However, the other arguments (all but the last) must be lists. 1171However, the other arguments (all but the last) should be mutable lists.
1167 1172
1168A common pitfall is to use a quoted constant list as a non-last 1173A common pitfall is to use a constant list as a non-last
1169argument to @code{nconc}. If you do this, your program will change 1174argument to @code{nconc}. If you do this, the resulting behavior
1170each time you run it! Here is what happens: 1175is undefined. It is possible that your program will change
1176each time you run it! Here is what might happen (though this
1177is not guaranteed to happen):
1171 1178
1172@smallexample 1179@smallexample
1173@group 1180@group
@@ -1270,7 +1277,7 @@ removing it involves changing the @sc{cdr}s (@pxref{Setcdr}).
1270 1277
1271@example 1278@example
1272@group 1279@group
1273(setq sample-list '(a b c (4))) 1280(setq sample-list (list 'a 'b 'c '(4)))
1274 @result{} (a b c (4)) 1281 @result{} (a b c (4))
1275@end group 1282@end group
1276@group 1283@group
@@ -1303,12 +1310,12 @@ into the variable that held the original list:
1303(setq flowers (delq 'rose flowers)) 1310(setq flowers (delq 'rose flowers))
1304@end example 1311@end example
1305 1312
1306In the following example, the @code{(4)} that @code{delq} attempts to match 1313In the following example, the @code{(list 4)} that @code{delq} attempts to match
1307and the @code{(4)} in the @code{sample-list} are not @code{eq}: 1314and the @code{(4)} in the @code{sample-list} are @code{equal} but not @code{eq}:
1308 1315
1309@example 1316@example
1310@group 1317@group
1311(delq '(4) sample-list) 1318(delq (list 4) sample-list)
1312 @result{} (a c (4)) 1319 @result{} (a c (4))
1313@end group 1320@end group
1314@end example 1321@end example
@@ -1324,7 +1331,7 @@ of @code{list}.
1324 1331
1325@example 1332@example
1326@group 1333@group
1327(setq sample-list '(a b c a b c)) 1334(setq sample-list (list 'a 'b 'c 'a 'b 'c))
1328 @result{} (a b c a b c) 1335 @result{} (a b c a b c)
1329@end group 1336@end group
1330@group 1337@group
@@ -1349,12 +1356,12 @@ Compare this with @code{memq}:
1349 1356
1350@example 1357@example
1351@group 1358@group
1352(memql 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} are @code{eql}.} 1359(memql 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} must be @code{eql}.}
1353 @result{} (1.2 1.3) 1360 @result{} (1.2 1.3)
1354@end group 1361@end group
1355@group 1362@group
1356(memq 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} are not @code{eq}.} 1363(memq 1.2 '(1.1 1.2 1.3)) ; @r{@code{1.2} and @code{1.2} need not be @code{eq}.}
1357 @result{} nil 1364 @result{} nil ; @r{... or it might be @code{(1.2 1.3)}.}
1358@end group 1365@end group
1359@end example 1366@end example
1360@end defun 1367@end defun
@@ -1373,11 +1380,11 @@ Compare this with @code{memq}:
1373 1380
1374@example 1381@example
1375@group 1382@group
1376(member '(2) '((1) (2))) ; @r{@code{(2)} and @code{(2)} are @code{equal}.} 1383(member (list 2) '((1) (2))) ; @r{@code{(list 2)} and @code{(2)} are @code{equal}.}
1377 @result{} ((2)) 1384 @result{} ((2))
1378@end group 1385@end group
1379@group 1386@group
1380(memq '(2) '((1) (2))) ; @r{@code{(2)} and @code{(2)} are not @code{eq}.} 1387(memq (list 2) '((1) (2))) ; @r{@code{(list 2)} and @code{(2)} are not @code{eq}.}
1381 @result{} nil 1388 @result{} nil
1382@end group 1389@end group
1383@group 1390@group
@@ -1407,7 +1414,7 @@ For example:
1407 1414
1408@example 1415@example
1409@group 1416@group
1410(setq l '((2) (1) (2))) 1417(setq l (list '(2) '(1) '(2)))
1411(delete '(2) l) 1418(delete '(2) l)
1412 @result{} ((1)) 1419 @result{} ((1))
1413l 1420l
@@ -1416,7 +1423,7 @@ l
1416;; @r{write @code{(setq l (delete '(2) l))}.} 1423;; @r{write @code{(setq l (delete '(2) l))}.}
1417@end group 1424@end group
1418@group 1425@group
1419(setq l '((2) (1) (2))) 1426(setq l (list '(2) '(1) '(2)))
1420(delete '(1) l) 1427(delete '(1) l)
1421 @result{} ((2) (2)) 1428 @result{} ((2) (2))
1422l 1429l
@@ -1618,9 +1625,10 @@ keys may not be symbols:
1618 '(("simple leaves" . oak) 1625 '(("simple leaves" . oak)
1619 ("compound leaves" . horsechestnut))) 1626 ("compound leaves" . horsechestnut)))
1620 1627
1621(assq "simple leaves" leaves) 1628;; @r{The @code{copy-sequence} means the keys are not @code{eq}.}
1629(assq (copy-sequence "simple leaves") leaves)
1622 @result{} nil 1630 @result{} nil
1623(assoc "simple leaves" leaves) 1631(assoc (copy-sequence "simple leaves") leaves)
1624 @result{} ("simple leaves" . oak) 1632 @result{} ("simple leaves" . oak)
1625@end smallexample 1633@end smallexample
1626@end defun 1634@end defun
@@ -1759,7 +1767,7 @@ correct results, use the return value of @code{assq-delete-all} rather
1759than looking at the saved value of @var{alist}. 1767than looking at the saved value of @var{alist}.
1760 1768
1761@example 1769@example
1762(setq alist '((foo 1) (bar 2) (foo 3) (lose 4))) 1770(setq alist (list '(foo 1) '(bar 2) '(foo 3) '(lose 4)))
1763 @result{} ((foo 1) (bar 2) (foo 3) (lose 4)) 1771 @result{} ((foo 1) (bar 2) (foo 3) (lose 4))
1764(assq-delete-all 'foo alist) 1772(assq-delete-all 'foo alist)
1765 @result{} ((bar 2) (lose 4)) 1773 @result{} ((bar 2) (lose 4))
@@ -1926,7 +1934,7 @@ function returns the modified property list, so you can store that back
1926in the place where you got @var{plist}. For example, 1934in the place where you got @var{plist}. For example,
1927 1935
1928@example 1936@example
1929(setq my-plist '(bar t foo 4)) 1937(setq my-plist (list 'bar t 'foo 4))
1930 @result{} (bar t foo 4) 1938 @result{} (bar t foo 4)
1931(setq my-plist (plist-put my-plist 'foo 69)) 1939(setq my-plist (plist-put my-plist 'foo 69))
1932 @result{} (bar t foo 69) 1940 @result{} (bar t foo 69)
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 855dff2130a..3e9f2221020 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -46,6 +46,10 @@ you store in it, type and all. (Actually, a small number of Emacs
46Lisp variables can only take on values of a certain type. 46Lisp variables can only take on values of a certain type.
47@xref{Variables with Restricted Values}.) 47@xref{Variables with Restricted Values}.)
48 48
49 Some Lisp objects are @dfn{constant}: their values never change.
50Others are @dfn{mutable}: their values can be changed via destructive
51operations that involve side effects.
52
49 This chapter describes the purpose, printed representation, and read 53 This chapter describes the purpose, printed representation, and read
50syntax of each of the standard types in GNU Emacs Lisp. Details on how 54syntax of each of the standard types in GNU Emacs Lisp. Details on how
51to use these types can be found in later chapters. 55to use these types can be found in later chapters.
@@ -59,6 +63,7 @@ to use these types can be found in later chapters.
59* Circular Objects:: Read syntax for circular structure. 63* Circular Objects:: Read syntax for circular structure.
60* Type Predicates:: Tests related to types. 64* Type Predicates:: Tests related to types.
61* Equality Predicates:: Tests of equality between any two objects. 65* Equality Predicates:: Tests of equality between any two objects.
66* Constants and Mutability:: Whether an object's value can change.
62@end menu 67@end menu
63 68
64@node Printed Representation 69@node Printed Representation
@@ -2377,3 +2382,46 @@ that for two strings to be equal, they have the same text properties.
2377@end group 2382@end group
2378@end example 2383@end example
2379@end defun 2384@end defun
2385
2386@node Constants and Mutability
2387@section Constants and Mutability
2388@cindex constants
2389@cindex mutable objects
2390
2391 Some Lisp objects are constant: their values never change.
2392For example, you can create a new integer by calculating one, but you
2393cannot modify the value of an existing integer.
2394
2395 Other Lisp objects are mutable: their values can be changed
2396via destructive operations involving side effects. For example, an
2397existing marker can be changed by moving the marker to point to
2398somewhere else.
2399
2400 Although numbers are always constants and markers are always
2401mutable, some types contain both constant and mutable members. These
2402types include conses, vectors, strings, and symbols. For example, the string
2403literal @code{"aaa"} yields a constant string, whereas the function
2404call @code{(make-string 3 ?a)} yields a mutable string that can be
2405changed via later calls to @code{aset}.
2406
2407 Trying to modify a constant variable signals an error
2408(@pxref{Constant Variables}).
2409A program should not attempt to modify other types of constants because the
2410resulting behavior is undefined: the Lisp interpreter might or might
2411not detect the error, and if it does not detect the error the
2412interpreter can behave unpredictably thereafter. Another way to put
2413this is that although mutable objects are safe to change and constant
2414symbols reliably reject attempts to change them, other constants are
2415not safely mutable: if you try to change one your program might
2416behave as you expect but it might crash or worse. This problem occurs
2417with types that have both constant and mutable members, and that have
2418mutators like @code{setcar} and @code{aset} that are valid on mutable
2419objects but hazardous on constants.
2420
2421 When the same constant occurs multiple times in a program, the Lisp
2422interpreter might save time or space by reusing existing constants or
2423constant components. For example, @code{(eq "abc" "abc")} returns
2424@code{t} if the interpreter creates only one instance of the string
2425constant @code{"abc"}, and returns @code{nil} if it creates two
2426instances. Lisp programs should be written so that they work
2427regardless of whether this optimization is in use.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index e72858bbf1a..5c0b1e2edf0 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2617,7 +2617,7 @@ if it is non-@code{nil}; this can be overridden by binding
2617This variable is non-@code{nil} when Emacs is running in batch mode. 2617This variable is non-@code{nil} when Emacs is running in batch mode.
2618@end defvar 2618@end defvar
2619 2619
2620If Emacs exits due to signalling an error in batch mode, the exit 2620If Emacs exits due to signaling an error in batch mode, the exit
2621status of the Emacs command is non-zero: 2621status of the Emacs command is non-zero:
2622 2622
2623@example 2623@example
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 1a3a04f680b..1cb0d05cc7b 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -183,11 +183,11 @@ for other ways to copy sequences.
183 183
184@example 184@example
185@group 185@group
186(setq bar '(1 2)) 186(setq bar (list 1 2)) ; @r{Create a mutable list.}
187 @result{} (1 2) 187 @result{} (1 2)
188@end group 188@end group
189@group 189@group
190(setq x (vector 'foo bar)) 190(setq x (vector 'foo bar)) ; @r{Create a mutable vector.}
191 @result{} [foo (1 2)] 191 @result{} [foo (1 2)]
192@end group 192@end group
193@group 193@group
@@ -278,7 +278,7 @@ Unlike @code{reverse} the original @var{sequence} may be modified.
278 278
279@example 279@example
280@group 280@group
281(setq x '(a b c)) 281(setq x (list 'a 'b 'c)) ; @r{Create a mutable list.}
282 @result{} (a b c) 282 @result{} (a b c)
283@end group 283@end group
284@group 284@group
@@ -320,7 +320,7 @@ presented graphically:
320 For the vector, it is even simpler because you don't need setq: 320 For the vector, it is even simpler because you don't need setq:
321 321
322@example 322@example
323(setq x [1 2 3 4]) 323(setq x (copy-sequence [1 2 3 4])) ; @r{Create a mutable vector.}
324 @result{} [1 2 3 4] 324 @result{} [1 2 3 4]
325(nreverse x) 325(nreverse x)
326 @result{} [4 3 2 1] 326 @result{} [4 3 2 1]
@@ -330,7 +330,7 @@ x
330 330
331Note that unlike @code{reverse}, this function doesn't work with strings. 331Note that unlike @code{reverse}, this function doesn't work with strings.
332Although you can alter string data by using @code{aset}, it is strongly 332Although you can alter string data by using @code{aset}, it is strongly
333encouraged to treat strings as immutable. 333encouraged to treat strings as immutable even when they are mutable.
334 334
335@end defun 335@end defun
336 336
@@ -374,11 +374,11 @@ appears in a different position in the list due to the change of
374 374
375@example 375@example
376@group 376@group
377(setq nums '(1 3 2 6 5 4 0)) 377(setq nums (list 1 3 2 6 5 4 0)) ; @r{Create a mutable list.}
378 @result{} (1 3 2 6 5 4 0) 378 @result{} (1 3 2 6 5 4 0)
379@end group 379@end group
380@group 380@group
381(sort nums '<) 381(sort nums #'<)
382 @result{} (0 1 2 3 4 5 6) 382 @result{} (0 1 2 3 4 5 6)
383@end group 383@end group
384@group 384@group
@@ -396,7 +396,7 @@ of @code{sort} and use that. Most often we store the result back into
396the variable that held the original list: 396the variable that held the original list:
397 397
398@example 398@example
399(setq nums (sort nums '<)) 399(setq nums (sort nums #'<))
400@end example 400@end example
401 401
402For the better understanding of what stable sort is, consider the following 402For the better understanding of what stable sort is, consider the following
@@ -1228,7 +1228,7 @@ This function sets the @var{index}th element of @var{array} to be
1228 1228
1229@example 1229@example
1230@group 1230@group
1231(setq w [foo bar baz]) 1231(setq w (vector 'foo 'bar 'baz)) ; @r{Create a mutable vector.}
1232 @result{} [foo bar baz] 1232 @result{} [foo bar baz]
1233(aset w 0 'fu) 1233(aset w 0 'fu)
1234 @result{} fu 1234 @result{} fu
@@ -1237,7 +1237,8 @@ w
1237@end group 1237@end group
1238 1238
1239@group 1239@group
1240(setq x "asdfasfd") 1240;; @r{@code{copy-sequence} creates a mutable string.}
1241(setq x (copy-sequence "asdfasfd"))
1241 @result{} "asdfasfd" 1242 @result{} "asdfasfd"
1242(aset x 3 ?Z) 1243(aset x 3 ?Z)
1243 @result{} 90 1244 @result{} 90
@@ -1246,6 +1247,10 @@ x
1246@end group 1247@end group
1247@end example 1248@end example
1248 1249
1250The @var{array} should be mutable; that is, it should not be a constant,
1251such as the constants created via quoting or via self-evaluating forms.
1252@xref{Constants and Mutability}.
1253
1249If @var{array} is a string and @var{object} is not a character, a 1254If @var{array} is a string and @var{object} is not a character, a
1250@code{wrong-type-argument} error results. The function converts a 1255@code{wrong-type-argument} error results. The function converts a
1251unibyte string to multibyte if necessary to insert a character. 1256unibyte string to multibyte if necessary to insert a character.
@@ -1257,7 +1262,8 @@ each element of @var{array} is @var{object}. It returns @var{array}.
1257 1262
1258@example 1263@example
1259@group 1264@group
1260(setq a [a b c d e f g]) 1265;; @r{Create a mutable vector and then fill it with zeros.}
1266(setq a (copy-sequence [a b c d e f g]))
1261 @result{} [a b c d e f g] 1267 @result{} [a b c d e f g]
1262(fillarray a 0) 1268(fillarray a 0)
1263 @result{} [0 0 0 0 0 0 0] 1269 @result{} [0 0 0 0 0 0 0]
@@ -1265,7 +1271,8 @@ a
1265 @result{} [0 0 0 0 0 0 0] 1271 @result{} [0 0 0 0 0 0 0]
1266@end group 1272@end group
1267@group 1273@group
1268(setq s "When in the course") 1274;; @r{Create a mutable string and then fill it with "-".}
1275(setq s (copy-sequence "When in the course"))
1269 @result{} "When in the course" 1276 @result{} "When in the course"
1270(fillarray s ?-) 1277(fillarray s ?-)
1271 @result{} "------------------" 1278 @result{} "------------------"
@@ -1302,7 +1309,9 @@ same way in Lisp input.
1302 A vector, like a string or a number, is considered a constant for 1309 A vector, like a string or a number, is considered a constant for
1303evaluation: the result of evaluating it is the same vector. This does 1310evaluation: the result of evaluating it is the same vector. This does
1304not evaluate or even examine the elements of the vector. 1311not evaluate or even examine the elements of the vector.
1305@xref{Self-Evaluating Forms}. 1312@xref{Self-Evaluating Forms}. Vectors written with square brackets
1313are constants and should not be modified via @code{aset} or other
1314destructive operations. @xref{Constants and Mutability}.
1306 1315
1307 Here are examples illustrating these principles: 1316 Here are examples illustrating these principles:
1308 1317
@@ -1565,14 +1574,14 @@ For example, here is how to examine the elements of the syntax table:
1565@example 1574@example
1566(let (accumulator) 1575(let (accumulator)
1567 (map-char-table 1576 (map-char-table
1568 #'(lambda (key value) 1577 (lambda (key value)
1569 (setq accumulator 1578 (setq accumulator
1570 (cons (list 1579 (cons (list
1571 (if (consp key) 1580 (if (consp key)
1572 (list (car key) (cdr key)) 1581 (list (car key) (cdr key))
1573 key) 1582 key)
1574 value) 1583 value)
1575 accumulator))) 1584 accumulator)))
1576 (syntax-table)) 1585 (syntax-table))
1577 accumulator) 1586 accumulator)
1578@result{} 1587@result{}
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 14cabc5d79d..a4c9c2549c5 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -51,10 +51,8 @@ by a distinguished character code.
51operate on them with the general array and sequence functions documented 51operate on them with the general array and sequence functions documented
52in @ref{Sequences Arrays Vectors}. For example, you can access or 52in @ref{Sequences Arrays Vectors}. For example, you can access or
53change individual characters in a string using the functions @code{aref} 53change individual characters in a string using the functions @code{aref}
54and @code{aset} (@pxref{Array Functions}). However, note that 54and @code{aset} (@pxref{Array Functions}). However, you should not
55@code{length} should @emph{not} be used for computing the width of a 55try to change the contents of constant strings (@pxref{Modifying Strings}).
56string on display; use @code{string-width} (@pxref{Size of Displayed
57Text}) instead.
58 56
59 There are two text representations for non-@acronym{ASCII} 57 There are two text representations for non-@acronym{ASCII}
60characters in Emacs strings (and in buffers): unibyte and multibyte. 58characters in Emacs strings (and in buffers): unibyte and multibyte.
@@ -89,6 +87,9 @@ copy them into buffers. @xref{Character Type}, and @ref{String Type},
89for information about the syntax of characters and strings. 87for information about the syntax of characters and strings.
90@xref{Non-ASCII Characters}, for functions to convert between text 88@xref{Non-ASCII Characters}, for functions to convert between text
91representations and to encode and decode character codes. 89representations and to encode and decode character codes.
90Also, note that @code{length} should @emph{not} be used for computing
91the width of a string on display; use @code{string-width} (@pxref{Size
92of Displayed Text}) instead.
92 93
93@node Predicates for Strings 94@node Predicates for Strings
94@section Predicates for Strings 95@section Predicates for Strings
@@ -380,6 +381,11 @@ usual value is @w{@code{"[ \f\t\n\r\v]+"}}.
380@cindex modifying strings 381@cindex modifying strings
381@cindex string modification 382@cindex string modification
382 383
384 You can alter the contents of a mutable string via operations
385described in this section. However, you should not try to use these
386operations to alter the contents of a constant string.
387@xref{Constants and Mutability}.
388
383 The most basic way to alter the contents of an existing string is with 389 The most basic way to alter the contents of an existing string is with
384@code{aset} (@pxref{Array Functions}). @code{(aset @var{string} 390@code{aset} (@pxref{Array Functions}). @code{(aset @var{string}
385@var{idx} @var{char})} stores @var{char} into @var{string} at index 391@var{idx} @var{char})} stores @var{char} into @var{string} at index
@@ -591,7 +597,7 @@ for sorting (@pxref{Sequence Functions}):
591 597
592@example 598@example
593@group 599@group
594(sort '("11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp) 600(sort (list "11" "12" "1 1" "1 2" "1.1" "1.2") 'string-collate-lessp)
595 @result{} ("11" "1 1" "1.1" "12" "1 2" "1.2") 601 @result{} ("11" "1 1" "1.1" "12" "1 2" "1.2")
596@end group 602@end group
597@end example 603@end example
@@ -608,7 +614,7 @@ systems. The @var{locale} value of @code{"POSIX"} or @code{"C"} lets
608 614
609@example 615@example
610@group 616@group
611(sort '("11" "12" "1 1" "1 2" "1.1" "1.2") 617(sort (list "11" "12" "1 1" "1 2" "1.1" "1.2")
612 (lambda (s1 s2) (string-collate-lessp s1 s2 "POSIX"))) 618 (lambda (s1 s2) (string-collate-lessp s1 s2 "POSIX")))
613 @result{} ("1 1" "1 2" "1.1" "1.2" "11" "12") 619 @result{} ("1 1" "1 2" "1.1" "1.2" "11" "12")
614@end group 620@end group
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index ad45a8edaff..9eb99a0ac92 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -1118,9 +1118,9 @@ bidi-class}).
1118 ;; 'bidi-class' Unicode property is R, AL, or RLO -- 1118 ;; 'bidi-class' Unicode property is R, AL, or RLO --
1119 ;; these have a right-to-left directionality. 1119 ;; these have a right-to-left directionality.
1120 (map-char-table 1120 (map-char-table
1121 #'(lambda (key val) 1121 (lambda (key val)
1122 (if (memq val '(R AL RLO)) 1122 (if (memq val '(R AL RLO))
1123 (modify-category-entry key ?R category-table))) 1123 (modify-category-entry key ?R category-table)))
1124 uniprop-table) 1124 uniprop-table)
1125 category-table)) 1125 category-table))
1126@end example 1126@end example
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index ffdf952b081..58424a4231b 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -2073,11 +2073,10 @@ its @code{sort-subr} call looks like this:
2073@example 2073@example
2074@group 2074@group
2075(sort-subr reverse 2075(sort-subr reverse
2076 (function 2076 (lambda ()
2077 (lambda () 2077 (while (and (not (eobp))
2078 (while (and (not (eobp)) 2078 (looking-at paragraph-separate))
2079 (looking-at paragraph-separate)) 2079 (forward-line 1)))
2080 (forward-line 1))))
2081 'forward-paragraph) 2080 'forward-paragraph)
2082@end group 2081@end group
2083@end example 2082@end example
@@ -4679,7 +4678,7 @@ expanded when the header line is computed. To do this, the
4679above. @var{specification} is an alist that has elements where the 4678above. @var{specification} is an alist that has elements where the
4680@code{car} is a character and the @code{cdr} is the substitution. 4679@code{car} is a character and the @code{cdr} is the substitution.
4681 4680
4682If @code{ONLY-PRESENT} is @code{nil}, errors will be signalled if a 4681If @code{ONLY-PRESENT} is @code{nil}, errors will be signaled if a
4683format character has been used that's not present in 4682format character has been used that's not present in
4684@var{specification}. If it's non-@code{nil}, that format 4683@var{specification}. If it's non-@code{nil}, that format
4685specification is left verbatim in the result. 4684specification is left verbatim in the result.
@@ -5725,7 +5724,7 @@ made within the @code{combine-after-change-calls} body.
5725@code{after-change-functions} within 5724@code{after-change-functions} within
5726the body of a @code{combine-after-change-calls} form. 5725the body of a @code{combine-after-change-calls} form.
5727 5726
5728@strong{Warning:} if the changes you combine occur in widely scattered 5727@strong{Warning:} If the changes you combine occur in widely scattered
5729parts of the buffer, this will still work, but it is not advisable, 5728parts of the buffer, this will still work, but it is not advisable,
5730because it may lead to inefficient behavior for some change hook 5729because it may lead to inefficient behavior for some change hook
5731functions. 5730functions.
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 424e15bc6d1..718e269fc86 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -25668,6 +25668,13 @@ Create non-spam statistics for every file in this directory. Every
25668file is treated as one non-spam mail. 25668file is treated as one non-spam mail.
25669@end defun 25669@end defun
25670 25670
25671@defvar spam-stat-process-directory-age
25672Maximum age of files to be processed, in days. Without this filter,
25673re-training spam-stat with several thousand messages could take a long
25674time. The default is 90, but you might want to set this to a bigger
25675value during the initial training.
25676@end defvar
25677
25671Usually you would call @code{spam-stat-process-spam-directory} on a 25678Usually you would call @code{spam-stat-process-spam-directory} on a
25672directory such as @file{~/Mail/mail/spam} (this usually corresponds to 25679directory such as @file{~/Mail/mail/spam} (this usually corresponds to
25673the group @samp{nnml:mail.spam}), and you would call 25680the group @samp{nnml:mail.spam}), and you would call
diff --git a/etc/NEWS.27 b/etc/NEWS.27
index 4485bf91650..091c831e9d6 100644
--- a/etc/NEWS.27
+++ b/etc/NEWS.27
@@ -934,7 +934,7 @@ back, customize 'follow-hide-ghost-cursors' to nil.
934*** 'windmove-create-window' when non-nil makes a new window. 934*** 'windmove-create-window' when non-nil makes a new window.
935This happens upon moving off the edge of the frame. 935This happens upon moving off the edge of the frame.
936 936
937--- 937+++
938*** Windmove supports directional window display and selection. 938*** Windmove supports directional window display and selection.
939The new command 'windmove-display-default-keybindings' binds default 939The new command 'windmove-display-default-keybindings' binds default
940keys with provided modifiers (by default, Shift-Meta) to the commands 940keys with provided modifiers (by default, Shift-Meta) to the commands
@@ -948,7 +948,7 @@ display the buffer in the same window, for example, 'S-M-0 C-h e'
948displays the "*Messages*" buffer in the same window. 'S-M-t C-h C-n' 948displays the "*Messages*" buffer in the same window. 'S-M-t C-h C-n'
949displays NEWS in a new tab. 949displays NEWS in a new tab.
950 950
951--- 951+++
952*** Windmove also supports directional window deletion. 952*** Windmove also supports directional window deletion.
953The new command 'windmove-delete-default-keybindings' binds default 953The new command 'windmove-delete-default-keybindings' binds default
954keys with provided prefix (by default, 'C-x') and modifiers (by default, 954keys with provided prefix (by default, 'C-x') and modifiers (by default,
@@ -958,7 +958,7 @@ With a prefix arg 'C-u', also kills the buffer in that window.
958With 'M-0', deletes the selected window and selects the window 958With 'M-0', deletes the selected window and selects the window
959that was in the specified direction. 959that was in the specified direction.
960 960
961--- 961+++
962*** New command 'windmove-swap-states-in-direction' binds default keys 962*** New command 'windmove-swap-states-in-direction' binds default keys
963to the commands that swap the states of the selected window with the 963to the commands that swap the states of the selected window with the
964window in the specified direction. 964window in the specified direction.
@@ -1011,10 +1011,6 @@ remapped to these, respectively.
1011 1011
1012** Dired 1012** Dired
1013 1013
1014---
1015*** On systems that support suid/guid files, Dired now fontifies the
1016permissions of such files with a special face 'dired-set-id'.
1017
1018+++ 1014+++
1019*** New command 'dired-create-empty-file'. 1015*** New command 'dired-create-empty-file'.
1020 1016
@@ -1026,10 +1022,6 @@ It is by default bound to '* N'.
1026*** The marking commands now report how many files were marked by the 1022*** The marking commands now report how many files were marked by the
1027command itself, not how many files are marked in total. 1023command itself, not how many files are marked in total.
1028 1024
1029---
1030*** A new face, 'dired-special', is used to highlight sockets, named
1031pipes, block devices and character devices.
1032
1033+++ 1025+++
1034*** The new user option 'dired-create-destination-dirs' controls whether 1026*** The new user option 'dired-create-destination-dirs' controls whether
1035'dired-do-copy' and 'dired-rename-file' should create non-existent 1027'dired-do-copy' and 'dired-rename-file' should create non-existent
@@ -1047,6 +1039,14 @@ Dired performs file renaming using underlying version control system.
1047*** Zstandard compression is now supported for 'dired-do-compress' and 1039*** Zstandard compression is now supported for 'dired-do-compress' and
1048'dired-do-compress-to'. 1040'dired-do-compress-to'.
1049 1041
1042---
1043*** On systems that support suid/guid files, Dired now fontifies the
1044permissions of such files with a special face 'dired-set-id'.
1045
1046---
1047*** A new face, 'dired-special', is used to highlight sockets, named
1048pipes, block devices and character devices.
1049
1050** Find-Dired 1050** Find-Dired
1051 1051
1052--- 1052---
@@ -1068,12 +1068,6 @@ script. The default is nil.
1068*** New command 'log-edit-generate-changelog-from-diff', bound to 'C-c C-w'. 1068*** New command 'log-edit-generate-changelog-from-diff', bound to 'C-c C-w'.
1069This generates ChangeLog entries from the VC fileset diff. 1069This generates ChangeLog entries from the VC fileset diff.
1070 1070
1071---
1072*** 'vc-dir' now shows a button allowing you to hide the stash list.
1073Controlled by user option 'vc-git-show-stash'. Default t means show
1074the entire list as before. An integer value limits the list length
1075(but still allows you to show the entire list via the button).
1076
1077+++ 1071+++
1078*** Recording ChangeLog entries doesn't require an actual file. 1072*** Recording ChangeLog entries doesn't require an actual file.
1079If a ChangeLog file doesn't exist, and if the new user option 1073If a ChangeLog file doesn't exist, and if the new user option
@@ -1084,9 +1078,11 @@ still be used if it exists.) Set the user option to nil to get the
1084previous behavior of always creating a buffer that visits a ChangeLog 1078previous behavior of always creating a buffer that visits a ChangeLog
1085file. 1079file.
1086 1080
1087--- 1081+++
1088*** New user option 'vc-find-revision-no-save'. 1082*** The new 'd' command ('vc-dir-clean-files') in 'vc-dir-mode'
1089With non-nil, 'vc-find-revision' doesn't write the created buffer to file. 1083buffers will delete the marked files (or if no files are marked, the
1084file under point). This command does not notify the VC backend, and
1085is mostly useful for unregistered files.
1090 1086
1091--- 1087---
1092*** 'vc-dir-ignore' now takes a prefix argument to ignore all marked files. 1088*** 'vc-dir-ignore' now takes a prefix argument to ignore all marked files.
@@ -1102,6 +1098,12 @@ When some files are marked, only those are stashed.
1102When no files are marked, all modified files are stashed, as before. 1098When no files are marked, all modified files are stashed, as before.
1103 1099
1104--- 1100---
1101*** 'vc-dir' now shows a button allowing you to hide the stash list.
1102Controlled by user option 'vc-git-show-stash'. Default t means show
1103the entire list as before. An integer value limits the list length
1104(but still allows you to show the entire list via the button).
1105
1106---
1105*** 'vc-git-stash' is now bound to 'C' in the stash headers. 1107*** 'vc-git-stash' is now bound to 'C' in the stash headers.
1106 1108
1107-- 1109--
@@ -1133,26 +1135,20 @@ you invoke 'C-x v m' ('vc-merge').
1133instead of revision numbers as completion candidates when it prompts 1135instead of revision numbers as completion candidates when it prompts
1134for a revision. 1136for a revision.
1135 1137
1136+++
1137*** 'C-u C-x v D' ('vc-root-version-diff') prompts for two revisions
1138and compares their entire trees.
1139
1140--- 1138---
1141*** New user option 'vc-hg-revert-switches'. 1139*** New user option 'vc-hg-revert-switches'.
1142It specifies switches to pass to Hg's 'revert' command. 1140It specifies switches to pass to Hg's 'revert' command.
1143 1141
1142+++
1143*** 'C-u C-x v D' ('vc-root-version-diff') prompts for two revisions
1144and compares their entire trees.
1145
1144--- 1146---
1145*** 'C-x v M D' ('vc-diff-mergebase') and 'C-x v M L' ('vc-log-mergebase') 1147*** 'C-x v M D' ('vc-diff-mergebase') and 'C-x v M L' ('vc-log-mergebase')
1146print diffs and logs between the merge base (common ancestor) of two 1148print diffs and logs between the merge base (common ancestor) of two
1147given revisions. 1149given revisions.
1148 1150
1149+++ 1151+++
1150*** The new 'd' command ('vc-dir-clean-files') in 'vc-dir-mode'
1151buffers will delete the marked files (or if no files are marked, the
1152file under point). This command does not notify the VC backend, and
1153is mostly useful for unregistered files.
1154
1155+++
1156*** New command 'vc-log-search' asks for a pattern, searches it 1152*** New command 'vc-log-search' asks for a pattern, searches it
1157in the revision log, and displays matched log entries in the 1153in the revision log, and displays matched log entries in the
1158log buffer. For example, 'M-x vc-log-search RET bug#36644 RET' 1154log buffer. For example, 'M-x vc-log-search RET bug#36644 RET'
@@ -1170,6 +1166,10 @@ revision's commit. (For some less capable VCSes, only the log entry
1170is shown.) 1166is shown.)
1171 1167
1172--- 1168---
1169*** New user option 'vc-find-revision-no-save'.
1170With non-nil, 'vc-find-revision' doesn't write the created buffer to file.
1171
1172---
1173*** 'C-x v =' can now mimic Magit's diff format. 1173*** 'C-x v =' can now mimic Magit's diff format.
1174Set the new user option 'diff-font-lock-prettify' to t for that, see 1174Set the new user option 'diff-font-lock-prettify' to t for that, see
1175below under "Diff mode". 1175below under "Diff mode".
@@ -3515,6 +3515,10 @@ functions.
3515*** 'image-mode' now uses this library to automatically rotate images 3515*** 'image-mode' now uses this library to automatically rotate images
3516according to the orientation in the Exif data, if any. 3516according to the orientation in the Exif data, if any.
3517 3517
3518*** In 'image-mode' the image is resized automatically to fit in window.
3519The image will resize upon first display and whenever the window's
3520dimensions change.
3521
3518--- 3522---
3519*** New library image-converter. 3523*** New library image-converter.
3520If you need to view exotic image formats for which Emacs doesn't have 3524If you need to view exotic image formats for which Emacs doesn't have
@@ -3552,6 +3556,8 @@ name to the kill ring.
3552With a prefix argument, 'image-rotate' now rotates the image at point 3556With a prefix argument, 'image-rotate' now rotates the image at point
355390 degrees counter-clockwise, instead of the default clockwise. 355790 degrees counter-clockwise, instead of the default clockwise.
3554 3558
3559*** 'image-mode' has a new key prefix 's' for transformation commands.
3560
3555** Modules 3561** Modules
3556 3562
3557--- 3563---
diff --git a/lib/ieee754.in.h b/lib/ieee754.in.h
index d64bb46e9de..01ca648905f 100644
--- a/lib/ieee754.in.h
+++ b/lib/ieee754.in.h
@@ -67,7 +67,7 @@ union ieee754_float
67#endif /* Little endian. */ 67#endif /* Little endian. */
68 } ieee; 68 } ieee;
69 69
70 /* This format makes it easier to see if a NaN is a signalling NaN. */ 70 /* This format makes it easier to see if a NaN is a signaling NaN. */
71 struct 71 struct
72 { 72 {
73#if __BYTE_ORDER == __BIG_ENDIAN 73#if __BYTE_ORDER == __BIG_ENDIAN
@@ -118,7 +118,7 @@ union ieee754_double
118#endif /* Little endian. */ 118#endif /* Little endian. */
119 } ieee; 119 } ieee;
120 120
121 /* This format makes it easier to see if a NaN is a signalling NaN. */ 121 /* This format makes it easier to see if a NaN is a signaling NaN. */
122 struct 122 struct
123 { 123 {
124#if __BYTE_ORDER == __BIG_ENDIAN 124#if __BYTE_ORDER == __BIG_ENDIAN
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 4f01918bdb9..13b72196565 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -677,7 +677,7 @@ Each element is (INDEX . VALUE)")
677(byte-defop 112 1 byte-current-buffer) 677(byte-defop 112 1 byte-current-buffer)
678(byte-defop 113 0 byte-set-buffer) 678(byte-defop 113 0 byte-set-buffer)
679(byte-defop 114 0 byte-save-current-buffer 679(byte-defop 114 0 byte-save-current-buffer
680 "To make a binding to record the current buffer") 680 "to make a binding to record the current buffer")
681(byte-defop 115 0 byte-set-mark-OBSOLETE) 681(byte-defop 115 0 byte-set-mark-OBSOLETE)
682(byte-defop 116 1 byte-interactive-p-OBSOLETE) 682(byte-defop 116 1 byte-interactive-p-OBSOLETE)
683 683
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index b5581aa3fbb..e4b800786cc 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2134,7 +2134,7 @@ buffer, otherwise stop after the first error."
2134 (checkdoc-ispell-init) 2134 (checkdoc-ispell-init)
2135 (unless checkdoc-spellcheck-documentation-flag 2135 (unless checkdoc-spellcheck-documentation-flag
2136 ;; this happens when (checkdoc-ispell-init) can't start `ispell-program-name' 2136 ;; this happens when (checkdoc-ispell-init) can't start `ispell-program-name'
2137 (user-error "No spellchecker installed: check the variable `ispell-program-name'.")) 2137 (user-error "No spellchecker installed: check the variable `ispell-program-name'"))
2138 (save-excursion 2138 (save-excursion
2139 (skip-chars-forward "^a-zA-Z") 2139 (skip-chars-forward "^a-zA-Z")
2140 (let (word sym case-fold-search err word-beginning word-end) 2140 (let (word sym case-fold-search err word-beginning word-end)
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index bb10194a946..4408bb58464 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -767,7 +767,7 @@ The result of the body appears to the compiler as a quoted constant."
767 "Eval EXPR and choose among clauses on that value. 767 "Eval EXPR and choose among clauses on that value.
768Each clause looks like (KEYLIST BODY...). EXPR is evaluated and 768Each clause looks like (KEYLIST BODY...). EXPR is evaluated and
769compared against each key in each KEYLIST; the corresponding BODY 769compared against each key in each KEYLIST; the corresponding BODY
770is evaluated. If no clause succeeds, cl-case returns nil. A 770is evaluated. If no clause succeeds, this macro returns nil. A
771single non-nil atom may be used in place of a KEYLIST of one 771single non-nil atom may be used in place of a KEYLIST of one
772atom. A KEYLIST of t or `otherwise' is allowed only in the final 772atom. A KEYLIST of t or `otherwise' is allowed only in the final
773clause, and matches if no other keys match. Key values are 773clause, and matches if no other keys match. Key values are
@@ -806,10 +806,10 @@ compared by `eql'.
806 806
807;;;###autoload 807;;;###autoload
808(defmacro cl-typecase (expr &rest clauses) 808(defmacro cl-typecase (expr &rest clauses)
809 "Evals EXPR, chooses among clauses on that value. 809 "Eval EXPR and choose among clauses on that value.
810Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it 810Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it
811satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds, 811satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds,
812cl-typecase returns nil. A TYPE of t or `otherwise' is allowed only in the 812this macro returns nil. A TYPE of t or `otherwise' is allowed only in the
813final clause, and matches if no other keys match. 813final clause, and matches if no other keys match.
814\n(fn EXPR (TYPE BODY...)...)" 814\n(fn EXPR (TYPE BODY...)...)"
815 (declare (indent 1) 815 (declare (indent 1)
@@ -2701,7 +2701,7 @@ pairs for that slot.
2701Supported keywords for slots are: 2701Supported keywords for slots are:
2702- `:read-only': If this has a non-nil value, that slot cannot be set via `setf'. 2702- `:read-only': If this has a non-nil value, that slot cannot be set via `setf'.
2703- `:documentation': this is a docstring describing the slot. 2703- `:documentation': this is a docstring describing the slot.
2704- `:type': the type of the field; currently unused. 2704- `:type': the type of the field; currently only used for documentation.
2705 2705
2706\(fn NAME &optional DOCSTRING &rest SLOTS)" 2706\(fn NAME &optional DOCSTRING &rest SLOTS)"
2707 (declare (doc-string 2) (indent 1) 2707 (declare (doc-string 2) (indent 1)
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el
index 7dd3cbd1a21..f68c0faf09d 100644
--- a/lisp/emacs-lisp/elp.el
+++ b/lisp/emacs-lisp/elp.el
@@ -238,7 +238,7 @@ FUNSYM must be a symbol of a defined function."
238 ;; The info vector data structure is a 2 element vector. The 0th 238 ;; The info vector data structure is a 2 element vector. The 0th
239 ;; element is the call-count, i.e. the total number of times this 239 ;; element is the call-count, i.e. the total number of times this
240 ;; function has been entered. This value is bumped up on entry to 240 ;; function has been entered. This value is bumped up on entry to
241 ;; the function so that non-local exists are still recorded. TBD: 241 ;; the function so that non-local exits are still recorded. TBD:
242 ;; I haven't tested non-local exits at all, so no guarantees. 242 ;; I haven't tested non-local exits at all, so no guarantees.
243 ;; 243 ;;
244 ;; The 1st element is the total amount of time in seconds that has 244 ;; The 1st element is the total amount of time in seconds that has
diff --git a/lisp/emacs-lisp/generator.el b/lisp/emacs-lisp/generator.el
index 27ed29925b3..ba344eb5150 100644
--- a/lisp/emacs-lisp/generator.el
+++ b/lisp/emacs-lisp/generator.el
@@ -59,7 +59,7 @@
59;; This raw form of iteration is general, but a bit awkward to use, so 59;; This raw form of iteration is general, but a bit awkward to use, so
60;; this library also provides some convenience functions: 60;; this library also provides some convenience functions:
61;; 61;;
62;; `iter-do' is like `cl-do', except that instead of walking a list, 62;; `iter-do' is like `dolist', except that instead of walking a list,
63;; it walks an iterator. `cl-loop' is also extended with a new 63;; it walks an iterator. `cl-loop' is also extended with a new
64;; keyword, `iter-by', that iterates over an iterator. 64;; keyword, `iter-by', that iterates over an iterator.
65;; 65;;
@@ -67,7 +67,7 @@
67;;; Implementation: 67;;; Implementation:
68 68
69;; 69;;
70;; The internal cps transformation code uses the cps- namespace. 70;; The internal CPS transformation code uses the cps- namespace.
71;; Iteration functions use the `iter-' namespace. Generator functions 71;; Iteration functions use the `iter-' namespace. Generator functions
72;; are somewhat less efficient than conventional elisp routines, 72;; are somewhat less efficient than conventional elisp routines,
73;; although we try to avoid CPS transformation on forms that do not 73;; although we try to avoid CPS transformation on forms that do not
@@ -89,13 +89,13 @@
89 `(gensym (format ,fmt ,@args))) 89 `(gensym (format ,fmt ,@args)))
90 90
91(defvar cps--dynamic-wrappers '(identity) 91(defvar cps--dynamic-wrappers '(identity)
92 "List of transformer functions to apply to atomic forms we 92 "List of functions to apply to atomic forms.
93evaluate in CPS context.") 93These are transformer functions applied to atomic forms evaluated
94in CPS context.")
94 95
95(defconst cps-standard-special-forms 96(defconst cps-standard-special-forms
96 '(setq setq-default throw interactive) 97 '(setq setq-default throw interactive)
97 "List of special forms that we treat just like ordinary 98 "List of special forms treated just like ordinary function applications." )
98 function applications." )
99 99
100(defun cps--trace-funcall (func &rest args) 100(defun cps--trace-funcall (func &rest args)
101 (message "%S: args=%S" func args) 101 (message "%S: args=%S" func args)
@@ -118,17 +118,15 @@ evaluate in CPS context.")
118 (error "%s not supported in generators" ,function))) 118 (error "%s not supported in generators" ,function)))
119 119
120(defmacro cps--with-value-wrapper (wrapper &rest body) 120(defmacro cps--with-value-wrapper (wrapper &rest body)
121 "Continue generating CPS code with an atomic-form wrapper 121 "Evaluate BODY with WRAPPER added to the stack of atomic-form wrappers.
122to the current stack of such wrappers. WRAPPER is a function that 122WRAPPER is a function that takes an atomic form and returns a wrapped form.
123takes a form and returns a wrapped form.
124 123
125Whenever we generate an atomic form (i.e., a form that can't 124Whenever we generate an atomic form (i.e., a form that can't
126`iter-yield'), we first (before actually inserting that form in our 125`iter-yield'), we first (before actually inserting that form in our
127generated code) pass that form through all the transformer 126generated code) pass that form through all the transformer
128functions. We use this facility to wrap forms that can transfer 127functions. We use this facility to wrap forms that can transfer
129control flow non-locally in goo that diverts this control flow to 128control flow non-locally in goo that diverts this control flow to
130the CPS state machinery. 129the CPS state machinery."
131"
132 (declare (indent 1)) 130 (declare (indent 1))
133 `(let ((cps--dynamic-wrappers 131 `(let ((cps--dynamic-wrappers
134 (cons 132 (cons
@@ -153,7 +151,7 @@ DYNAMIC-VAR bound to STATIC-VAR."
153 ,@body)) 151 ,@body))
154 152
155(defun cps--add-state (kind body) 153(defun cps--add-state (kind body)
156 "Create a new CPS state with body BODY and return the state's name." 154 "Create a new CPS state of KIND with BODY and return the state's name."
157 (declare (indent 1)) 155 (declare (indent 1))
158 (let ((state (cps--gensym "cps-state-%s-" kind))) 156 (let ((state (cps--gensym "cps-state-%s-" kind)))
159 (push (list state body cps--cleanup-function) cps--states) 157 (push (list state body cps--cleanup-function) cps--states)
@@ -170,14 +168,12 @@ DYNAMIC-VAR bound to STATIC-VAR."
170 (and (fboundp handler) handler))) 168 (and (fboundp handler) handler)))
171 169
172(defvar cps-inhibit-atomic-optimization nil 170(defvar cps-inhibit-atomic-optimization nil
173 "When non-nil, always rewrite forms into cps even when they 171 "When non-nil, always rewrite forms into CPS even when they don't yield.")
174don't yield.")
175 172
176(defvar cps--yield-seen) 173(defvar cps--yield-seen)
177 174
178(defun cps--atomic-p (form) 175(defun cps--atomic-p (form)
179 "Return whether the given form never yields." 176 "Return nil if FORM can yield, non-nil otherwise."
180
181 (and (not cps-inhibit-atomic-optimization) 177 (and (not cps-inhibit-atomic-optimization)
182 (let* ((cps--yield-seen)) 178 (let* ((cps--yield-seen))
183 (ignore (macroexpand-all 179 (ignore (macroexpand-all
@@ -649,8 +645,8 @@ modified copy."
649(defun iter-yield (value) 645(defun iter-yield (value)
650 "When used inside a generator, yield control to caller. 646 "When used inside a generator, yield control to caller.
651The caller of `iter-next' receives VALUE, and the next call to 647The caller of `iter-next' receives VALUE, and the next call to
652`iter-next' resumes execution at the previous 648`iter-next' resumes execution with the form immediately following this
653`iter-yield' point." 649`iter-yield' call."
654 (identity value) 650 (identity value)
655 (error "`iter-yield' used outside a generator")) 651 (error "`iter-yield' used outside a generator"))
656 652
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index 3ab49293e90..096036a0ffa 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -38,7 +38,7 @@
38;; 38;;
39;; Instead, we use here a higher-order approach: instead 39;; Instead, we use here a higher-order approach: instead
40;; of a 5-tuple, a place-expander returns a function. 40;; of a 5-tuple, a place-expander returns a function.
41;; If you think about types, the old approach return things of type 41;; If you think about types, the old approach returns things of type
42;; {vars: List Var, values: List Exp, 42;; {vars: List Var, values: List Exp,
43;; stores: List Var, getter: Exp, setter: Exp} 43;; stores: List Var, getter: Exp, setter: Exp}
44;; whereas the new approach returns a function of type 44;; whereas the new approach returns a function of type
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 3b0f5493eeb..98c44161ad0 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -535,7 +535,7 @@ This will generate compile-time constants from BINDINGS."
535 535
536;; Support backtrace mode. 536;; Support backtrace mode.
537(defconst lisp-el-font-lock-keywords-for-backtraces lisp-el-font-lock-keywords 537(defconst lisp-el-font-lock-keywords-for-backtraces lisp-el-font-lock-keywords
538 "Default highlighting from Emacs Lisp mod used in Backtrace mode.") 538 "Default highlighting from Emacs Lisp mode used in Backtrace mode.")
539(defconst lisp-el-font-lock-keywords-for-backtraces-1 lisp-el-font-lock-keywords-1 539(defconst lisp-el-font-lock-keywords-for-backtraces-1 lisp-el-font-lock-keywords-1
540 "Subdued highlighting from Emacs Lisp mode used in Backtrace mode.") 540 "Subdued highlighting from Emacs Lisp mode used in Backtrace mode.")
541(defconst lisp-el-font-lock-keywords-for-backtraces-2 541(defconst lisp-el-font-lock-keywords-for-backtraces-2
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 22d7d913141..fbce1193cd0 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -418,24 +418,40 @@ call."
418 418
419(defvar image-mode-map 419(defvar image-mode-map
420 (let ((map (make-sparse-keymap))) 420 (let ((map (make-sparse-keymap)))
421
422 ;; Toggling keys
421 (define-key map "\C-c\C-c" 'image-toggle-display) 423 (define-key map "\C-c\C-c" 'image-toggle-display)
422 (define-key map "\C-c\C-x" 'image-toggle-hex-display) 424 (define-key map "\C-c\C-x" 'image-toggle-hex-display)
423 (define-key map (kbd "SPC") 'image-scroll-up) 425
424 (define-key map (kbd "S-SPC") 'image-scroll-down) 426 ;; Transformation keys
425 (define-key map (kbd "DEL") 'image-scroll-down) 427 (define-key map "sf" 'image-mode-fit-frame)
426 (define-key map (kbd "RET") 'image-toggle-animation) 428 (define-key map "sh" 'image-transform-fit-to-height)
429 (define-key map "sw" 'image-transform-fit-to-width)
430 (define-key map "sr" 'image-transform-set-rotation)
431 (define-key map "s0" 'image-transform-reset)
432 (define-key map "ss" 'image-transform-set-scale)
433
434 ;; Multi-frame keys
435 (define-key map (kbd "RET") 'image-toggle-animation)
427 (define-key map "F" 'image-goto-frame) 436 (define-key map "F" 'image-goto-frame)
428 (define-key map "f" 'image-next-frame) 437 (define-key map "f" 'image-next-frame)
429 (define-key map "b" 'image-previous-frame) 438 (define-key map "b" 'image-previous-frame)
430 (define-key map "n" 'image-next-file)
431 (define-key map "p" 'image-previous-file)
432 (define-key map "a+" 'image-increase-speed) 439 (define-key map "a+" 'image-increase-speed)
433 (define-key map "a-" 'image-decrease-speed) 440 (define-key map "a-" 'image-decrease-speed)
434 (define-key map "a0" 'image-reset-speed) 441 (define-key map "a0" 'image-reset-speed)
435 (define-key map "ar" 'image-reverse-speed) 442 (define-key map "ar" 'image-reverse-speed)
443
444 ;; File keys
445 (define-key map "n" 'image-next-file)
446 (define-key map "p" 'image-previous-file)
436 (define-key map "w" 'image-mode-copy-file-name-as-kill) 447 (define-key map "w" 'image-mode-copy-file-name-as-kill)
437 (define-key map "m" 'image-mode-mark-file) 448 (define-key map "m" 'image-mode-mark-file)
438 (define-key map "u" 'image-mode-unmark-file) 449 (define-key map "u" 'image-mode-unmark-file)
450
451 ;; Scrolling keys
452 (define-key map (kbd "SPC") 'image-scroll-up)
453 (define-key map (kbd "S-SPC") 'image-scroll-down)
454 (define-key map (kbd "DEL") 'image-scroll-down)
439 (define-key map [remap forward-char] 'image-forward-hscroll) 455 (define-key map [remap forward-char] 'image-forward-hscroll)
440 (define-key map [remap backward-char] 'image-backward-hscroll) 456 (define-key map [remap backward-char] 'image-backward-hscroll)
441 (define-key map [remap right-char] 'image-forward-hscroll) 457 (define-key map [remap right-char] 'image-forward-hscroll)
@@ -452,6 +468,7 @@ call."
452 (define-key map [remap move-end-of-line] 'image-eol) 468 (define-key map [remap move-end-of-line] 'image-eol)
453 (define-key map [remap beginning-of-buffer] 'image-bob) 469 (define-key map [remap beginning-of-buffer] 'image-bob)
454 (define-key map [remap end-of-buffer] 'image-eob) 470 (define-key map [remap end-of-buffer] 'image-eob)
471
455 (easy-menu-define image-mode-menu map "Menu for Image mode." 472 (easy-menu-define image-mode-menu map "Menu for Image mode."
456 '("Image" 473 '("Image"
457 ["Show as Text" image-toggle-display :active t 474 ["Show as Text" image-toggle-display :active t
@@ -459,17 +476,15 @@ call."
459 ["Show as Hex" image-toggle-hex-display :active t 476 ["Show as Hex" image-toggle-hex-display :active t
460 :help "Show image as hex"] 477 :help "Show image as hex"]
461 "--" 478 "--"
479 ["Fit Frame to Image" image-mode-fit-frame :active t
480 :help "Resize frame to match image"]
462 ["Fit to Window Height" image-transform-fit-to-height 481 ["Fit to Window Height" image-transform-fit-to-height
463 :visible (eq image-type 'imagemagick)
464 :help "Resize image to match the window height"] 482 :help "Resize image to match the window height"]
465 ["Fit to Window Width" image-transform-fit-to-width 483 ["Fit to Window Width" image-transform-fit-to-width
466 :visible (eq image-type 'imagemagick)
467 :help "Resize image to match the window width"] 484 :help "Resize image to match the window width"]
468 ["Rotate Image..." image-transform-set-rotation 485 ["Rotate Image..." image-transform-set-rotation
469 :visible (eq image-type 'imagemagick)
470 :help "Rotate the image"] 486 :help "Rotate the image"]
471 ["Reset Transformations" image-transform-reset 487 ["Reset Transformations" image-transform-reset
472 :visible (eq image-type 'imagemagick)
473 :help "Reset all image transformations"] 488 :help "Reset all image transformations"]
474 "--" 489 "--"
475 ["Show Thumbnails" 490 ["Show Thumbnails"
@@ -486,9 +501,6 @@ call."
486 :active buffer-file-name 501 :active buffer-file-name
487 :help "Copy the current file name to the kill ring"] 502 :help "Copy the current file name to the kill ring"]
488 "--" 503 "--"
489 ["Fit Frame to Image" image-mode-fit-frame :active t
490 :help "Resize frame to match image"]
491 "--"
492 ["Animate Image" image-toggle-animation :style toggle 504 ["Animate Image" image-toggle-animation :style toggle
493 :selected (let ((image (image-get-display-property))) 505 :selected (let ((image (image-get-display-property)))
494 (and image (image-animate-timer image))) 506 (and image (image-animate-timer image)))
@@ -767,11 +779,12 @@ was inserted."
767 props image) 779 props image)
768 780
769 ;; Get the rotation data from the file, if any. 781 ;; Get the rotation data from the file, if any.
770 (setq image-transform-rotation 782 (when (zerop image-transform-rotation) ; don't reset modified value
771 (or (exif-orientation 783 (setq image-transform-rotation
772 (ignore-error exif-error 784 (or (exif-orientation
773 (exif-parse-buffer))) 785 (ignore-error exif-error
774 0.0)) 786 (exif-parse-buffer)))
787 0.0)))
775 788
776 ;; :scale 1: If we do not set this, create-image will apply 789 ;; :scale 1: If we do not set this, create-image will apply
777 ;; default scaling based on font size. 790 ;; default scaling based on font size.
@@ -1250,8 +1263,7 @@ Do this for an image of type `imagemagick' to make sure that the
1250elisp code matches the way ImageMagick computes the bounding box 1263elisp code matches the way ImageMagick computes the bounding box
1251of a rotated image." 1264of a rotated image."
1252 (when (and (not (numberp image-transform-resize)) 1265 (when (and (not (numberp image-transform-resize))
1253 (boundp 'image-type) 1266 (boundp 'image-type))
1254 (eq image-type 'imagemagick))
1255 (let ((size (image-display-size (image-get-display-property) t))) 1267 (let ((size (image-display-size (image-get-display-property) t)))
1256 (cond ((eq image-transform-resize 'fit-width) 1268 (cond ((eq image-transform-resize 'fit-width)
1257 (cl-assert (= (car size) 1269 (cl-assert (= (car size)
@@ -1268,10 +1280,7 @@ of a rotated image."
1268 "Return rescaling/rotation properties for image SPEC. 1280 "Return rescaling/rotation properties for image SPEC.
1269These properties are determined by the Image mode variables 1281These properties are determined by the Image mode variables
1270`image-transform-resize' and `image-transform-rotation'. The 1282`image-transform-resize' and `image-transform-rotation'. The
1271return value is suitable for appending to an image spec. 1283return value is suitable for appending to an image spec."
1272
1273Rescaling and rotation properties only take effect if Emacs is
1274compiled with ImageMagick support."
1275 (setq image-transform-scale 1.0) 1284 (setq image-transform-scale 1.0)
1276 (when (or image-transform-resize 1285 (when (or image-transform-resize
1277 (/= image-transform-rotation 0.0)) 1286 (/= image-transform-rotation 0.0))
@@ -1302,41 +1311,32 @@ compiled with ImageMagick support."
1302 (list :rotation image-transform-rotation)))))) 1311 (list :rotation image-transform-rotation))))))
1303 1312
1304(defun image-transform-set-scale (scale) 1313(defun image-transform-set-scale (scale)
1305 "Prompt for a number, and resize the current image by that amount. 1314 "Prompt for a number, and resize the current image by that amount."
1306This command has no effect unless Emacs is compiled with
1307ImageMagick support."
1308 (interactive "nScale: ") 1315 (interactive "nScale: ")
1309 (setq image-transform-resize scale) 1316 (setq image-transform-resize scale)
1310 (image-toggle-display-image)) 1317 (image-toggle-display-image))
1311 1318
1312(defun image-transform-fit-to-height () 1319(defun image-transform-fit-to-height ()
1313 "Fit the current image to the height of the current window. 1320 "Fit the current image to the height of the current window."
1314This command has no effect unless Emacs is compiled with
1315ImageMagick support."
1316 (interactive) 1321 (interactive)
1317 (setq image-transform-resize 'fit-height) 1322 (setq image-transform-resize 'fit-height)
1318 (image-toggle-display-image)) 1323 (image-toggle-display-image))
1319 1324
1320(defun image-transform-fit-to-width () 1325(defun image-transform-fit-to-width ()
1321 "Fit the current image to the width of the current window. 1326 "Fit the current image to the width of the current window."
1322This command has no effect unless Emacs is compiled with
1323ImageMagick support."
1324 (interactive) 1327 (interactive)
1325 (setq image-transform-resize 'fit-width) 1328 (setq image-transform-resize 'fit-width)
1326 (image-toggle-display-image)) 1329 (image-toggle-display-image))
1327 1330
1328(defun image-transform-set-rotation (rotation) 1331(defun image-transform-set-rotation (rotation)
1329 "Prompt for an angle ROTATION, and rotate the image by that amount. 1332 "Prompt for an angle ROTATION, and rotate the image by that amount.
1330ROTATION should be in degrees. This command has no effect unless 1333ROTATION should be in degrees."
1331Emacs is compiled with ImageMagick support."
1332 (interactive "nRotation angle (in degrees): ") 1334 (interactive "nRotation angle (in degrees): ")
1333 (setq image-transform-rotation (float (mod rotation 360))) 1335 (setq image-transform-rotation (float (mod rotation 360)))
1334 (image-toggle-display-image)) 1336 (image-toggle-display-image))
1335 1337
1336(defun image-transform-reset () 1338(defun image-transform-reset ()
1337 "Display the current image with the default size and rotation. 1339 "Display the current image with the default size and rotation."
1338This command has no effect unless Emacs is compiled with
1339ImageMagick support."
1340 (interactive) 1340 (interactive)
1341 (setq image-transform-resize nil 1341 (setq image-transform-resize nil
1342 image-transform-rotation 0.0 1342 image-transform-rotation 0.0
diff --git a/lisp/image/exif.el b/lisp/image/exif.el
index 065456dc318..6aeb52c726d 100644
--- a/lisp/image/exif.el
+++ b/lisp/image/exif.el
@@ -95,7 +95,7 @@ mirrored or not.")
95 "Parse FILE (a JPEG file) and return the Exif data, if any. 95 "Parse FILE (a JPEG file) and return the Exif data, if any.
96The return value is a list of Exif items. 96The return value is a list of Exif items.
97 97
98If the data is invalid, an `exif-error' is signalled." 98If the data is invalid, an `exif-error' is signaled."
99 (with-temp-buffer 99 (with-temp-buffer
100 (set-buffer-multibyte nil) 100 (set-buffer-multibyte nil)
101 (insert-file-contents-literally file) 101 (insert-file-contents-literally file)
@@ -105,7 +105,7 @@ If the data is invalid, an `exif-error' is signalled."
105 "Parse BUFFER (which should be a JPEG file) and return the Exif data, if any. 105 "Parse BUFFER (which should be a JPEG file) and return the Exif data, if any.
106The return value is a list of Exif items. 106The return value is a list of Exif items.
107 107
108If the data is invalid, an `exif-error' is signalled." 108If the data is invalid, an `exif-error' is signaled."
109 (setq buffer (or buffer (current-buffer))) 109 (setq buffer (or buffer (current-buffer)))
110 (with-current-buffer buffer 110 (with-current-buffer buffer
111 (if enable-multibyte-characters 111 (if enable-multibyte-characters
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index caa5747817c..5cc10b1315a 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -75,7 +75,7 @@ unless the display width of STR is equal to or less than the display
75width of ELLIPSIS. If it is non-nil and not a string, then ELLIPSIS 75width of ELLIPSIS. If it is non-nil and not a string, then ELLIPSIS
76defaults to `truncate-string-ellipsis'. 76defaults to `truncate-string-ellipsis'.
77 77
78If ELLIPSIS-TEXT-PROPERTY in non-nil, a too-long string will not 78If ELLIPSIS-TEXT-PROPERTY is non-nil, a too-long string will not
79be truncated, but instead the elided parts will be covered by a 79be truncated, but instead the elided parts will be covered by a
80`display' text property showing the ellipsis." 80`display' text property showing the ellipsis."
81 (or start-column 81 (or start-column
diff --git a/lisp/json.el b/lisp/json.el
index 055f3f5be11..6f3b791ed17 100644
--- a/lisp/json.el
+++ b/lisp/json.el
@@ -736,7 +736,7 @@ you will get the following structure returned:
736 736
737OBJECT should have a structure like one returned by `json-read'. 737OBJECT should have a structure like one returned by `json-read'.
738If an error is detected during encoding, an error based on 738If an error is detected during encoding, an error based on
739`json-error' is signalled." 739`json-error' is signaled."
740 (cond ((memq object (list t json-null json-false)) 740 (cond ((memq object (list t json-null json-false))
741 (json-encode-keyword object)) 741 (json-encode-keyword object))
742 ((stringp object) (json-encode-string object)) 742 ((stringp object) (json-encode-string object))
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 6090e3f74ed..d2c3f9045e5 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -163,8 +163,8 @@ perform completion, no matter what ACTION is.
163 163
164If ACTION is `metadata' or a list where the first element is 164If ACTION is `metadata' or a list where the first element is
165`boundaries', return nil. If ACTION is nil, this function works 165`boundaries', return nil. If ACTION is nil, this function works
166like `try-completion'; if it's t, this function works like 166like `try-completion'; if it is t, this function works like
167`all-completion'; and any other values makes it work like 167`all-completion'; and any other value makes it work like
168`test-completion'." 168`test-completion'."
169 (cond 169 (cond
170 ((functionp collection) (funcall collection string predicate action)) 170 ((functionp collection) (funcall collection string predicate action))
diff --git a/lisp/obsolete/cl.el b/lisp/obsolete/cl.el
index 1da4289b695..20bffffd781 100644
--- a/lisp/obsolete/cl.el
+++ b/lisp/obsolete/cl.el
@@ -509,7 +509,7 @@ This method shows how to handle `setf's to places of the form
509ARGLIST, as if NAME were going to be expanded as a macro, then 509ARGLIST, as if NAME were going to be expanded as a macro, then
510the BODY forms are executed and must return a list of five elements: 510the BODY forms are executed and must return a list of five elements:
511a temporary-variables list, a value-forms list, a store-variables list 511a temporary-variables list, a value-forms list, a store-variables list
512\(of length one), a store-form, and an access- form. 512\(of length one), a store-form, and an access-form.
513 513
514See `gv-define-expander', and `gv-define-setter' for better and 514See `gv-define-expander', and `gv-define-setter' for better and
515simpler ways to define setf-methods." 515simpler ways to define setf-methods."
diff --git a/lisp/sort.el b/lisp/sort.el
index e4ff2afb3d7..de0e1b9519d 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -198,7 +198,8 @@ as start and end positions), and with `string<' otherwise."
198 198
199;;;###autoload 199;;;###autoload
200(defun sort-lines (reverse beg end) 200(defun sort-lines (reverse beg end)
201 "Sort lines in region alphabetically; argument means descending order. 201 "Sort lines in region alphabetically; REVERSE non-nil means descending order.
202Interactively, REVERSE is the prefix argument, and BEG and END are the region.
202Called from a program, there are three arguments: 203Called from a program, there are three arguments:
203REVERSE (non-nil means reverse order), BEG and END (region to sort). 204REVERSE (non-nil means reverse order), BEG and END (region to sort).
204The variable `sort-fold-case' determines whether alphabetic case affects 205The variable `sort-fold-case' determines whether alphabetic case affects
diff --git a/lisp/startup.el b/lisp/startup.el
index 5af264e3ef7..bff10003f84 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -352,11 +352,11 @@ Setting `init-file-user' does not prevent Emacs from loading
352 352
353(defcustom site-run-file (purecopy "site-start") 353(defcustom site-run-file (purecopy "site-start")
354 "File containing site-wide run-time initializations. 354 "File containing site-wide run-time initializations.
355This file is loaded at run-time before `~/.emacs'. It contains inits 355This file is loaded at run-time before `user-init-file'. It contains
356that need to be in place for the entire site, but which, due to their 356inits that need to be in place for the entire site, but which, due to
357higher incidence of change, don't make sense to put into Emacs's 357their higher incidence of change, don't make sense to put into Emacs's
358dump file. Thus, the run-time load order is: 1. file described in 358dump file. Thus, the run-time load order is: 1. file described in
359this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'. 359this variable, if non-nil; 2. `user-init-file'; 3. `default.el'.
360 360
361Don't use the `site-start.el' file for things some users may not like. 361Don't use the `site-start.el' file for things some users may not like.
362Put them in `default.el' instead, so that users can more easily 362Put them in `default.el' instead, so that users can more easily
diff --git a/lisp/subr.el b/lisp/subr.el
index f7445d8c25e..c8913145a18 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -385,7 +385,7 @@ entry to the debugger, even when `debug-on-error' is non-nil.
385This can be overridden by `debug-ignored-errors'. 385This can be overridden by `debug-ignored-errors'.
386 386
387To signal with MESSAGE without interpreting format characters 387To signal with MESSAGE without interpreting format characters
388like `%', `\\=`' and `\\='', use (error \"%s\" MESSAGE). 388like `%', `\\=`' and `\\='', use (user-error \"%s\" MESSAGE).
389In Emacs, the convention is that error messages start with a capital 389In Emacs, the convention is that error messages start with a capital
390letter but *do not* end with a period. Please follow this convention 390letter but *do not* end with a period. Please follow this convention
391for the sake of consistency." 391for the sake of consistency."
@@ -3314,7 +3314,7 @@ alternatives."
3314 3314
3315(defun function-get (f prop &optional autoload) 3315(defun function-get (f prop &optional autoload)
3316 "Return the value of property PROP of function F. 3316 "Return the value of property PROP of function F.
3317If AUTOLOAD is non-nil and F is autoloaded, try to autoload it 3317If AUTOLOAD is non-nil and F is autoloaded, try to load it
3318in the hope that it will set PROP. If AUTOLOAD is `macro', do it only 3318in the hope that it will set PROP. If AUTOLOAD is `macro', do it only
3319if it's an autoloaded macro." 3319if it's an autoloaded macro."
3320 (let ((val nil)) 3320 (let ((val nil))
@@ -5021,7 +5021,7 @@ The properties used on SYMBOL are `composefunc', `sendfunc',
5021(defun backtrace-frames (&optional base) 5021(defun backtrace-frames (&optional base)
5022 "Collect all frames of current backtrace into a list. 5022 "Collect all frames of current backtrace into a list.
5023If non-nil, BASE should be a function, and frames before its 5023If non-nil, BASE should be a function, and frames before its
5024nearest activation frames are discarded." 5024nearest activation frame are discarded."
5025 (let ((frames nil)) 5025 (let ((frames nil))
5026 (mapbacktrace (lambda (&rest frame) (push frame frames)) 5026 (mapbacktrace (lambda (&rest frame) (push frame frames))
5027 (or base 'backtrace-frames)) 5027 (or base 'backtrace-frames))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index a9fbd2f04cb..65f61644b6d 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -800,8 +800,8 @@ Otherwise returns the library directory name, if that is defined."
800 800
801(defun ispell-create-debug-buffer (&optional append) 801(defun ispell-create-debug-buffer (&optional append)
802 "Create an ispell debug buffer for debugging output. 802 "Create an ispell debug buffer for debugging output.
803If APPEND is non-nil, append the info to previous buffer if exists, 803If APPEND is non-nil, add output to the old buffer if it exists,
804otherwise is reset. Returns name of ispell debug buffer. 804otherwise the buffer is erased first. Returns the debug buffer.
805See `ispell-buffer-with-debug' for an example of use." 805See `ispell-buffer-with-debug' for an example of use."
806 (let ((ispell-debug-buffer (get-buffer-create "*ispell-debug*"))) 806 (let ((ispell-debug-buffer (get-buffer-create "*ispell-debug*")))
807 (with-current-buffer ispell-debug-buffer 807 (with-current-buffer ispell-debug-buffer
@@ -812,7 +812,7 @@ See `ispell-buffer-with-debug' for an example of use."
812 ispell-debug-buffer)) 812 ispell-debug-buffer))
813 813
814(defsubst ispell-print-if-debug (format &rest args) 814(defsubst ispell-print-if-debug (format &rest args)
815 "Print message using FORMAT and ARGS to `ispell-debug-buffer' buffer if enabled." 815 "Print message using FORMAT and ARGS to `ispell-debug-buffer' if enabled."
816 (if (boundp 'ispell-debug-buffer) 816 (if (boundp 'ispell-debug-buffer)
817 (with-current-buffer ispell-debug-buffer 817 (with-current-buffer ispell-debug-buffer
818 (goto-char (point-max)) 818 (goto-char (point-max))
@@ -3618,8 +3618,8 @@ Returns the sum SHIFT due to changes in word replacements."
3618 3618
3619;;;###autoload 3619;;;###autoload
3620(defun ispell-buffer-with-debug (&optional append) 3620(defun ispell-buffer-with-debug (&optional append)
3621 "`ispell-buffer' with some output sent to `ispell-debug-buffer' buffer. 3621 "`ispell-buffer' with some output sent to `ispell-debug-buffer'.
3622If APPEND is non-n il, append the info to previous buffer if exists." 3622If APPEND is non-nil, don't erase previous debugging output."
3623 (interactive) 3623 (interactive)
3624 (let ((ispell-debug-buffer (ispell-create-debug-buffer append))) 3624 (let ((ispell-debug-buffer (ispell-create-debug-buffer append)))
3625 (ispell-buffer))) 3625 (ispell-buffer)))
diff --git a/src/eval.c b/src/eval.c
index 78a787c4ffd..014905ce6df 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1229,7 +1229,7 @@ The car of a handler may be a list of condition names instead of a
1229single condition name; then it handles all of them. If the special 1229single condition name; then it handles all of them. If the special
1230condition name `debug' is present in this list, it allows another 1230condition name `debug' is present in this list, it allows another
1231condition in the list to run the debugger if `debug-on-error' and the 1231condition in the list to run the debugger if `debug-on-error' and the
1232other usual mechanisms says it should (otherwise, `condition-case' 1232other usual mechanisms say it should (otherwise, `condition-case'
1233suppresses the debugger). 1233suppresses the debugger).
1234 1234
1235When a handler handles an error, control returns to the `condition-case' 1235When a handler handles an error, control returns to the `condition-case'
diff --git a/src/lread.c b/src/lread.c
index c6607a8935f..59bf529f45c 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4881,7 +4881,7 @@ features required. Each entry has the form `(provide . FEATURE)',
4881`(defface . SYMBOL)', `(define-type . SYMBOL)', 4881`(defface . SYMBOL)', `(define-type . SYMBOL)',
4882`(cl-defmethod METHOD SPECIALIZERS)', or `(t . SYMBOL)'. 4882`(cl-defmethod METHOD SPECIALIZERS)', or `(t . SYMBOL)'.
4883Entries like `(t . SYMBOL)' may precede a `(defun . FUNCTION)' entry, 4883Entries like `(t . SYMBOL)' may precede a `(defun . FUNCTION)' entry,
4884and means that SYMBOL was an autoload before this file redefined it 4884and mean that SYMBOL was an autoload before this file redefined it
4885as a function. In addition, entries may also be single symbols, 4885as a function. In addition, entries may also be single symbols,
4886which means that symbol was defined by `defvar' or `defconst'. 4886which means that symbol was defined by `defvar' or `defconst'.
4887 4887
diff --git a/src/regex-emacs.c b/src/regex-emacs.c
index 9cade11c9fb..ba7f3cef64b 100644
--- a/src/regex-emacs.c
+++ b/src/regex-emacs.c
@@ -3954,9 +3954,11 @@ re_match_2_internal (struct re_pattern_buffer *bufp,
3954 3954
3955 /* Prevent shrinking and relocation of buffer text if GC happens 3955 /* Prevent shrinking and relocation of buffer text if GC happens
3956 while we are inside this function. The calls to 3956 while we are inside this function. The calls to
3957 UPDATE_SYNTAX_TABLE_* macros can trigger GC if they call Lisp, 3957 UPDATE_SYNTAX_TABLE_* macros can call Lisp (via
3958 and we have C pointers to buffer text that must not become 3958 `internal--syntax-propertize`); these calls are careful to defend against
3959 invalid as result of GC. */ 3959 buffer modifications, but even with no modifications, the buffer text may
3960 be relocated during GC by `compact_buffer` which would invalidate
3961 our C pointers to buffer text. */
3960 if (!current_buffer->text->inhibit_shrinking) 3962 if (!current_buffer->text->inhibit_shrinking)
3961 { 3963 {
3962 record_unwind_protect_ptr (unwind_re_match, current_buffer); 3964 record_unwind_protect_ptr (unwind_re_match, current_buffer);
diff --git a/src/syntax.c b/src/syntax.c
index c765cc9a17b..a03202d386c 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -480,10 +480,10 @@ parse_sexp_propertize (ptrdiff_t charpos)
480 safe_call1 (Qinternal__syntax_propertize, 480 safe_call1 (Qinternal__syntax_propertize,
481 make_fixnum (min (zv, 1 + charpos))); 481 make_fixnum (min (zv, 1 + charpos)));
482 if (modiffs != CHARS_MODIFF) 482 if (modiffs != CHARS_MODIFF)
483 error ("parse-sexp-propertize-function modified the buffer!"); 483 error ("internal--syntax-propertize modified the buffer!");
484 if (syntax_propertize__done <= charpos 484 if (syntax_propertize__done <= charpos
485 && syntax_propertize__done < zv) 485 && syntax_propertize__done < zv)
486 error ("parse-sexp-propertize-function did not move" 486 error ("internal--syntax-propertize did not move"
487 " syntax-propertize--done"); 487 " syntax-propertize--done");
488 SETUP_SYNTAX_TABLE (charpos, 1); 488 SETUP_SYNTAX_TABLE (charpos, 1);
489 } 489 }
diff --git a/test/lisp/jsonrpc-tests.el b/test/lisp/jsonrpc-tests.el
index 63c4c32d45f..6c08023d4f3 100644
--- a/test/lisp/jsonrpc-tests.el
+++ b/test/lisp/jsonrpc-tests.el
@@ -114,7 +114,7 @@
114 (condition-case err 114 (condition-case err
115 (progn 115 (progn
116 (jsonrpc-request conn 'delete-directory "~/tmp") 116 (jsonrpc-request conn 'delete-directory "~/tmp")
117 (ert-fail "A `jsonrpc-error' should have been signalled!")) 117 (ert-fail "A `jsonrpc-error' should have been signaled!"))
118 (jsonrpc-error 118 (jsonrpc-error
119 (should (= -32601 (cdr (assoc 'jsonrpc-error-code (cdr err))))))))) 119 (should (= -32601 (cdr (assoc 'jsonrpc-error-code (cdr err)))))))))
120 120
@@ -124,7 +124,7 @@
124 (condition-case err 124 (condition-case err
125 (progn 125 (progn
126 (jsonrpc-request conn '+ ["a" 2]) 126 (jsonrpc-request conn '+ ["a" 2])
127 (ert-fail "A `jsonrpc-error' should have been signalled!")) 127 (ert-fail "A `jsonrpc-error' should have been signaled!"))
128 (jsonrpc-error 128 (jsonrpc-error
129 (should (= -32603 (cdr (assoc 'jsonrpc-error-code (cdr err))))))))) 129 (should (= -32603 (cdr (assoc 'jsonrpc-error-code (cdr err)))))))))
130 130
diff --git a/test/src/thread-tests.el b/test/src/thread-tests.el
index 6673ac4b4eb..5d85fc74e50 100644
--- a/test/src/thread-tests.el
+++ b/test/src/thread-tests.el
@@ -112,7 +112,7 @@
112 (should-error (thread-join (current-thread)))) 112 (should-error (thread-join (current-thread))))
113 113
114(ert-deftest threads-join-error () 114(ert-deftest threads-join-error ()
115 "Test of error signalling from `thread-join'." 115 "Test of error signaling from `thread-join'."
116 :tags '(:unstable) 116 :tags '(:unstable)
117 (skip-unless (featurep 'threads)) 117 (skip-unless (featurep 'threads))
118 (let ((thread (make-thread #'threads-call-error))) 118 (let ((thread (make-thread #'threads-call-error)))