diff options
| author | Stefan Monnier | 2010-12-13 10:27:36 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-12-13 10:27:36 -0500 |
| commit | f49d1f52b2e368ef67dcfececd426de958548f4e (patch) | |
| tree | ce24ced92f2acc976daf4b69e3634c8bd600e44e /doc | |
| parent | 07176b2a9e63a0d3933b167f987475d8a18da5cc (diff) | |
| parent | 11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39 (diff) | |
| download | emacs-f49d1f52b2e368ef67dcfececd426de958548f4e.tar.gz emacs-f49d1f52b2e368ef67dcfececd426de958548f4e.zip | |
Merge from emacs-23
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs/ChangeLog | 29 | ||||
| -rw-r--r-- | doc/emacs/custom.texi | 3 | ||||
| -rw-r--r-- | doc/emacs/display.texi | 11 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 1 | ||||
| -rw-r--r-- | doc/emacs/msdog.texi | 73 | ||||
| -rw-r--r-- | doc/emacs/search.texi | 12 | ||||
| -rw-r--r-- | doc/emacs/text.texi | 6 | ||||
| -rw-r--r-- | doc/emacs/trouble.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 225 | ||||
| -rw-r--r-- | doc/lispref/backups.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 7 | ||||
| -rw-r--r-- | doc/lispref/modes.texi | 791 | ||||
| -rw-r--r-- | doc/lispref/processes.texi | 23 | ||||
| -rw-r--r-- | doc/lispref/strings.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 4 | ||||
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/cl.texi | 18 |
17 files changed, 1007 insertions, 218 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index e390c6cbc16..d300ed84062 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,32 @@ | |||
| 1 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * custom.texi (Init Syntax): Add index entries for "character syntax". | ||
| 4 | (Bug#7576) | ||
| 5 | |||
| 6 | 2010-12-13 Karel Klíč <kklic@redhat.com> | ||
| 7 | |||
| 8 | * text.texi (HTML Mode): Small fixes. (Bug#7607) | ||
| 9 | |||
| 10 | 2010-12-13 Glenn Morris <rgm@gnu.org> | ||
| 11 | |||
| 12 | * trouble.texi (Checklist): Fix typo in newsgroup name. | ||
| 13 | |||
| 14 | 2010-12-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 15 | |||
| 16 | * search.texi (Word Search): Note that the lazy highlight always | ||
| 17 | matches to whole words (Bug#7470). | ||
| 18 | |||
| 19 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> | ||
| 20 | |||
| 21 | * display.texi (Optional Mode Line): Make the description of | ||
| 22 | load-average more accurate. | ||
| 23 | |||
| 24 | * msdog.texi (Windows HOME): Mention that HOME can also be set in the | ||
| 25 | registry, with a cross-reference. | ||
| 26 | (Windows Startup): New node. Move the stuff about the current | ||
| 27 | directory from "Windows HOME". | ||
| 28 | |||
| 29 | 2010-12-13 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> | ||
| 1 | 2010-11-27 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> | 30 | 2010-11-27 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> |
| 2 | 31 | ||
| 3 | * maintaining.texi (VC With A Locking VCS, VC Directory Commands): | 32 | * maintaining.texi (VC With A Locking VCS, VC Directory Commands): |
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 18fdb581210..0d78e21ca06 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi | |||
| @@ -2234,6 +2234,8 @@ a Meta character, as in @samp{\M-a} for @kbd{Meta-A} or @samp{\M-\C-a} for | |||
| 2234 | non-@acronym{ASCII} in your init file. | 2234 | non-@acronym{ASCII} in your init file. |
| 2235 | 2235 | ||
| 2236 | @item Characters: | 2236 | @item Characters: |
| 2237 | @cindex Lisp character syntax | ||
| 2238 | @cindex character syntax | ||
| 2237 | Lisp character constant syntax consists of a @samp{?} followed by | 2239 | Lisp character constant syntax consists of a @samp{?} followed by |
| 2238 | either a character or an escape sequence starting with @samp{\}. | 2240 | either a character or an escape sequence starting with @samp{\}. |
| 2239 | Examples: @code{?x}, @code{?\n}, @code{?\"}, @code{?\)}. Note that | 2241 | Examples: @code{?x}, @code{?\n}, @code{?\"}, @code{?\)}. Note that |
| @@ -2250,6 +2252,7 @@ keys which send non-@acronym{ASCII} characters. | |||
| 2250 | @code{nil} stands for `false'. | 2252 | @code{nil} stands for `false'. |
| 2251 | 2253 | ||
| 2252 | @item Other Lisp objects: | 2254 | @item Other Lisp objects: |
| 2255 | @cindex Lisp object syntax | ||
| 2253 | Write a single-quote (@code{'}) followed by the Lisp object you want. | 2256 | Write a single-quote (@code{'}) followed by the Lisp object you want. |
| 2254 | @end table | 2257 | @end table |
| 2255 | 2258 | ||
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index cd08a524f50..49a50af19d8 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi | |||
| @@ -1010,11 +1010,12 @@ their parentheses. It looks like this: | |||
| 1010 | @noindent | 1010 | @noindent |
| 1011 | @vindex display-time-24hr-format | 1011 | @vindex display-time-24hr-format |
| 1012 | Here @var{hh} and @var{mm} are the hour and minute, followed always by | 1012 | Here @var{hh} and @var{mm} are the hour and minute, followed always by |
| 1013 | @samp{am} or @samp{pm}. @var{l.ll} is the average number of running | 1013 | @samp{am} or @samp{pm}. @var{l.ll} is the average number, collected |
| 1014 | processes in the whole system recently. (Some fields may be missing if | 1014 | for the last few minutes, of processes in the whole system that were |
| 1015 | your operating system cannot support them.) If you prefer time display | 1015 | either running or ready to run (i.e.@: were waiting for an available |
| 1016 | in 24-hour format, set the variable @code{display-time-24hr-format} | 1016 | processor). (Some fields may be missing if your operating system |
| 1017 | to @code{t}. | 1017 | cannot support them.) If you prefer time display in 24-hour format, |
| 1018 | set the variable @code{display-time-24hr-format} to @code{t}. | ||
| 1018 | 1019 | ||
| 1019 | @cindex mail (on mode line) | 1020 | @cindex mail (on mode line) |
| 1020 | @vindex display-time-use-mail-icon | 1021 | @vindex display-time-use-mail-icon |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 65a565dbe8e..a47bb8beb49 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -1192,6 +1192,7 @@ Emacs and Mac OS / GNUstep | |||
| 1192 | 1192 | ||
| 1193 | Emacs and Microsoft Windows/MS-DOS | 1193 | Emacs and Microsoft Windows/MS-DOS |
| 1194 | 1194 | ||
| 1195 | * Windows Startup:: How to start Emacs on Windows. | ||
| 1195 | * Text and Binary:: Text files use CRLF to terminate lines. | 1196 | * Text and Binary:: Text files use CRLF to terminate lines. |
| 1196 | * Windows Files:: File-name conventions on Windows. | 1197 | * Windows Files:: File-name conventions on Windows. |
| 1197 | * ls in Lisp:: Emulation of @code{ls} for Dired. | 1198 | * ls in Lisp:: Emulation of @code{ls} for Dired. |
diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi index 4be67aa31de..d4ee8463e5c 100644 --- a/doc/emacs/msdog.texi +++ b/doc/emacs/msdog.texi | |||
| @@ -28,6 +28,7 @@ However, a few special considerations apply, and they are described | |||
| 28 | here. | 28 | here. |
| 29 | 29 | ||
| 30 | @menu | 30 | @menu |
| 31 | * Windows Startup:: How to start Emacs on Windows. | ||
| 31 | * Text and Binary:: Text files use CRLF to terminate lines. | 32 | * Text and Binary:: Text files use CRLF to terminate lines. |
| 32 | * Windows Files:: File-name conventions on Windows. | 33 | * Windows Files:: File-name conventions on Windows. |
| 33 | * ls in Lisp:: Emulation of @code{ls} for Dired. | 34 | * ls in Lisp:: Emulation of @code{ls} for Dired. |
| @@ -44,6 +45,68 @@ here. | |||
| 44 | @end ifnottex | 45 | @end ifnottex |
| 45 | @end menu | 46 | @end menu |
| 46 | 47 | ||
| 48 | @node Windows Startup | ||
| 49 | @section How to Start Emacs on MS-Windows | ||
| 50 | @cindex starting Emacs on MS-Windows | ||
| 51 | |||
| 52 | There are several ways of starting Emacs on MS-Windows: | ||
| 53 | |||
| 54 | @enumerate | ||
| 55 | @item | ||
| 56 | @pindex runemacs.exe | ||
| 57 | @cindex desktop shortcut, MS-Windows | ||
| 58 | @cindex start directory, MS-Windows | ||
| 59 | @cindex directory where Emacs starts on MS-Windows | ||
| 60 | From the desktop shortcut icon: either double-click the left mouse | ||
| 61 | button on the icon, or click once, then press @key{RET}. The desktop | ||
| 62 | shortcut should specify as its ``Target'' (in the ``Properties'' of | ||
| 63 | the shortcut) the full absolute file name of @file{runemacs.exe}, | ||
| 64 | @emph{not} of @file{emacs.exe}. This is because @file{runemacs.exe} | ||
| 65 | hides the console window that would have been created if the target of | ||
| 66 | the shortcut were @file{emacs.exe} (which is a console program, as far | ||
| 67 | as Windows is concerned). If you use this method, Emacs starts in the | ||
| 68 | directory specified by the shortcut. To control where that is, | ||
| 69 | right-click on the shortcut, select ``Properties'', and in the | ||
| 70 | ``Shortcut'' tab modify the ``Start in'' field to your liking. | ||
| 71 | |||
| 72 | @item | ||
| 73 | From the Command Prompt window, by typing @kbd{emacs @key{RET}} at the | ||
| 74 | prompt. The Command Prompt window where you did that will not be | ||
| 75 | available for invoking other commands until Emacs exits. In this | ||
| 76 | case, Emacs will start in the current directory of the Windows shell. | ||
| 77 | |||
| 78 | @item | ||
| 79 | From the Command Prompt window, by typing @kbd{runemacs @key{RET}} at | ||
| 80 | the prompt. The Command Prompt window where you did that will be | ||
| 81 | immediately available for invoking other commands. In this case, | ||
| 82 | Emacs will start in the current directory of the Windows shell. | ||
| 83 | |||
| 84 | @item | ||
| 85 | @cindex invoking Emacs from Windows Explorer | ||
| 86 | @pindex emacsclient.exe | ||
| 87 | @pindex emacsclientw.exe | ||
| 88 | Via the Emacs client program, @file{emacsclient.exe} or | ||
| 89 | @file{emacsclientw.exe}. This allows to invoke Emacs from other | ||
| 90 | programs, and to reuse a running Emacs process for serving editing | ||
| 91 | jobs required by other programs. @xref{Emacs Server}. The difference | ||
| 92 | between @file{emacsclient.exe} and @file{emacsclientw.exe} is that the | ||
| 93 | former waits for Emacs to signal that the editing job is finished, | ||
| 94 | while the latter does not wait. Which one of them to use in each case | ||
| 95 | depends on the expectations of the program that needs editing | ||
| 96 | services. If the program will use the edited files, it needs to wait | ||
| 97 | for Emacs, so you should use @file{emacsclient.exe}. By contrast, if | ||
| 98 | the results of editing are not needed by the invoking program, you | ||
| 99 | will be better off using @file{emacsclientw.exe}. A notable situation | ||
| 100 | where you would want @file{emacsclientw.exe} is when you right-click | ||
| 101 | on a file in the Windows Explorer and select ``Open With'' from the | ||
| 102 | pop-up menu. Use the @samp{--alternate-editor=} or @samp{-a} options | ||
| 103 | if Emacs might not be running (or not running as a server) when | ||
| 104 | @command{emacsclient} is invoked---that will always give you an | ||
| 105 | editor. When invoked via @command{emacsclient}, Emacs will start in | ||
| 106 | the current directory of the program that invoked | ||
| 107 | @command{emacsclient}. | ||
| 108 | @end enumerate | ||
| 109 | |||
| 47 | @node Text and Binary | 110 | @node Text and Binary |
| 48 | @section Text Files and Binary Files | 111 | @section Text Files and Binary Files |
| 49 | @cindex text and binary files on MS-DOS/MS-Windows | 112 | @cindex text and binary files on MS-DOS/MS-Windows |
| @@ -342,6 +405,9 @@ Windows 2K/XP and later, and either @file{C:\WINDOWS\Application Data} | |||
| 342 | or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the | 405 | or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on the |
| 343 | older Windows 9X/ME systems. | 406 | older Windows 9X/ME systems. |
| 344 | 407 | ||
| 408 | @code{HOME} can also be set in the system registry, for details see | ||
| 409 | @ref{MS-Windows Registry}. | ||
| 410 | |||
| 345 | @cindex init file @file{.emacs} on MS-Windows | 411 | @cindex init file @file{.emacs} on MS-Windows |
| 346 | The home directory is where your init file @file{.emacs} is stored. | 412 | The home directory is where your init file @file{.emacs} is stored. |
| 347 | When Emacs starts, it first checks whether the environment variable | 413 | When Emacs starts, it first checks whether the environment variable |
| @@ -373,13 +439,6 @@ names, the Windows port of Emacs supports an alternative name | |||
| 373 | @file{_emacs} as a fallback, if such a file exists in the home | 439 | @file{_emacs} as a fallback, if such a file exists in the home |
| 374 | directory, whereas @file{.emacs} does not. | 440 | directory, whereas @file{.emacs} does not. |
| 375 | 441 | ||
| 376 | @cindex start directory, MS-Windows | ||
| 377 | @cindex directory where Emacs starts on MS-Windows | ||
| 378 | If you use a Windows desktop shortcut to start Emacs, it starts in | ||
| 379 | the directory specified by the shortcut. To control where that is, | ||
| 380 | right-click on the shortcut, select ``Properties'', and in the | ||
| 381 | ``Shortcut'' tab modify the ``Start in'' field to your liking. | ||
| 382 | |||
| 383 | @node Windows Keyboard | 442 | @node Windows Keyboard |
| 384 | @section Keyboard Usage on MS-Windows | 443 | @section Keyboard Usage on MS-Windows |
| 385 | @cindex keyboard, MS-Windows | 444 | @cindex keyboard, MS-Windows |
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 69532e6083d..6e62dba3bef 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi | |||
| @@ -459,11 +459,13 @@ for a forward search, or @kbd{M-s w C-r @key{RET}} for a backward search. | |||
| 459 | These run the commands @code{word-search-forward} and | 459 | These run the commands @code{word-search-forward} and |
| 460 | @code{word-search-backward} respectively. | 460 | @code{word-search-backward} respectively. |
| 461 | 461 | ||
| 462 | A nonincremental word search differs slightly from the incremental | 462 | Incremental and nonincremental word searches differ slightly in the |
| 463 | version in the way it finds a match: the last word in the search | 463 | way they find a match. In a nonincremental word search, the last word |
| 464 | string must be an exact match for a whole word. In an incremental | 464 | in the search string must exactly match a whole word. In an |
| 465 | word search, the last word in the search string can match part of a | 465 | incremental word search, the matching is more lax: the last word in |
| 466 | word; this allows the matching to proceed incrementally as you type. | 466 | the search string can match part of a word, so that the matching |
| 467 | proceeds incrementally as you type. This additional laxity does not | ||
| 468 | apply to the lazy highlight, which always matches whole words. | ||
| 467 | 469 | ||
| 468 | @node Regexp Search | 470 | @node Regexp Search |
| 469 | @section Regular Expression Search | 471 | @section Regular Expression Search |
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index a9faa420967..bef7319eae5 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi | |||
| @@ -1765,7 +1765,7 @@ variant of SGML mode. | |||
| 1765 | @kindex C-c C-n @r{(SGML mode)} | 1765 | @kindex C-c C-n @r{(SGML mode)} |
| 1766 | @findex sgml-name-char | 1766 | @findex sgml-name-char |
| 1767 | Interactively specify a special character and insert the SGML | 1767 | Interactively specify a special character and insert the SGML |
| 1768 | @samp{&}-command for that character. | 1768 | @samp{&}-command for that character (@code{sgml-name-char}). |
| 1769 | 1769 | ||
| 1770 | @item C-c C-t | 1770 | @item C-c C-t |
| 1771 | @kindex C-c C-t @r{(SGML mode)} | 1771 | @kindex C-c C-t @r{(SGML mode)} |
| @@ -1799,7 +1799,7 @@ A numeric argument acts as a repeat count. | |||
| 1799 | @findex sgml-skip-tag-backward | 1799 | @findex sgml-skip-tag-backward |
| 1800 | Skip backward across a balanced tag group (which extends from an | 1800 | Skip backward across a balanced tag group (which extends from an |
| 1801 | opening tag through its corresponding closing tag) | 1801 | opening tag through its corresponding closing tag) |
| 1802 | (@code{sgml-skip-tag-forward}). A numeric argument acts as a repeat | 1802 | (@code{sgml-skip-tag-backward}). A numeric argument acts as a repeat |
| 1803 | count. | 1803 | count. |
| 1804 | 1804 | ||
| 1805 | @item C-c C-d | 1805 | @item C-c C-d |
| @@ -1841,7 +1841,7 @@ buffer as SGML (@code{sgml-validate}). | |||
| 1841 | @kindex C-c TAB @r{(SGML mode)} | 1841 | @kindex C-c TAB @r{(SGML mode)} |
| 1842 | @findex sgml-tags-invisible | 1842 | @findex sgml-tags-invisible |
| 1843 | Toggle the visibility of existing tags in the buffer. This can be | 1843 | Toggle the visibility of existing tags in the buffer. This can be |
| 1844 | used as a cheap preview. | 1844 | used as a cheap preview (@code{sgml-tags-invisible}). |
| 1845 | @end table | 1845 | @end table |
| 1846 | 1846 | ||
| 1847 | @cindex nXML mode | 1847 | @cindex nXML mode |
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 2f90b30bf83..e2b27083243 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi | |||
| @@ -629,7 +629,7 @@ read the tracker's online documentation to see the various features | |||
| 629 | you can use. | 629 | you can use. |
| 630 | 630 | ||
| 631 | All mail sent to the @samp{bug-gnu-emacs} mailing list is also | 631 | All mail sent to the @samp{bug-gnu-emacs} mailing list is also |
| 632 | gatewayed to the @samp{bug.gnu.emacs} newsgroup. The reverse is also | 632 | gatewayed to the @samp{gnu.emacs.bug} newsgroup. The reverse is also |
| 633 | true, but we ask you not to post bug reports via the newsgroup. It | 633 | true, but we ask you not to post bug reports via the newsgroup. It |
| 634 | can make it much harder to contact you if we need to ask for more | 634 | can make it much harder to contact you if we need to ask for more |
| 635 | information, and it does not integrate well with the bug tracker. | 635 | information, and it does not integrate well with the bug tracker. |
| @@ -1127,6 +1127,3 @@ Emacs distribution. | |||
| 1127 | @lowersections | 1127 | @lowersections |
| 1128 | @end ifnottex | 1128 | @end ifnottex |
| 1129 | 1129 | ||
| 1130 | @ignore | ||
| 1131 | arch-tag: c9cba76d-b2cb-4e0c-ae3f-19d5ef35817c | ||
| 1132 | @end ignore | ||
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 36d85bc98ba..2b2cc6251c4 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,36 @@ | |||
| 1 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * processes.texi (Shell Arguments): | ||
| 4 | * strings.texi (Creating Strings): Don't mention "shell commands"; | ||
| 5 | make it explicit that `split-string-and-unquote' and | ||
| 6 | `combine-and-quote-strings' are mainly for working with arguments | ||
| 7 | to call-process and start-process. | ||
| 8 | |||
| 9 | * processes.texi (Shell Arguments): Fix documentation of | ||
| 10 | `split-string-and-unquote'. Add indexing. (Bug#7563) | ||
| 11 | |||
| 12 | 2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 13 | |||
| 14 | * modes.texi (Auto-Indentation): New section to document SMIE. | ||
| 15 | (Major Mode Conventions): | ||
| 16 | * text.texi (Mode-Specific Indent): Refer to it. | ||
| 17 | |||
| 18 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> | ||
| 19 | |||
| 20 | * display.texi (Other Display Specs): Document left-fringe and | ||
| 21 | right-fringe display specs. | ||
| 22 | |||
| 23 | 2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 24 | |||
| 25 | * backups.texi (Making Backups): | ||
| 26 | * modes.texi (Example Major Modes): Use recommended coding style. | ||
| 27 | (Major Mode Basics, Derived Modes): Encourge more strongly use of | ||
| 28 | define-derived-mode. Mention completion-at-point-functions. | ||
| 29 | |||
| 30 | 2010-12-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 31 | |||
| 32 | * nonascii.texi (Converting Representations): | ||
| 33 | Document byte-to-string. | ||
| 1 | 2010-12-08 Glenn Morris <rgm@gnu.org> | 34 | 2010-12-08 Glenn Morris <rgm@gnu.org> |
| 2 | 35 | ||
| 3 | * buffers.texi (Modification Time): | 36 | * buffers.texi (Modification Time): |
| @@ -42,8 +75,8 @@ | |||
| 42 | 75 | ||
| 43 | * customize.texi (Composite Types): Lower-case index entry. | 76 | * customize.texi (Composite Types): Lower-case index entry. |
| 44 | 77 | ||
| 45 | * loading.texi (How Programs Do Loading): Document | 78 | * loading.texi (How Programs Do Loading): |
| 46 | load-file-name. (Bug#7346) | 79 | Document load-file-name. (Bug#7346) |
| 47 | 80 | ||
| 48 | 2010-11-17 Glenn Morris <rgm@gnu.org> | 81 | 2010-11-17 Glenn Morris <rgm@gnu.org> |
| 49 | 82 | ||
| @@ -484,8 +517,8 @@ | |||
| 484 | * minibuf.texi (Basic Completion): 4th arg to all-completions is | 517 | * minibuf.texi (Basic Completion): 4th arg to all-completions is |
| 485 | obsolete. | 518 | obsolete. |
| 486 | 519 | ||
| 487 | * processes.texi (Process Buffers): Document | 520 | * processes.texi (Process Buffers): |
| 488 | process-kill-buffer-query-function. | 521 | Document process-kill-buffer-query-function. |
| 489 | 522 | ||
| 490 | 2009-12-05 Glenn Morris <rgm@gnu.org> | 523 | 2009-12-05 Glenn Morris <rgm@gnu.org> |
| 491 | 524 | ||
| @@ -932,8 +965,8 @@ | |||
| 932 | (Suspending Emacs): Mark suspend-emacs as a command. | 965 | (Suspending Emacs): Mark suspend-emacs as a command. |
| 933 | (Processor Run Time): Mark emacs-uptime and emacs-init-time as | 966 | (Processor Run Time): Mark emacs-uptime and emacs-init-time as |
| 934 | commands. | 967 | commands. |
| 935 | (Terminal Output): Remove obsolete function baud-rate. Document | 968 | (Terminal Output): Remove obsolete function baud-rate. |
| 936 | TERMINAL arg for send-string-to-terminal. | 969 | Document TERMINAL arg for send-string-to-terminal. |
| 937 | 970 | ||
| 938 | * nonascii.texi (Terminal I/O Encoding): Document TERMINAL arg for | 971 | * nonascii.texi (Terminal I/O Encoding): Document TERMINAL arg for |
| 939 | terminal-coding-system and set-terminal-coding-system. | 972 | terminal-coding-system and set-terminal-coding-system. |
| @@ -1037,8 +1070,8 @@ | |||
| 1037 | 2009-05-09 Eli Zaretskii <eliz@gnu.org> | 1070 | 2009-05-09 Eli Zaretskii <eliz@gnu.org> |
| 1038 | 1071 | ||
| 1039 | * nonascii.texi (Default Coding Systems): Document | 1072 | * nonascii.texi (Default Coding Systems): Document |
| 1040 | find-auto-coding, set-auto-coding, and auto-coding-alist. Add | 1073 | find-auto-coding, set-auto-coding, and auto-coding-alist. |
| 1041 | indexing. | 1074 | Add indexing. |
| 1042 | (Lisp and Coding Systems): Add index entries. | 1075 | (Lisp and Coding Systems): Add index entries. |
| 1043 | 1076 | ||
| 1044 | 2009-05-09 Martin Rudalics <rudalics@gmx.at> | 1077 | 2009-05-09 Martin Rudalics <rudalics@gmx.at> |
| @@ -1080,8 +1113,8 @@ | |||
| 1080 | 1113 | ||
| 1081 | 2009-04-22 Chong Yidong <cyd@stupidchicken.com> | 1114 | 2009-04-22 Chong Yidong <cyd@stupidchicken.com> |
| 1082 | 1115 | ||
| 1083 | * os.texi (Command-Line Arguments): Document | 1116 | * os.texi (Command-Line Arguments): |
| 1084 | command-line-args-left. | 1117 | Document command-line-args-left. |
| 1085 | (Suspending Emacs): Adapt text to multi-tty case. Document use of | 1118 | (Suspending Emacs): Adapt text to multi-tty case. Document use of |
| 1086 | terminal objects for tty arguments. | 1119 | terminal objects for tty arguments. |
| 1087 | (Startup Summary): Add xref to Session Management. | 1120 | (Startup Summary): Add xref to Session Management. |
| @@ -1157,13 +1190,13 @@ | |||
| 1157 | 2009-04-09 Chong Yidong <cyd@stupidchicken.com> | 1190 | 2009-04-09 Chong Yidong <cyd@stupidchicken.com> |
| 1158 | 1191 | ||
| 1159 | * text.texi (Yank Commands): Note that yank uses push-mark. | 1192 | * text.texi (Yank Commands): Note that yank uses push-mark. |
| 1160 | (Filling): Clarify REGION argument of fill-paragraph. Document | 1193 | (Filling): Clarify REGION argument of fill-paragraph. |
| 1161 | fill-forward-paragraph-function. | 1194 | Document fill-forward-paragraph-function. |
| 1162 | (Special Properties): Remove "new in Emacs 22" declaration. | 1195 | (Special Properties): Remove "new in Emacs 22" declaration. |
| 1163 | (Clickable Text): Merge with Links and Mouse-1 node. | 1196 | (Clickable Text): Merge with Links and Mouse-1 node. |
| 1164 | 1197 | ||
| 1165 | * display.texi (Button Properties, Button Buffer Commands): Change | 1198 | * display.texi (Button Properties, Button Buffer Commands): |
| 1166 | xref to Clickable Text. | 1199 | Change xref to Clickable Text. |
| 1167 | 1200 | ||
| 1168 | * tips.texi (Key Binding Conventions): Change xref to Clickable | 1201 | * tips.texi (Key Binding Conventions): Change xref to Clickable |
| 1169 | Text. | 1202 | Text. |
| @@ -1225,8 +1258,8 @@ | |||
| 1225 | 1258 | ||
| 1226 | 2009-03-29 Chong Yidong <cyd@stupidchicken.com> | 1259 | 2009-03-29 Chong Yidong <cyd@stupidchicken.com> |
| 1227 | 1260 | ||
| 1228 | * help.texi (Accessing Documentation, Help Functions): Remove | 1261 | * help.texi (Accessing Documentation, Help Functions): |
| 1229 | information about long-obsolete Emacs versions. | 1262 | Remove information about long-obsolete Emacs versions. |
| 1230 | 1263 | ||
| 1231 | * modes.texi (Mode Line Variables): The default values of the mode | 1264 | * modes.texi (Mode Line Variables): The default values of the mode |
| 1232 | line variables are now more complicated. | 1265 | line variables are now more complicated. |
| @@ -1269,8 +1302,8 @@ | |||
| 1269 | 2009-03-23 Chong Yidong <cyd@stupidchicken.com> | 1302 | 2009-03-23 Chong Yidong <cyd@stupidchicken.com> |
| 1270 | 1303 | ||
| 1271 | * minibuf.texi (Intro to Minibuffers): Remove long-obsolete info | 1304 | * minibuf.texi (Intro to Minibuffers): Remove long-obsolete info |
| 1272 | about minibuffers in old Emacs versions. Copyedits. Emphasize | 1305 | about minibuffers in old Emacs versions. Copyedits. |
| 1273 | that enable-recursive-minibuffers defaults to nil. | 1306 | Emphasize that enable-recursive-minibuffers defaults to nil. |
| 1274 | (Text from Minibuffer): Simplify introduction. | 1307 | (Text from Minibuffer): Simplify introduction. |
| 1275 | 1308 | ||
| 1276 | 2009-03-22 Alan Mackenzie <acm@muc.de> | 1309 | 2009-03-22 Alan Mackenzie <acm@muc.de> |
| @@ -1324,8 +1357,8 @@ | |||
| 1324 | * customize.texi (Common Keywords): It's not necessary to use :tag | 1357 | * customize.texi (Common Keywords): It's not necessary to use :tag |
| 1325 | to remove hyphens, as custom-unlispify-tag-name does it | 1358 | to remove hyphens, as custom-unlispify-tag-name does it |
| 1326 | automatically. | 1359 | automatically. |
| 1327 | (Variable Definitions): Link to File Local Variables. Document | 1360 | (Variable Definitions): Link to File Local Variables. |
| 1328 | customized-value symbol property. | 1361 | Document customized-value symbol property. |
| 1329 | (Customization Types): Move menu to end of node. | 1362 | (Customization Types): Move menu to end of node. |
| 1330 | 1363 | ||
| 1331 | 2009-03-10 Chong Yidong <cyd@stupidchicken.com> | 1364 | 2009-03-10 Chong Yidong <cyd@stupidchicken.com> |
| @@ -1436,8 +1469,8 @@ | |||
| 1436 | * text.texi (Commands for Insertion): | 1469 | * text.texi (Commands for Insertion): |
| 1437 | * commands.texi (Event Mod): | 1470 | * commands.texi (Event Mod): |
| 1438 | * keymaps.texi (Searching Keymaps): | 1471 | * keymaps.texi (Searching Keymaps): |
| 1439 | * nonascii.texi (Translation of Characters): Reinstate | 1472 | * nonascii.texi (Translation of Characters): |
| 1440 | documentation of translation-table-for-input. | 1473 | Reinstate documentation of translation-table-for-input. |
| 1441 | (Explicit Encoding): Document the `charset' text property produced | 1474 | (Explicit Encoding): Document the `charset' text property produced |
| 1442 | by decode-coding-region and decode-coding-string. | 1475 | by decode-coding-region and decode-coding-string. |
| 1443 | 1476 | ||
| @@ -1466,8 +1499,8 @@ | |||
| 1466 | 2009-01-22 Chong Yidong <cyd@stupidchicken.com> | 1499 | 2009-01-22 Chong Yidong <cyd@stupidchicken.com> |
| 1467 | 1500 | ||
| 1468 | * files.texi (Format Conversion Piecemeal): Clarify behavior of | 1501 | * files.texi (Format Conversion Piecemeal): Clarify behavior of |
| 1469 | write-region-annotate-functions. Document | 1502 | write-region-annotate-functions. |
| 1470 | write-region-post-annotation-function. | 1503 | Document write-region-post-annotation-function. |
| 1471 | 1504 | ||
| 1472 | 2009-01-19 Chong Yidong <cyd@stupidchicken.com> | 1505 | 2009-01-19 Chong Yidong <cyd@stupidchicken.com> |
| 1473 | 1506 | ||
| @@ -1534,8 +1567,8 @@ | |||
| 1534 | 1567 | ||
| 1535 | * processes.texi (Serial Ports): Improve wording, suggested by RMS. | 1568 | * processes.texi (Serial Ports): Improve wording, suggested by RMS. |
| 1536 | 1569 | ||
| 1537 | * nonascii.texi (Lisp and Coding Systems): Document | 1570 | * nonascii.texi (Lisp and Coding Systems): |
| 1538 | inhibit-null-byte-detection and inhibit-iso-escape-detection. | 1571 | Document inhibit-null-byte-detection and inhibit-iso-escape-detection. |
| 1539 | (Character Properties): Improve wording. | 1572 | (Character Properties): Improve wording. |
| 1540 | 1573 | ||
| 1541 | 2009-01-09 Chong Yidong <cyd@stupidchicken.com> | 1574 | 2009-01-09 Chong Yidong <cyd@stupidchicken.com> |
| @@ -1543,8 +1576,8 @@ | |||
| 1543 | * display.texi (Font Lookup): Remove obsolete function | 1576 | * display.texi (Font Lookup): Remove obsolete function |
| 1544 | x-font-family-list. x-list-fonts accepts Fontconfig/GTK syntax. | 1577 | x-font-family-list. x-list-fonts accepts Fontconfig/GTK syntax. |
| 1545 | (Low-Level Font): Rename from Fonts, move to end of Faces section. | 1578 | (Low-Level Font): Rename from Fonts, move to end of Faces section. |
| 1546 | (Font Selection): Reorder order of variable descriptions. Minor | 1579 | (Font Selection): Reorder order of variable descriptions. |
| 1547 | clarifications. | 1580 | Minor clarifications. |
| 1548 | 1581 | ||
| 1549 | * elisp.texi (Top): Update node listing. | 1582 | * elisp.texi (Top): Update node listing. |
| 1550 | 1583 | ||
| @@ -1565,8 +1598,8 @@ | |||
| 1565 | * elisp.texi: Update node listing. | 1598 | * elisp.texi: Update node listing. |
| 1566 | 1599 | ||
| 1567 | * display.texi (Faces): Put Font Selection node after Auto Faces. | 1600 | * display.texi (Faces): Put Font Selection node after Auto Faces. |
| 1568 | (Face Attributes): Don't link to Font Lookup. Document | 1601 | (Face Attributes): Don't link to Font Lookup. |
| 1569 | font-family-list. | 1602 | Document font-family-list. |
| 1570 | (Fonts): New node. | 1603 | (Fonts): New node. |
| 1571 | 1604 | ||
| 1572 | 2009-01-08 Jason Rumney <jasonr@gnu.org> | 1605 | 2009-01-08 Jason Rumney <jasonr@gnu.org> |
| @@ -1794,8 +1827,8 @@ | |||
| 1794 | * windows.texi (Window Hooks): Remove *-end-trigger-functions | 1827 | * windows.texi (Window Hooks): Remove *-end-trigger-functions |
| 1795 | vars, which are obsolete. Mention jit-lock-register. | 1828 | vars, which are obsolete. Mention jit-lock-register. |
| 1796 | 1829 | ||
| 1797 | * modes.texi (Other Font Lock Variables): Document | 1830 | * modes.texi (Other Font Lock Variables): |
| 1798 | jit-lock-register and jit-lock-unregister. | 1831 | Document jit-lock-register and jit-lock-unregister. |
| 1799 | 1832 | ||
| 1800 | * frames.texi (Color Parameters): Document alpha parameter. | 1833 | * frames.texi (Color Parameters): Document alpha parameter. |
| 1801 | 1834 | ||
| @@ -1867,8 +1900,8 @@ | |||
| 1867 | 2008-11-01 Eli Zaretskii <eliz@gnu.org> | 1900 | 2008-11-01 Eli Zaretskii <eliz@gnu.org> |
| 1868 | 1901 | ||
| 1869 | * nonascii.texi (Text Representations): Rewrite to make consistent | 1902 | * nonascii.texi (Text Representations): Rewrite to make consistent |
| 1870 | with Emacs 23 internal representation of characters. Document | 1903 | with Emacs 23 internal representation of characters. |
| 1871 | `unibyte-string'. | 1904 | Document `unibyte-string'. |
| 1872 | 1905 | ||
| 1873 | 2008-10-28 Chong Yidong <cyd@stupidchicken.com> | 1906 | 2008-10-28 Chong Yidong <cyd@stupidchicken.com> |
| 1874 | 1907 | ||
| @@ -1981,8 +2014,8 @@ | |||
| 1981 | 2014 | ||
| 1982 | * processes.texi (Synchronous Processes): Document `process-lines'. | 2015 | * processes.texi (Synchronous Processes): Document `process-lines'. |
| 1983 | 2016 | ||
| 1984 | * customize.texi (Variable Definitions): Document | 2017 | * customize.texi (Variable Definitions): |
| 1985 | `custom-reevaluate-setting'. | 2018 | Document `custom-reevaluate-setting'. |
| 1986 | 2019 | ||
| 1987 | 2008-10-18 Martin Rudalics <rudalics@gmx.at> | 2020 | 2008-10-18 Martin Rudalics <rudalics@gmx.at> |
| 1988 | 2021 | ||
| @@ -1998,13 +2031,13 @@ | |||
| 1998 | * maps.texi (Standard Keymaps): Document `multi-query-replace-map' | 2031 | * maps.texi (Standard Keymaps): Document `multi-query-replace-map' |
| 1999 | and `search-map'. | 2032 | and `search-map'. |
| 2000 | 2033 | ||
| 2001 | * searching.texi (Search and Replace): Document | 2034 | * searching.texi (Search and Replace): |
| 2002 | `replace-search-function' and `replace-re-search-function'. | 2035 | Document `replace-search-function' and `replace-re-search-function'. |
| 2003 | Document `multi-query-replace-map'. | 2036 | Document `multi-query-replace-map'. |
| 2004 | 2037 | ||
| 2005 | * minibuf.texi (Text from Minibuffer): Document `read-regexp'. | 2038 | * minibuf.texi (Text from Minibuffer): Document `read-regexp'. |
| 2006 | (Completion Commands, Reading File Names): Rename | 2039 | (Completion Commands, Reading File Names): |
| 2007 | `minibuffer-local-must-match-filename-map' to | 2040 | Rename `minibuffer-local-must-match-filename-map' to |
| 2008 | `minibuffer-local-filename-must-match-map'. | 2041 | `minibuffer-local-filename-must-match-map'. |
| 2009 | (Minibuffer Completion): The `require-match' argument to | 2042 | (Minibuffer Completion): The `require-match' argument to |
| 2010 | `completing-read' can now have the value `confirm-only'. | 2043 | `completing-read' can now have the value `confirm-only'. |
| @@ -2349,7 +2382,7 @@ | |||
| 2349 | 2382 | ||
| 2350 | 2007-12-30 Richard Stallman <rms@gnu.org> | 2383 | 2007-12-30 Richard Stallman <rms@gnu.org> |
| 2351 | 2384 | ||
| 2352 | * commands.texi (Accessing Mouse): Renamed from Accessing Events. | 2385 | * commands.texi (Accessing Mouse): Rename from Accessing Events. |
| 2353 | (Accessing Scroll): New node broken out of Accessing Mouse. | 2386 | (Accessing Scroll): New node broken out of Accessing Mouse. |
| 2354 | 2387 | ||
| 2355 | 2007-12-28 Richard Stallman <rms@gnu.org> | 2388 | 2007-12-28 Richard Stallman <rms@gnu.org> |
| @@ -2393,8 +2426,8 @@ | |||
| 2393 | 2426 | ||
| 2394 | 2007-11-29 Glenn Morris <rgm@gnu.org> | 2427 | 2007-11-29 Glenn Morris <rgm@gnu.org> |
| 2395 | 2428 | ||
| 2396 | * functions.texi (Declaring Functions): Add findex. Mention | 2429 | * functions.texi (Declaring Functions): Add findex. |
| 2397 | `external' files. | 2430 | Mention `external' files. |
| 2398 | 2431 | ||
| 2399 | 2007-11-26 Juanma Barranquero <lekktu@gmail.com> | 2432 | 2007-11-26 Juanma Barranquero <lekktu@gmail.com> |
| 2400 | 2433 | ||
| @@ -2521,8 +2554,8 @@ | |||
| 2521 | * display.texi (Display Property): Explain some display specs | 2554 | * display.texi (Display Property): Explain some display specs |
| 2522 | don't let you move point in. | 2555 | don't let you move point in. |
| 2523 | 2556 | ||
| 2524 | * frames.texi (Cursor Parameters): Describe | 2557 | * frames.texi (Cursor Parameters): |
| 2525 | cursor-in-non-selected-windows here. Explain more values. | 2558 | Describe cursor-in-non-selected-windows here. Explain more values. |
| 2526 | 2559 | ||
| 2527 | * windows.texi (Basic Windows): Don't describe | 2560 | * windows.texi (Basic Windows): Don't describe |
| 2528 | cursor-in-non-selected-windows here. | 2561 | cursor-in-non-selected-windows here. |
| @@ -2601,8 +2634,8 @@ | |||
| 2601 | 2634 | ||
| 2602 | 2007-08-16 Richard Stallman <rms@gnu.org> | 2635 | 2007-08-16 Richard Stallman <rms@gnu.org> |
| 2603 | 2636 | ||
| 2604 | * processes.texi (Asynchronous Processes): Clarify | 2637 | * processes.texi (Asynchronous Processes): |
| 2605 | doc of start-file-process. | 2638 | Clarify doc of start-file-process. |
| 2606 | 2639 | ||
| 2607 | 2007-08-08 Martin Rudalics <rudalics@gmx.at> | 2640 | 2007-08-08 Martin Rudalics <rudalics@gmx.at> |
| 2608 | 2641 | ||
| @@ -2669,8 +2702,8 @@ | |||
| 2669 | 2702 | ||
| 2670 | 2007-06-27 Richard Stallman <rms@gnu.org> | 2703 | 2007-06-27 Richard Stallman <rms@gnu.org> |
| 2671 | 2704 | ||
| 2672 | * files.texi (Format Conversion Piecemeal): Clarify | 2705 | * files.texi (Format Conversion Piecemeal): |
| 2673 | `after-insert-file-functions' calling convention. | 2706 | Clarify `after-insert-file-functions' calling convention. |
| 2674 | 2707 | ||
| 2675 | 2007-06-27 Michael Albinus <michael.albinus@gmx.de> | 2708 | 2007-06-27 Michael Albinus <michael.albinus@gmx.de> |
| 2676 | 2709 | ||
| @@ -2725,8 +2758,8 @@ | |||
| 2725 | 2758 | ||
| 2726 | 2007-05-30 Nick Roberts <nickrob@snap.net.nz> | 2759 | 2007-05-30 Nick Roberts <nickrob@snap.net.nz> |
| 2727 | 2760 | ||
| 2728 | * commands.texi (Click Events): Layout more logically. Describe | 2761 | * commands.texi (Click Events): Layout more logically. |
| 2729 | width and height. | 2762 | Describe width and height. |
| 2730 | (Drag Events, Motion Events): Update to new format for position. | 2763 | (Drag Events, Motion Events): Update to new format for position. |
| 2731 | 2764 | ||
| 2732 | 2007-06-02 Richard Stallman <rms@gnu.org> | 2765 | 2007-06-02 Richard Stallman <rms@gnu.org> |
| @@ -3132,8 +3165,8 @@ | |||
| 3132 | 3165 | ||
| 3133 | 2007-03-05 Richard Stallman <rms@gnu.org> | 3166 | 2007-03-05 Richard Stallman <rms@gnu.org> |
| 3134 | 3167 | ||
| 3135 | * variables.texi (File Local Variables): Update | 3168 | * variables.texi (File Local Variables): |
| 3136 | enable-local-variables values. | 3169 | Update enable-local-variables values. |
| 3137 | 3170 | ||
| 3138 | 2007-03-04 Richard Stallman <rms@gnu.org> | 3171 | 2007-03-04 Richard Stallman <rms@gnu.org> |
| 3139 | 3172 | ||
| @@ -3204,8 +3237,8 @@ | |||
| 3204 | 2007-02-03 Eli Zaretskii <eliz@gnu.org> | 3237 | 2007-02-03 Eli Zaretskii <eliz@gnu.org> |
| 3205 | 3238 | ||
| 3206 | * elisp.texi (Top): Make the detailed menu headers compliant with | 3239 | * elisp.texi (Top): Make the detailed menu headers compliant with |
| 3207 | Texinfo guidelines and with what texnfo-upd.el expects. Add | 3240 | Texinfo guidelines and with what texnfo-upd.el expects. |
| 3208 | comments to prevent people from inadvertently modifying the key | 3241 | Add comments to prevent people from inadvertently modifying the key |
| 3209 | parts needed by `texinfo-multiple-files-update'. | 3242 | parts needed by `texinfo-multiple-files-update'. |
| 3210 | 3243 | ||
| 3211 | 2007-02-02 Eli Zaretskii <eliz@gnu.org> | 3244 | 2007-02-02 Eli Zaretskii <eliz@gnu.org> |
| @@ -3292,8 +3325,8 @@ | |||
| 3292 | 3325 | ||
| 3293 | 2006-12-24 Richard Stallman <rms@gnu.org> | 3326 | 2006-12-24 Richard Stallman <rms@gnu.org> |
| 3294 | 3327 | ||
| 3295 | * customize.texi (Variable Definitions): Document | 3328 | * customize.texi (Variable Definitions): |
| 3296 | new name custom-add-frequent-value. | 3329 | Document new name custom-add-frequent-value. |
| 3297 | 3330 | ||
| 3298 | 2006-12-19 Kim F. Storm <storm@cua.dk> | 3331 | 2006-12-19 Kim F. Storm <storm@cua.dk> |
| 3299 | 3332 | ||
| @@ -3592,8 +3625,8 @@ | |||
| 3592 | 3625 | ||
| 3593 | 2006-09-01 Chong Yidong <cyd@stupidchicken.com> | 3626 | 2006-09-01 Chong Yidong <cyd@stupidchicken.com> |
| 3594 | 3627 | ||
| 3595 | * buffers.texi (Buffer Modification): Document | 3628 | * buffers.texi (Buffer Modification): |
| 3596 | buffer-chars-modified-tick. | 3629 | Document buffer-chars-modified-tick. |
| 3597 | 3630 | ||
| 3598 | 2006-08-31 Richard Stallman <rms@gnu.org> | 3631 | 2006-08-31 Richard Stallman <rms@gnu.org> |
| 3599 | 3632 | ||
| @@ -3655,7 +3688,7 @@ | |||
| 3655 | 2006-08-12 Chong Yidong <cyd@stupidchicken.com> | 3688 | 2006-08-12 Chong Yidong <cyd@stupidchicken.com> |
| 3656 | 3689 | ||
| 3657 | * text.texi (Near Point): Say "cursor" not "terminal cursor". | 3690 | * text.texi (Near Point): Say "cursor" not "terminal cursor". |
| 3658 | (Commands for Insertion): Removed split-line since it's not | 3691 | (Commands for Insertion): Remove split-line since it's not |
| 3659 | relevant for Lisp programming. | 3692 | relevant for Lisp programming. |
| 3660 | (Yank Commands): Rewrite introduction. | 3693 | (Yank Commands): Rewrite introduction. |
| 3661 | (Undo): Clarify. | 3694 | (Undo): Clarify. |
| @@ -3686,7 +3719,7 @@ | |||
| 3686 | (Major Mode Basics): Mention define-derived-mode explicitly. | 3719 | (Major Mode Basics): Mention define-derived-mode explicitly. |
| 3687 | (Major Mode Conventions): Rebinding RET is OK for some modes. | 3720 | (Major Mode Conventions): Rebinding RET is OK for some modes. |
| 3688 | Mention change-major-mode-hook and after-change-major-mode-hook. | 3721 | Mention change-major-mode-hook and after-change-major-mode-hook. |
| 3689 | (Example Major Modes): Moved to end of Modes section. | 3722 | (Example Major Modes): Move to end of Modes section. |
| 3690 | (Mode Line Basics): Clarify. | 3723 | (Mode Line Basics): Clarify. |
| 3691 | (Mode Line Data): Mention help-echo and local-map in strings. | 3724 | (Mode Line Data): Mention help-echo and local-map in strings. |
| 3692 | Explain reason for treatment of non-risky variables. | 3725 | Explain reason for treatment of non-risky variables. |
| @@ -4185,7 +4218,7 @@ | |||
| 4185 | 4218 | ||
| 4186 | 2006-05-25 Chong Yidong <cyd@stupidchicken.com> | 4219 | 2006-05-25 Chong Yidong <cyd@stupidchicken.com> |
| 4187 | 4220 | ||
| 4188 | * keymaps.texi (Key Sequences): Renamed from Keymap Terminology. | 4221 | * keymaps.texi (Key Sequences): Rename from Keymap Terminology. |
| 4189 | Explain string and vector representations of key sequences. | 4222 | Explain string and vector representations of key sequences. |
| 4190 | 4223 | ||
| 4191 | * keymaps.texi (Changing Key Bindings): | 4224 | * keymaps.texi (Changing Key Bindings): |
| @@ -4234,8 +4267,8 @@ | |||
| 4234 | 4267 | ||
| 4235 | 2006-05-15 Oliver Scholz <epameinondas@gmx.de> (tiny change) | 4268 | 2006-05-15 Oliver Scholz <epameinondas@gmx.de> (tiny change) |
| 4236 | 4269 | ||
| 4237 | * nonascii.texi (Explicit Encoding): Fix | 4270 | * nonascii.texi (Explicit Encoding): |
| 4238 | typo (encoding<->decoding). | 4271 | Fix typo (encoding<->decoding). |
| 4239 | 4272 | ||
| 4240 | 2006-05-14 Richard Stallman <rms@gnu.org> | 4273 | 2006-05-14 Richard Stallman <rms@gnu.org> |
| 4241 | 4274 | ||
| @@ -4285,8 +4318,8 @@ | |||
| 4285 | 4318 | ||
| 4286 | 2006-05-09 Richard Stallman <rms@gnu.org> | 4319 | 2006-05-09 Richard Stallman <rms@gnu.org> |
| 4287 | 4320 | ||
| 4288 | * variables.texi (File Local Variables): Document | 4321 | * variables.texi (File Local Variables): |
| 4289 | safe-local-eval-forms and safe-local-eval-function. | 4322 | Document safe-local-eval-forms and safe-local-eval-function. |
| 4290 | 4323 | ||
| 4291 | 2006-05-07 Kim F. Storm <storm@cua.dk> | 4324 | 2006-05-07 Kim F. Storm <storm@cua.dk> |
| 4292 | 4325 | ||
| @@ -4770,8 +4803,8 @@ | |||
| 4770 | 4803 | ||
| 4771 | 2005-12-03 Eli Zaretskii <eliz@gnu.org> | 4804 | 2005-12-03 Eli Zaretskii <eliz@gnu.org> |
| 4772 | 4805 | ||
| 4773 | * hooks.texi (Standard Hooks): Add index entries. Mention | 4806 | * hooks.texi (Standard Hooks): Add index entries. |
| 4774 | `compilation-finish-functions'. | 4807 | Mention `compilation-finish-functions'. |
| 4775 | 4808 | ||
| 4776 | 2005-11-27 Richard M. Stallman <rms@gnu.org> | 4809 | 2005-11-27 Richard M. Stallman <rms@gnu.org> |
| 4777 | 4810 | ||
| @@ -4994,8 +5027,8 @@ | |||
| 4994 | buffer-local. | 5027 | buffer-local. |
| 4995 | (Undo): Note that buffer-undo-list is buffer-local. | 5028 | (Undo): Note that buffer-undo-list is buffer-local. |
| 4996 | 5029 | ||
| 4997 | * windows.texi (Buffers and Windows): Document | 5030 | * windows.texi (Buffers and Windows): |
| 4998 | buffer-display-count. | 5031 | Document buffer-display-count. |
| 4999 | 5032 | ||
| 5000 | 2005-09-06 Richard M. Stallman <rms@gnu.org> | 5033 | 2005-09-06 Richard M. Stallman <rms@gnu.org> |
| 5001 | 5034 | ||
| @@ -5236,7 +5269,7 @@ | |||
| 5236 | 5269 | ||
| 5237 | * display.texi (Displaying Messages): New node, with most | 5270 | * display.texi (Displaying Messages): New node, with most |
| 5238 | of what was in The Echo Area. | 5271 | of what was in The Echo Area. |
| 5239 | (Progress): Moved under The Echo Area. | 5272 | (Progress): Move under The Echo Area. |
| 5240 | (Logging Messages): New node with new text. | 5273 | (Logging Messages): New node with new text. |
| 5241 | (Echo Area Customization): New node, the rest of what was | 5274 | (Echo Area Customization): New node, the rest of what was |
| 5242 | in The Echo Area. Document message-truncate-lines with @defvar. | 5275 | in The Echo Area. Document message-truncate-lines with @defvar. |
| @@ -6551,8 +6584,8 @@ | |||
| 6551 | (Scroll Bars): Add scroll-bar-mode and scroll-bar-width. | 6584 | (Scroll Bars): Add scroll-bar-mode and scroll-bar-width. |
| 6552 | (Usual Display): Move tab-width up. | 6585 | (Usual Display): Move tab-width up. |
| 6553 | 6586 | ||
| 6554 | * customize.texi (Variable Definitions): Replace | 6587 | * customize.texi (Variable Definitions): |
| 6555 | show-paren-mode example with tooltip-mode. | 6588 | Replace show-paren-mode example with tooltip-mode. |
| 6556 | (Simple Types, Composite Types, Defining New Types): | 6589 | (Simple Types, Composite Types, Defining New Types): |
| 6557 | Minor cleanups. | 6590 | Minor cleanups. |
| 6558 | 6591 | ||
| @@ -6788,8 +6821,8 @@ | |||
| 6788 | (Display Fringe Bitmaps): New node. | 6821 | (Display Fringe Bitmaps): New node. |
| 6789 | (Images): Add 'Image Slices' to menu. | 6822 | (Images): Add 'Image Slices' to menu. |
| 6790 | (Image Descriptors): Add `:pointer' and `:map' properties. | 6823 | (Image Descriptors): Add `:pointer' and `:map' properties. |
| 6791 | (Showing Images): Add slice arg to `insert-image'. Add | 6824 | (Showing Images): Add slice arg to `insert-image'. |
| 6792 | 'insert-sliced-image'. | 6825 | Add 'insert-sliced-image'. |
| 6793 | 6826 | ||
| 6794 | 2004-09-20 Richard M. Stallman <rms@gnu.org> | 6827 | 2004-09-20 Richard M. Stallman <rms@gnu.org> |
| 6795 | 6828 | ||
| @@ -6802,8 +6835,8 @@ | |||
| 6802 | 6835 | ||
| 6803 | 2004-09-07 Luc Teirlinck <teirllm@auburn.edu> | 6836 | 2004-09-07 Luc Teirlinck <teirllm@auburn.edu> |
| 6804 | 6837 | ||
| 6805 | * locals.texi (Standard Buffer-Local Variables): Add | 6838 | * locals.texi (Standard Buffer-Local Variables): |
| 6806 | `buffer-auto-save-file-format'. | 6839 | Add `buffer-auto-save-file-format'. |
| 6807 | * internals.texi (Buffer Internals): Describe new | 6840 | * internals.texi (Buffer Internals): Describe new |
| 6808 | auto_save_file_format field of the buffer structure. | 6841 | auto_save_file_format field of the buffer structure. |
| 6809 | * files.texi (Format Conversion): `auto-save-file-format' has been | 6842 | * files.texi (Format Conversion): `auto-save-file-format' has been |
| @@ -7191,8 +7224,8 @@ | |||
| 7191 | 7224 | ||
| 7192 | 2004-04-05 Jesper Harder <harder@ifa.au.dk> | 7225 | 2004-04-05 Jesper Harder <harder@ifa.au.dk> |
| 7193 | 7226 | ||
| 7194 | * variables.texi (Variable Aliases): Mention | 7227 | * variables.texi (Variable Aliases): |
| 7195 | cyclic-variable-indirection. | 7228 | Mention cyclic-variable-indirection. |
| 7196 | 7229 | ||
| 7197 | * errors.texi (Standard Errors): Ditto. | 7230 | * errors.texi (Standard Errors): Ditto. |
| 7198 | 7231 | ||
| @@ -7371,7 +7404,7 @@ | |||
| 7371 | 7404 | ||
| 7372 | 2004-02-07 Jan Djärv <jan.h.d@swipnet.se> | 7405 | 2004-02-07 Jan Djärv <jan.h.d@swipnet.se> |
| 7373 | 7406 | ||
| 7374 | * positions.texi (Text Lines): Added missing end defun. | 7407 | * positions.texi (Text Lines): Add missing end defun. |
| 7375 | 7408 | ||
| 7376 | 2004-02-07 Kim F. Storm <storm@cua.dk> | 7409 | 2004-02-07 Kim F. Storm <storm@cua.dk> |
| 7377 | 7410 | ||
| @@ -7394,12 +7427,12 @@ | |||
| 7394 | read-minibuffer. | 7427 | read-minibuffer. |
| 7395 | (Minibuffer History): Clarify description of cons values for | 7428 | (Minibuffer History): Clarify description of cons values for |
| 7396 | HISTORY arguments. | 7429 | HISTORY arguments. |
| 7397 | (Basic Completion): Various corrections and clarifications. Add | 7430 | (Basic Completion): Various corrections and clarifications. |
| 7398 | completion-regexp-list. | 7431 | Add completion-regexp-list. |
| 7399 | (Minibuffer Completion): Correct and clarify description of | 7432 | (Minibuffer Completion): Correct and clarify description of |
| 7400 | completing-read. | 7433 | completing-read. |
| 7401 | (Completion Commands): Mention Partial Completion mode. Various | 7434 | (Completion Commands): Mention Partial Completion mode. |
| 7402 | other minor changes. | 7435 | Various other minor changes. |
| 7403 | (High-Level Completion): Various corrections and clarifications. | 7436 | (High-Level Completion): Various corrections and clarifications. |
| 7404 | (Reading File Names): Ditto. | 7437 | (Reading File Names): Ditto. |
| 7405 | (Minibuffer Misc): Ditto. | 7438 | (Minibuffer Misc): Ditto. |
| @@ -7474,8 +7507,8 @@ | |||
| 7474 | 7507 | ||
| 7475 | * functions.texi: Various small changes in addition to the | 7508 | * functions.texi: Various small changes in addition to the |
| 7476 | following. | 7509 | following. |
| 7477 | (What Is a Function): `functionp' returns nil for macros. Clarify | 7510 | (What Is a Function): `functionp' returns nil for macros. |
| 7478 | behavior of this and following functions for symbol arguments. | 7511 | Clarify behavior of this and following functions for symbol arguments. |
| 7479 | (Function Documentation): Add `\' in front of (fn @var{arglist}) | 7512 | (Function Documentation): Add `\' in front of (fn @var{arglist}) |
| 7480 | and explain why. | 7513 | and explain why. |
| 7481 | (Defining Functions): Mention DOCSTRING argument to `defalias'. | 7514 | (Defining Functions): Mention DOCSTRING argument to `defalias'. |
| @@ -8271,7 +8304,7 @@ | |||
| 8271 | 8304 | ||
| 8272 | 2003-01-31 Joe Buehler <jhpb@draco.hekimian.com> | 8305 | 2003-01-31 Joe Buehler <jhpb@draco.hekimian.com> |
| 8273 | 8306 | ||
| 8274 | * os.texi (System Environment): Added cygwin system-type. | 8307 | * os.texi (System Environment): Add cygwin system-type. |
| 8275 | 8308 | ||
| 8276 | 2003-01-25 Richard M. Stallman <rms@gnu.org> | 8309 | 2003-01-25 Richard M. Stallman <rms@gnu.org> |
| 8277 | 8310 | ||
| @@ -8304,7 +8337,7 @@ | |||
| 8304 | 8337 | ||
| 8305 | * README: Target for Info file is `make info'. | 8338 | * README: Target for Info file is `make info'. |
| 8306 | 8339 | ||
| 8307 | * files.texi (File Name Components): Fixed typos in | 8340 | * files.texi (File Name Components): Fix typos in |
| 8308 | `file-name-sans-extension'. | 8341 | `file-name-sans-extension'. |
| 8309 | (Magic File Names): Complete list of operations for magic file | 8342 | (Magic File Names): Complete list of operations for magic file |
| 8310 | name handlers. | 8343 | name handlers. |
| @@ -8320,7 +8353,7 @@ | |||
| 8320 | 8353 | ||
| 8321 | 2002-08-05 Per Abrahamsen <abraham@dina.kvl.dk> | 8354 | 2002-08-05 Per Abrahamsen <abraham@dina.kvl.dk> |
| 8322 | 8355 | ||
| 8323 | * customize.texi (Splicing into Lists): Fixed example. | 8356 | * customize.texi (Splicing into Lists): Fix example. |
| 8324 | Reported by Fabrice Bauzac <fabrice.bauzac@wanadoo.fr>. | 8357 | Reported by Fabrice Bauzac <fabrice.bauzac@wanadoo.fr>. |
| 8325 | 8358 | ||
| 8326 | 2002-06-17 Juanma Barranquero <lektu@terra.es> | 8359 | 2002-06-17 Juanma Barranquero <lektu@terra.es> |
| @@ -8360,8 +8393,8 @@ | |||
| 8360 | 8393 | ||
| 8361 | 2001-11-17 Eli Zaretskii <eliz@is.elta.co.il> | 8394 | 2001-11-17 Eli Zaretskii <eliz@is.elta.co.il> |
| 8362 | 8395 | ||
| 8363 | * permute-index: Don't depend on csh-specific features. Replace | 8396 | * permute-index: Don't depend on csh-specific features. |
| 8364 | the interpreter name with /bin/sh. | 8397 | Replace the interpreter name with /bin/sh. |
| 8365 | 8398 | ||
| 8366 | * two-volume-cross-refs.txt: New file. | 8399 | * two-volume-cross-refs.txt: New file. |
| 8367 | * two.el: New file. | 8400 | * two.el: New file. |
| @@ -8499,8 +8532,8 @@ | |||
| 8499 | * numbers.texi (Integer Basics): Document CL style read syntax for | 8532 | * numbers.texi (Integer Basics): Document CL style read syntax for |
| 8500 | integers in bases other than 10. | 8533 | integers in bases other than 10. |
| 8501 | 8534 | ||
| 8502 | * positions.texi (List Motion): Document | 8535 | * positions.texi (List Motion): |
| 8503 | open-paren-in-column-0-is-defun-start. | 8536 | Document open-paren-in-column-0-is-defun-start. |
| 8504 | 8537 | ||
| 8505 | * lists.texi (Sets And Lists): Document member-ignore-case. | 8538 | * lists.texi (Sets And Lists): Document member-ignore-case. |
| 8506 | 8539 | ||
| @@ -8695,7 +8728,7 @@ | |||
| 8695 | 1995-06-19 Richard Stallman <rms@mole.gnu.ai.mit.edu> | 8728 | 1995-06-19 Richard Stallman <rms@mole.gnu.ai.mit.edu> |
| 8696 | 8729 | ||
| 8697 | * Makefile (VERSION): Update version number. | 8730 | * Makefile (VERSION): Update version number. |
| 8698 | (maintainer-clean): Renamed from realclean. | 8731 | (maintainer-clean): Rename from realclean. |
| 8699 | 8732 | ||
| 8700 | 1995-06-07 Karl Heuer <kwzh@nutrimat.gnu.ai.mit.edu> | 8733 | 1995-06-07 Karl Heuer <kwzh@nutrimat.gnu.ai.mit.edu> |
| 8701 | 8734 | ||
| @@ -8767,11 +8800,11 @@ | |||
| 8767 | 8800 | ||
| 8768 | 1991-11-26 Richard Stallman (rms@mole.gnu.ai.mit.edu) | 8801 | 1991-11-26 Richard Stallman (rms@mole.gnu.ai.mit.edu) |
| 8769 | 8802 | ||
| 8770 | * Makefile (srcs): Added index.perm. | 8803 | * Makefile (srcs): Add index.perm. |
| 8771 | (elisp.dvi): Remove erroneous shell comment. | 8804 | (elisp.dvi): Remove erroneous shell comment. |
| 8772 | Expect output of permute-index in permuted.fns. | 8805 | Expect output of permute-index in permuted.fns. |
| 8773 | Save old elisp.aux in elisp.oaux. | 8806 | Save old elisp.aux in elisp.oaux. |
| 8774 | (clean): Added index.texi to be deleted. | 8807 | (clean): Add index.texi to be deleted. |
| 8775 | 8808 | ||
| 8776 | 1990-08-11 Richard Stallman (rms@sugar-bombs.ai.mit.edu) | 8809 | 1990-08-11 Richard Stallman (rms@sugar-bombs.ai.mit.edu) |
| 8777 | 8810 | ||
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index 7d6ae233f2b..349d0beb9c7 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi | |||
| @@ -88,10 +88,8 @@ save disk space. (You would put this code in your init file.) | |||
| 88 | @smallexample | 88 | @smallexample |
| 89 | @group | 89 | @group |
| 90 | (add-hook 'rmail-mode-hook | 90 | (add-hook 'rmail-mode-hook |
| 91 | (function (lambda () | 91 | (lambda () |
| 92 | (make-local-variable | 92 | (set (make-local-variable 'make-backup-files) nil))) |
| 93 | 'make-backup-files) | ||
| 94 | (setq make-backup-files nil)))) | ||
| 95 | @end group | 93 | @end group |
| 96 | @end smallexample | 94 | @end smallexample |
| 97 | @end defopt | 95 | @end defopt |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 6e872ad4233..29b8556e905 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -3892,6 +3892,13 @@ position as that text. It is equivalent to using just @var{string}, | |||
| 3892 | but it is done as a special case of marginal display (@pxref{Display | 3892 | but it is done as a special case of marginal display (@pxref{Display |
| 3893 | Margins}). | 3893 | Margins}). |
| 3894 | 3894 | ||
| 3895 | @item (left-fringe @var{bitmap} @r{[}@var{face}@r{]}) | ||
| 3896 | @itemx (right-fringe @var{bitmap} @r{[}@var{face}@r{]}) | ||
| 3897 | This display specification on any character of a line of text causes | ||
| 3898 | the specified @var{bitmap} be displayed in the left or right fringes | ||
| 3899 | for that line. The optional @var{face} specifies the colors to be | ||
| 3900 | used for the bitmap. @xref{Fringe Bitmaps}, for the details. | ||
| 3901 | |||
| 3895 | @item (space-width @var{factor}) | 3902 | @item (space-width @var{factor}) |
| 3896 | This display specification affects all the space characters within the | 3903 | This display specification affects all the space characters within the |
| 3897 | text that has the specification. It displays all of these spaces | 3904 | text that has the specification. It displays all of these spaces |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 12f16b67663..5f59d4c4b62 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -20,14 +20,15 @@ user. For related topics such as keymaps and syntax tables, see | |||
| 20 | @ref{Keymaps}, and @ref{Syntax Tables}. | 20 | @ref{Keymaps}, and @ref{Syntax Tables}. |
| 21 | 21 | ||
| 22 | @menu | 22 | @menu |
| 23 | * Hooks:: How to use hooks; how to write code that provides hooks. | 23 | * Hooks:: How to use hooks; how to write code that provides hooks. |
| 24 | * Major Modes:: Defining major modes. | 24 | * Major Modes:: Defining major modes. |
| 25 | * Minor Modes:: Defining minor modes. | 25 | * Minor Modes:: Defining minor modes. |
| 26 | * Mode Line Format:: Customizing the text that appears in the mode line. | 26 | * Mode Line Format:: Customizing the text that appears in the mode line. |
| 27 | * Imenu:: How a mode can provide a menu | 27 | * Imenu:: How a mode can provide a menu |
| 28 | of definitions in the buffer. | 28 | of definitions in the buffer. |
| 29 | * Font Lock Mode:: How modes can highlight text according to syntax. | 29 | * Font Lock Mode:: How modes can highlight text according to syntax. |
| 30 | * Desktop Save Mode:: How modes can have buffer state saved between | 30 | * Auto-Indentation:: How to teach Emacs to indent for a major mode. |
| 31 | * Desktop Save Mode:: How modes can have buffer state saved between | ||
| 31 | Emacs sessions. | 32 | Emacs sessions. |
| 32 | @end menu | 33 | @end menu |
| 33 | 34 | ||
| @@ -78,8 +79,8 @@ convention. | |||
| 78 | its value is just a single function, not a list of functions. | 79 | its value is just a single function, not a list of functions. |
| 79 | 80 | ||
| 80 | @menu | 81 | @menu |
| 81 | * Running Hooks:: How to run a hook. | 82 | * Running Hooks:: How to run a hook. |
| 82 | * Setting Hooks:: How to put functions on a hook, or remove them. | 83 | * Setting Hooks:: How to put functions on a hook, or remove them. |
| 83 | @end menu | 84 | @end menu |
| 84 | 85 | ||
| 85 | @node Running Hooks | 86 | @node Running Hooks |
| @@ -199,16 +200,16 @@ buffer, such as a local keymap. The effect lasts until you switch | |||
| 199 | to another major mode in the same buffer. | 200 | to another major mode in the same buffer. |
| 200 | 201 | ||
| 201 | @menu | 202 | @menu |
| 202 | * Major Mode Basics:: | 203 | * Major Mode Basics:: |
| 203 | * Major Mode Conventions:: Coding conventions for keymaps, etc. | 204 | * Major Mode Conventions:: Coding conventions for keymaps, etc. |
| 204 | * Auto Major Mode:: How Emacs chooses the major mode automatically. | 205 | * Auto Major Mode:: How Emacs chooses the major mode automatically. |
| 205 | * Mode Help:: Finding out how to use a mode. | 206 | * Mode Help:: Finding out how to use a mode. |
| 206 | * Derived Modes:: Defining a new major mode based on another major | 207 | * Derived Modes:: Defining a new major mode based on another major |
| 207 | mode. | 208 | mode. |
| 208 | * Generic Modes:: Defining a simple major mode that supports | 209 | * Generic Modes:: Defining a simple major mode that supports |
| 209 | comment syntax and Font Lock mode. | 210 | comment syntax and Font Lock mode. |
| 210 | * Mode Hooks:: Hooks run at the end of major mode functions. | 211 | * Mode Hooks:: Hooks run at the end of major mode functions. |
| 211 | * Example Major Modes:: Text mode and Lisp modes. | 212 | * Example Major Modes:: Text mode and Lisp modes. |
| 212 | @end menu | 213 | @end menu |
| 213 | 214 | ||
| 214 | @node Major Mode Basics | 215 | @node Major Mode Basics |
| @@ -238,9 +239,8 @@ mode except that it provides two additional commands. Its definition | |||
| 238 | is distinct from that of Text mode, but uses that of Text mode. | 239 | is distinct from that of Text mode, but uses that of Text mode. |
| 239 | 240 | ||
| 240 | Even if the new mode is not an obvious derivative of any other mode, | 241 | Even if the new mode is not an obvious derivative of any other mode, |
| 241 | it is convenient to use @code{define-derived-mode} with a @code{nil} | 242 | we recommend to use @code{define-derived-mode}, since it automatically |
| 242 | parent argument, since it automatically enforces the most important | 243 | enforces the most important coding conventions for you. |
| 243 | coding conventions for you. | ||
| 244 | 244 | ||
| 245 | For a very simple programming language major mode that handles | 245 | For a very simple programming language major mode that handles |
| 246 | comments and fontification, you can use @code{define-generic-mode}. | 246 | comments and fontification, you can use @code{define-generic-mode}. |
| @@ -333,7 +333,7 @@ In a major mode for editing some kind of structured text, such as a | |||
| 333 | programming language, indentation of text according to structure is | 333 | programming language, indentation of text according to structure is |
| 334 | probably useful. So the mode should set @code{indent-line-function} | 334 | probably useful. So the mode should set @code{indent-line-function} |
| 335 | to a suitable function, and probably customize other variables | 335 | to a suitable function, and probably customize other variables |
| 336 | for indentation. | 336 | for indentation. @xref{Auto-Indentation}. |
| 337 | 337 | ||
| 338 | @item | 338 | @item |
| 339 | @cindex keymaps in modes | 339 | @cindex keymaps in modes |
| @@ -429,6 +429,10 @@ The mode can specify a local value for | |||
| 429 | this mode. | 429 | this mode. |
| 430 | 430 | ||
| 431 | @item | 431 | @item |
| 432 | The mode can specify how to complete various keywords by adding | ||
| 433 | to the special hook @code{completion-at-point-functions}. | ||
| 434 | |||
| 435 | @item | ||
| 432 | Use @code{defvar} or @code{defcustom} to set mode-related variables, so | 436 | Use @code{defvar} or @code{defcustom} to set mode-related variables, so |
| 433 | that they are not reinitialized if they already have a value. (Such | 437 | that they are not reinitialized if they already have a value. (Such |
| 434 | reinitialization could discard customizations made by the user.) | 438 | reinitialization could discard customizations made by the user.) |
| @@ -492,7 +496,7 @@ The @code{define-derived-mode} macro automatically marks the derived | |||
| 492 | mode as special if the parent mode is special. The special mode | 496 | mode as special if the parent mode is special. The special mode |
| 493 | @code{special-mode} provides a convenient parent for other special | 497 | @code{special-mode} provides a convenient parent for other special |
| 494 | modes to inherit from; it sets @code{buffer-read-only} to @code{t}, | 498 | modes to inherit from; it sets @code{buffer-read-only} to @code{t}, |
| 495 | and does nothing else. | 499 | and does little else. |
| 496 | 500 | ||
| 497 | @item | 501 | @item |
| 498 | If you want to make the new mode the default for files with certain | 502 | If you want to make the new mode the default for files with certain |
| @@ -737,8 +741,10 @@ documentation of the major mode. | |||
| 737 | @subsection Defining Derived Modes | 741 | @subsection Defining Derived Modes |
| 738 | @cindex derived mode | 742 | @cindex derived mode |
| 739 | 743 | ||
| 740 | It's often useful to define a new major mode in terms of an existing | 744 | The recommended way to define a new major mode is to derive it |
| 741 | one. An easy way to do this is to use @code{define-derived-mode}. | 745 | from an existing one using @code{define-derived-mode}. If there is no |
| 746 | closely related mode, you can inherit from @code{text-mode}, | ||
| 747 | @code{special-mode}, or in the worst case @code{fundamental-mode}. | ||
| 742 | 748 | ||
| 743 | @defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{} | 749 | @defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{} |
| 744 | This macro defines @var{variant} as a major mode command, using | 750 | This macro defines @var{variant} as a major mode command, using |
| @@ -979,8 +985,7 @@ You can thus get the full benefit of adaptive filling | |||
| 979 | Turning on Text mode runs the normal hook `text-mode-hook'." | 985 | Turning on Text mode runs the normal hook `text-mode-hook'." |
| 980 | @end group | 986 | @end group |
| 981 | @group | 987 | @group |
| 982 | (make-local-variable 'text-mode-variant) | 988 | (set (make-local-variable 'text-mode-variant) t) |
| 983 | (setq text-mode-variant t) | ||
| 984 | ;; @r{These two lines are a feature added recently.} | 989 | ;; @r{These two lines are a feature added recently.} |
| 985 | (set (make-local-variable 'require-final-newline) | 990 | (set (make-local-variable 'require-final-newline) |
| 986 | mode-require-final-newline) | 991 | mode-require-final-newline) |
| @@ -998,9 +1003,8 @@ the default value, and we'll delete it in a future version.) | |||
| 998 | @smallexample | 1003 | @smallexample |
| 999 | @group | 1004 | @group |
| 1000 | ;; @r{This isn't needed nowadays, since @code{define-derived-mode} does it.} | 1005 | ;; @r{This isn't needed nowadays, since @code{define-derived-mode} does it.} |
| 1001 | (defvar text-mode-abbrev-table nil | 1006 | (define-abbrev-table 'text-mode-abbrev-table () |
| 1002 | "Abbrev table used while in text mode.") | 1007 | "Abbrev table used while in text mode.") |
| 1003 | (define-abbrev-table 'text-mode-abbrev-table ()) | ||
| 1004 | @end group | 1008 | @end group |
| 1005 | 1009 | ||
| 1006 | @group | 1010 | @group |
| @@ -1022,12 +1026,10 @@ Turning on text-mode runs the hook `text-mode-hook'." | |||
| 1022 | ;; @r{These four lines are absent from the current version} | 1026 | ;; @r{These four lines are absent from the current version} |
| 1023 | ;; @r{not because this is done some other way, but rather} | 1027 | ;; @r{not because this is done some other way, but rather} |
| 1024 | ;; @r{because nowadays Text mode uses the normal definition of paragraphs.} | 1028 | ;; @r{because nowadays Text mode uses the normal definition of paragraphs.} |
| 1025 | (make-local-variable 'paragraph-start) | 1029 | (set (make-local-variable 'paragraph-start) |
| 1026 | (setq paragraph-start (concat "[ \t]*$\\|" page-delimiter)) | 1030 | (concat "[ \t]*$\\|" page-delimiter)) |
| 1027 | (make-local-variable 'paragraph-separate) | 1031 | (set (make-local-variable 'paragraph-separate) paragraph-start) |
| 1028 | (setq paragraph-separate paragraph-start) | 1032 | (set (make-local-variable 'indent-line-function) 'indent-relative-maybe) |
| 1029 | (make-local-variable 'indent-line-function) | ||
| 1030 | (setq indent-line-function 'indent-relative-maybe) | ||
| 1031 | @end group | 1033 | @end group |
| 1032 | @group | 1034 | @group |
| 1033 | (setq mode-name "Text") | 1035 | (setq mode-name "Text") |
| @@ -1115,15 +1117,12 @@ modes should understand the Lisp conventions for comments. The rest of | |||
| 1115 | 1117 | ||
| 1116 | @smallexample | 1118 | @smallexample |
| 1117 | @group | 1119 | @group |
| 1118 | (make-local-variable 'paragraph-start) | 1120 | (set (make-local-variable 'paragraph-start) (concat page-delimiter "\\|$" )) |
| 1119 | (setq paragraph-start (concat page-delimiter "\\|$" )) | 1121 | (set (make-local-variable 'paragraph-separate) paragraph-start) |
| 1120 | (make-local-variable 'paragraph-separate) | ||
| 1121 | (setq paragraph-separate paragraph-start) | ||
| 1122 | @dots{} | 1122 | @dots{} |
| 1123 | @end group | 1123 | @end group |
| 1124 | @group | 1124 | @group |
| 1125 | (make-local-variable 'comment-indent-function) | 1125 | (set (make-local-variable 'comment-indent-function) 'lisp-comment-indent)) |
| 1126 | (setq comment-indent-function 'lisp-comment-indent)) | ||
| 1127 | @dots{} | 1126 | @dots{} |
| 1128 | @end group | 1127 | @end group |
| 1129 | @end smallexample | 1128 | @end smallexample |
| @@ -1135,16 +1134,13 @@ common. The following code sets up the common commands: | |||
| 1135 | 1134 | ||
| 1136 | @smallexample | 1135 | @smallexample |
| 1137 | @group | 1136 | @group |
| 1138 | (defvar shared-lisp-mode-map () | 1137 | (defvar shared-lisp-mode-map |
| 1138 | (let ((map (make-sparse-keymap))) | ||
| 1139 | (define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp) | ||
| 1140 | (define-key shared-lisp-mode-map "\177" | ||
| 1141 | 'backward-delete-char-untabify) | ||
| 1142 | map) | ||
| 1139 | "Keymap for commands shared by all sorts of Lisp modes.") | 1143 | "Keymap for commands shared by all sorts of Lisp modes.") |
| 1140 | |||
| 1141 | ;; @r{Putting this @code{if} after the @code{defvar} is an older style.} | ||
| 1142 | (if shared-lisp-mode-map | ||
| 1143 | () | ||
| 1144 | (setq shared-lisp-mode-map (make-sparse-keymap)) | ||
| 1145 | (define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp) | ||
| 1146 | (define-key shared-lisp-mode-map "\177" | ||
| 1147 | 'backward-delete-char-untabify)) | ||
| 1148 | @end group | 1144 | @end group |
| 1149 | @end smallexample | 1145 | @end smallexample |
| 1150 | 1146 | ||
| @@ -1153,15 +1149,13 @@ And here is the code to set up the keymap for Lisp mode: | |||
| 1153 | 1149 | ||
| 1154 | @smallexample | 1150 | @smallexample |
| 1155 | @group | 1151 | @group |
| 1156 | (defvar lisp-mode-map () | 1152 | (defvar lisp-mode-map |
| 1153 | (let ((map (make-sparse-keymap))) | ||
| 1154 | (set-keymap-parent map shared-lisp-mode-map) | ||
| 1155 | (define-key map "\e\C-x" 'lisp-eval-defun) | ||
| 1156 | (define-key map "\C-c\C-z" 'run-lisp) | ||
| 1157 | map) | ||
| 1157 | "Keymap for ordinary Lisp mode...") | 1158 | "Keymap for ordinary Lisp mode...") |
| 1158 | |||
| 1159 | (if lisp-mode-map | ||
| 1160 | () | ||
| 1161 | (setq lisp-mode-map (make-sparse-keymap)) | ||
| 1162 | (set-keymap-parent lisp-mode-map shared-lisp-mode-map) | ||
| 1163 | (define-key lisp-mode-map "\e\C-x" 'lisp-eval-defun) | ||
| 1164 | (define-key lisp-mode-map "\C-c\C-z" 'run-lisp)) | ||
| 1165 | @end group | 1159 | @end group |
| 1166 | @end smallexample | 1160 | @end smallexample |
| 1167 | 1161 | ||
| @@ -1192,11 +1186,9 @@ if that value is non-nil." | |||
| 1192 | ; @r{finds out what to describe.} | 1186 | ; @r{finds out what to describe.} |
| 1193 | (setq mode-name "Lisp") ; @r{This goes into the mode line.} | 1187 | (setq mode-name "Lisp") ; @r{This goes into the mode line.} |
| 1194 | (lisp-mode-variables t) ; @r{This defines various variables.} | 1188 | (lisp-mode-variables t) ; @r{This defines various variables.} |
| 1195 | (make-local-variable 'comment-start-skip) | 1189 | (set (make-local-variable 'comment-start-skip) |
| 1196 | (setq comment-start-skip | 1190 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") |
| 1197 | "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *") | 1191 | (set (make-local-variable 'font-lock-keywords-case-fold-search) t) |
| 1198 | (make-local-variable 'font-lock-keywords-case-fold-search) | ||
| 1199 | (setq font-lock-keywords-case-fold-search t) | ||
| 1200 | @end group | 1192 | @end group |
| 1201 | @group | 1193 | @group |
| 1202 | (setq imenu-case-fold-search t) | 1194 | (setq imenu-case-fold-search t) |
| @@ -1580,14 +1572,14 @@ information displayed in the mode line relates to the enabled major and | |||
| 1580 | minor modes. | 1572 | minor modes. |
| 1581 | 1573 | ||
| 1582 | @menu | 1574 | @menu |
| 1583 | * Base: Mode Line Basics. Basic ideas of mode line control. | 1575 | * Base: Mode Line Basics. Basic ideas of mode line control. |
| 1584 | * Data: Mode Line Data. The data structure that controls the mode line. | 1576 | * Data: Mode Line Data. The data structure that controls the mode line. |
| 1585 | * Top: Mode Line Top. The top level variable, mode-line-format. | 1577 | * Top: Mode Line Top. The top level variable, mode-line-format. |
| 1586 | * Mode Line Variables:: Variables used in that data structure. | 1578 | * Mode Line Variables:: Variables used in that data structure. |
| 1587 | * %-Constructs:: Putting information into a mode line. | 1579 | * %-Constructs:: Putting information into a mode line. |
| 1588 | * Properties in Mode:: Using text properties in the mode line. | 1580 | * Properties in Mode:: Using text properties in the mode line. |
| 1589 | * Header Lines:: Like a mode line, but at the top. | 1581 | * Header Lines:: Like a mode line, but at the top. |
| 1590 | * Emulating Mode Line:: Formatting text as the mode line would. | 1582 | * Emulating Mode Line:: Formatting text as the mode line would. |
| 1591 | @end menu | 1583 | @end menu |
| 1592 | 1584 | ||
| 1593 | @node Mode Line Basics | 1585 | @node Mode Line Basics |
| @@ -2361,7 +2353,7 @@ Search-based fontification happens second. | |||
| 2361 | * Other Font Lock Variables:: Additional customization facilities. | 2353 | * Other Font Lock Variables:: Additional customization facilities. |
| 2362 | * Levels of Font Lock:: Each mode can define alternative levels | 2354 | * Levels of Font Lock:: Each mode can define alternative levels |
| 2363 | so that the user can select more or less. | 2355 | so that the user can select more or less. |
| 2364 | * Precalculated Fontification:: How Lisp programs that produce the buffer | 2356 | * Precalculated Fontification:: How Lisp programs that produce the buffer |
| 2365 | contents can also specify how to fontify it. | 2357 | contents can also specify how to fontify it. |
| 2366 | * Faces for Font Lock:: Special faces specifically for Font Lock. | 2358 | * Faces for Font Lock:: Special faces specifically for Font Lock. |
| 2367 | * Syntactic Font Lock:: Fontification based on syntax tables. | 2359 | * Syntactic Font Lock:: Fontification based on syntax tables. |
| @@ -3223,6 +3215,659 @@ Since this function is called after every buffer change, it should be | |||
| 3223 | reasonably fast. | 3215 | reasonably fast. |
| 3224 | @end defvar | 3216 | @end defvar |
| 3225 | 3217 | ||
| 3218 | @node Auto-Indentation | ||
| 3219 | @section Auto-indention of code | ||
| 3220 | |||
| 3221 | For programming languages, an important feature of a major mode is to | ||
| 3222 | provide automatic indentation. This is controlled in Emacs by | ||
| 3223 | @code{indent-line-function} (@pxref{Mode-Specific Indent}). | ||
| 3224 | Writing a good indentation function can be difficult and to a large | ||
| 3225 | extent it is still a black art. | ||
| 3226 | |||
| 3227 | Many major mode authors will start by writing a simple indentation | ||
| 3228 | function that works for simple cases, for example by comparing with the | ||
| 3229 | indentation of the previous text line. For most programming languages | ||
| 3230 | that are not really line-based, this tends to scale very poorly: | ||
| 3231 | improving such a function to let it handle more diverse situations tends | ||
| 3232 | to become more and more difficult, resulting in the end with a large, | ||
| 3233 | complex, unmaintainable indentation function which nobody dares to touch. | ||
| 3234 | |||
| 3235 | A good indentation function will usually need to actually parse the | ||
| 3236 | text, according to the syntax of the language. Luckily, it is not | ||
| 3237 | necessary to parse the text in as much detail as would be needed | ||
| 3238 | for a compiler, but on the other hand, the parser embedded in the | ||
| 3239 | indentation code will want to be somewhat friendly to syntactically | ||
| 3240 | incorrect code. | ||
| 3241 | |||
| 3242 | Good maintainable indentation functions usually fall into 2 categories: | ||
| 3243 | either parsing forward from some ``safe'' starting point until the | ||
| 3244 | position of interest, or parsing backward from the position of interest. | ||
| 3245 | Neither of the two is a clearly better choice than the other: parsing | ||
| 3246 | backward is often more difficult than parsing forward because | ||
| 3247 | programming languages are designed to be parsed forward, but for the | ||
| 3248 | purpose of indentation it has the advantage of not needing to | ||
| 3249 | guess a ``safe'' starting point, and it generally enjoys the property | ||
| 3250 | that only a minimum of text will be analyzed to decide the indentation | ||
| 3251 | of a line, so indentation will tend to be unaffected by syntax errors in | ||
| 3252 | some earlier unrelated piece of code. Parsing forward on the other hand | ||
| 3253 | is usually easier and has the advantage of making it possible to | ||
| 3254 | reindent efficiently a whole region at a time, with a single parse. | ||
| 3255 | |||
| 3256 | Rather than write your own indentation function from scratch, it is | ||
| 3257 | often preferable to try and reuse some existing ones or to rely | ||
| 3258 | on a generic indentation engine. There are sadly few such | ||
| 3259 | engines. The CC-mode indentation code (used with C, C++, Java, Awk | ||
| 3260 | and a few other such modes) has been made more generic over the years, | ||
| 3261 | so if your language seems somewhat similar to one of those languages, | ||
| 3262 | you might try to use that engine. @c FIXME: documentation? | ||
| 3263 | Another one is SMIE which takes an approach in the spirit | ||
| 3264 | of Lisp sexps and adapts it to non-Lisp languages. | ||
| 3265 | |||
| 3266 | @menu | ||
| 3267 | * SMIE:: A simple minded indentation engine | ||
| 3268 | @end menu | ||
| 3269 | |||
| 3270 | @node SMIE | ||
| 3271 | @subsection Simple Minded Indentation Engine | ||
| 3272 | |||
| 3273 | SMIE is a package that provides a generic navigation and indentation | ||
| 3274 | engine. Based on a very simple parser using an ``operator precedence | ||
| 3275 | grammar'', it lets major modes extend the sexp-based navigation of Lisp | ||
| 3276 | to non-Lisp languages as well as provide a simple to use but reliable | ||
| 3277 | auto-indentation. | ||
| 3278 | |||
| 3279 | Operator precedence grammar is a very primitive technology for parsing | ||
| 3280 | compared to some of the more common techniques used in compilers. | ||
| 3281 | It has the following characteristics: its parsing power is very limited, | ||
| 3282 | and it is largely unable to detect syntax errors, but it has the | ||
| 3283 | advantage of being algorithmically efficient and able to parse forward | ||
| 3284 | just as well as backward. In practice that means that SMIE can use it | ||
| 3285 | for indentation based on backward parsing, that it can provide both | ||
| 3286 | @code{forward-sexp} and @code{backward-sexp} functionality, and that it | ||
| 3287 | will naturally work on syntactically incorrect code without any extra | ||
| 3288 | effort. The downside is that it also means that most programming | ||
| 3289 | languages cannot be parsed correctly using SMIE, at least not without | ||
| 3290 | resorting to some special tricks (@pxref{SMIE Tricks}). | ||
| 3291 | |||
| 3292 | @menu | ||
| 3293 | * SMIE setup:: SMIE setup and features | ||
| 3294 | * Operator Precedence Grammars:: A very simple parsing technique | ||
| 3295 | * SMIE Grammar:: Defining the grammar of a language | ||
| 3296 | * SMIE Lexer:: Defining tokens | ||
| 3297 | * SMIE Tricks:: Working around the parser's limitations | ||
| 3298 | * SMIE Indentation:: Specifying indentation rules | ||
| 3299 | * SMIE Indentation Helpers:: Helper functions for indentation rules | ||
| 3300 | * SMIE Indentation Example:: Sample indentation rules | ||
| 3301 | @end menu | ||
| 3302 | |||
| 3303 | @node SMIE setup | ||
| 3304 | @subsubsection SMIE Setup and Features | ||
| 3305 | |||
| 3306 | SMIE is meant to be a one-stop shop for structural navigation and | ||
| 3307 | various other features which rely on the syntactic structure of code, in | ||
| 3308 | particular automatic indentation. The main entry point is | ||
| 3309 | @code{smie-setup} which is a function typically called while setting | ||
| 3310 | up a major mode. | ||
| 3311 | |||
| 3312 | @defun smie-setup grammar rules-function &rest keywords | ||
| 3313 | Setup SMIE navigation and indentation. | ||
| 3314 | @var{grammar} is a grammar table generated by @code{smie-prec2->grammar}. | ||
| 3315 | @var{rules-function} is a set of indentation rules for use on | ||
| 3316 | @code{smie-rules-function}. | ||
| 3317 | @var{keywords} are additional arguments, which can include the following | ||
| 3318 | keywords: | ||
| 3319 | @itemize | ||
| 3320 | @item | ||
| 3321 | @code{:forward-token} @var{fun}: Specify the forward lexer to use. | ||
| 3322 | @item | ||
| 3323 | @code{:backward-token} @var{fun}: Specify the backward lexer to use. | ||
| 3324 | @end itemize | ||
| 3325 | @end defun | ||
| 3326 | |||
| 3327 | Calling this function is sufficient to make commands such as | ||
| 3328 | @code{forward-sexp}, @code{backward-sexp}, and @code{transpose-sexps} be | ||
| 3329 | able to properly handle structural elements other than just the paired | ||
| 3330 | parentheses already handled by syntax tables. For example, if the | ||
| 3331 | provided grammar is precise enough, @code{transpose-sexps} can correctly | ||
| 3332 | transpose the two arguments of a @code{+} operator, taking into account | ||
| 3333 | the precedence rules of the language. | ||
| 3334 | |||
| 3335 | Calling `smie-setup' is also sufficient to make TAB indentation work in | ||
| 3336 | the expected way, extends @code{blink-matching-paren} to apply to | ||
| 3337 | elements like @code{begin...end}, and provides some commands that you | ||
| 3338 | can bind in the major mode keymap. | ||
| 3339 | |||
| 3340 | @deffn Command smie-close-block | ||
| 3341 | This command closes the most recently opened (and not yet closed) block. | ||
| 3342 | @end deffn | ||
| 3343 | |||
| 3344 | @deffn Command smie-down-list &optional arg | ||
| 3345 | This command is like @code{down-list} but it also pays attention to | ||
| 3346 | nesting of tokens other than parentheses, such as @code{begin...end}. | ||
| 3347 | @end deffn | ||
| 3348 | |||
| 3349 | @node Operator Precedence Grammars | ||
| 3350 | @subsubsection Operator Precedence Grammars | ||
| 3351 | |||
| 3352 | SMIE's precedence grammars simply give to each token a pair of | ||
| 3353 | precedences: the left-precedence and the right-precedence. We say | ||
| 3354 | @code{T1 < T2} if the right-precedence of token @code{T1} is less than | ||
| 3355 | the left-precedence of token @code{T2}. A good way to read this | ||
| 3356 | @code{<} is as a kind of parenthesis: if we find @code{... T1 something | ||
| 3357 | T2 ...} then that should be parsed as @code{... T1 (something T2 ...} | ||
| 3358 | rather than as @code{... T1 something) T2 ...}. The latter | ||
| 3359 | interpretation would be the case if we had @code{T1 > T2}. If we have | ||
| 3360 | @code{T1 = T2}, it means that token T2 follows token T1 in the same | ||
| 3361 | syntactic construction, so typically we have @code{"begin" = "end"}. | ||
| 3362 | Such pairs of precedences are sufficient to express left-associativity | ||
| 3363 | or right-associativity of infix operators, nesting of tokens like | ||
| 3364 | parentheses and many other cases. | ||
| 3365 | |||
| 3366 | @c ¡Let's leave this undocumented to leave it more open for change! | ||
| 3367 | @c @defvar smie-grammar | ||
| 3368 | @c The value of this variable is an alist specifying the left and right | ||
| 3369 | @c precedence of each token. It is meant to be initialized by using one of | ||
| 3370 | @c the functions below. | ||
| 3371 | @c @end defvar | ||
| 3372 | |||
| 3373 | @defun smie-prec2->grammar table | ||
| 3374 | This function takes a @emph{prec2} grammar @var{table} and returns an | ||
| 3375 | alist suitable for use in @code{smie-setup}. The @emph{prec2} | ||
| 3376 | @var{table} is itself meant to be built by one of the functions below. | ||
| 3377 | @end defun | ||
| 3378 | |||
| 3379 | @defun smie-merge-prec2s &rest tables | ||
| 3380 | This function takes several @emph{prec2} @var{tables} and merges them | ||
| 3381 | into a new @emph{prec2} table. | ||
| 3382 | @end defun | ||
| 3383 | |||
| 3384 | @defun smie-precs->prec2 precs | ||
| 3385 | This function builds a @emph{prec2} table from a table of precedences | ||
| 3386 | @var{precs}. @var{precs} should be a list, sorted by precedence (for | ||
| 3387 | example @code{"+"} will come before @code{"*"}), of elements of the form | ||
| 3388 | @code{(@var{assoc} @var{op} ...)}, where each @var{op} is a token that | ||
| 3389 | acts as an operator; @var{assoc} is their associativity, which can be | ||
| 3390 | either @code{left}, @code{right}, @code{assoc}, or @code{nonassoc}. | ||
| 3391 | All operators in a given element share the same precedence level | ||
| 3392 | and associativity. | ||
| 3393 | @end defun | ||
| 3394 | |||
| 3395 | @defun smie-bnf->prec2 bnf &rest resolvers | ||
| 3396 | This function lets you specify the grammar using a BNF notation. | ||
| 3397 | It accepts a @var{bnf} description of the grammar along with a set of | ||
| 3398 | conflict resolution rules @var{resolvers}, and | ||
| 3399 | returns a @emph{prec2} table. | ||
| 3400 | |||
| 3401 | @var{bnf} is a list of nonterminal definitions of the form | ||
| 3402 | @code{(@var{nonterm} @var{rhs1} @var{rhs2} ...)} where each @var{rhs} | ||
| 3403 | is a (non-empty) list of terminals (aka tokens) or non-terminals. | ||
| 3404 | |||
| 3405 | Not all grammars are accepted: | ||
| 3406 | @itemize | ||
| 3407 | @item | ||
| 3408 | An @var{rhs} cannot be an empty list (an empty list is never needed, | ||
| 3409 | since SMIE allows all non-terminals to match the empty string anyway). | ||
| 3410 | @item | ||
| 3411 | An @var{rhs} cannot have 2 consecutive non-terminals: each pair of | ||
| 3412 | non-terminals needs to be separated by a terminal (aka token). | ||
| 3413 | This is a fundamental limitation of operator precedence grammars. | ||
| 3414 | @end itemize | ||
| 3415 | |||
| 3416 | Additionally, conflicts can occur: | ||
| 3417 | @itemize | ||
| 3418 | @item | ||
| 3419 | The returned @emph{prec2} table holds constraints between pairs of tokens, and | ||
| 3420 | for any given pair only one constraint can be present: T1 < T2, | ||
| 3421 | T1 = T2, or T1 > T2. | ||
| 3422 | @item | ||
| 3423 | A token can be an @code{opener} (something similar to an open-paren), | ||
| 3424 | a @code{closer} (like a close-paren), or @code{neither} of the two | ||
| 3425 | (e.g. an infix operator, or an inner token like @code{"else"}). | ||
| 3426 | @end itemize | ||
| 3427 | |||
| 3428 | Precedence conflicts can be resolved via @var{resolvers}, which | ||
| 3429 | is a list of @emph{precs} tables (see @code{smie-precs->prec2}): for | ||
| 3430 | each precedence conflict, if those @code{precs} tables | ||
| 3431 | specify a particular constraint, then the conflict is resolved by using | ||
| 3432 | this constraint instead, else a conflict is reported and one of the | ||
| 3433 | conflicting constraints is picked arbitrarily and the others are | ||
| 3434 | simply ignored. | ||
| 3435 | @end defun | ||
| 3436 | |||
| 3437 | @node SMIE Grammar | ||
| 3438 | @subsubsection Defining the Grammar of a Language | ||
| 3439 | |||
| 3440 | The usual way to define the SMIE grammar of a language is by | ||
| 3441 | defining a new global variable that holds the precedence table by | ||
| 3442 | giving a set of BNF rules. | ||
| 3443 | For example, the grammar definition for a small Pascal-like language | ||
| 3444 | could look like: | ||
| 3445 | @example | ||
| 3446 | @group | ||
| 3447 | (require 'smie) | ||
| 3448 | (defvar sample-smie-grammar | ||
| 3449 | (smie-prec2->grammar | ||
| 3450 | (smie-bnf->prec2 | ||
| 3451 | @end group | ||
| 3452 | @group | ||
| 3453 | '((id) | ||
| 3454 | (inst ("begin" insts "end") | ||
| 3455 | ("if" exp "then" inst "else" inst) | ||
| 3456 | (id ":=" exp) | ||
| 3457 | (exp)) | ||
| 3458 | (insts (insts ";" insts) (inst)) | ||
| 3459 | (exp (exp "+" exp) | ||
| 3460 | (exp "*" exp) | ||
| 3461 | ("(" exps ")")) | ||
| 3462 | (exps (exps "," exps) (exp))) | ||
| 3463 | @end group | ||
| 3464 | @group | ||
| 3465 | '((assoc ";")) | ||
| 3466 | '((assoc ",")) | ||
| 3467 | '((assoc "+") (assoc "*"))))) | ||
| 3468 | @end group | ||
| 3469 | @end example | ||
| 3470 | |||
| 3471 | @noindent | ||
| 3472 | A few things to note: | ||
| 3473 | |||
| 3474 | @itemize | ||
| 3475 | @item | ||
| 3476 | The above grammar does not explicitly mention the syntax of function | ||
| 3477 | calls: SMIE will automatically allow any sequence of sexps, such as | ||
| 3478 | identifiers, balanced parentheses, or @code{begin ... end} blocks | ||
| 3479 | to appear anywhere anyway. | ||
| 3480 | @item | ||
| 3481 | The grammar category @code{id} has no right hand side: this does not | ||
| 3482 | mean that it can match only the empty string, since as mentioned any | ||
| 3483 | sequence of sexps can appear anywhere anyway. | ||
| 3484 | @item | ||
| 3485 | Because non terminals cannot appear consecutively in the BNF grammar, it | ||
| 3486 | is difficult to correctly handle tokens that act as terminators, so the | ||
| 3487 | above grammar treats @code{";"} as a statement @emph{separator} instead, | ||
| 3488 | which SMIE can handle very well. | ||
| 3489 | @item | ||
| 3490 | Separators used in sequences (such as @code{","} and @code{";"} above) | ||
| 3491 | are best defined with BNF rules such as @code{(foo (foo "separator" foo) ...)} | ||
| 3492 | which generate precedence conflicts which are then resolved by giving | ||
| 3493 | them an explicit @code{(assoc "separator")}. | ||
| 3494 | @item | ||
| 3495 | The @code{("(" exps ")")} rule was not needed to pair up parens, since | ||
| 3496 | SMIE will pair up any characters that are marked as having paren syntax | ||
| 3497 | in the syntax table. What this rule does instead (together with the | ||
| 3498 | definition of @code{exps}) is to make it clear that @code{","} should | ||
| 3499 | not appear outside of parentheses. | ||
| 3500 | @item | ||
| 3501 | Rather than have a single @emph{precs} table to resolve conflicts, it is | ||
| 3502 | preferable to have several tables, so as to let the BNF part of the | ||
| 3503 | grammar specify relative precedences where possible. | ||
| 3504 | @item | ||
| 3505 | Unless there is a very good reason to prefer @code{left} or | ||
| 3506 | @code{right}, it is usually preferable to mark operators as associative, | ||
| 3507 | using @code{assoc}. For that reason @code{"+"} and @code{"*"} are | ||
| 3508 | defined above as @code{assoc}, although the language defines them | ||
| 3509 | formally as left associative. | ||
| 3510 | @end itemize | ||
| 3511 | |||
| 3512 | @node SMIE Lexer | ||
| 3513 | @subsubsection Defining Tokens | ||
| 3514 | |||
| 3515 | SMIE comes with a predefined lexical analyzer which uses syntax tables | ||
| 3516 | in the following way: any sequence of characters that have word or | ||
| 3517 | symbol syntax is considered a token, and so is any sequence of | ||
| 3518 | characters that have punctuation syntax. This default lexer is | ||
| 3519 | often a good starting point but is rarely actually correct for any given | ||
| 3520 | language. For example, it will consider @code{"2,+3"} to be composed | ||
| 3521 | of 3 tokens: @code{"2"}, @code{",+"}, and @code{"3"}. | ||
| 3522 | |||
| 3523 | To describe the lexing rules of your language to SMIE, you need | ||
| 3524 | 2 functions, one to fetch the next token, and another to fetch the | ||
| 3525 | previous token. Those functions will usually first skip whitespace and | ||
| 3526 | comments and then look at the next chunk of text to see if it | ||
| 3527 | is a special token. If so it should skip the token and | ||
| 3528 | return a description of this token. Usually this is simply the string | ||
| 3529 | extracted from the buffer, but it can be anything you want. | ||
| 3530 | For example: | ||
| 3531 | @example | ||
| 3532 | @group | ||
| 3533 | (defvar sample-keywords-regexp | ||
| 3534 | (regexp-opt '("+" "*" "," ";" ">" ">=" "<" "<=" ":=" "="))) | ||
| 3535 | @end group | ||
| 3536 | @group | ||
| 3537 | (defun sample-smie-forward-token () | ||
| 3538 | (forward-comment (point-max)) | ||
| 3539 | (cond | ||
| 3540 | ((looking-at sample-keywords-regexp) | ||
| 3541 | (goto-char (match-end 0)) | ||
| 3542 | (match-string-no-properties 0)) | ||
| 3543 | (t (buffer-substring-no-properties | ||
| 3544 | (point) | ||
| 3545 | (progn (skip-syntax-forward "w_") | ||
| 3546 | (point)))))) | ||
| 3547 | @end group | ||
| 3548 | @group | ||
| 3549 | (defun sample-smie-backward-token () | ||
| 3550 | (forward-comment (- (point))) | ||
| 3551 | (cond | ||
| 3552 | ((looking-back sample-keywords-regexp (- (point) 2) t) | ||
| 3553 | (goto-char (match-beginning 0)) | ||
| 3554 | (match-string-no-properties 0)) | ||
| 3555 | (t (buffer-substring-no-properties | ||
| 3556 | (point) | ||
| 3557 | (progn (skip-syntax-backward "w_") | ||
| 3558 | (point)))))) | ||
| 3559 | @end group | ||
| 3560 | @end example | ||
| 3561 | |||
| 3562 | Notice how those lexers return the empty string when in front of | ||
| 3563 | parentheses. This is because SMIE automatically takes care of the | ||
| 3564 | parentheses defined in the syntax table. More specifically if the lexer | ||
| 3565 | returns nil or an empty string, SMIE tries to handle the corresponding | ||
| 3566 | text as a sexp according to syntax tables. | ||
| 3567 | |||
| 3568 | @node SMIE Tricks | ||
| 3569 | @subsubsection Living With a Weak Parser | ||
| 3570 | |||
| 3571 | The parsing technique used by SMIE does not allow tokens to behave | ||
| 3572 | differently in different contexts. For most programming languages, this | ||
| 3573 | manifests itself by precedence conflicts when converting the | ||
| 3574 | BNF grammar. | ||
| 3575 | |||
| 3576 | Sometimes, those conflicts can be worked around by expressing the | ||
| 3577 | grammar slightly differently. For example, for Modula-2 it might seem | ||
| 3578 | natural to have a BNF grammar that looks like this: | ||
| 3579 | |||
| 3580 | @example | ||
| 3581 | ... | ||
| 3582 | (inst ("IF" exp "THEN" insts "ELSE" insts "END") | ||
| 3583 | ("CASE" exp "OF" cases "END") | ||
| 3584 | ...) | ||
| 3585 | (cases (cases "|" cases) (caselabel ":" insts) ("ELSE" insts)) | ||
| 3586 | ... | ||
| 3587 | @end example | ||
| 3588 | |||
| 3589 | But this will create conflicts for @code{"ELSE"}: on the one hand, the | ||
| 3590 | IF rule implies (among many other things) that @code{"ELSE" = "END"}; | ||
| 3591 | but on the other hand, since @code{"ELSE"} appears within @code{cases}, | ||
| 3592 | which appears left of @code{"END"}, we also have @code{"ELSE" > "END"}. | ||
| 3593 | We can solve the conflict either by using: | ||
| 3594 | @example | ||
| 3595 | ... | ||
| 3596 | (inst ("IF" exp "THEN" insts "ELSE" insts "END") | ||
| 3597 | ("CASE" exp "OF" cases "END") | ||
| 3598 | ("CASE" exp "OF" cases "ELSE" insts "END") | ||
| 3599 | ...) | ||
| 3600 | (cases (cases "|" cases) (caselabel ":" insts)) | ||
| 3601 | ... | ||
| 3602 | @end example | ||
| 3603 | or | ||
| 3604 | @example | ||
| 3605 | ... | ||
| 3606 | (inst ("IF" exp "THEN" else "END") | ||
| 3607 | ("CASE" exp "OF" cases "END") | ||
| 3608 | ...) | ||
| 3609 | (else (insts "ELSE" insts)) | ||
| 3610 | (cases (cases "|" cases) (caselabel ":" insts) (else)) | ||
| 3611 | ... | ||
| 3612 | @end example | ||
| 3613 | |||
| 3614 | Reworking the grammar to try and solve conflicts has its downsides, tho, | ||
| 3615 | because SMIE assumes that the grammar reflects the logical structure of | ||
| 3616 | the code, so it is preferable to keep the BNF closer to the intended | ||
| 3617 | abstract syntax tree. | ||
| 3618 | |||
| 3619 | Other times, after careful consideration you may conclude that those | ||
| 3620 | conflicts are not serious and simply resolve them via the | ||
| 3621 | @var{resolvers} argument of @code{smie-bnf->prec2}. Usually this is | ||
| 3622 | because the grammar is simply ambiguous: the conflict does not affect | ||
| 3623 | the set of programs described by the grammar, but only the way those | ||
| 3624 | programs are parsed. This is typically the case for separators and | ||
| 3625 | associative infix operators, where you want to add a resolver like | ||
| 3626 | @code{'((assoc "|"))}. Another case where this can happen is for the | ||
| 3627 | classic @emph{dangling else} problem, where you will use @code{'((assoc | ||
| 3628 | "else" "then"))}. It can also happen for cases where the conflict is | ||
| 3629 | real and cannot really be resolved, but it is unlikely to pose a problem | ||
| 3630 | in practice. | ||
| 3631 | |||
| 3632 | Finally, in many cases some conflicts will remain despite all efforts to | ||
| 3633 | restructure the grammar. Do not despair: while the parser cannot be | ||
| 3634 | made more clever, you can make the lexer as smart as you want. So, the | ||
| 3635 | solution is then to look at the tokens involved in the conflict and to | ||
| 3636 | split one of those tokens into 2 (or more) different tokens. E.g. if | ||
| 3637 | the grammar needs to distinguish between two incompatible uses of the | ||
| 3638 | token @code{"begin"}, make the lexer return different tokens (say | ||
| 3639 | @code{"begin-fun"} and @code{"begin-plain"}) depending on which kind of | ||
| 3640 | @code{"begin"} it finds. This pushes the work of distinguishing the | ||
| 3641 | different cases to the lexer, which will thus have to look at the | ||
| 3642 | surrounding text to find ad-hoc clues. | ||
| 3643 | |||
| 3644 | @node SMIE Indentation | ||
| 3645 | @subsubsection Specifying Indentation Rules | ||
| 3646 | |||
| 3647 | Based on the provided grammar, SMIE will be able to provide automatic | ||
| 3648 | indentation without any extra effort. But in practice, this default | ||
| 3649 | indentation style will probably not be good enough. You will want to | ||
| 3650 | tweak it in many different cases. | ||
| 3651 | |||
| 3652 | SMIE indentation is based on the idea that indentation rules should be | ||
| 3653 | as local as possible. To this end, it relies on the idea of | ||
| 3654 | @emph{virtual} indentation, which is the indentation that a particular | ||
| 3655 | program point would have if it were at the beginning of a line. | ||
| 3656 | Of course, if that program point is indeed at the beginning of a line, | ||
| 3657 | its virtual indentation is its current indentation. But if not, then | ||
| 3658 | SMIE uses the indentation algorithm to compute the virtual indentation | ||
| 3659 | of that point. Now in practice, the virtual indentation of a program | ||
| 3660 | point does not have to be identical to the indentation it would have if | ||
| 3661 | we inserted a newline before it. To see how this works, the SMIE rule | ||
| 3662 | for indentation after a @code{@{} in C does not care whether the | ||
| 3663 | @code{@{} is standing on a line of its own or is at the end of the | ||
| 3664 | preceding line. Instead, these different cases are handled in the | ||
| 3665 | indentation rule that decides how to indent before a @code{@{}. | ||
| 3666 | |||
| 3667 | Another important concept is the notion of @emph{parent}: The | ||
| 3668 | @emph{parent} of a token, is the head token of the nearest enclosing | ||
| 3669 | syntactic construct. For example, the parent of an @code{else} is the | ||
| 3670 | @code{if} to which it belongs, and the parent of an @code{if}, in turn, | ||
| 3671 | is the lead token of the surrounding construct. The command | ||
| 3672 | @code{backward-sexp} jumps from a token to its parent, but there are | ||
| 3673 | some caveats: for @emph{openers} (tokens which start a construct, like | ||
| 3674 | @code{if}), you need to start with point before the token, while for | ||
| 3675 | others you need to start with point after the token. | ||
| 3676 | @code{backward-sexp} stops with point before the parent token if that is | ||
| 3677 | the @emph{opener} of the token of interest, and otherwise it stops with | ||
| 3678 | point after the parent token. | ||
| 3679 | |||
| 3680 | SMIE indentation rules are specified using a function that takes two | ||
| 3681 | arguments @var{method} and @var{arg} where the meaning of @var{arg} and the | ||
| 3682 | expected return value depend on @var{method}. | ||
| 3683 | |||
| 3684 | @var{method} can be: | ||
| 3685 | @itemize | ||
| 3686 | @item | ||
| 3687 | @code{:after}, in which case @var{arg} is a token and the function | ||
| 3688 | should return the @var{offset} to use for indentation after @var{arg}. | ||
| 3689 | @item | ||
| 3690 | @code{:before}, in which case @var{arg} is a token and the function | ||
| 3691 | should return the @var{offset} to use to indent @var{arg} itself. | ||
| 3692 | @item | ||
| 3693 | @code{:elem}, in which case the function should return either the offset | ||
| 3694 | to use to indent function arguments (if @var{arg} is the symbol | ||
| 3695 | @code{arg}) or the basic indentation step (if @var{arg} is the symbol | ||
| 3696 | @code{basic}). | ||
| 3697 | @item | ||
| 3698 | @code{:list-intro}, in which case @var{arg} is a token and the function | ||
| 3699 | should return non-@code{nil} if the token is followed by a list of | ||
| 3700 | expressions (not separated by any token) rather than an expression. | ||
| 3701 | @end itemize | ||
| 3702 | |||
| 3703 | When @var{arg} is a token, the function is called with point just before | ||
| 3704 | that token. A return value of nil always means to fallback on the | ||
| 3705 | default behavior, so the function should return nil for arguments it | ||
| 3706 | does not expect. | ||
| 3707 | |||
| 3708 | @var{offset} can be: | ||
| 3709 | @itemize | ||
| 3710 | @item | ||
| 3711 | @code{nil}: use the default indentation rule. | ||
| 3712 | @item | ||
| 3713 | @code{(column . @var{column})}: indent to column @var{column}. | ||
| 3714 | @item | ||
| 3715 | @var{number}: offset by @var{number}, relative to a base token which is | ||
| 3716 | the current token for @code{:after} and its parent for @code{:before}. | ||
| 3717 | @end itemize | ||
| 3718 | |||
| 3719 | @node SMIE Indentation Helpers | ||
| 3720 | @subsubsection Helper Functions for Indentation Rules | ||
| 3721 | |||
| 3722 | SMIE provides various functions designed specifically for use in the | ||
| 3723 | indentation rules function (several of those functions break if used in | ||
| 3724 | another context). These functions all start with the prefix | ||
| 3725 | @code{smie-rule-}. | ||
| 3726 | |||
| 3727 | @defun smie-rule-bolp | ||
| 3728 | Return non-@code{nil} if the current token is the first on the line. | ||
| 3729 | @end defun | ||
| 3730 | |||
| 3731 | @defun smie-rule-hanging-p | ||
| 3732 | Return non-@code{nil} if the current token is @emph{hanging}. | ||
| 3733 | A token is @emph{hanging} if it is the last token on the line | ||
| 3734 | and if it is preceded by other tokens: a lone token on a line is not | ||
| 3735 | hanging. | ||
| 3736 | @end defun | ||
| 3737 | |||
| 3738 | @defun smie-rule-next-p &rest tokens | ||
| 3739 | Return non-@code{nil} if the next token is among @var{tokens}. | ||
| 3740 | @end defun | ||
| 3741 | |||
| 3742 | @defun smie-rule-prev-p &rest tokens | ||
| 3743 | Return non-@code{nil} if the previous token is among @var{tokens}. | ||
| 3744 | @end defun | ||
| 3745 | |||
| 3746 | @defun smie-rule-parent-p &rest parents | ||
| 3747 | Return non-@code{nil} if the current token's parent is among @var{parents}. | ||
| 3748 | @end defun | ||
| 3749 | |||
| 3750 | @defun smie-rule-sibling-p | ||
| 3751 | Return non-nil if the current token's parent is actually a sibling. | ||
| 3752 | This is the case for example when the parent of a @code{","} is just the | ||
| 3753 | previous @code{","}. | ||
| 3754 | @end defun | ||
| 3755 | |||
| 3756 | @defun smie-rule-parent &optional offset | ||
| 3757 | Return the proper offset to align the current token with the parent. | ||
| 3758 | If non-@code{nil}, @var{offset} should be an integer giving an | ||
| 3759 | additional offset to apply. | ||
| 3760 | @end defun | ||
| 3761 | |||
| 3762 | @defun smie-rule-separator method | ||
| 3763 | Indent current token as a @emph{separator}. | ||
| 3764 | |||
| 3765 | By @emph{separator}, we mean here a token whose sole purpose is to | ||
| 3766 | separate various elements within some enclosing syntactic construct, and | ||
| 3767 | which does not have any semantic significance in itself (i.e. it would | ||
| 3768 | typically not exist as a node in an abstract syntax tree). | ||
| 3769 | |||
| 3770 | Such a token is expected to have an associative syntax and be closely | ||
| 3771 | tied to its syntactic parent. Typical examples are @code{","} in lists | ||
| 3772 | of arguments (enclosed inside parentheses), or @code{";"} in sequences | ||
| 3773 | of instructions (enclosed in a @code{@{...@}} or @code{begin...end} | ||
| 3774 | block). | ||
| 3775 | |||
| 3776 | @var{method} should be the method name that was passed to | ||
| 3777 | `smie-rules-function'. | ||
| 3778 | @end defun | ||
| 3779 | |||
| 3780 | @node SMIE Indentation Example | ||
| 3781 | @subsubsection Sample Indentation Rules | ||
| 3782 | |||
| 3783 | Here is an example of an indentation function: | ||
| 3784 | |||
| 3785 | @example | ||
| 3786 | (defun sample-smie-rules (kind token) | ||
| 3787 | (pcase (cons kind token) | ||
| 3788 | (`(:elem . basic) sample-indent-basic) | ||
| 3789 | (`(,_ . ",") (smie-rule-separator kind)) | ||
| 3790 | (`(:after . ":=") sample-indent-basic) | ||
| 3791 | (`(:before . ,(or `"begin" `"(" `"@{"))) | ||
| 3792 | (if (smie-rule-hanging-p) (smie-rule-parent))) | ||
| 3793 | (`(:before . "if") | ||
| 3794 | (and (not (smie-rule-bolp)) (smie-rule-prev-p "else") | ||
| 3795 | (smie-rule-parent))))) | ||
| 3796 | @end example | ||
| 3797 | |||
| 3798 | @noindent | ||
| 3799 | A few things to note: | ||
| 3800 | |||
| 3801 | @itemize | ||
| 3802 | @item | ||
| 3803 | The first case indicates the basic indentation increment to use. | ||
| 3804 | If @code{sample-indent-basic} is nil, then SMIE uses the global | ||
| 3805 | setting @code{smie-indent-basic}. The major mode could have set | ||
| 3806 | @code{smie-indent-basic} buffer-locally instead, but that | ||
| 3807 | is discouraged. | ||
| 3808 | |||
| 3809 | @item | ||
| 3810 | The rule for the token @code{","} make SMIE try to be more clever when | ||
| 3811 | the comma separator is placed at the beginning of lines. It tries to | ||
| 3812 | outdent the separator so as to align the code after the comma; for | ||
| 3813 | example: | ||
| 3814 | |||
| 3815 | @example | ||
| 3816 | x = longfunctionname ( | ||
| 3817 | arg1 | ||
| 3818 | , arg2 | ||
| 3819 | ); | ||
| 3820 | @end example | ||
| 3821 | |||
| 3822 | @item | ||
| 3823 | The rule for indentation after @code{":="} exists because otherwise | ||
| 3824 | SMIE would treat @code{":="} as an infix operator and would align the | ||
| 3825 | right argument with the left one. | ||
| 3826 | |||
| 3827 | @item | ||
| 3828 | The rule for indentation before @code{"begin"} is an example of the use | ||
| 3829 | of virtual indentation: This rule is used only when @code{"begin"} is | ||
| 3830 | hanging, which can happen only when @code{"begin"} is not at the | ||
| 3831 | beginning of a line. So this is not used when indenting | ||
| 3832 | @code{"begin"} itself but only when indenting something relative to this | ||
| 3833 | @code{"begin"}. Concretely, this rule changes the indentation from: | ||
| 3834 | |||
| 3835 | @example | ||
| 3836 | if x > 0 then begin | ||
| 3837 | dosomething(x); | ||
| 3838 | end | ||
| 3839 | @end example | ||
| 3840 | to | ||
| 3841 | @example | ||
| 3842 | if x > 0 then begin | ||
| 3843 | dosomething(x); | ||
| 3844 | end | ||
| 3845 | @end example | ||
| 3846 | |||
| 3847 | @item | ||
| 3848 | The rule for indentation before @code{"if"} is similar to the one for | ||
| 3849 | @code{"begin"}, but where the purpose is to treat @code{"else if"} | ||
| 3850 | as a single unit, so as to align a sequence of tests rather than indent | ||
| 3851 | each test further to the right. This function does this only in the | ||
| 3852 | case where the @code{"if"} is not placed on a separate line, hence the | ||
| 3853 | @code{smie-rule-bolp} test. | ||
| 3854 | |||
| 3855 | If we know that the @code{"else"} is always aligned with its @code{"if"} | ||
| 3856 | and is always at the beginning of a line, we can use a more efficient | ||
| 3857 | rule: | ||
| 3858 | @example | ||
| 3859 | ((equal token "if") | ||
| 3860 | (and (not (smie-rule-bolp)) (smie-rule-prev-p "else") | ||
| 3861 | (save-excursion | ||
| 3862 | (sample-smie-backward-token) ;Jump before the "else". | ||
| 3863 | (cons 'column (current-column))))) | ||
| 3864 | @end example | ||
| 3865 | |||
| 3866 | The advantage of this formulation is that it reuses the indentation of | ||
| 3867 | the previous @code{"else"}, rather than going all the way back to the | ||
| 3868 | first @code{"if"} of the sequence. | ||
| 3869 | @end itemize | ||
| 3870 | |||
| 3226 | @node Desktop Save Mode | 3871 | @node Desktop Save Mode |
| 3227 | @section Desktop Save Mode | 3872 | @section Desktop Save Mode |
| 3228 | @cindex desktop save mode | 3873 | @cindex desktop save mode |
| @@ -3276,5 +3921,7 @@ optionally bound to @code{desktop-save-buffer}. | |||
| 3276 | @end defvar | 3921 | @end defvar |
| 3277 | 3922 | ||
| 3278 | @ignore | 3923 | @ignore |
| 3279 | arch-tag: 4c7bff41-36e6-4da6-9e7f-9b9289e27c8e | 3924 | Local Variables: |
| 3925 | fill-column: 72 | ||
| 3926 | End: | ||
| 3280 | @end ignore | 3927 | @end ignore |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 89f97f99de3..cb67d628947 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -195,10 +195,18 @@ a shell command: | |||
| 195 | @end example | 195 | @end example |
| 196 | @end defun | 196 | @end defun |
| 197 | 197 | ||
| 198 | @cindex quoting and unquoting shell command line | 198 | @cindex quoting and unquoting command-line arguments |
| 199 | The following two functions are useful for creating shell commands | 199 | @cindex minibuffer input, and command-line arguments |
| 200 | from individual argument strings, and taking shell command lines apart | 200 | @cindex @code{call-process}, command-line arguments from minibuffer |
| 201 | into individual arguments. | 201 | @cindex @code{start-process}, command-line arguments from minibuffer |
| 202 | The following two functions are useful for combining a list of | ||
| 203 | individual command-line argument strings into a single string, and | ||
| 204 | taking a string apart into a list of individual command-line | ||
| 205 | arguments. These functions are mainly intended to be used for | ||
| 206 | converting user input in the minibuffer, a Lisp string, into a list of | ||
| 207 | string arguments to be passed to @code{call-process} or | ||
| 208 | @code{start-process}, or for the converting such lists of arguments in | ||
| 209 | a single Lisp string to be presented in the minibuffer or echo area. | ||
| 202 | 210 | ||
| 203 | @defun split-string-and-unquote string &optional separators | 211 | @defun split-string-and-unquote string &optional separators |
| 204 | This function splits @var{string} into substrings at matches for the | 212 | This function splits @var{string} into substrings at matches for the |
| @@ -210,7 +218,7 @@ If @var{separators} is omitted or @code{nil}, it defaults to | |||
| 210 | @code{"\\s-+"}, which is a regular expression that matches one or more | 218 | @code{"\\s-+"}, which is a regular expression that matches one or more |
| 211 | characters with whitespace syntax (@pxref{Syntax Class Table}). | 219 | characters with whitespace syntax (@pxref{Syntax Class Table}). |
| 212 | 220 | ||
| 213 | This function performs two types of quoting: enclosing a whole string | 221 | This function supports two types of quoting: enclosing a whole string |
| 214 | in double quotes @code{"@dots{}"}, and quoting individual characters | 222 | in double quotes @code{"@dots{}"}, and quoting individual characters |
| 215 | with a backslash escape @samp{\}. The latter is also used in Lisp | 223 | with a backslash escape @samp{\}. The latter is also used in Lisp |
| 216 | strings, so this function can handle those as well. | 224 | strings, so this function can handle those as well. |
| @@ -226,9 +234,8 @@ resulting string. | |||
| 226 | The strings in @var{list-of-strings} that need quoting are those that | 234 | The strings in @var{list-of-strings} that need quoting are those that |
| 227 | include @var{separator} as their substring. Quoting a string encloses | 235 | include @var{separator} as their substring. Quoting a string encloses |
| 228 | it in double quotes @code{"@dots{}"}. In the simplest case, if you | 236 | it in double quotes @code{"@dots{}"}. In the simplest case, if you |
| 229 | are consing a shell command from the individual command-line | 237 | are consing a command from the individual command-line arguments, |
| 230 | arguments, every argument that includes embedded blanks will be | 238 | every argument that includes embedded blanks will be quoted. |
| 231 | quoted. | ||
| 232 | @end defun | 239 | @end defun |
| 233 | 240 | ||
| 234 | @node Synchronous Processes | 241 | @node Synchronous Processes |
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 94d2765a833..cc74c2cbf8a 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi | |||
| @@ -348,9 +348,9 @@ practice: | |||
| 348 | @result{} ("o" "o" "o") | 348 | @result{} ("o" "o" "o") |
| 349 | @end example | 349 | @end example |
| 350 | 350 | ||
| 351 | If you need to split a string that is a shell command, where | 351 | If you need to split a string into a list of individual command-line |
| 352 | individual arguments could be quoted, see @ref{Shell Arguments, | 352 | arguments suitable for @code{call-process} or @code{start-process}, |
| 353 | split-string-and-unquote}. | 353 | see @ref{Shell Arguments, split-string-and-unquote}. |
| 354 | @end defun | 354 | @end defun |
| 355 | 355 | ||
| 356 | @defvar split-string-default-separators | 356 | @defvar split-string-default-separators |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 45d358366de..3c14a8cf5db 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -2203,11 +2203,11 @@ The functions in this section return unpredictable values. | |||
| 2203 | @defvar indent-line-function | 2203 | @defvar indent-line-function |
| 2204 | This variable's value is the function to be used by @key{TAB} (and | 2204 | This variable's value is the function to be used by @key{TAB} (and |
| 2205 | various commands) to indent the current line. The command | 2205 | various commands) to indent the current line. The command |
| 2206 | @code{indent-according-to-mode} does no more than call this function. | 2206 | @code{indent-according-to-mode} does little more than call this function. |
| 2207 | 2207 | ||
| 2208 | In Lisp mode, the value is the symbol @code{lisp-indent-line}; in C | 2208 | In Lisp mode, the value is the symbol @code{lisp-indent-line}; in C |
| 2209 | mode, @code{c-indent-line}; in Fortran mode, @code{fortran-indent-line}. | 2209 | mode, @code{c-indent-line}; in Fortran mode, @code{fortran-indent-line}. |
| 2210 | The default value is @code{indent-relative}. | 2210 | The default value is @code{indent-relative}. @xref{Auto-Indentation}. |
| 2211 | @end defvar | 2211 | @end defvar |
| 2212 | 2212 | ||
| 2213 | @deffn Command indent-according-to-mode | 2213 | @deffn Command indent-according-to-mode |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 174d3015291..d7d5618ae8d 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-12-13 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * cl.texi (For Clauses): Small fixes for frames and windows. | ||
| 4 | |||
| 5 | 2010-12-13 Glenn Morris <rgm@gnu.org> | ||
| 1 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | 6 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> |
| 2 | 7 | ||
| 3 | * org.texi (Using capture): Document using prefix arguments for | 8 | * org.texi (Using capture): Document using prefix arguments for |
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index 79038792a3e..4d7ebadff34 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi | |||
| @@ -2494,15 +2494,18 @@ term restricts the search to just the specified property. The | |||
| 2494 | @code{of} term may specify either a buffer or a string. | 2494 | @code{of} term may specify either a buffer or a string. |
| 2495 | 2495 | ||
| 2496 | @item for @var{var} being the frames | 2496 | @item for @var{var} being the frames |
| 2497 | This clause iterates over all frames, i.e., X window system windows | 2497 | This clause iterates over all Emacs frames. The clause @code{screens} is |
| 2498 | open on Emacs files. The | 2498 | a synonym for @code{frames}. The frames are visited in |
| 2499 | clause @code{screens} is a synonym for @code{frames}. The frames | 2499 | @code{next-frame} order starting from @code{selected-frame}. |
| 2500 | are visited in @code{next-frame} order starting from | ||
| 2501 | @code{selected-frame}. | ||
| 2502 | 2500 | ||
| 2503 | @item for @var{var} being the windows [of @var{frame}] | 2501 | @item for @var{var} being the windows [of @var{frame}] |
| 2504 | This clause iterates over the windows (in the Emacs sense) of | 2502 | This clause iterates over the windows (in the Emacs sense) of |
| 2505 | the current frame, or of the specified @var{frame}. | 2503 | the current frame, or of the specified @var{frame}. It visits windows |
| 2504 | in @code{next-window} order starting from @code{selected-window} | ||
| 2505 | (or @code{frame-selected-window} if you specify @var{frame}). | ||
| 2506 | This clause treats the minibuffer window in the same way as | ||
| 2507 | @code{next-window} does. For greater flexibility, consider using | ||
| 2508 | @code{walk-windows} instead. | ||
| 2506 | 2509 | ||
| 2507 | @item for @var{var} being the buffers | 2510 | @item for @var{var} being the buffers |
| 2508 | This clause iterates over all buffers in Emacs. It is equivalent | 2511 | This clause iterates over all buffers in Emacs. It is equivalent |
| @@ -5322,6 +5325,3 @@ recursion. | |||
| 5322 | 5325 | ||
| 5323 | @bye | 5326 | @bye |
| 5324 | 5327 | ||
| 5325 | @ignore | ||
| 5326 | arch-tag: b61e7200-3bfa-4a70-a9d3-095e152696f8 | ||
| 5327 | @end ignore | ||