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 | |
| parent | 07176b2a9e63a0d3933b167f987475d8a18da5cc (diff) | |
| parent | 11aad4e9f9f54ce8e9ecc66347e512b20a3cdf39 (diff) | |
| download | emacs-f49d1f52b2e368ef67dcfececd426de958548f4e.tar.gz emacs-f49d1f52b2e368ef67dcfececd426de958548f4e.zip | |
Merge from emacs-23
51 files changed, 1551 insertions, 436 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 | ||
diff --git a/etc/ChangeLog b/etc/ChangeLog index eba8529f63d..6fd4b35b810 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-12-13 W. Martin Borgert <debacle@debian.org> (tiny change) | ||
| 2 | |||
| 3 | * schema/schemas.xml: Add DocBook (Bug#7491). | ||
| 4 | |||
| 5 | 2010-12-13 Ulrich Mueller <ulm@gentoo.org> | ||
| 1 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> | 6 | 2010-12-11 Carsten Dominik <carsten.dominik@gmail.com> |
| 2 | 7 | ||
| 3 | * refcards/orgcard.tex: Cleanup. | 8 | * refcards/orgcard.tex: Cleanup. |
diff --git a/etc/schema/schemas.xml b/etc/schema/schemas.xml index 314bdf1145f..f79d107e2df 100644 --- a/etc/schema/schemas.xml +++ b/etc/schema/schemas.xml | |||
| @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. --> | |||
| 22 | <uri pattern="*.html" typeId="XHTML"/> | 22 | <uri pattern="*.html" typeId="XHTML"/> |
| 23 | <uri pattern="*.rng" typeId="RELAX NG"/> | 23 | <uri pattern="*.rng" typeId="RELAX NG"/> |
| 24 | <uri pattern="*.rdf" typeId="RDF"/> | 24 | <uri pattern="*.rdf" typeId="RDF"/> |
| 25 | <uri pattern="*.dbk" typeId="DocBook"/> | ||
| 25 | 26 | ||
| 26 | <namespace ns="http://www.w3.org/1999/XSL/Transform" typeId="XSLT"/> | 27 | <namespace ns="http://www.w3.org/1999/XSL/Transform" typeId="XSLT"/> |
| 27 | <namespace ns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" typeId="RDF"/> | 28 | <namespace ns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" typeId="RDF"/> |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b0fab21cc9..e4310dd5fe8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,137 @@ | |||
| 1 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * subr.el (posn-col-row): Evaluate header-line-format in the | ||
| 4 | context of the POSITION window's buffer. | ||
| 5 | |||
| 6 | 2010-12-13 Glenn Morris <rgm@gnu.org> | ||
| 7 | |||
| 8 | * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1) | ||
| 9 | (with-silent-modifications): Doc fixes. | ||
| 10 | |||
| 11 | 2010-12-13 Michael Albinus <michael.albinus@gmx.de> | ||
| 12 | |||
| 13 | * net/tramp.el (tramp-action-password, tramp-process-actions): | ||
| 14 | Revert patch from 2010-12-08. Use `save-restriction'. | ||
| 15 | |||
| 16 | 2010-12-13 Stephen Berman <stephen.berman@gmx.net> | ||
| 17 | |||
| 18 | * calendar/diary-lib.el (diary-list-sexp-entries): | ||
| 19 | Handle case of no newline at end of file. (Bug#7536) | ||
| 20 | |||
| 21 | 2010-12-13 Glenn Morris <rgm@gnu.org> | ||
| 22 | |||
| 23 | * mail/smtpmail.el (smtpmail-send-it): Revert previous change. | ||
| 24 | |||
| 25 | 2010-12-13 Michael Albinus <michael.albinus@gmx.de> | ||
| 26 | |||
| 27 | * net/tramp.el (tramp-action-password): Delete region, do not narrow. | ||
| 28 | (tramp-process-actions): Do not widen. | ||
| 29 | * net/tramp-sh.el (tramp-sh-handle-start-file-process): | ||
| 30 | Protect buffer-modified value. (Bug#7557) | ||
| 31 | |||
| 32 | 2010-12-13 Jan Moringen <jmoringe@techfak.uni-bielefeld.de> | ||
| 33 | |||
| 34 | * log-edit.el (log-edit-changelog-entries): | ||
| 35 | Regexp quote filename. (Bug#7505) | ||
| 36 | |||
| 37 | 2010-12-13 Tom Breton <tehom@panix.com> | ||
| 38 | |||
| 39 | * cus-edit.el (custom-save-all): | ||
| 40 | Bind print-length and print-level to nil. (Bug#7581) | ||
| 41 | |||
| 42 | 2010-12-13 Glenn Morris <rgm@gnu.org> | ||
| 43 | |||
| 44 | * mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map): | ||
| 45 | Run hooks to update menu contents. (Bug#7586) | ||
| 46 | |||
| 47 | * mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued | ||
| 48 | file names, for the sake of MS Windows. (Bug#7588) | ||
| 49 | |||
| 50 | 2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 51 | |||
| 52 | * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains | ||
| 53 | empty lines without a leading space. | ||
| 54 | |||
| 55 | 2010-12-13 Leo <sdl.web@gmail.com> | ||
| 56 | |||
| 57 | * dired-aux.el (dired-do-redisplay): Postpone dired-after-readin-hook | ||
| 58 | while mapping over marks (Bug#6810). | ||
| 59 | |||
| 60 | 2010-12-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 61 | |||
| 62 | * image-dired.el (image-dired-db-file) | ||
| 63 | (image-dired-temp-image-file, image-dired-gallery-dir) | ||
| 64 | (image-dired-temp-rotate-image-file): Set default values relative | ||
| 65 | to image-dired-dir (Bug#7518). | ||
| 66 | |||
| 67 | 2010-12-13 Lawrence Mitchell <wence@gmx.li> | ||
| 68 | |||
| 69 | * format.el (format-decode-run-method): Pass args FROM and TO, not | ||
| 70 | point-min and point-max, to shell-command-on-region (Bug#7488). | ||
| 71 | |||
| 72 | 2010-12-13 Jan Djärv <jan.h.d@swipnet.se> | ||
| 73 | |||
| 74 | * frame.el (blink-cursor-mode): Make default t for ns. | ||
| 75 | |||
| 76 | 2010-12-13 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> | ||
| 77 | |||
| 78 | * vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501). | ||
| 79 | |||
| 80 | 2010-12-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 81 | |||
| 82 | * comint.el (comint-dynamic-list-input-ring) | ||
| 83 | (comint-dynamic-complete-filename) | ||
| 84 | (comint-replace-by-expanded-filename) | ||
| 85 | (comint-dynamic-simple-complete) | ||
| 86 | (comint-dynamic-list-filename-completions) | ||
| 87 | (comint-dynamic-list-completions): Doc fix (Bug#7499). | ||
| 88 | |||
| 89 | * subr.el (posn-x-y, posn-object-x-y, posn-object-width-height): | ||
| 90 | Doc fix (Bug#7471). | ||
| 91 | |||
| 92 | 2010-12-13 Martin Rudalics <rudalics@gmx.at> | ||
| 93 | |||
| 94 | * dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil | ||
| 95 | (Bug#7533). | ||
| 96 | |||
| 97 | 2010-12-13 W. Martin Borgert <debacle@debian.org> (tiny change) | ||
| 98 | |||
| 99 | * files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode. | ||
| 100 | (Bug#7491). | ||
| 101 | |||
| 102 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> | ||
| 103 | |||
| 104 | * files.el (file-relative-name): Handle UNC file names on | ||
| 105 | DOS/Windows. (Bug#4674) | ||
| 106 | |||
| 107 | 2010-12-13 Daiki Ueno <ueno@unixuser.org> | ||
| 108 | |||
| 109 | * epg.el (epg-digest-algorithm-alist): Replace "RMD160" with | ||
| 110 | "RIPEMD160" (Bug#7490). Reported by Daniel Kahn Gillmor. | ||
| 111 | (epg-context-set-passphrase-callback): Mention that the callback | ||
| 112 | is not called when used with GnuPG 2.x. | ||
| 113 | |||
| 114 | 2010-12-13 Glenn Morris <rgm@gnu.org> | ||
| 115 | |||
| 116 | * ps-print.el (ps-line-lengths-internal, ps-nb-pages): | ||
| 117 | Ensure ps-footer-font-size-internal is initialized. | ||
| 118 | Call ps-get-page-dimensions before trying to use ps-font-for-text. | ||
| 119 | |||
| 120 | 2010-12-13 Kenichi Handa <handa@m17n.org> | ||
| 121 | |||
| 122 | * mail/rmailmm.el (rmail-mime-parse): Call rmail-mime-process | ||
| 123 | within condition-case. | ||
| 124 | (rmail-show-mime): Don't use condition-case. | ||
| 125 | (rmail-search-mime-message): New function. | ||
| 126 | (rmail-search-mime-message-function): Set to | ||
| 127 | rmail-search-mime-message. | ||
| 128 | |||
| 129 | 2010-12-13 Leo <sdl.web@gmail.com> | ||
| 130 | |||
| 131 | * ido.el (ido-common-initialization): New function. (bug#3274) | ||
| 132 | (ido-mode): Use it. | ||
| 133 | (ido-completing-read): Call it. | ||
| 134 | |||
| 1 | 2010-12-12 Karl Fogel <kfogel@red-bean.com> | 135 | 2010-12-12 Karl Fogel <kfogel@red-bean.com> |
| 2 | 136 | ||
| 3 | * bookmark.el (bookmark-name-from-full-record): Rename back to | 137 | * bookmark.el (bookmark-name-from-full-record): Rename back to |
| @@ -437,17 +571,15 @@ | |||
| 437 | (rmail-mime-save): Handle the case that the button's `data' is a | 571 | (rmail-mime-save): Handle the case that the button's `data' is a |
| 438 | MIME entity. | 572 | MIME entity. |
| 439 | (rmail-mime-insert-text): New function. | 573 | (rmail-mime-insert-text): New function. |
| 440 | (rmail-mime-insert-image): Handle the case that DATA is a MIME | 574 | (rmail-mime-insert-image): Handle the case that DATA is a MIME entity. |
| 441 | entity. | ||
| 442 | (rmail-mime-bulk-handler): Just call rmail-mime-insert-bulk. | 575 | (rmail-mime-bulk-handler): Just call rmail-mime-insert-bulk. |
| 443 | (rmail-mime-insert-bulk): New function mostly copied from the old | 576 | (rmail-mime-insert-bulk): New function mostly copied from the old |
| 444 | rmail-mime-bulk-handler. | 577 | rmail-mime-bulk-handler. |
| 445 | (rmail-mime-multipart-handler): Just call | 578 | (rmail-mime-multipart-handler): Just call rmail-mime-process-multipart. |
| 446 | rmail-mime-process-multipart. | 579 | (rmail-mime-process-multipart): New function mostly copied from |
| 447 | (rmail-mime-process-multipart): New funciton mostly copied from | ||
| 448 | the old rmail-mime-multipart-handler. | 580 | the old rmail-mime-multipart-handler. |
| 449 | (rmail-mime-show): Just call rmail-mime-process. | 581 | (rmail-mime-show): Just call rmail-mime-process. |
| 450 | (rmail-mime-process): New funciton mostly copied from the old | 582 | (rmail-mime-process): New function mostly copied from the old |
| 451 | rmail-mime-show. | 583 | rmail-mime-show. |
| 452 | (rmail-mime-insert-multipart, rmail-mime-parse) | 584 | (rmail-mime-insert-multipart, rmail-mime-parse) |
| 453 | (rmail-mime-insert, rmail-show-mime) | 585 | (rmail-mime-insert, rmail-show-mime) |
| @@ -5911,7 +6043,7 @@ | |||
| 5911 | 2010-07-20 Michael R. Mauger <mmaug@yahoo.com> | 6043 | 2010-07-20 Michael R. Mauger <mmaug@yahoo.com> |
| 5912 | 6044 | ||
| 5913 | * progmodes/sql.el: Version 2.3. | 6045 | * progmodes/sql.el: Version 2.3. |
| 5914 | (sql-connection-alist): Changed keys from symbols to strings; | 6046 | (sql-connection-alist): Change keys from symbols to strings; |
| 5915 | enhanced the widget definition. | 6047 | enhanced the widget definition. |
| 5916 | (sql-mode-menu): Add submenu to select connections. | 6048 | (sql-mode-menu): Add submenu to select connections. |
| 5917 | (sql-interactive-mode-menu): Add "Save Connection" item. | 6049 | (sql-interactive-mode-menu): Add "Save Connection" item. |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 231c92f417d..869d69fd8b7 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -1764,7 +1764,7 @@ best if they are non-marking." | |||
| 1764 | (forward-line 1) | 1764 | (forward-line 1) |
| 1765 | (while (looking-at "[ \t]") | 1765 | (while (looking-at "[ \t]") |
| 1766 | (forward-line 1)) | 1766 | (forward-line 1)) |
| 1767 | (backward-char 1) | 1767 | (if (bolp) (backward-char 1)) |
| 1768 | (setq entry (buffer-substring-no-properties entry-start (point)))) | 1768 | (setq entry (buffer-substring-no-properties entry-start (point)))) |
| 1769 | (setq diary-entry (diary-sexp-entry sexp entry date) | 1769 | (setq diary-entry (diary-sexp-entry sexp entry date) |
| 1770 | literal entry ; before evaluation | 1770 | literal entry ; before evaluation |
diff --git a/lisp/comint.el b/lisp/comint.el index b4d06cefafb..bd563ee4592 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1009,7 +1009,7 @@ See also `comint-read-input-ring'." | |||
| 1009 | (choose-completion-string completion buffer))) | 1009 | (choose-completion-string completion buffer))) |
| 1010 | 1010 | ||
| 1011 | (defun comint-dynamic-list-input-ring () | 1011 | (defun comint-dynamic-list-input-ring () |
| 1012 | "List in help buffer the buffer's input history." | 1012 | "Display a list of recent inputs entered into the current buffer." |
| 1013 | (interactive) | 1013 | (interactive) |
| 1014 | (if (or (not (ring-p comint-input-ring)) | 1014 | (if (or (not (ring-p comint-input-ring)) |
| 1015 | (ring-empty-p comint-input-ring)) | 1015 | (ring-empty-p comint-input-ring)) |
| @@ -3003,7 +3003,7 @@ Completes if after a filename. See `comint-match-partial-filename' and | |||
| 3003 | This function is similar to `comint-replace-by-expanded-filename', except that | 3003 | This function is similar to `comint-replace-by-expanded-filename', except that |
| 3004 | it won't change parts of the filename already entered in the buffer; it just | 3004 | it won't change parts of the filename already entered in the buffer; it just |
| 3005 | adds completion characters to the end of the filename. A completions listing | 3005 | adds completion characters to the end of the filename. A completions listing |
| 3006 | may be shown in a help buffer if completion is ambiguous. | 3006 | may be shown in a separate buffer if completion is ambiguous. |
| 3007 | 3007 | ||
| 3008 | Completion is dependent on the value of `comint-completion-addsuffix', | 3008 | Completion is dependent on the value of `comint-completion-addsuffix', |
| 3009 | `comint-completion-recexact' and `comint-completion-fignore', and the timing of | 3009 | `comint-completion-recexact' and `comint-completion-fignore', and the timing of |
| @@ -3090,11 +3090,11 @@ See `comint-dynamic-complete-filename'. Returns t if successful." | |||
| 3090 | 3090 | ||
| 3091 | (defun comint-replace-by-expanded-filename () | 3091 | (defun comint-replace-by-expanded-filename () |
| 3092 | "Dynamically expand and complete the filename at point. | 3092 | "Dynamically expand and complete the filename at point. |
| 3093 | Replace the filename with an expanded, canonicalized and completed replacement. | 3093 | Replace the filename with an expanded, canonicalized and |
| 3094 | \"Expanded\" means environment variables (e.g., $HOME) and `~'s are replaced | 3094 | completed replacement, i.e. substituting environment |
| 3095 | with the corresponding directories. \"Canonicalized\" means `..' and `.' are | 3095 | variables (e.g. $HOME), `~'s, `..', and `.', and making the |
| 3096 | removed, and the filename is made absolute instead of relative. For expansion | 3096 | filename absolute. For expansion see `expand-file-name' and |
| 3097 | see `expand-file-name' and `substitute-in-file-name'. For completion see | 3097 | `substitute-in-file-name'. For completion see |
| 3098 | `comint-dynamic-complete-filename'." | 3098 | `comint-dynamic-complete-filename'." |
| 3099 | (interactive) | 3099 | (interactive) |
| 3100 | (let ((filename (comint-match-partial-filename))) | 3100 | (let ((filename (comint-match-partial-filename))) |
| @@ -3105,15 +3105,16 @@ see `expand-file-name' and `substitute-in-file-name'. For completion see | |||
| 3105 | 3105 | ||
| 3106 | (defun comint-dynamic-simple-complete (stub candidates) | 3106 | (defun comint-dynamic-simple-complete (stub candidates) |
| 3107 | "Dynamically complete STUB from CANDIDATES list. | 3107 | "Dynamically complete STUB from CANDIDATES list. |
| 3108 | This function inserts completion characters at point by completing STUB from | 3108 | This function inserts completion characters at point by |
| 3109 | the strings in CANDIDATES. A completions listing may be shown in a help buffer | 3109 | completing STUB from the strings in CANDIDATES. If completion is |
| 3110 | if completion is ambiguous. | 3110 | ambiguous, possibly show a completions listing in a separate |
| 3111 | buffer. | ||
| 3111 | 3112 | ||
| 3112 | Returns nil if no completion was inserted. | 3113 | Return nil if no completion was inserted. |
| 3113 | Returns `sole' if completed with the only completion match. | 3114 | Return `sole' if completed with the only completion match. |
| 3114 | Returns `shortest' if completed with the shortest of the completion matches. | 3115 | Return `shortest' if completed with the shortest match. |
| 3115 | Returns `partial' if completed as far as possible with the completion matches. | 3116 | Return `partial' if completed as far as possible. |
| 3116 | Returns `listed' if a completion listing was shown. | 3117 | Return `listed' if a completion listing was shown. |
| 3117 | 3118 | ||
| 3118 | See also `comint-dynamic-complete-filename'." | 3119 | See also `comint-dynamic-complete-filename'." |
| 3119 | (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) | 3120 | (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) |
| @@ -3161,7 +3162,7 @@ See also `comint-dynamic-complete-filename'." | |||
| 3161 | 3162 | ||
| 3162 | 3163 | ||
| 3163 | (defun comint-dynamic-list-filename-completions () | 3164 | (defun comint-dynamic-list-filename-completions () |
| 3164 | "List in help buffer possible completions of the filename at point." | 3165 | "Display a list of possible completions for the filename at point." |
| 3165 | (interactive) | 3166 | (interactive) |
| 3166 | (let* ((completion-ignore-case read-file-name-completion-ignore-case) | 3167 | (let* ((completion-ignore-case read-file-name-completion-ignore-case) |
| 3167 | ;; If we bind this, it breaks remote directory tracking in rlogin.el. | 3168 | ;; If we bind this, it breaks remote directory tracking in rlogin.el. |
| @@ -3190,9 +3191,9 @@ See also `comint-dynamic-complete-filename'." | |||
| 3190 | (defvar comint-dynamic-list-completions-config nil) | 3191 | (defvar comint-dynamic-list-completions-config nil) |
| 3191 | 3192 | ||
| 3192 | (defun comint-dynamic-list-completions (completions &optional common-substring) | 3193 | (defun comint-dynamic-list-completions (completions &optional common-substring) |
| 3193 | "List in help buffer sorted COMPLETIONS. | 3194 | "Display a list of sorted COMPLETIONS. |
| 3194 | The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'. | 3195 | The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'. |
| 3195 | Typing SPC flushes the help buffer." | 3196 | Typing SPC flushes the completions buffer." |
| 3196 | (let ((window (get-buffer-window "*Completions*" 0))) | 3197 | (let ((window (get-buffer-window "*Completions*" 0))) |
| 3197 | (setq completions (sort completions 'string-lessp)) | 3198 | (setq completions (sort completions 'string-lessp)) |
| 3198 | (if (and (eq last-command this-command) | 3199 | (if (and (eq last-command this-command) |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 61e6881139a..edb299f86ed 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -4426,7 +4426,9 @@ if only the first line of the docstring is shown.")) | |||
| 4426 | 4426 | ||
| 4427 | (unless (eq major-mode 'emacs-lisp-mode) | 4427 | (unless (eq major-mode 'emacs-lisp-mode) |
| 4428 | (emacs-lisp-mode)) | 4428 | (emacs-lisp-mode)) |
| 4429 | (let ((inhibit-read-only t)) | 4429 | (let ((inhibit-read-only t) |
| 4430 | (print-length nil) | ||
| 4431 | (print-level nil)) | ||
| 4430 | (custom-save-variables) | 4432 | (custom-save-variables) |
| 4431 | (custom-save-faces)) | 4433 | (custom-save-faces)) |
| 4432 | (let ((file-precious-flag t)) | 4434 | (let ((file-precious-flag t)) |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 764d13f5a9c..f269d89b1bd 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -1019,10 +1019,14 @@ See Info node `(emacs)Subdir switches' for more details." | |||
| 1019 | ;; message much faster than making dired-map-over-marks show progress | 1019 | ;; message much faster than making dired-map-over-marks show progress |
| 1020 | (dired-uncache | 1020 | (dired-uncache |
| 1021 | (if (consp dired-directory) (car dired-directory) dired-directory)) | 1021 | (if (consp dired-directory) (car dired-directory) dired-directory)) |
| 1022 | (dired-map-over-marks (let ((fname (dired-get-filename))) | 1022 | (dired-map-over-marks (let ((fname (dired-get-filename)) |
| 1023 | ;; Postphone readin hook till we map | ||
| 1024 | ;; over all marked files (Bug#6810). | ||
| 1025 | (dired-after-readin-hook nil)) | ||
| 1023 | (message "Redisplaying... %s" fname) | 1026 | (message "Redisplaying... %s" fname) |
| 1024 | (dired-update-file-line fname)) | 1027 | (dired-update-file-line fname)) |
| 1025 | arg) | 1028 | arg) |
| 1029 | (run-hooks 'dired-after-readin-hook) | ||
| 1026 | (dired-move-to-filename) | 1030 | (dired-move-to-filename) |
| 1027 | (message "Redisplaying...done"))) | 1031 | (message "Redisplaying...done"))) |
| 1028 | 1032 | ||
diff --git a/lisp/dired.el b/lisp/dired.el index 8012fcb472d..56030feae8b 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -2775,7 +2775,8 @@ name, or the marker and a count of marked files." | |||
| 2775 | ;; that's possible. (Bug#1806) | 2775 | ;; that's possible. (Bug#1806) |
| 2776 | (split-window-vertically)) | 2776 | (split-window-vertically)) |
| 2777 | ;; Otherwise, try to split WINDOW sensibly. | 2777 | ;; Otherwise, try to split WINDOW sensibly. |
| 2778 | (split-window-sensibly window))))) | 2778 | (split-window-sensibly window)))) |
| 2779 | pop-up-frames) | ||
| 2779 | (pop-to-buffer (get-buffer-create buf))) | 2780 | (pop-to-buffer (get-buffer-create buf))) |
| 2780 | ;; If dired-shrink-to-fit is t, make its window fit its contents. | 2781 | ;; If dired-shrink-to-fit is t, make its window fit its contents. |
| 2781 | (when dired-shrink-to-fit | 2782 | (when dired-shrink-to-fit |
| @@ -3557,7 +3558,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3557 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | 3558 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command |
| 3558 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | 3559 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown |
| 3559 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | 3560 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff |
| 3560 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "1628b7a7d379fb4da8ae4bf29faad4b5") | 3561 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "2e8658304f56098052e312d01c8763a2") |
| 3561 | ;;; Generated autoloads from dired-aux.el | 3562 | ;;; Generated autoloads from dired-aux.el |
| 3562 | 3563 | ||
| 3563 | (autoload 'dired-diff "dired-aux" "\ | 3564 | (autoload 'dired-diff "dired-aux" "\ |
diff --git a/lisp/files.el b/lisp/files.el index 460b005b9ef..e89c3075397 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2337,6 +2337,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode) | |||
| 2337 | ("\\.oak\\'" . scheme-mode) | 2337 | ("\\.oak\\'" . scheme-mode) |
| 2338 | ("\\.sgml?\\'" . sgml-mode) | 2338 | ("\\.sgml?\\'" . sgml-mode) |
| 2339 | ("\\.x[ms]l\\'" . xml-mode) | 2339 | ("\\.x[ms]l\\'" . xml-mode) |
| 2340 | ("\\.dbk\\'" . xml-mode) | ||
| 2340 | ("\\.dtd\\'" . sgml-mode) | 2341 | ("\\.dtd\\'" . sgml-mode) |
| 2341 | ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) | 2342 | ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) |
| 2342 | ("\\.js\\'" . js-mode) ; javascript-mode would be better | 2343 | ("\\.js\\'" . js-mode) ; javascript-mode would be better |
| @@ -4167,11 +4168,29 @@ on a DOS/Windows machine, it returns FILENAME in expanded form." | |||
| 4167 | (dremote (file-remote-p directory))) | 4168 | (dremote (file-remote-p directory))) |
| 4168 | (if ;; Conditions for separate trees | 4169 | (if ;; Conditions for separate trees |
| 4169 | (or | 4170 | (or |
| 4170 | ;; Test for different drives on DOS/Windows | 4171 | ;; Test for different filesystems on DOS/Windows |
| 4171 | (and | 4172 | (and |
| 4172 | ;; Should `cygwin' really be included here? --stef | 4173 | ;; Should `cygwin' really be included here? --stef |
| 4173 | (memq system-type '(ms-dos cygwin windows-nt)) | 4174 | (memq system-type '(ms-dos cygwin windows-nt)) |
| 4174 | (not (eq t (compare-strings filename 0 2 directory 0 2)))) | 4175 | (or |
| 4176 | ;; Test for different drive letters | ||
| 4177 | (not (eq t (compare-strings filename 0 2 directory 0 2))) | ||
| 4178 | ;; Test for UNCs on different servers | ||
| 4179 | (not (eq t (compare-strings | ||
| 4180 | (progn | ||
| 4181 | (if (string-match "\\`//\\([^:/]+\\)/" filename) | ||
| 4182 | (match-string 1 filename) | ||
| 4183 | ;; Windows file names cannot have ? in | ||
| 4184 | ;; them, so use that to detect when | ||
| 4185 | ;; neither FILENAME nor DIRECTORY is a | ||
| 4186 | ;; UNC. | ||
| 4187 | "?")) | ||
| 4188 | 0 nil | ||
| 4189 | (progn | ||
| 4190 | (if (string-match "\\`//\\([^:/]+\\)/" directory) | ||
| 4191 | (match-string 1 directory) | ||
| 4192 | "?")) | ||
| 4193 | 0 nil t))))) | ||
| 4175 | ;; Test for different remote file system identification | 4194 | ;; Test for different remote file system identification |
| 4176 | (not (equal fremote dremote))) | 4195 | (not (equal fremote dremote))) |
| 4177 | filename | 4196 | filename |
diff --git a/lisp/format.el b/lisp/format.el index 0436187d984..b4277ef6df0 100644 --- a/lisp/format.el +++ b/lisp/format.el | |||
| @@ -181,8 +181,7 @@ it should be a Lisp function. Decoding is done for the given BUFFER." | |||
| 181 | ;; We should perhaps go via a temporary buffer and copy it | 181 | ;; We should perhaps go via a temporary buffer and copy it |
| 182 | ;; back, in case of errors. | 182 | ;; back, in case of errors. |
| 183 | (if (and (zerop (save-window-excursion | 183 | (if (and (zerop (save-window-excursion |
| 184 | (shell-command-on-region (point-min) (point-max) | 184 | (shell-command-on-region from to method t t |
| 185 | method t t | ||
| 186 | error-buff))) | 185 | error-buff))) |
| 187 | ;; gzip gives zero exit status with bad args, for instance. | 186 | ;; gzip gives zero exit status with bad args, for instance. |
| 188 | (zerop (with-current-buffer error-buff | 187 | (zerop (with-current-buffer error-buff |
diff --git a/lisp/frame.el b/lisp/frame.el index b133851b440..969a02debe9 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -1545,7 +1545,7 @@ cursor display. On a text-only terminal, this is not implemented." | |||
| 1545 | :init-value (not (or noninteractive | 1545 | :init-value (not (or noninteractive |
| 1546 | no-blinking-cursor | 1546 | no-blinking-cursor |
| 1547 | (eq system-type 'ms-dos) | 1547 | (eq system-type 'ms-dos) |
| 1548 | (not (memq window-system '(x w32))))) | 1548 | (not (memq window-system '(x w32 ns))))) |
| 1549 | :initialize 'custom-initialize-delay | 1549 | :initialize 'custom-initialize-delay |
| 1550 | :group 'cursor | 1550 | :group 'cursor |
| 1551 | :global t | 1551 | :global t |
diff --git a/lisp/ido.el b/lisp/ido.el index 2df9b8666af..306485de1ad 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -1467,6 +1467,11 @@ Removes badly formatted data and ignored directories." | |||
| 1467 | ;; ido kill emacs hook | 1467 | ;; ido kill emacs hook |
| 1468 | (ido-save-history)) | 1468 | (ido-save-history)) |
| 1469 | 1469 | ||
| 1470 | (defun ido-common-initialization () | ||
| 1471 | (ido-init-completion-maps) | ||
| 1472 | (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) | ||
| 1473 | (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)) | ||
| 1474 | |||
| 1470 | (define-minor-mode ido-everywhere | 1475 | (define-minor-mode ido-everywhere |
| 1471 | "Toggle using ido speed-ups everywhere file and directory names are read. | 1476 | "Toggle using ido speed-ups everywhere file and directory names are read. |
| 1472 | With ARG, turn ido speed-up on if arg is positive, off otherwise." | 1477 | With ARG, turn ido speed-up on if arg is positive, off otherwise." |
| @@ -1510,12 +1515,9 @@ This function also adds a hook to the minibuffer." | |||
| 1510 | (t nil))) | 1515 | (t nil))) |
| 1511 | 1516 | ||
| 1512 | (ido-everywhere (if ido-everywhere 1 -1)) | 1517 | (ido-everywhere (if ido-everywhere 1 -1)) |
| 1513 | (when ido-mode | ||
| 1514 | (ido-init-completion-maps)) | ||
| 1515 | 1518 | ||
| 1516 | (when ido-mode | 1519 | (when ido-mode |
| 1517 | (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) | 1520 | (ido-common-initialization) |
| 1518 | (add-hook 'choose-completion-string-functions 'ido-choose-completion-string) | ||
| 1519 | (ido-load-history) | 1521 | (ido-load-history) |
| 1520 | 1522 | ||
| 1521 | (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) | 1523 | (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) |
| @@ -4759,6 +4761,8 @@ DEF, if non-nil, is the default value." | |||
| 4759 | (ido-directory-too-big nil) | 4761 | (ido-directory-too-big nil) |
| 4760 | (ido-context-switch-command 'ignore) | 4762 | (ido-context-switch-command 'ignore) |
| 4761 | (ido-choice-list choices)) | 4763 | (ido-choice-list choices)) |
| 4764 | ;; Initialize ido before invoking ido-read-internal | ||
| 4765 | (ido-common-initialization) | ||
| 4762 | (ido-read-internal 'list prompt hist def require-match initial-input))) | 4766 | (ido-read-internal 'list prompt hist def require-match initial-input))) |
| 4763 | 4767 | ||
| 4764 | (defun ido-unload-function () | 4768 | (defun ido-unload-function () |
diff --git a/lisp/image-dired.el b/lisp/image-dired.el index a74ddd312d5..565448c854e 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el | |||
| @@ -187,19 +187,19 @@ that allows sharing of thumbnails across different programs." | |||
| 187 | :group 'image-dired) | 187 | :group 'image-dired) |
| 188 | 188 | ||
| 189 | (defcustom image-dired-db-file | 189 | (defcustom image-dired-db-file |
| 190 | (locate-user-emacs-file "image-dired/.image-dired_db") | 190 | (expand-file-name ".image-dired_db" image-dired-dir) |
| 191 | "Database file where file names and their associated tags are stored." | 191 | "Database file where file names and their associated tags are stored." |
| 192 | :type 'string | 192 | :type 'string |
| 193 | :group 'image-dired) | 193 | :group 'image-dired) |
| 194 | 194 | ||
| 195 | (defcustom image-dired-temp-image-file | 195 | (defcustom image-dired-temp-image-file |
| 196 | (locate-user-emacs-file "image-dired/.image-dired_temp") | 196 | (expand-file-name ".image-dired_temp" image-dired-dir) |
| 197 | "Name of temporary image file used by various commands." | 197 | "Name of temporary image file used by various commands." |
| 198 | :type 'string | 198 | :type 'string |
| 199 | :group 'image-dired) | 199 | :group 'image-dired) |
| 200 | 200 | ||
| 201 | (defcustom image-dired-gallery-dir | 201 | (defcustom image-dired-gallery-dir |
| 202 | (locate-user-emacs-file "image-dired/.image-dired_gallery") | 202 | (expand-file-name ".image-dired_gallery" image-dired-dir) |
| 203 | "Directory to store generated gallery html pages. | 203 | "Directory to store generated gallery html pages. |
| 204 | This path needs to be \"shared\" to the public so that it can access | 204 | This path needs to be \"shared\" to the public so that it can access |
| 205 | the index.html page that image-dired creates." | 205 | the index.html page that image-dired creates." |
| @@ -344,7 +344,7 @@ original image file name and %t which is replaced by | |||
| 344 | :group 'image-dired) | 344 | :group 'image-dired) |
| 345 | 345 | ||
| 346 | (defcustom image-dired-temp-rotate-image-file | 346 | (defcustom image-dired-temp-rotate-image-file |
| 347 | (locate-user-emacs-file "image-dired/.image-dired_rotate_temp") | 347 | (expand-file-name ".image-dired_rotate_temp" image-dired-dir) |
| 348 | "Temporary file for rotate operations." | 348 | "Temporary file for rotate operations." |
| 349 | :type 'string | 349 | :type 'string |
| 350 | :group 'image-dired) | 350 | :group 'image-dired) |
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index ffb52683bd7..139b7cf926a 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -4289,7 +4289,7 @@ With prefix argument N moves forward N messages with these labels. | |||
| 4289 | 4289 | ||
| 4290 | ;;;*** | 4290 | ;;;*** |
| 4291 | 4291 | ||
| 4292 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "ec0bed149baed671125f623e5b012f6f") | 4292 | ;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "b1ce015fd919b54cc7b1d0b2155489f9") |
| 4293 | ;;; Generated autoloads from rmailmm.el | 4293 | ;;; Generated autoloads from rmailmm.el |
| 4294 | 4294 | ||
| 4295 | (autoload 'rmail-mime "rmailmm" "\ | 4295 | (autoload 'rmail-mime "rmailmm" "\ |
| @@ -4380,7 +4380,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order. | |||
| 4380 | 4380 | ||
| 4381 | ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic | 4381 | ;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic |
| 4382 | ;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels | 4382 | ;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels |
| 4383 | ;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "666a5db1021cdcba6e68a18a553d65f1") | 4383 | ;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "d855683972baef7111d4508dffbb54b6") |
| 4384 | ;;; Generated autoloads from rmailsum.el | 4384 | ;;; Generated autoloads from rmailsum.el |
| 4385 | 4385 | ||
| 4386 | (autoload 'rmail-summary "rmailsum" "\ | 4386 | (autoload 'rmail-summary "rmailsum" "\ |
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el index 918d2dfc365..708ec64706e 100644 --- a/lisp/mail/rmailmm.el +++ b/lisp/mail/rmailmm.el | |||
| @@ -691,7 +691,9 @@ modified." | |||
| 691 | The value is a MIME-entiy object (see `rmail-mime-enty-new')." | 691 | The value is a MIME-entiy object (see `rmail-mime-enty-new')." |
| 692 | (save-excursion | 692 | (save-excursion |
| 693 | (goto-char (point-min)) | 693 | (goto-char (point-min)) |
| 694 | (rmail-mime-process nil t))) | 694 | (condition-case nil |
| 695 | (rmail-mime-process nil t) | ||
| 696 | (error nil)))) | ||
| 695 | 697 | ||
| 696 | (defun rmail-mime-insert (entity &optional content-type disposition) | 698 | (defun rmail-mime-insert (entity &optional content-type disposition) |
| 697 | "Insert a MIME-entity ENTITY in the current buffer. | 699 | "Insert a MIME-entity ENTITY in the current buffer. |
| @@ -744,30 +746,31 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." | |||
| 744 | message type disposition encoding)) | 746 | message type disposition encoding)) |
| 745 | 747 | ||
| 746 | (defun rmail-show-mime () | 748 | (defun rmail-show-mime () |
| 747 | (let ((mbox-buf rmail-buffer)) | 749 | "Function to set in `rmail-show-mime-function' (which see)." |
| 748 | (condition-case nil | 750 | (let ((mbox-buf rmail-buffer) |
| 749 | (let ((entity (rmail-mime-parse))) | 751 | (entity (rmail-mime-parse))) |
| 750 | (with-current-buffer rmail-view-buffer | 752 | (if entity |
| 751 | (let ((inhibit-read-only t) | 753 | (with-current-buffer rmail-view-buffer |
| 752 | (rmail-buffer mbox-buf)) | 754 | (let ((inhibit-read-only t) |
| 753 | (erase-buffer) | 755 | (rmail-buffer mbox-buf)) |
| 754 | (rmail-mime-insert entity)))) | 756 | (erase-buffer) |
| 755 | (error | 757 | (rmail-mime-insert entity))) |
| 756 | ;; Decoding failed. Insert the original message body as is. | 758 | ;; Decoding failed. Insert the original message body as is. |
| 757 | (let ((region (with-current-buffer mbox-buf | 759 | (let ((region (with-current-buffer mbox-buf |
| 758 | (goto-char (point-min)) | 760 | (goto-char (point-min)) |
| 759 | (re-search-forward "^$" nil t) | 761 | (re-search-forward "^$" nil t) |
| 760 | (forward-line 1) | 762 | (forward-line 1) |
| 761 | (cons (point) (point-max))))) | 763 | (cons (point) (point-max))))) |
| 762 | (with-current-buffer rmail-view-buffer | 764 | (with-current-buffer rmail-view-buffer |
| 763 | (let ((inhibit-read-only t)) | 765 | (let ((inhibit-read-only t)) |
| 764 | (erase-buffer) | 766 | (erase-buffer) |
| 765 | (insert-buffer-substring mbox-buf (car region) (cdr region)))) | 767 | (insert-buffer-substring mbox-buf (car region) (cdr region)))) |
| 766 | (message "MIME decoding failed")))))) | 768 | (message "MIME decoding failed"))))) |
| 767 | 769 | ||
| 768 | (setq rmail-show-mime-function 'rmail-show-mime) | 770 | (setq rmail-show-mime-function 'rmail-show-mime) |
| 769 | 771 | ||
| 770 | (defun rmail-insert-mime-forwarded-message (forward-buffer) | 772 | (defun rmail-insert-mime-forwarded-message (forward-buffer) |
| 773 | "Function to set in `rmail-insert-mime-forwarded-message-function' (which see)." | ||
| 771 | (let ((mbox-buf (with-current-buffer forward-buffer rmail-view-buffer))) | 774 | (let ((mbox-buf (with-current-buffer forward-buffer rmail-view-buffer))) |
| 772 | (save-restriction | 775 | (save-restriction |
| 773 | (narrow-to-region (point) (point)) | 776 | (narrow-to-region (point) (point)) |
| @@ -777,6 +780,7 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." | |||
| 777 | 'rmail-insert-mime-forwarded-message) | 780 | 'rmail-insert-mime-forwarded-message) |
| 778 | 781 | ||
| 779 | (defun rmail-insert-mime-resent-message (forward-buffer) | 782 | (defun rmail-insert-mime-resent-message (forward-buffer) |
| 783 | "Function to set in `rmail-insert-mime-resent-message-function' (which see)." | ||
| 780 | (insert-buffer-substring | 784 | (insert-buffer-substring |
| 781 | (with-current-buffer forward-buffer rmail-view-buffer)) | 785 | (with-current-buffer forward-buffer rmail-view-buffer)) |
| 782 | (goto-char (point-min)) | 786 | (goto-char (point-min)) |
| @@ -787,6 +791,41 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'." | |||
| 787 | (setq rmail-insert-mime-resent-message-function | 791 | (setq rmail-insert-mime-resent-message-function |
| 788 | 'rmail-insert-mime-resent-message) | 792 | 'rmail-insert-mime-resent-message) |
| 789 | 793 | ||
| 794 | (defun rmail-search-mime-message (msg regexp) | ||
| 795 | "Function to set in `rmail-search-mime-message-function' (which see)." | ||
| 796 | (save-restriction | ||
| 797 | (narrow-to-region (rmail-msgbeg msg) (rmail-msgend msg)) | ||
| 798 | (let ((mbox-buf (current-buffer)) | ||
| 799 | (header-end (save-excursion | ||
| 800 | (re-search-forward "^$" nil 'move) (point))) | ||
| 801 | (body-end (point-max)) | ||
| 802 | (entity (rmail-mime-parse))) | ||
| 803 | (or | ||
| 804 | ;; At first, just search the headers. | ||
| 805 | (with-temp-buffer | ||
| 806 | (insert-buffer-substring mbox-buf nil header-end) | ||
| 807 | (rfc2047-decode-region (point-min) (point)) | ||
| 808 | (goto-char (point-min)) | ||
| 809 | (re-search-forward regexp nil t)) | ||
| 810 | ;; Next, search the body. | ||
| 811 | (if (and entity | ||
| 812 | (let* ((content-type (rmail-mime-entity-type entity)) | ||
| 813 | (charset (cdr (assq 'charset (cdr content-type))))) | ||
| 814 | (or (not (string-match "text/.*" (car content-type))) | ||
| 815 | (and charset | ||
| 816 | (not (string= (downcase charset) "us-ascii")))))) | ||
| 817 | ;; Search the decoded MIME message. | ||
| 818 | (with-temp-buffer | ||
| 819 | (let ((rmail-buffer mbox-buf)) | ||
| 820 | (rmail-mime-insert entity)) | ||
| 821 | (goto-char (point-min)) | ||
| 822 | (re-search-forward regexp nil t)) | ||
| 823 | ;; Search the body without decoding. | ||
| 824 | (goto-char header-end) | ||
| 825 | (re-search-forward regexp nil t)))))) | ||
| 826 | |||
| 827 | (setq rmail-search-mime-message-function 'rmail-search-mime-message) | ||
| 828 | |||
| 790 | (provide 'rmailmm) | 829 | (provide 'rmailmm) |
| 791 | 830 | ||
| 792 | ;; Local Variables: | 831 | ;; Local Variables: |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 4e76de60188..62bfbb740c4 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -1007,5 +1007,4 @@ many continuation lines." | |||
| 1007 | 1007 | ||
| 1008 | (provide 'smtpmail) | 1008 | (provide 'smtpmail) |
| 1009 | 1009 | ||
| 1010 | ;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466 | ||
| 1011 | ;;; smtpmail.el ends here | 1010 | ;;; smtpmail.el ends here |
diff --git a/lisp/mouse.el b/lisp/mouse.el index 40e0c14c064..aa5dadf84ff 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -185,6 +185,7 @@ items `Turn Off' and `Help'." | |||
| 185 | (minor-mode-menu-from-indicator indicator))) | 185 | (minor-mode-menu-from-indicator indicator))) |
| 186 | 186 | ||
| 187 | (defun mouse-menu-major-mode-map () | 187 | (defun mouse-menu-major-mode-map () |
| 188 | (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) | ||
| 188 | (let* (;; Keymap from which to inherit; may be null. | 189 | (let* (;; Keymap from which to inherit; may be null. |
| 189 | (ancestor (mouse-menu-non-singleton | 190 | (ancestor (mouse-menu-non-singleton |
| 190 | (and (current-local-map) | 191 | (and (current-local-map) |
| @@ -217,6 +218,7 @@ Otherwise return the whole menu." | |||
| 217 | "Return a keymap equivalent to the menu bar. | 218 | "Return a keymap equivalent to the menu bar. |
| 218 | The contents are the items that would be in the menu bar whether or | 219 | The contents are the items that would be in the menu bar whether or |
| 219 | not it is actually displayed." | 220 | not it is actually displayed." |
| 221 | (run-hooks 'activate-menubar-hook 'menu-bar-update-hook) | ||
| 220 | (let* ((local-menu (and (current-local-map) | 222 | (let* ((local-menu (and (current-local-map) |
| 221 | (lookup-key (current-local-map) [menu-bar]))) | 223 | (lookup-key (current-local-map) [menu-bar]))) |
| 222 | (global-menu (lookup-key global-map [menu-bar])) | 224 | (global-menu (lookup-key global-map [menu-bar])) |
| @@ -2130,5 +2132,4 @@ choose a font." | |||
| 2130 | 2132 | ||
| 2131 | (provide 'mouse) | 2133 | (provide 'mouse) |
| 2132 | 2134 | ||
| 2133 | ;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3 | ||
| 2134 | ;;; mouse.el ends here | 2135 | ;;; mouse.el ends here |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 1501868a6b5..92f6c2a0335 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -2637,61 +2637,65 @@ the result will be a local, non-Tramp, filename." | |||
| 2637 | (defun tramp-sh-handle-start-file-process (name buffer program &rest args) | 2637 | (defun tramp-sh-handle-start-file-process (name buffer program &rest args) |
| 2638 | "Like `start-file-process' for Tramp files." | 2638 | "Like `start-file-process' for Tramp files." |
| 2639 | (with-parsed-tramp-file-name default-directory nil | 2639 | (with-parsed-tramp-file-name default-directory nil |
| 2640 | (unwind-protect | 2640 | ;; When PROGRAM is nil, we just provide a tty. |
| 2641 | ;; When PROGRAM is nil, we just provide a tty. | 2641 | (let ((command |
| 2642 | (let ((command | 2642 | (when (stringp program) |
| 2643 | (when (stringp program) | 2643 | (format "cd %s; exec %s" |
| 2644 | (format "cd %s; exec %s" | 2644 | (tramp-shell-quote-argument localname) |
| 2645 | (tramp-shell-quote-argument localname) | 2645 | (mapconcat 'tramp-shell-quote-argument |
| 2646 | (mapconcat 'tramp-shell-quote-argument | 2646 | (cons program args) " ")))) |
| 2647 | (cons program args) " ")))) | 2647 | (tramp-process-connection-type |
| 2648 | (tramp-process-connection-type | 2648 | (or (null program) tramp-process-connection-type)) |
| 2649 | (or (null program) tramp-process-connection-type)) | 2649 | (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer))) |
| 2650 | (name1 name) | 2650 | (name1 name) |
| 2651 | (i 0)) | 2651 | (i 0)) |
| 2652 | (unless buffer | 2652 | (unwind-protect |
| 2653 | ;; BUFFER can be nil. We use a temporary buffer. | 2653 | (save-excursion |
| 2654 | (setq buffer (generate-new-buffer tramp-temp-buffer-name))) | 2654 | (save-restriction |
| 2655 | (while (get-process name1) | 2655 | (unless buffer |
| 2656 | ;; NAME must be unique as process name. | 2656 | ;; BUFFER can be nil. We use a temporary buffer. |
| 2657 | (setq i (1+ i) | 2657 | (setq buffer (generate-new-buffer tramp-temp-buffer-name))) |
| 2658 | name1 (format "%s<%d>" name i))) | 2658 | (while (get-process name1) |
| 2659 | (setq name name1) | 2659 | ;; NAME must be unique as process name. |
| 2660 | ;; Set the new process properties. | 2660 | (setq i (1+ i) |
| 2661 | (tramp-set-connection-property v "process-name" name) | 2661 | name1 (format "%s<%d>" name i))) |
| 2662 | (tramp-set-connection-property v "process-buffer" buffer) | 2662 | (setq name name1) |
| 2663 | ;; Activate narrowing in order to save BUFFER contents. | 2663 | ;; Set the new process properties. |
| 2664 | ;; Clear also the modification time; otherwise we might be | 2664 | (tramp-set-connection-property v "process-name" name) |
| 2665 | ;; interrupted by `verify-visited-file-modtime'. | 2665 | (tramp-set-connection-property v "process-buffer" buffer) |
| 2666 | (with-current-buffer (tramp-get-connection-buffer v) | 2666 | ;; Activate narrowing in order to save BUFFER contents. |
| 2667 | (clear-visited-file-modtime) | 2667 | ;; Clear also the modification time; otherwise we might |
| 2668 | (narrow-to-region (point-max) (point-max))) | 2668 | ;; be interrupted by `verify-visited-file-modtime'. |
| 2669 | (if command | 2669 | (with-current-buffer (tramp-get-connection-buffer v) |
| 2670 | ;; Send the command. | 2670 | (let ((buffer-undo-list t)) |
| 2671 | (tramp-send-command v command nil t) ; nooutput | 2671 | (clear-visited-file-modtime) |
| 2672 | ;; Check, whether a pty is associated. | 2672 | (narrow-to-region (point-max) (point-max)) |
| 2673 | (tramp-maybe-open-connection v) | 2673 | (if command |
| 2674 | (unless (tramp-compat-process-get | 2674 | ;; Send the command. |
| 2675 | (tramp-get-connection-process v) 'remote-tty) | 2675 | (tramp-send-command v command nil t) ; nooutput |
| 2676 | (tramp-error | 2676 | ;; Check, whether a pty is associated. |
| 2677 | v 'file-error "pty association is not supported for `%s'" name))) | 2677 | (tramp-maybe-open-connection v) |
| 2678 | (let ((p (tramp-get-connection-process v))) | 2678 | (unless (tramp-compat-process-get |
| 2679 | ;; Set sentinel and query flag for this process. | 2679 | (tramp-get-connection-process v) 'remote-tty) |
| 2680 | (tramp-set-connection-property p "vector" v) | 2680 | (tramp-error |
| 2681 | (set-process-sentinel p 'tramp-process-sentinel) | 2681 | v 'file-error |
| 2682 | (tramp-compat-set-process-query-on-exit-flag p t) | 2682 | "pty association is not supported for `%s'" name))))) |
| 2683 | ;; Return process. | 2683 | (let ((p (tramp-get-connection-process v))) |
| 2684 | p)) | 2684 | ;; Set sentinel and query flag for this process. |
| 2685 | ;; Save exit. | 2685 | (tramp-set-connection-property p "vector" v) |
| 2686 | (with-current-buffer (tramp-get-connection-buffer v) | 2686 | (set-process-sentinel p 'tramp-process-sentinel) |
| 2687 | (if (string-match tramp-temp-buffer-name (buffer-name)) | 2687 | (tramp-compat-set-process-query-on-exit-flag p t) |
| 2688 | (progn | 2688 | ;; Return process. |
| 2689 | (set-process-buffer (tramp-get-connection-process v) nil) | 2689 | p))) |
| 2690 | (kill-buffer (current-buffer))) | 2690 | ;; Save exit. |
| 2691 | (widen) | 2691 | (with-current-buffer (tramp-get-connection-buffer v) |
| 2692 | (goto-char (point-max)))) | 2692 | (if (string-match tramp-temp-buffer-name (buffer-name)) |
| 2693 | (tramp-set-connection-property v "process-name" nil) | 2693 | (progn |
| 2694 | (tramp-set-connection-property v "process-buffer" nil)))) | 2694 | (set-process-buffer (tramp-get-connection-process v) nil) |
| 2695 | (kill-buffer (current-buffer))) | ||
| 2696 | (set-buffer-modified-p bmp))) | ||
| 2697 | (tramp-set-connection-property v "process-name" nil) | ||
| 2698 | (tramp-set-connection-property v "process-buffer" nil))))) | ||
| 2695 | 2699 | ||
| 2696 | (defun tramp-sh-handle-process-file | 2700 | (defun tramp-sh-handle-process-file |
| 2697 | (program &optional infile destination display &rest args) | 2701 | (program &optional infile destination display &rest args) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index f7d3b81039e..abcb6ae7d77 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3077,26 +3077,27 @@ The terminal type can be configured with `tramp-terminal-type'." | |||
| 3077 | (tramp-compat-with-temp-message "" | 3077 | (tramp-compat-with-temp-message "" |
| 3078 | ;; Enable auth-source and password-cache. | 3078 | ;; Enable auth-source and password-cache. |
| 3079 | (tramp-set-connection-property vec "first-password-request" t) | 3079 | (tramp-set-connection-property vec "first-password-request" t) |
| 3080 | (let (exit) | 3080 | (save-restriction |
| 3081 | (while (not exit) | 3081 | (let (exit) |
| 3082 | (tramp-message proc 3 "Waiting for prompts from remote shell") | 3082 | (while (not exit) |
| 3083 | (setq exit | 3083 | (tramp-message proc 3 "Waiting for prompts from remote shell") |
| 3084 | (catch 'tramp-action | 3084 | (setq exit |
| 3085 | (if timeout | 3085 | (catch 'tramp-action |
| 3086 | (with-timeout (timeout) | 3086 | (if timeout |
| 3087 | (tramp-process-one-action proc vec actions)) | 3087 | (with-timeout (timeout) |
| 3088 | (tramp-process-one-action proc vec actions))))) | 3088 | (tramp-process-one-action proc vec actions)) |
| 3089 | (with-current-buffer (tramp-get-connection-buffer vec) | 3089 | (tramp-process-one-action proc vec actions))))) |
| 3090 | (widen) | 3090 | (with-current-buffer (tramp-get-connection-buffer vec) |
| 3091 | (tramp-message vec 6 "\n%s" (buffer-string))) | 3091 | (widen) |
| 3092 | (unless (eq exit 'ok) | 3092 | (tramp-message vec 6 "\n%s" (buffer-string))) |
| 3093 | (tramp-clear-passwd vec) | 3093 | (unless (eq exit 'ok) |
| 3094 | (tramp-error-with-buffer | 3094 | (tramp-clear-passwd vec) |
| 3095 | nil vec 'file-error | 3095 | (tramp-error-with-buffer |
| 3096 | (cond | 3096 | nil vec 'file-error |
| 3097 | ((eq exit 'permission-denied) "Permission denied") | 3097 | (cond |
| 3098 | ((eq exit 'process-died) "Process died") | 3098 | ((eq exit 'permission-denied) "Permission denied") |
| 3099 | (t "Login failed"))))))) | 3099 | ((eq exit 'process-died) "Process died") |
| 3100 | (t "Login failed")))))))) | ||
| 3100 | 3101 | ||
| 3101 | :;; Utility functions: | 3102 | :;; Utility functions: |
| 3102 | 3103 | ||
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index 885fe68be26..4e13ae07624 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -4328,14 +4328,17 @@ Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head" | |||
| 4328 | (ps-header-font-size-internal | 4328 | (ps-header-font-size-internal |
| 4329 | (or ps-header-font-size-internal | 4329 | (or ps-header-font-size-internal |
| 4330 | (ps-get-font-size 'ps-header-font-size))) | 4330 | (ps-get-font-size 'ps-header-font-size))) |
| 4331 | (ps-footer-font-size-internal | ||
| 4332 | (or ps-footer-font-size-internal | ||
| 4333 | (ps-get-font-size 'ps-footer-font-size))) | ||
| 4331 | (ps-header-title-font-size-internal | 4334 | (ps-header-title-font-size-internal |
| 4332 | (or ps-header-title-font-size-internal | 4335 | (or ps-header-title-font-size-internal |
| 4333 | (ps-get-font-size 'ps-header-title-font-size))) | 4336 | (ps-get-font-size 'ps-header-title-font-size))) |
| 4334 | (buf (get-buffer-create "*Line-lengths*")) | 4337 | (buf (get-buffer-create "*Line-lengths*")) |
| 4335 | (ifs ps-font-size-internal) ; initial font size | 4338 | (ifs ps-font-size-internal) ; initial font size |
| 4336 | (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width | ||
| 4337 | (print-width (progn (ps-get-page-dimensions) | 4339 | (print-width (progn (ps-get-page-dimensions) |
| 4338 | ps-print-width)) | 4340 | ps-print-width)) |
| 4341 | (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width | ||
| 4339 | (ps-setup (ps-setup)) ; setup for the current buffer | 4342 | (ps-setup (ps-setup)) ; setup for the current buffer |
| 4340 | (fs-min 5) ; minimum font size | 4343 | (fs-min 5) ; minimum font size |
| 4341 | cw-min ; minimum character width | 4344 | cw-min ; minimum character width |
| @@ -4375,6 +4378,9 @@ and on the current ps-print setup." | |||
| 4375 | (ps-header-font-size-internal | 4378 | (ps-header-font-size-internal |
| 4376 | (or ps-header-font-size-internal | 4379 | (or ps-header-font-size-internal |
| 4377 | (ps-get-font-size 'ps-header-font-size))) | 4380 | (ps-get-font-size 'ps-header-font-size))) |
| 4381 | (ps-footer-font-size-internal | ||
| 4382 | (or ps-footer-font-size-internal | ||
| 4383 | (ps-get-font-size 'ps-footer-font-size))) | ||
| 4378 | (ps-header-title-font-size-internal | 4384 | (ps-header-title-font-size-internal |
| 4379 | (or ps-header-title-font-size-internal | 4385 | (or ps-header-title-font-size-internal |
| 4380 | (ps-get-font-size 'ps-header-title-font-size))) | 4386 | (ps-get-font-size 'ps-header-title-font-size))) |
| @@ -4384,9 +4390,9 @@ and on the current ps-print setup." | |||
| 4384 | (buf (get-buffer-create "*Nb-Pages*")) | 4390 | (buf (get-buffer-create "*Nb-Pages*")) |
| 4385 | (ils ps-line-spacing-internal) ; initial line spacing | 4391 | (ils ps-line-spacing-internal) ; initial line spacing |
| 4386 | (ifs ps-font-size-internal) ; initial font size | 4392 | (ifs ps-font-size-internal) ; initial font size |
| 4387 | (ilh (ps-line-height 'ps-font-for-text)) ; initial line height | ||
| 4388 | (page-height (progn (ps-get-page-dimensions) | 4393 | (page-height (progn (ps-get-page-dimensions) |
| 4389 | ps-print-height)) | 4394 | ps-print-height)) |
| 4395 | (ilh (ps-line-height 'ps-font-for-text)) ; initial line height | ||
| 4390 | (ps-setup (ps-setup)) ; setup for the current buffer | 4396 | (ps-setup (ps-setup)) ; setup for the current buffer |
| 4391 | (fs-min 4) ; minimum font size | 4397 | (fs-min 4) ; minimum font size |
| 4392 | lh-min ; minimum line height | 4398 | lh-min ; minimum line height |
diff --git a/lisp/subr.el b/lisp/subr.el index ff65997c68c..8a7ef7069c2 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -417,7 +417,7 @@ Unibyte strings are converted to multibyte for comparison." | |||
| 417 | (assoc-string key alist nil)) | 417 | (assoc-string key alist nil)) |
| 418 | 418 | ||
| 419 | (defun member-ignore-case (elt list) | 419 | (defun member-ignore-case (elt list) |
| 420 | "Like `member', but ignores differences in case and text representation. | 420 | "Like `member', but ignore differences in case and text representation. |
| 421 | ELT must be a string. Upper-case and lower-case letters are treated as equal. | 421 | ELT must be a string. Upper-case and lower-case letters are treated as equal. |
| 422 | Unibyte strings are converted to multibyte for comparison. | 422 | Unibyte strings are converted to multibyte for comparison. |
| 423 | Non-strings in LIST are ignored." | 423 | Non-strings in LIST are ignored." |
| @@ -915,8 +915,9 @@ Select the corresponding window as well." | |||
| 915 | 915 | ||
| 916 | (defsubst posn-x-y (position) | 916 | (defsubst posn-x-y (position) |
| 917 | "Return the x and y coordinates in POSITION. | 917 | "Return the x and y coordinates in POSITION. |
| 918 | POSITION should be a list of the form returned by the `event-start' | 918 | The return value has the form (X . Y), where X and Y are given in |
| 919 | and `event-end' functions." | 919 | pixels. POSITION should be a list of the form returned by |
| 920 | `event-start' and `event-end'." | ||
| 920 | (nth 2 position)) | 921 | (nth 2 position)) |
| 921 | 922 | ||
| 922 | (declare-function scroll-bar-scale "scroll-bar" (num-denom whole)) | 923 | (declare-function scroll-bar-scale "scroll-bar" (num-denom whole)) |
| @@ -955,7 +956,9 @@ and `event-end' functions." | |||
| 955 | (setq spacing 0))) | 956 | (setq spacing 0))) |
| 956 | (cons (/ (car pair) (frame-char-width frame)) | 957 | (cons (/ (car pair) (frame-char-width frame)) |
| 957 | (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) | 958 | (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) |
| 958 | (if (null header-line-format) 0 1)))))))) | 959 | (if (null (with-current-buffer (window-buffer window) |
| 960 | header-line-format)) | ||
| 961 | 0 1)))))))) | ||
| 959 | 962 | ||
| 960 | (defun posn-actual-col-row (position) | 963 | (defun posn-actual-col-row (position) |
| 961 | "Return the actual column and row in POSITION, measured in characters. | 964 | "Return the actual column and row in POSITION, measured in characters. |
| @@ -996,14 +999,15 @@ and `event-end' functions." | |||
| 996 | 999 | ||
| 997 | (defsubst posn-object-x-y (position) | 1000 | (defsubst posn-object-x-y (position) |
| 998 | "Return the x and y coordinates relative to the object of POSITION. | 1001 | "Return the x and y coordinates relative to the object of POSITION. |
| 999 | POSITION should be a list of the form returned by the `event-start' | 1002 | The return value has the form (DX . DY), where DX and DY are |
| 1000 | and `event-end' functions." | 1003 | given in pixels. POSITION should be a list of the form returned |
| 1004 | by `event-start' and `event-end'." | ||
| 1001 | (nth 8 position)) | 1005 | (nth 8 position)) |
| 1002 | 1006 | ||
| 1003 | (defsubst posn-object-width-height (position) | 1007 | (defsubst posn-object-width-height (position) |
| 1004 | "Return the pixel width and height of the object of POSITION. | 1008 | "Return the pixel width and height of the object of POSITION. |
| 1005 | POSITION should be a list of the form returned by the `event-start' | 1009 | The return value has the form (WIDTH . HEIGHT). POSITION should |
| 1006 | and `event-end' functions." | 1010 | be a list of the form returned by `event-start' and `event-end'." |
| 1007 | (nth 9 position)) | 1011 | (nth 9 position)) |
| 1008 | 1012 | ||
| 1009 | 1013 | ||
| @@ -1355,9 +1359,8 @@ if it is empty or a duplicate." | |||
| 1355 | 1359 | ||
| 1356 | (defun run-mode-hooks (&rest hooks) | 1360 | (defun run-mode-hooks (&rest hooks) |
| 1357 | "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. | 1361 | "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. |
| 1358 | Execution is delayed if `delay-mode-hooks' is non-nil. | 1362 | Execution is delayed if the variable `delay-mode-hooks' is non-nil. |
| 1359 | If `delay-mode-hooks' is nil, run `after-change-major-mode-hook' | 1363 | Otherwise, runs the mode hooks and then `after-change-major-mode-hook'. |
| 1360 | after running the mode hooks. | ||
| 1361 | Major mode functions should use this instead of `run-hooks' when running their | 1364 | Major mode functions should use this instead of `run-hooks' when running their |
| 1362 | FOO-mode-hook." | 1365 | FOO-mode-hook." |
| 1363 | (if delay-mode-hooks | 1366 | (if delay-mode-hooks |
| @@ -2458,7 +2461,7 @@ If PARAM is present and non-nil, it replaces STRING as the object | |||
| 2458 | `yank-rectangle', PARAM may be a list of strings to insert as a | 2461 | `yank-rectangle', PARAM may be a list of strings to insert as a |
| 2459 | rectangle. | 2462 | rectangle. |
| 2460 | If NOEXCLUDE is present and non-nil, the normal removal of the | 2463 | If NOEXCLUDE is present and non-nil, the normal removal of the |
| 2461 | yank-excluded-properties is not performed; instead FUNCTION is | 2464 | `yank-excluded-properties' is not performed; instead FUNCTION is |
| 2462 | responsible for removing those properties. This may be necessary | 2465 | responsible for removing those properties. This may be necessary |
| 2463 | if FUNCTION adjusts point before or after inserting the object. | 2466 | if FUNCTION adjusts point before or after inserting the object. |
| 2464 | If UNDO is present and non-nil, it is a function that will be called | 2467 | If UNDO is present and non-nil, it is a function that will be called |
| @@ -3818,9 +3821,9 @@ which is higher than \"1alpha\"." | |||
| 3818 | 3821 | ||
| 3819 | ;; The following statement ought to be in print.c, but `provide' can't | 3822 | ;; The following statement ought to be in print.c, but `provide' can't |
| 3820 | ;; be used there. | 3823 | ;; be used there. |
| 3824 | ;; http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00236.html | ||
| 3821 | (when (hash-table-p (car (read-from-string | 3825 | (when (hash-table-p (car (read-from-string |
| 3822 | (prin1-to-string (make-hash-table))))) | 3826 | (prin1-to-string (make-hash-table))))) |
| 3823 | (provide 'hashtable-print-readable)) | 3827 | (provide 'hashtable-print-readable)) |
| 3824 | 3828 | ||
| 3825 | ;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc | ||
| 3826 | ;;; subr.el ends here | 3829 | ;;; subr.el ends here |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 44cc511c99c..5fd96e43b6b 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-12-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART. | ||
| 4 | Suggested by Lennart Borgman (Bug#7543). | ||
| 5 | |||
| 1 | 2010-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org> | 6 | 2010-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * url-file.el (url-file-build-filename): Avoid interpreting | 8 | * url-file.el (url-file-build-filename): Avoid interpreting |
| @@ -14,8 +19,8 @@ | |||
| 14 | 19 | ||
| 15 | 2010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org> | 20 | 2010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 16 | 21 | ||
| 17 | * url-http.el (url-http-wait-for-headers-change-function): Protect | 22 | * url-http.el (url-http-wait-for-headers-change-function): |
| 18 | against url-http-response-status for degenerate documents. | 23 | Protect against url-http-response-status for degenerate documents. |
| 19 | (url-http-wait-for-headers-change-function): Revert previous | 24 | (url-http-wait-for-headers-change-function): Revert previous |
| 20 | change. It lead to really slow loads. | 25 | change. It lead to really slow loads. |
| 21 | 26 | ||
| @@ -31,7 +36,7 @@ | |||
| 31 | 36 | ||
| 32 | 2010-10-03 Lars Magne Ingebrigtsen <larsi@gnus.org> | 37 | 2010-10-03 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 33 | 38 | ||
| 34 | * url-vars.el (url-mime-charset-string): Changed the default to | 39 | * url-vars.el (url-mime-charset-string): Change the default to |
| 35 | nil to avoid sending 1171 bytes of not very useful data to the | 40 | nil to avoid sending 1171 bytes of not very useful data to the |
| 36 | HTTP server every request. | 41 | HTTP server every request. |
| 37 | 42 | ||
| @@ -119,8 +124,8 @@ | |||
| 119 | 2010-07-01 Mark A. Hershberger <mah@everybody.org> | 124 | 2010-07-01 Mark A. Hershberger <mah@everybody.org> |
| 120 | 125 | ||
| 121 | * url-http.el (url-http-create-request): Add a CRLF on the end so | 126 | * url-http.el (url-http-create-request): Add a CRLF on the end so |
| 122 | that POSTs with content to https urls work. See | 127 | that POSTs with content to https urls work. |
| 123 | <https://bugs.launchpad.net/mediawiki-el/+bug/540759> | 128 | See <https://bugs.launchpad.net/mediawiki-el/+bug/540759> |
| 124 | 129 | ||
| 125 | 2010-06-22 Mark A. Hershberger <mah@everybody.org> | 130 | 2010-06-22 Mark A. Hershberger <mah@everybody.org> |
| 126 | 131 | ||
| @@ -602,8 +607,8 @@ | |||
| 602 | * url-http.el (url-http-proxy): New variable. | 607 | * url-http.el (url-http-proxy): New variable. |
| 603 | (url-http-create-request): Use it. Don't use `url-proxy-object'. | 608 | (url-http-create-request): Use it. Don't use `url-proxy-object'. |
| 604 | (url-http): Treat `url' argument as resource to download, and | 609 | (url-http): Treat `url' argument as resource to download, and |
| 605 | dynamic variable `url-using-proxy' as proxy to use. Set | 610 | dynamic variable `url-using-proxy' as proxy to use. |
| 606 | `url-current-object' to actual URL, and `url-http-proxy' to proxy | 611 | Set `url-current-object' to actual URL, and `url-http-proxy' to proxy |
| 607 | used. | 612 | used. |
| 608 | (url-http-handle-cookies): Assume that `url-current-object' does | 613 | (url-http-handle-cookies): Assume that `url-current-object' does |
| 609 | not point to the proxy used. | 614 | not point to the proxy used. |
| @@ -619,24 +624,24 @@ | |||
| 619 | (url-proxy): Bind it instead of `proxy-object'. | 624 | (url-proxy): Bind it instead of `proxy-object'. |
| 620 | 625 | ||
| 621 | * url-http.el (url-http-create-request): Remove url argument, use | 626 | * url-http.el (url-http-create-request): Remove url argument, use |
| 622 | the buffer-local variable `url-http-target-url' instead. Both | 627 | the buffer-local variable `url-http-target-url' instead. |
| 623 | callers updated. Simplify proxy handling. | 628 | Both callers updated. Simplify proxy handling. |
| 624 | (url-http): Don't make proxy-object buffer local. | 629 | (url-http): Don't make proxy-object buffer local. |
| 625 | 630 | ||
| 626 | * url.el (url-retrieve-internal): Bind url-proxy-object to nil. | 631 | * url.el (url-retrieve-internal): Bind url-proxy-object to nil. |
| 627 | 632 | ||
| 628 | 2006-11-26 Magnus Henoch <mange@freemail.hu> | 633 | 2006-11-26 Magnus Henoch <mange@freemail.hu> |
| 629 | 634 | ||
| 630 | * url-http.el (url-http-wait-for-headers-change-function): Use | 635 | * url-http.el (url-http-wait-for-headers-change-function): |
| 631 | `when' instead of `if' when possible. | 636 | Use `when' instead of `if' when possible. |
| 632 | (url-http): Define url-http-response-version. | 637 | (url-http): Define url-http-response-version. |
| 633 | (url-http-parse-response): Set it. | 638 | (url-http-parse-response): Set it. |
| 634 | (url-http-parse-headers): Use it to determine keep-alive behavior. | 639 | (url-http-parse-headers): Use it to determine keep-alive behavior. |
| 635 | 640 | ||
| 636 | 2006-11-23 Diane Murray <disumu@x3y2z1.net> (tiny change) | 641 | 2006-11-23 Diane Murray <disumu@x3y2z1.net> (tiny change) |
| 637 | 642 | ||
| 638 | * url-http.el (url-http-content-length-after-change-function): Use | 643 | * url-http.el (url-http-content-length-after-change-function): |
| 639 | `url-lazy-message'. | 644 | Use `url-lazy-message'. |
| 640 | 645 | ||
| 641 | * url-util.el (url-display-percentage): Only show a message if | 646 | * url-util.el (url-display-percentage): Only show a message if |
| 642 | `url-show-status' is non-nil. | 647 | `url-show-status' is non-nil. |
| @@ -1018,8 +1023,8 @@ | |||
| 1018 | (url-cookie-generate-header-lines): Likewise. | 1023 | (url-cookie-generate-header-lines): Likewise. |
| 1019 | (url-cookie-handle-set-cookie): Likewise. | 1024 | (url-cookie-handle-set-cookie): Likewise. |
| 1020 | (url-cookie-create): Expect :localpart instead of :path. | 1025 | (url-cookie-create): Expect :localpart instead of :path. |
| 1021 | (url-cookie-localpart): Renamed from url-cookie-path. | 1026 | (url-cookie-localpart): Rename from url-cookie-path. |
| 1022 | (url-cookie-set-localpart): Renamed from url-cookie-set-path. | 1027 | (url-cookie-set-localpart): Rename from url-cookie-set-path. |
| 1023 | (url-cookie-file): Doc fix. | 1028 | (url-cookie-file): Doc fix. |
| 1024 | (url-cookie-p): Add doc string. | 1029 | (url-cookie-p): Add doc string. |
| 1025 | 1030 | ||
| @@ -2236,7 +2241,7 @@ | |||
| 2236 | message when we have to contact a host so the user always gets | 2241 | message when we have to contact a host so the user always gets |
| 2237 | at least some feedback. | 2242 | at least some feedback. |
| 2238 | 2243 | ||
| 2239 | * lisp/url-expand.el (url-expander-remove-relative-links): Moved and | 2244 | * lisp/url-expand.el (url-expander-remove-relative-links): Move and |
| 2240 | renamed function. | 2245 | renamed function. |
| 2241 | (url-default-expander): Use it. | 2246 | (url-default-expander): Use it. |
| 2242 | 2247 | ||
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index e056db38a98..ec0974e9d76 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el | |||
| @@ -198,7 +198,7 @@ telling Microsoft that." | |||
| 198 | (and exp (> (float-time) (float-time (date-to-time exp)))))) | 198 | (and exp (> (float-time) (float-time (date-to-time exp)))))) |
| 199 | 199 | ||
| 200 | (defun url-cookie-retrieve (host &optional localpart secure) | 200 | (defun url-cookie-retrieve (host &optional localpart secure) |
| 201 | "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART." | 201 | "Retrieve all cookies for a specified HOST and LOCALPART." |
| 202 | (let ((storage (if secure | 202 | (let ((storage (if secure |
| 203 | (append url-cookie-secure-storage url-cookie-storage) | 203 | (append url-cookie-secure-storage url-cookie-storage) |
| 204 | url-cookie-storage)) | 204 | url-cookie-storage)) |
| @@ -226,7 +226,8 @@ telling Microsoft that." | |||
| 226 | (setq cur (car cookies) | 226 | (setq cur (car cookies) |
| 227 | cookies (cdr cookies) | 227 | cookies (cdr cookies) |
| 228 | localpart-match (url-cookie-localpart cur)) | 228 | localpart-match (url-cookie-localpart cur)) |
| 229 | (if (and (if (stringp localpart-match) | 229 | (if (and (if (and (stringp localpart-match) |
| 230 | (stringp localpart)) | ||
| 230 | (string-match (concat "^" (regexp-quote | 231 | (string-match (concat "^" (regexp-quote |
| 231 | localpart-match)) | 232 | localpart-match)) |
| 232 | localpart) | 233 | localpart) |
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index cec4fb24616..c16c2460e75 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el | |||
| @@ -1829,10 +1829,13 @@ For use in `add-log-current-defun-function'." | |||
| 1829 | (eval-and-compile (require 'smerge-mode)) | 1829 | (eval-and-compile (require 'smerge-mode)) |
| 1830 | (save-excursion | 1830 | (save-excursion |
| 1831 | (diff-beginning-of-hunk 'try-harder) | 1831 | (diff-beginning-of-hunk 'try-harder) |
| 1832 | (let* ((style (diff-hunk-style)) ;Skips the hunk header as well. | 1832 | (let* ((start (point)) |
| 1833 | (style (diff-hunk-style)) ;Skips the hunk header as well. | ||
| 1833 | (beg (point)) | 1834 | (beg (point)) |
| 1834 | (props '((diff-mode . fine) (face diff-refine-change))) | 1835 | (props '((diff-mode . fine) (face diff-refine-change))) |
| 1835 | (end (progn (diff-end-of-hunk) (point)))) | 1836 | ;; Be careful to go back to `start' so diff-end-of-hunk gets |
| 1837 | ;; to read the hunk header's line info. | ||
| 1838 | (end (progn (goto-char start) (diff-end-of-hunk) (point)))) | ||
| 1836 | 1839 | ||
| 1837 | (remove-overlays beg end 'diff-mode 'fine) | 1840 | (remove-overlays beg end 'diff-mode 'fine) |
| 1838 | 1841 | ||
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 2bce58f50f2..c7f37c50011 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el | |||
| @@ -774,7 +774,7 @@ where LOGBUFFER is the name of the ChangeLog buffer, and each | |||
| 774 | (setq pattern (file-name-nondirectory file))) | 774 | (setq pattern (file-name-nondirectory file))) |
| 775 | 775 | ||
| 776 | (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)" | 776 | (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)" |
| 777 | pattern | 777 | (regexp-quote pattern) |
| 778 | "\\($\\|[^[:alnum:]]\\)")) | 778 | "\\($\\|[^[:alnum:]]\\)")) |
| 779 | 779 | ||
| 780 | (let (texts | 780 | (let (texts |
diff --git a/src/ChangeLog b/src/ChangeLog index 18c482c2e92..2db05fd1722 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,58 @@ | |||
| 1 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * fileio.c (Fexpand_file_name): Doc fix. (Bug#7617) | ||
| 4 | |||
| 5 | 2010-12-13 Eli Zaretskii <eliz@gnu.org> | ||
| 6 | |||
| 7 | * xdisp.c (string_pos_nchars_ahead, c_string_pos) | ||
| 8 | (face_before_or_after_it_pos, next_element_from_string) | ||
| 9 | (next_element_from_c_string, produce_stretch_glyph): Remove unused | ||
| 10 | calculations of maximum string length before calling | ||
| 11 | string_char_and_length and STRING_CHAR_AND_LENGTH. | ||
| 12 | (string_char_and_length): Update commentary: MAXLEN is no longer | ||
| 13 | needed. | ||
| 14 | |||
| 15 | 2010-12-13 Jan Djärv <jan.h.d@swipnet.se> | ||
| 16 | |||
| 17 | * keyboard.c (kbd_buffer_get_event): Construct SAVE_SESSION_EVENT | ||
| 18 | as (Qsave_session arg). | ||
| 19 | |||
| 20 | * xsmfns.c (smc_interact_CB): Set arg to Qnil. | ||
| 21 | (smc_die_CB): Make an event with arg Qt. | ||
| 22 | (Fhandle_save_session): If event has Qt as argument, | ||
| 23 | call Fkill_emacs (Bug#7552). | ||
| 24 | |||
| 25 | 2010-12-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 26 | |||
| 27 | * buffer.c (transient-mark-mode): Doc fix (Bug#7465). | ||
| 28 | |||
| 29 | 2010-12-13 Jan Djärv <jan.h.d@swipnet.se> | ||
| 30 | |||
| 31 | * xsmfns.c (smc_die_CB): Call Fkill_emacs (Bug#7552). | ||
| 32 | |||
| 33 | 2010-12-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 34 | |||
| 35 | * dispextern.h (struct it): New member overlay_strings_charpos. | ||
| 36 | |||
| 37 | * xdisp.c (next_overlay_string, load_overlay_strings): Record the | ||
| 38 | charpos where we computed n_overlay_strings. | ||
| 39 | (next_overlay_string): Load overlay strings at recorded position, | ||
| 40 | which may not be the same as the iterator's charpos (Bug#7016). | ||
| 41 | |||
| 42 | 2010-12-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 43 | |||
| 44 | * xdisp.c (try_scrolling): Avoid infloop if the first line is | ||
| 45 | obscured due to a vscroll (Bug#7537). | ||
| 46 | |||
| 47 | 2010-12-13 Jan Djärv <jhd@zeplinf.localdomain> | ||
| 48 | |||
| 49 | * nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT. | ||
| 50 | |||
| 51 | * nsterm.m (x_set_window_size, windowWillResize, initFrameFromEmacs): | ||
| 52 | Use FRAME_TOOLBAR_HEIGHT. | ||
| 53 | (x_set_offset): Handle XNegative and YNegative in | ||
| 54 | f->size_hint_flags (Bug#7510). | ||
| 55 | |||
| 1 | 2010-12-11 Eli Zaretskii <eliz@gnu.org> | 56 | 2010-12-11 Eli Zaretskii <eliz@gnu.org> |
| 2 | 57 | ||
| 3 | * w32fns.c (Fx_show_tip): Call try_window with last argument | 58 | * w32fns.c (Fx_show_tip): Call try_window with last argument |
diff --git a/src/buffer.c b/src/buffer.c index 67192b4843b..1351dac3cd7 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -6106,15 +6106,17 @@ Non-nil also enables highlighting of the region whenever the mark is active. | |||
| 6106 | The variable `highlight-nonselected-windows' controls whether to highlight | 6106 | The variable `highlight-nonselected-windows' controls whether to highlight |
| 6107 | all windows or just the selected window. | 6107 | all windows or just the selected window. |
| 6108 | 6108 | ||
| 6109 | If the value is `lambda', that enables Transient Mark mode temporarily. | 6109 | Lisp programs may give this variable certain special values: |
| 6110 | After any subsequent action that would normally deactivate the mark | 6110 | |
| 6111 | \(such as buffer modification), Transient Mark mode is turned off. | 6111 | - A value of `lambda' enables Transient Mark mode temporarily. |
| 6112 | 6112 | It is disabled again after any subsequent action that would | |
| 6113 | If the value is (only . OLDVAL), that enables Transient Mark mode | 6113 | normally deactivate the mark (e.g. buffer modification). |
| 6114 | temporarily. After any subsequent point motion command that is not | 6114 | |
| 6115 | shift-translated, or any other action that would normally deactivate | 6115 | - A value of (only . OLDVAL) enables Transient Mark mode |
| 6116 | the mark (such as buffer modification), the value of | 6116 | temporarily. After any subsequent point motion command that is |
| 6117 | `transient-mark-mode' is set to OLDVAL. */); | 6117 | not shift-translated, or any other action that would normally |
| 6118 | deactivate the mark (e.g. buffer modification), the value of | ||
| 6119 | `transient-mark-mode' is set to OLDVAL. */); | ||
| 6118 | Vtransient_mark_mode = Qnil; | 6120 | Vtransient_mark_mode = Qnil; |
| 6119 | 6121 | ||
| 6120 | DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, | 6122 | DEFVAR_LISP ("inhibit-read-only", &Vinhibit_read_only, |
diff --git a/src/config.in b/src/config.in index 105f343870c..737d3827363 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -1053,9 +1053,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 1053 | /* Define to `int' if <sys/types.h> does not define. */ | 1053 | /* Define to `int' if <sys/types.h> does not define. */ |
| 1054 | #undef pid_t | 1054 | #undef pid_t |
| 1055 | 1055 | ||
| 1056 | /* Define to `unsigned int' if <sys/types.h> does not define. */ | ||
| 1057 | #undef size_t | ||
| 1058 | |||
| 1059 | /* Define to any substitute for sys_siglist. */ | 1056 | /* Define to any substitute for sys_siglist. */ |
| 1060 | #undef sys_siglist | 1057 | #undef sys_siglist |
| 1061 | 1058 | ||
diff --git a/src/dispextern.h b/src/dispextern.h index 7426c03b5ec..27d3c1583ca 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -2178,6 +2178,12 @@ struct it | |||
| 2178 | OVERLAY_STRING_CHUNK_SIZE. */ | 2178 | OVERLAY_STRING_CHUNK_SIZE. */ |
| 2179 | int n_overlay_strings; | 2179 | int n_overlay_strings; |
| 2180 | 2180 | ||
| 2181 | /* The charpos where n_overlay_strings was calculated. This should | ||
| 2182 | be set at the same time as n_overlay_strings. It is needed | ||
| 2183 | because we show before-strings at the start of invisible text; | ||
| 2184 | see handle_invisible_prop in xdisp.c. */ | ||
| 2185 | int overlay_strings_charpos; | ||
| 2186 | |||
| 2181 | /* Vector of overlays to process. Overlay strings are processed | 2187 | /* Vector of overlays to process. Overlay strings are processed |
| 2182 | OVERLAY_STRING_CHUNK_SIZE at a time. */ | 2188 | OVERLAY_STRING_CHUNK_SIZE at a time. */ |
| 2183 | #define OVERLAY_STRING_CHUNK_SIZE 16 | 2189 | #define OVERLAY_STRING_CHUNK_SIZE 16 |
diff --git a/src/fileio.c b/src/fileio.c index 886e5ebc411..c2b93a6bd8b 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -786,6 +786,9 @@ File name components that are `.' are removed, and | |||
| 786 | so are file name components followed by `..', along with the `..' itself; | 786 | so are file name components followed by `..', along with the `..' itself; |
| 787 | note that these simplifications are done without checking the resulting | 787 | note that these simplifications are done without checking the resulting |
| 788 | file names in the file system. | 788 | file names in the file system. |
| 789 | Multiple consecutive slashes are collapsed into a single slash, | ||
| 790 | except at the beginning of the file name when they are significant (e.g., | ||
| 791 | UNC file names on MS-Windows.) | ||
| 789 | An initial `~/' expands to your home directory. | 792 | An initial `~/' expands to your home directory. |
| 790 | An initial `~USER/' expands to USER's home directory. | 793 | An initial `~USER/' expands to USER's home directory. |
| 791 | See also the function `substitute-in-file-name'. | 794 | See also the function `substitute-in-file-name'. |
| @@ -793,7 +796,7 @@ See also the function `substitute-in-file-name'. | |||
| 793 | For technical reasons, this function can return correct but | 796 | For technical reasons, this function can return correct but |
| 794 | non-intuitive results for the root directory; for instance, | 797 | non-intuitive results for the root directory; for instance, |
| 795 | \(expand-file-name ".." "/") returns "/..". For this reason, use | 798 | \(expand-file-name ".." "/") returns "/..". For this reason, use |
| 796 | (directory-file-name (file-name-directory dirname)) to traverse a | 799 | \(directory-file-name (file-name-directory dirname)) to traverse a |
| 797 | filesystem tree, not (expand-file-name ".." dirname). */) | 800 | filesystem tree, not (expand-file-name ".." dirname). */) |
| 798 | (Lisp_Object name, Lisp_Object default_directory) | 801 | (Lisp_Object name, Lisp_Object default_directory) |
| 799 | { | 802 | { |
diff --git a/src/keyboard.c b/src/keyboard.c index 923ac1ad1d9..1023d34ca79 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -4102,7 +4102,7 @@ kbd_buffer_get_event (KBOARD **kbp, | |||
| 4102 | #endif | 4102 | #endif |
| 4103 | else if (event->kind == SAVE_SESSION_EVENT) | 4103 | else if (event->kind == SAVE_SESSION_EVENT) |
| 4104 | { | 4104 | { |
| 4105 | obj = Fcons (Qsave_session, Qnil); | 4105 | obj = Fcons (Qsave_session, Fcons (event->arg, Qnil)); |
| 4106 | kbd_fetch_ptr = event + 1; | 4106 | kbd_fetch_ptr = event + 1; |
| 4107 | } | 4107 | } |
| 4108 | /* Just discard these, by returning nil. | 4108 | /* Just discard these, by returning nil. |
diff --git a/src/nsterm.m b/src/nsterm.m index 78d690c020d..87dc1195425 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -1106,16 +1106,31 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_grav) | |||
| 1106 | 1106 | ||
| 1107 | f->left_pos = xoff; | 1107 | f->left_pos = xoff; |
| 1108 | f->top_pos = yoff; | 1108 | f->top_pos = yoff; |
| 1109 | |||
| 1110 | if (view != nil && (screen = [[view window] screen])) | ||
| 1111 | { | ||
| 1112 | f->left_pos = f->size_hint_flags & XNegative | ||
| 1113 | ? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f) | ||
| 1114 | : f->left_pos; | ||
| 1115 | /* We use visibleFrame here to take menu bar into account. | ||
| 1116 | Ideally we should also adjust left/top with visibleFrame.offset. */ | ||
| 1117 | |||
| 1118 | f->top_pos = f->size_hint_flags & YNegative | ||
| 1119 | ? ([screen visibleFrame].size.height + f->top_pos | ||
| 1120 | - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f) | ||
| 1121 | - FRAME_TOOLBAR_HEIGHT (f)) | ||
| 1122 | : f->top_pos; | ||
| 1109 | #ifdef NS_IMPL_GNUSTEP | 1123 | #ifdef NS_IMPL_GNUSTEP |
| 1110 | if (xoff < 100) | 1124 | if (f->left_pos < 100) |
| 1111 | f->left_pos = 100; /* don't overlap menu */ | 1125 | f->left_pos = 100; /* don't overlap menu */ |
| 1112 | #endif | 1126 | #endif |
| 1127 | [[view window] setFrameTopLeftPoint: | ||
| 1128 | NSMakePoint (SCREENMAXBOUND (f->left_pos), | ||
| 1129 | SCREENMAXBOUND ([screen frame].size.height | ||
| 1130 | - NS_TOP_POS (f)))]; | ||
| 1131 | f->size_hint_flags &= ~(XNegative|YNegative); | ||
| 1132 | } | ||
| 1113 | 1133 | ||
| 1114 | if (view != nil && (screen = [[view window] screen])) | ||
| 1115 | [[view window] setFrameTopLeftPoint: | ||
| 1116 | NSMakePoint (SCREENMAXBOUND (f->left_pos), | ||
| 1117 | SCREENMAXBOUND ([screen frame].size.height | ||
| 1118 | - NS_TOP_POS (f)))]; | ||
| 1119 | UNBLOCK_INPUT; | 1134 | UNBLOCK_INPUT; |
| 1120 | } | 1135 | } |
| 1121 | 1136 | ||
diff --git a/src/xdisp.c b/src/xdisp.c index 77e9db2e5eb..1c220647ba9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1544,11 +1544,10 @@ pos_visible_p (struct window *w, EMACS_INT charpos, int *x, int *y, | |||
| 1544 | } | 1544 | } |
| 1545 | 1545 | ||
| 1546 | 1546 | ||
| 1547 | /* Return the next character from STR which is MAXLEN bytes long. | 1547 | /* Return the next character from STR. Return in *LEN the length of |
| 1548 | Return in *LEN the length of the character. This is like | 1548 | the character. This is like STRING_CHAR_AND_LENGTH but never |
| 1549 | STRING_CHAR_AND_LENGTH but never returns an invalid character. If | 1549 | returns an invalid character. If we find one, we return a `?', but |
| 1550 | we find one, we return a `?', but with the length of the invalid | 1550 | with the length of the invalid character. */ |
| 1551 | character. */ | ||
| 1552 | 1551 | ||
| 1553 | static INLINE int | 1552 | static INLINE int |
| 1554 | string_char_and_length (const unsigned char *str, int *len) | 1553 | string_char_and_length (const unsigned char *str, int *len) |
| @@ -1577,15 +1576,13 @@ string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, EMACS_INT ncha | |||
| 1577 | 1576 | ||
| 1578 | if (STRING_MULTIBYTE (string)) | 1577 | if (STRING_MULTIBYTE (string)) |
| 1579 | { | 1578 | { |
| 1580 | EMACS_INT rest = SBYTES (string) - BYTEPOS (pos); | ||
| 1581 | const unsigned char *p = SDATA (string) + BYTEPOS (pos); | 1579 | const unsigned char *p = SDATA (string) + BYTEPOS (pos); |
| 1582 | int len; | 1580 | int len; |
| 1583 | 1581 | ||
| 1584 | while (nchars--) | 1582 | while (nchars--) |
| 1585 | { | 1583 | { |
| 1586 | string_char_and_length (p, &len); | 1584 | string_char_and_length (p, &len); |
| 1587 | p += len, rest -= len; | 1585 | p += len; |
| 1588 | xassert (rest >= 0); | ||
| 1589 | CHARPOS (pos) += 1; | 1586 | CHARPOS (pos) += 1; |
| 1590 | BYTEPOS (pos) += len; | 1587 | BYTEPOS (pos) += len; |
| 1591 | } | 1588 | } |
| @@ -1625,15 +1622,13 @@ c_string_pos (EMACS_INT charpos, const unsigned char *s, int multibyte_p) | |||
| 1625 | 1622 | ||
| 1626 | if (multibyte_p) | 1623 | if (multibyte_p) |
| 1627 | { | 1624 | { |
| 1628 | EMACS_INT rest = strlen (s); | ||
| 1629 | int len; | 1625 | int len; |
| 1630 | 1626 | ||
| 1631 | SET_TEXT_POS (pos, 0, 0); | 1627 | SET_TEXT_POS (pos, 0, 0); |
| 1632 | while (charpos--) | 1628 | while (charpos--) |
| 1633 | { | 1629 | { |
| 1634 | string_char_and_length (s, &len); | 1630 | string_char_and_length (s, &len); |
| 1635 | s += len, rest -= len; | 1631 | s += len; |
| 1636 | xassert (rest >= 0); | ||
| 1637 | CHARPOS (pos) += 1; | 1632 | CHARPOS (pos) += 1; |
| 1638 | BYTEPOS (pos) += len; | 1633 | BYTEPOS (pos) += len; |
| 1639 | } | 1634 | } |
| @@ -4823,6 +4818,7 @@ next_overlay_string (struct it *it) | |||
| 4823 | && it->stop_charpos <= it->end_charpos)); | 4818 | && it->stop_charpos <= it->end_charpos)); |
| 4824 | it->current.overlay_string_index = -1; | 4819 | it->current.overlay_string_index = -1; |
| 4825 | it->n_overlay_strings = 0; | 4820 | it->n_overlay_strings = 0; |
| 4821 | it->overlay_strings_charpos = -1; | ||
| 4826 | 4822 | ||
| 4827 | /* If we're at the end of the buffer, record that we have | 4823 | /* If we're at the end of the buffer, record that we have |
| 4828 | processed the overlay strings there already, so that | 4824 | processed the overlay strings there already, so that |
| @@ -4835,11 +4831,13 @@ next_overlay_string (struct it *it) | |||
| 4835 | /* There are more overlay strings to process. If | 4831 | /* There are more overlay strings to process. If |
| 4836 | IT->current.overlay_string_index has advanced to a position | 4832 | IT->current.overlay_string_index has advanced to a position |
| 4837 | where we must load IT->overlay_strings with more strings, do | 4833 | where we must load IT->overlay_strings with more strings, do |
| 4838 | it. */ | 4834 | it. We must load at the IT->overlay_strings_charpos where |
| 4835 | IT->n_overlay_strings was originally computed; when invisible | ||
| 4836 | text is present, this might not be IT_CHARPOS (Bug#7016). */ | ||
| 4839 | int i = it->current.overlay_string_index % OVERLAY_STRING_CHUNK_SIZE; | 4837 | int i = it->current.overlay_string_index % OVERLAY_STRING_CHUNK_SIZE; |
| 4840 | 4838 | ||
| 4841 | if (it->current.overlay_string_index && i == 0) | 4839 | if (it->current.overlay_string_index && i == 0) |
| 4842 | load_overlay_strings (it, 0); | 4840 | load_overlay_strings (it, it->overlay_strings_charpos); |
| 4843 | 4841 | ||
| 4844 | /* Initialize IT to deliver display elements from the overlay | 4842 | /* Initialize IT to deliver display elements from the overlay |
| 4845 | string. */ | 4843 | string. */ |
| @@ -5051,8 +5049,9 @@ load_overlay_strings (struct it *it, EMACS_INT charpos) | |||
| 5051 | if (n > 1) | 5049 | if (n > 1) |
| 5052 | qsort (entries, n, sizeof *entries, compare_overlay_entries); | 5050 | qsort (entries, n, sizeof *entries, compare_overlay_entries); |
| 5053 | 5051 | ||
| 5054 | /* Record the total number of strings to process. */ | 5052 | /* Record number of overlay strings, and where we computed it. */ |
| 5055 | it->n_overlay_strings = n; | 5053 | it->n_overlay_strings = n; |
| 5054 | it->overlay_strings_charpos = charpos; | ||
| 5056 | 5055 | ||
| 5057 | /* IT->current.overlay_string_index is the number of overlay strings | 5056 | /* IT->current.overlay_string_index is the number of overlay strings |
| 5058 | that have already been consumed by IT. Copy some of the | 5057 | that have already been consumed by IT. Copy some of the |
| @@ -13426,7 +13425,11 @@ try_scrolling (Lisp_Object window, int just_this_one_p, | |||
| 13426 | 13425 | ||
| 13427 | /* If cursor ends up on a partially visible line, | 13426 | /* If cursor ends up on a partially visible line, |
| 13428 | treat that as being off the bottom of the screen. */ | 13427 | treat that as being off the bottom of the screen. */ |
| 13429 | if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0)) | 13428 | if (! cursor_row_fully_visible_p (w, extra_scroll_margin_lines <= 1, 0) |
| 13429 | /* It's possible that the cursor is on the first line of the | ||
| 13430 | buffer, which is partially obscured due to a vscroll | ||
| 13431 | (Bug#7537). In that case, avoid looping forever . */ | ||
| 13432 | && extra_scroll_margin_lines < w->desired_matrix->nrows - 1) | ||
| 13430 | { | 13433 | { |
| 13431 | clear_glyph_matrix (w->desired_matrix); | 13434 | clear_glyph_matrix (w->desired_matrix); |
| 13432 | ++extra_scroll_margin_lines; | 13435 | ++extra_scroll_margin_lines; |
diff --git a/src/xsmfns.c b/src/xsmfns.c index 7b82fd4e61e..561fd5ee51a 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -172,6 +172,7 @@ smc_interact_CB (SmcConn smcConn, SmPointer clientData) | |||
| 172 | { | 172 | { |
| 173 | doing_interact = True; | 173 | doing_interact = True; |
| 174 | emacs_event.kind = SAVE_SESSION_EVENT; | 174 | emacs_event.kind = SAVE_SESSION_EVENT; |
| 175 | emacs_event.arg = Qnil; | ||
| 175 | } | 176 | } |
| 176 | 177 | ||
| 177 | /* This is called when the session manager tells us to save ourselves. | 178 | /* This is called when the session manager tells us to save ourselves. |
| @@ -308,8 +309,8 @@ smc_save_yourself_CB (SmcConn smcConn, | |||
| 308 | static void | 309 | static void |
| 309 | smc_die_CB (SmcConn smcConn, SmPointer clientData) | 310 | smc_die_CB (SmcConn smcConn, SmPointer clientData) |
| 310 | { | 311 | { |
| 311 | SmcCloseConnection (smcConn, 0, 0); | 312 | emacs_event.kind = SAVE_SESSION_EVENT; |
| 312 | ice_connection_closed (); | 313 | emacs_event.arg = Qt; |
| 313 | } | 314 | } |
| 314 | 315 | ||
| 315 | /* We don't use the next two but they are mandatory, leave them empty. | 316 | /* We don't use the next two but they are mandatory, leave them empty. |
| @@ -522,9 +523,12 @@ is told to abort the window system shutdown. | |||
| 522 | Do not call this function yourself. */) | 523 | Do not call this function yourself. */) |
| 523 | (Lisp_Object event) | 524 | (Lisp_Object event) |
| 524 | { | 525 | { |
| 526 | int kill_emacs = CONSP (event) && CONSP (XCDR (event)) | ||
| 527 | && EQ (Qt, XCAR (XCDR (event))); | ||
| 528 | |||
| 525 | /* Check doing_interact so that we don't do anything if someone called | 529 | /* Check doing_interact so that we don't do anything if someone called |
| 526 | this at the wrong time. */ | 530 | this at the wrong time. */ |
| 527 | if (doing_interact) | 531 | if (doing_interact && ! kill_emacs) |
| 528 | { | 532 | { |
| 529 | Bool cancel_shutdown = False; | 533 | Bool cancel_shutdown = False; |
| 530 | 534 | ||
| @@ -535,9 +539,20 @@ Do not call this function yourself. */) | |||
| 535 | 539 | ||
| 536 | doing_interact = False; | 540 | doing_interact = False; |
| 537 | } | 541 | } |
| 542 | else if (kill_emacs) | ||
| 543 | { | ||
| 544 | /* We should not do user interaction here, but it is not easy to | ||
| 545 | prevent. Fix this in next version. */ | ||
| 546 | Fkill_emacs (Qnil); | ||
| 538 | 547 | ||
| 548 | /* This will not be reached, but we want kill-emacs-hook to be run. */ | ||
| 549 | SmcCloseConnection (smc_conn, 0, 0); | ||
| 550 | ice_connection_closed (); | ||
| 551 | } | ||
| 552 | |||
| 539 | return Qnil; | 553 | return Qnil; |
| 540 | } | 554 | } |
| 555 | |||
| 541 | 556 | ||
| 542 | 557 | ||
| 543 | /*********************************************************************** | 558 | /*********************************************************************** |