diff options
| author | Joakim Verona | 2012-02-15 20:11:06 +0100 |
|---|---|---|
| committer | Joakim Verona | 2012-02-15 20:11:06 +0100 |
| commit | 61a7b858618b498f85b98d8ba312a34e2315dcea (patch) | |
| tree | bea05440a546e6f07cdaaba644397d7f0e04f099 | |
| parent | 02db17e53bf46c91b2cb8ee33b43d8ae252a1681 (diff) | |
| parent | 60236b0dca0416202da5c3e39564b85b2ae3c9fa (diff) | |
| download | emacs-61a7b858618b498f85b98d8ba312a34e2315dcea.tar.gz emacs-61a7b858618b498f85b98d8ba312a34e2315dcea.zip | |
upstream
33 files changed, 637 insertions, 372 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index 75103ff3cec..f2c572cfd17 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -204,7 +204,7 @@ hooks.texi | |||
| 204 | index.texi | 204 | index.texi |
| 205 | internals.texi | 205 | internals.texi |
| 206 | intro.texi cyd | 206 | intro.texi cyd |
| 207 | keymaps.texi | 207 | keymaps.texi cyd |
| 208 | lists.texi cyd | 208 | lists.texi cyd |
| 209 | loading.texi cyd | 209 | loading.texi cyd |
| 210 | locals.texi | 210 | locals.texi |
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index b24c6946281..0b6178d6195 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-02-15 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * sending.texi (Mail Sending): smtpmail-auth-credentials was removed. | ||
| 4 | |||
| 1 | 2012-02-12 Glenn Morris <rgm@gnu.org> | 5 | 2012-02-12 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * ack.texi (Acknowledgments): | 7 | * ack.texi (Acknowledgments): |
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index 5afbb9b1442..77ee97b361e 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi | |||
| @@ -1250,7 +1250,7 @@ Daiki Ueno wrote @file{starttls.el}, support for Transport Layer | |||
| 1250 | Security protocol; @file{sasl-cram.el} and @file{sasl-digest.el} (with | 1250 | Security protocol; @file{sasl-cram.el} and @file{sasl-digest.el} (with |
| 1251 | Kenichi Okada), and @file{sasl.el}, support for Simple Authentication | 1251 | Kenichi Okada), and @file{sasl.el}, support for Simple Authentication |
| 1252 | and Security Layer (SASL); @file{plstore.el} for secure storage of | 1252 | and Security Layer (SASL); @file{plstore.el} for secure storage of |
| 1253 | propery lists; and the EasyPG (and its predecessor PGG) | 1253 | property lists; and the EasyPG (and its predecessor PGG) |
| 1254 | package, for GnuPG and PGP support. | 1254 | package, for GnuPG and PGP support. |
| 1255 | 1255 | ||
| 1256 | @item | 1256 | @item |
diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 6f154ce2af6..a2cb5d9f8f2 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi | |||
| @@ -377,8 +377,8 @@ sending mail via @code{smtpmail-send-it} (see below). | |||
| 377 | Send mail using the through an external mail host, such as your | 377 | Send mail using the through an external mail host, such as your |
| 378 | Internet service provider's outgoing SMTP mail server. If you have | 378 | Internet service provider's outgoing SMTP mail server. If you have |
| 379 | not told Emacs how to contact the SMTP server, it prompts for this | 379 | not told Emacs how to contact the SMTP server, it prompts for this |
| 380 | information, which is saved in the variables | 380 | information, which is saved in the @code{smtpmail-smtp-server} variable |
| 381 | @code{smtpmail-smtp-server} and @code{smtpmail-auth-credentials}. | 381 | and the file @file{~/.authinfo}. |
| 382 | @xref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}. | 382 | @xref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}. |
| 383 | 383 | ||
| 384 | @item sendmail-send-it | 384 | @item sendmail-send-it |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index c5848ca8b2d..1e369f3b627 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,31 @@ | |||
| 1 | 2012-02-15 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * minibuf.texi (Basic Completion): Define "completion table". | ||
| 4 | Move completion-in-region to Completion in Buffers node. | ||
| 5 | (Completion Commands): Use "completion table" terminology. | ||
| 6 | (Completion in Buffers): New node. | ||
| 7 | |||
| 8 | * modes.texi (Hooks): add-hook can be used for abnormal hooks too. | ||
| 9 | (Setting Hooks): Update minor mode usage example. | ||
| 10 | (Major Mode Conventions): Note that completion-at-point-functions | ||
| 11 | should be altered locally. Add xref to Completion in Buffers. | ||
| 12 | |||
| 13 | 2012-02-15 Glenn Morris <rgm@gnu.org> | ||
| 14 | |||
| 15 | * processes.texi (Network): Document open-network-stream :parameters. | ||
| 16 | |||
| 17 | 2012-02-14 Chong Yidong <cyd@gnu.org> | ||
| 18 | |||
| 19 | * keymaps.texi (Format of Keymaps): The CACHE component of keymaps | ||
| 20 | was removed on 2009-09-10. Update lisp-mode-map example. | ||
| 21 | (Inheritance and Keymaps): Minor clarification. | ||
| 22 | (Searching Keymaps): Remove out-of-place enumeration. | ||
| 23 | (Key Lookup): Remove unnecessary example (one was already given in | ||
| 24 | Format of Keymaps). | ||
| 25 | (Changing Key Bindings): Update suppress-keymap example. | ||
| 26 | (Menu Bar, Tool Bar): Copyedits. | ||
| 27 | (Tool Bar): Update tool-bar-map example. | ||
| 28 | |||
| 1 | 2012-02-12 Chong Yidong <cyd@gnu.org> | 29 | 2012-02-12 Chong Yidong <cyd@gnu.org> |
| 2 | 30 | ||
| 3 | * debugging.texi (Debugger Commands): Continuing is now allowed | 31 | * debugging.texi (Debugger Commands): Continuing is now allowed |
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 42c3613dd0b..5dd8994f439 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi | |||
| @@ -654,6 +654,7 @@ Completion | |||
| 654 | shell commands. | 654 | shell commands. |
| 655 | * Completion Styles:: Specifying rules for performing completion. | 655 | * Completion Styles:: Specifying rules for performing completion. |
| 656 | * Programmed Completion:: Writing your own completion-function. | 656 | * Programmed Completion:: Writing your own completion-function. |
| 657 | * Completion in Buffers:: Completing text in ordinary buffers. | ||
| 657 | 658 | ||
| 658 | Command Loop | 659 | Command Loop |
| 659 | 660 | ||
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index a8528a548fc..5652d94114e 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -173,13 +173,11 @@ ordinary binding applies to events of a particular @dfn{event type}, | |||
| 173 | which is always a character or a symbol. @xref{Classifying Events}. | 173 | which is always a character or a symbol. @xref{Classifying Events}. |
| 174 | In this kind of binding, @var{binding} is a command. | 174 | In this kind of binding, @var{binding} is a command. |
| 175 | 175 | ||
| 176 | @item (@var{type} @var{item-name} @r{[}@var{cache}@r{]} .@: @var{binding}) | 176 | @item (@var{type} @var{item-name} .@: @var{binding}) |
| 177 | This specifies a binding which is also a simple menu item that | 177 | This specifies a binding which is also a simple menu item that |
| 178 | displays as @var{item-name} in the menu. @var{cache}, if present, | 178 | displays as @var{item-name} in the menu. @xref{Simple Menu Items}. |
| 179 | caches certain information for display in the menu. @xref{Simple Menu | ||
| 180 | Items}. | ||
| 181 | 179 | ||
| 182 | @item (@var{type} @var{item-name} @var{help-string} @r{[}@var{cache}@r{]} .@: @var{binding}) | 180 | @item (@var{type} @var{item-name} @var{help-string} .@: @var{binding}) |
| 183 | This is a simple menu item with help string @var{help-string}. | 181 | This is a simple menu item with help string @var{help-string}. |
| 184 | 182 | ||
| 185 | @item (@var{type} menu-item .@: @var{details}) | 183 | @item (@var{type} menu-item .@: @var{details}) |
| @@ -234,8 +232,9 @@ other input events; thus, @kbd{M-@key{end}} has nothing to do with | |||
| 234 | @kbd{@key{ESC} @key{end}}. | 232 | @kbd{@key{ESC} @key{end}}. |
| 235 | 233 | ||
| 236 | Here as an example is the local keymap for Lisp mode, a sparse | 234 | Here as an example is the local keymap for Lisp mode, a sparse |
| 237 | keymap. It defines bindings for @key{DEL} and @key{TAB}, plus @kbd{C-c | 235 | keymap. It defines bindings for @key{DEL}, @kbd{C-c C-z}, |
| 238 | C-l}, @kbd{M-C-q}, and @kbd{M-C-x}. | 236 | @kbd{C-M-q}, and @kbd{C-M-x} (the actual value also contains a menu |
| 237 | binding, which is omitted here for the sake of brevity). | ||
| 239 | 238 | ||
| 240 | @example | 239 | @example |
| 241 | @group | 240 | @group |
| @@ -250,11 +249,8 @@ lisp-mode-map | |||
| 250 | @end group | 249 | @end group |
| 251 | @group | 250 | @group |
| 252 | (27 keymap | 251 | (27 keymap |
| 253 | ;; @r{@kbd{M-C-x}, treated as @kbd{@key{ESC} C-x}} | 252 | ;; @r{@kbd{C-M-x}, treated as @kbd{@key{ESC} C-x}} |
| 254 | (24 . lisp-send-defun) | 253 | (24 . lisp-send-defun)) |
| 255 | keymap | ||
| 256 | ;; @r{@kbd{M-C-q}, treated as @kbd{@key{ESC} C-q}} | ||
| 257 | (17 . indent-sexp)) | ||
| 258 | @end group | 254 | @end group |
| 259 | @group | 255 | @group |
| 260 | ;; @r{This part is inherited from @code{lisp-mode-shared-map}.} | 256 | ;; @r{This part is inherited from @code{lisp-mode-shared-map}.} |
| @@ -264,9 +260,8 @@ lisp-mode-map | |||
| 264 | @end group | 260 | @end group |
| 265 | @group | 261 | @group |
| 266 | (27 keymap | 262 | (27 keymap |
| 267 | ;; @r{@kbd{M-C-q}, treated as @kbd{@key{ESC} C-q}} | 263 | ;; @r{@kbd{C-M-q}, treated as @kbd{@key{ESC} C-q}} |
| 268 | (17 . indent-sexp)) | 264 | (17 . indent-sexp))) |
| 269 | (9 . lisp-indent-line)) | ||
| 270 | @end group | 265 | @end group |
| 271 | @end example | 266 | @end example |
| 272 | 267 | ||
| @@ -441,10 +436,10 @@ This function returns a new keymap composed of the existing keymap(s) | |||
| 441 | @var{maps}, and optionally inheriting from a parent keymap | 436 | @var{maps}, and optionally inheriting from a parent keymap |
| 442 | @var{parent}. @var{maps} can be a single keymap or a list of more | 437 | @var{parent}. @var{maps} can be a single keymap or a list of more |
| 443 | than one. When looking up a key in the resulting new map, Emacs | 438 | than one. When looking up a key in the resulting new map, Emacs |
| 444 | searches in each of the @var{maps}, and then in @var{parent}, stopping | 439 | searches in each of the @var{maps} in turn, and then in @var{parent}, |
| 445 | at the first match. A @code{nil} binding in any one of @var{maps} | 440 | stopping at the first match. A @code{nil} binding in any one of |
| 446 | overrides any binding in @var{parent}, but not a non-@code{nil} binding | 441 | @var{maps} overrides any binding in @var{parent}, but it does not |
| 447 | in any other of the @var{maps}. | 442 | override any non-@code{nil} binding in any other of the @var{maps}. |
| 448 | @end defun | 443 | @end defun |
| 449 | 444 | ||
| 450 | @noindent For example, here is how Emacs sets the parent of | 445 | @noindent For example, here is how Emacs sets the parent of |
| @@ -762,35 +757,23 @@ them: | |||
| 762 | @end lisp | 757 | @end lisp |
| 763 | 758 | ||
| 764 | @noindent | 759 | @noindent |
| 765 | The @var{find-in} and @var{find-in-any} are pseudo functions that | 760 | @var{find-in} and @var{find-in-any} are pseudo functions that search |
| 766 | search in one keymap and in an alist of keymaps, respectively. | 761 | in one keymap and in an alist of keymaps, respectively. (Searching a |
| 767 | (Searching a single keymap for a binding is called @dfn{key lookup}; | 762 | single keymap for a binding is called @dfn{key lookup}; see @ref{Key |
| 768 | see @ref{Key Lookup}.) If the key sequence starts with a mouse event, | 763 | Lookup}.) If the key sequence starts with a mouse event, or a |
| 769 | or a symbolic prefix event followed by a mouse event, that event's | 764 | symbolic prefix event followed by a mouse event, that event's position |
| 770 | position is used instead of point and the current buffer. Mouse | 765 | is used instead of point and the current buffer. Mouse events on an |
| 771 | events on an embedded string use non-@code{nil} text properties from | 766 | embedded string use non-@code{nil} text properties from that string |
| 772 | that string instead of the buffer. | 767 | instead of the buffer. |
| 773 | 768 | ||
| 774 | @enumerate | 769 | When a match is found (@pxref{Key Lookup}), if the binding in the |
| 775 | @item | ||
| 776 | The function finally found may be remapped | ||
| 777 | (@pxref{Remapping Commands}). | ||
| 778 | |||
| 779 | @item | ||
| 780 | Characters that are bound to @code{self-insert-command} are translated | ||
| 781 | according to @code{translation-table-for-input} before insertion. | ||
| 782 | |||
| 783 | @item | ||
| 784 | @code{current-active-maps} returns a list of the | ||
| 785 | currently active keymaps at point. | ||
| 786 | |||
| 787 | @item | ||
| 788 | When a match is found (@pxref{Key Lookup}), if the binding in the | ||
| 789 | keymap is a function, the search is over. However if the keymap entry | 770 | keymap is a function, the search is over. However if the keymap entry |
| 790 | is a symbol with a value or a string, Emacs replaces the input key | 771 | is a symbol with a value or a string, Emacs replaces the input key |
| 791 | sequences with the variable's value or the string, and restarts the | 772 | sequences with the variable's value or the string, and restarts the |
| 792 | search of the active keymaps. | 773 | search of the active keymaps. |
| 793 | @end enumerate | 774 | |
| 775 | The function finally found might also be remapped. @xref{Remapping | ||
| 776 | Commands}. | ||
| 794 | 777 | ||
| 795 | @node Controlling Active Maps | 778 | @node Controlling Active Maps |
| 796 | @section Controlling the Active Keymaps | 779 | @section Controlling the Active Keymaps |
| @@ -1088,21 +1071,9 @@ lookup form a complete key, and the object is its binding, but the | |||
| 1088 | binding is not executable as a command. | 1071 | binding is not executable as a command. |
| 1089 | @end table | 1072 | @end table |
| 1090 | 1073 | ||
| 1091 | In short, a keymap entry may be a keymap, a command, a keyboard macro, | 1074 | In short, a keymap entry may be a keymap, a command, a keyboard |
| 1092 | a symbol that leads to one of them, or an indirection or @code{nil}. | 1075 | macro, a symbol that leads to one of them, or an indirection or |
| 1093 | Here is an example of a sparse keymap with two characters bound to | 1076 | @code{nil}. |
| 1094 | commands and one bound to another keymap. This map is the normal value | ||
| 1095 | of @code{emacs-lisp-mode-map}. Note that 9 is the code for @key{TAB}, | ||
| 1096 | 127 for @key{DEL}, 27 for @key{ESC}, 17 for @kbd{C-q} and 24 for | ||
| 1097 | @kbd{C-x}. | ||
| 1098 | |||
| 1099 | @example | ||
| 1100 | @group | ||
| 1101 | (keymap (9 . lisp-indent-line) | ||
| 1102 | (127 . backward-delete-char-untabify) | ||
| 1103 | (27 keymap (17 . indent-sexp) (24 . eval-defun))) | ||
| 1104 | @end group | ||
| 1105 | @end example | ||
| 1106 | 1077 | ||
| 1107 | @node Functions for Key Lookup | 1078 | @node Functions for Key Lookup |
| 1108 | @section Functions for Key Lookup | 1079 | @section Functions for Key Lookup |
| @@ -1472,23 +1443,21 @@ that is used for some other purpose is likely to cause trouble; for | |||
| 1472 | example, suppressing @code{global-map} would make it impossible to use | 1443 | example, suppressing @code{global-map} would make it impossible to use |
| 1473 | most of Emacs. | 1444 | most of Emacs. |
| 1474 | 1445 | ||
| 1475 | Most often, @code{suppress-keymap} is used to initialize local | 1446 | This function can be used to initialize the local keymap of a major |
| 1476 | keymaps of modes such as Rmail and Dired where insertion of text is not | 1447 | mode for which insertion of text is not desirable. But usually such a |
| 1477 | desirable and the buffer is read-only. Here is an example taken from | 1448 | mode should be derived from @code{special-mode} (@pxref{Basic Major |
| 1478 | the file @file{emacs/lisp/dired.el}, showing how the local keymap for | 1449 | Modes}); then its keymap will automatically inherit from |
| 1479 | Dired mode is set up: | 1450 | @code{special-mode-map}, which is already suppressed. Here is how |
| 1451 | @code{special-mode-map} is defined: | ||
| 1480 | 1452 | ||
| 1481 | @smallexample | 1453 | @smallexample |
| 1482 | @group | 1454 | @group |
| 1483 | (setq dired-mode-map (make-keymap)) | 1455 | (defvar special-mode-map |
| 1484 | (suppress-keymap dired-mode-map) | 1456 | (let ((map (make-sparse-keymap))) |
| 1485 | (define-key dired-mode-map "r" 'dired-rename-file) | 1457 | (suppress-keymap map) |
| 1486 | (define-key dired-mode-map "\C-d" 'dired-flag-file-deleted) | 1458 | (define-key map "q" 'quit-window) |
| 1487 | (define-key dired-mode-map "d" 'dired-flag-file-deleted) | 1459 | @dots{} |
| 1488 | (define-key dired-mode-map "v" 'dired-view-file) | 1460 | map)) |
| 1489 | (define-key dired-mode-map "e" 'dired-find-file) | ||
| 1490 | (define-key dired-mode-map "f" 'dired-find-file) | ||
| 1491 | @dots{} | ||
| 1492 | @end group | 1461 | @end group |
| 1493 | @end smallexample | 1462 | @end smallexample |
| 1494 | @end defun | 1463 | @end defun |
| @@ -2064,12 +2033,10 @@ event type (it doesn't matter what event type) to a binding like this: | |||
| 2064 | @noindent | 2033 | @noindent |
| 2065 | The @sc{car}, @var{item-string}, is the string to be displayed in the | 2034 | The @sc{car}, @var{item-string}, is the string to be displayed in the |
| 2066 | menu. It should be short---preferably one to three words. It should | 2035 | menu. It should be short---preferably one to three words. It should |
| 2067 | describe the action of the command it corresponds to. Note that it is | 2036 | describe the action of the command it corresponds to. Note that not |
| 2068 | not generally possible to display non-@acronym{ASCII} text in menus. It will | 2037 | all graphical toolkits can display non-@acronym{ASCII} text in menus |
| 2069 | work for keyboard menus and will work to a large extent when Emacs is | 2038 | (it will work for keyboard menus and will work to a large extent with |
| 2070 | built with the Gtk+ toolkit.@footnote{In this case, the text is first | 2039 | the GTK+ toolkit). |
| 2071 | encoded using the @code{utf-8} coding system and then rendered by the | ||
| 2072 | toolkit as it sees fit.} | ||
| 2073 | 2040 | ||
| 2074 | You can also supply a second string, called the help string, as follows: | 2041 | You can also supply a second string, called the help string, as follows: |
| 2075 | 2042 | ||
| @@ -2418,18 +2385,6 @@ this; @key{SPC} is the default.) | |||
| 2418 | she should type the corresponding character---the one whose binding is | 2385 | she should type the corresponding character---the one whose binding is |
| 2419 | that alternative. | 2386 | that alternative. |
| 2420 | 2387 | ||
| 2421 | @ignore | ||
| 2422 | In a menu intended for keyboard use, each menu item must clearly | ||
| 2423 | indicate what character to type. The best convention to use is to make | ||
| 2424 | the character the first letter of the item string---that is something | ||
| 2425 | users will understand without being told. We plan to change this; by | ||
| 2426 | the time you read this manual, keyboard menus may explicitly name the | ||
| 2427 | key for each alternative. | ||
| 2428 | @end ignore | ||
| 2429 | |||
| 2430 | This way of using menus in an Emacs-like editor was inspired by the | ||
| 2431 | Hierarkey system. | ||
| 2432 | |||
| 2433 | @defvar menu-prompt-more-char | 2388 | @defvar menu-prompt-more-char |
| 2434 | This variable specifies the character to use to ask to see | 2389 | This variable specifies the character to use to ask to see |
| 2435 | the next line of a menu. Its initial value is 32, the code | 2390 | the next line of a menu. Its initial value is 32, the code |
| @@ -2512,21 +2467,17 @@ can do it this way: | |||
| 2512 | @subsection The Menu Bar | 2467 | @subsection The Menu Bar |
| 2513 | @cindex menu bar | 2468 | @cindex menu bar |
| 2514 | 2469 | ||
| 2515 | Most window systems allow each frame to have a @dfn{menu bar}---a | 2470 | On graphical displays, there is usually a @dfn{menu bar} at the top |
| 2516 | permanently displayed menu stretching horizontally across the top of | 2471 | of each frame. @xref{Menu Bars,,,emacs, The GNU Emacs Manual}. Menu |
| 2517 | the frame. (In order for a frame to display a menu bar, its | 2472 | bar items are subcommands of the fake ``function key'' |
| 2518 | @code{menu-bar-lines} parameter must be greater than zero. | 2473 | @code{menu-bar}, as defined in the active keymaps. |
| 2519 | @xref{Layout Parameters}.) | ||
| 2520 | |||
| 2521 | The items of the menu bar are the subcommands of the fake ``function | ||
| 2522 | key'' @code{menu-bar}, as defined in the active keymaps. | ||
| 2523 | 2474 | ||
| 2524 | To add an item to the menu bar, invent a fake ``function key'' of your | 2475 | To add an item to the menu bar, invent a fake ``function key'' of your |
| 2525 | own (let's call it @var{key}), and make a binding for the key sequence | 2476 | own (let's call it @var{key}), and make a binding for the key sequence |
| 2526 | @code{[menu-bar @var{key}]}. Most often, the binding is a menu keymap, | 2477 | @code{[menu-bar @var{key}]}. Most often, the binding is a menu keymap, |
| 2527 | so that pressing a button on the menu bar item leads to another menu. | 2478 | so that pressing a button on the menu bar item leads to another menu. |
| 2528 | 2479 | ||
| 2529 | When more than one active keymap defines the same fake function key | 2480 | When more than one active keymap defines the same ``function key'' |
| 2530 | for the menu bar, the item appears just once. If the user clicks on | 2481 | for the menu bar, the item appears just once. If the user clicks on |
| 2531 | that menu bar item, it brings up a single, combined menu containing | 2482 | that menu bar item, it brings up a single, combined menu containing |
| 2532 | all the subcommands of that item---the global subcommands, the local | 2483 | all the subcommands of that item---the global subcommands, the local |
| @@ -2541,11 +2492,6 @@ were @code{nil}. @xref{Active Keymaps}. | |||
| 2541 | 2492 | ||
| 2542 | @example | 2493 | @example |
| 2543 | @group | 2494 | @group |
| 2544 | (modify-frame-parameters (selected-frame) | ||
| 2545 | '((menu-bar-lines . 2))) | ||
| 2546 | @end group | ||
| 2547 | |||
| 2548 | @group | ||
| 2549 | ;; @r{Make a menu keymap (with a prompt string)} | 2495 | ;; @r{Make a menu keymap (with a prompt string)} |
| 2550 | ;; @r{and make it the menu bar item's definition.} | 2496 | ;; @r{and make it the menu bar item's definition.} |
| 2551 | (define-key global-map [menu-bar words] | 2497 | (define-key global-map [menu-bar words] |
| @@ -2618,20 +2564,17 @@ that the command does not actually have, it is ignored. | |||
| 2618 | @subsection Tool bars | 2564 | @subsection Tool bars |
| 2619 | @cindex tool bar | 2565 | @cindex tool bar |
| 2620 | 2566 | ||
| 2621 | A @dfn{tool bar} is a row of icons at the top of a frame, that execute | 2567 | A @dfn{tool bar} is a row of clickable icons at the top of a frame, |
| 2622 | commands when you click on them---in effect, a kind of graphical menu | 2568 | just below the menu bar. @xref{Tool Bars,,,emacs, The GNU Emacs |
| 2623 | bar. | 2569 | Manual}. |
| 2624 | |||
| 2625 | The frame parameter @code{tool-bar-lines} (X resource @samp{toolBar}) | ||
| 2626 | controls how many lines' worth of height to reserve for the tool bar. A | ||
| 2627 | zero value suppresses the tool bar. If the value is nonzero, and | ||
| 2628 | @code{auto-resize-tool-bars} is non-@code{nil}, the tool bar expands and | ||
| 2629 | contracts automatically as needed to hold the specified contents. | ||
| 2630 | 2570 | ||
| 2631 | If the value of @code{auto-resize-tool-bars} is @code{grow-only}, | 2571 | On each frame, the frame parameter @code{tool-bar-lines} controls |
| 2632 | the tool bar expands automatically, but does not contract automatically. | 2572 | how many lines' worth of height to reserve for the tool bar. A zero |
| 2633 | To contract the tool bar, the user has to redraw the frame by entering | 2573 | value suppresses the tool bar. If the value is nonzero, and |
| 2634 | @kbd{C-l}. | 2574 | @code{auto-resize-tool-bars} is non-@code{nil}, the tool bar expands |
| 2575 | and contracts automatically as needed to hold the specified contents. | ||
| 2576 | If the value is @code{grow-only}, the tool bar expands automatically, | ||
| 2577 | but does not contract automatically. | ||
| 2635 | 2578 | ||
| 2636 | The tool bar contents are controlled by a menu keymap attached to a | 2579 | The tool bar contents are controlled by a menu keymap attached to a |
| 2637 | fake ``function key'' called @code{tool-bar} (much like the way the menu | 2580 | fake ``function key'' called @code{tool-bar} (much like the way the menu |
| @@ -2683,17 +2626,17 @@ button in disabled state by applying an edge-detection algorithm to the | |||
| 2683 | image. | 2626 | image. |
| 2684 | 2627 | ||
| 2685 | The @code{:rtl} property specifies an alternative image to use for | 2628 | The @code{:rtl} property specifies an alternative image to use for |
| 2686 | right-to-left languages. Only the Gtk+ version of Emacs supports this | 2629 | right-to-left languages. Only the GTK+ version of Emacs supports this |
| 2687 | at present. | 2630 | at present. |
| 2688 | 2631 | ||
| 2689 | Like the menu bar, the tool bar can display separators (@pxref{Menu | 2632 | Like the menu bar, the tool bar can display separators (@pxref{Menu |
| 2690 | Separators}). Tool bar separators are vertical rather than | 2633 | Separators}). Tool bar separators are vertical rather than |
| 2691 | horizontal, though, and only a single style is supported. Separators | 2634 | horizontal, though, and only a single style is supported. They are |
| 2692 | are represented in the tool bar keymap in the same way as for the | 2635 | represented in the tool bar keymap by @code{(menu-item "--")} entries; |
| 2693 | menu bar, i.e. using a @code{(menu-item "--"}) entry. The Gtk+ and | 2636 | properties like @code{:visible} are not supported for tool bar |
| 2694 | Nextstep tool bars render separators natively, otherwise Emacs selects | 2637 | separators. Separators are rendered natively in GTK+ and Nextstep |
| 2695 | a separator image that is appropriate for the display. Note that tool | 2638 | tool bars; in the other cases, they are rendered using an image of a |
| 2696 | bar separators do not support any properties, such as @code{:visible}. | 2639 | vertical line. |
| 2697 | 2640 | ||
| 2698 | The default tool bar is defined so that items specific to editing do not | 2641 | The default tool bar is defined so that items specific to editing do not |
| 2699 | appear for major modes whose command symbol has a @code{mode-class} | 2642 | appear for major modes whose command symbol has a @code{mode-class} |
| @@ -2706,18 +2649,20 @@ using an indirection through @code{tool-bar-map}. | |||
| 2706 | 2649 | ||
| 2707 | @defvar tool-bar-map | 2650 | @defvar tool-bar-map |
| 2708 | By default, the global map binds @code{[tool-bar]} as follows: | 2651 | By default, the global map binds @code{[tool-bar]} as follows: |
| 2652 | |||
| 2709 | @example | 2653 | @example |
| 2710 | (global-set-key [tool-bar] | 2654 | (global-set-key [tool-bar] |
| 2711 | '(menu-item "tool bar" ignore | 2655 | `(menu-item ,(purecopy "tool bar") ignore |
| 2712 | :filter (lambda (ignore) tool-bar-map))) | 2656 | :filter tool-bar-make-keymap)) |
| 2713 | @end example | 2657 | @end example |
| 2658 | |||
| 2714 | @noindent | 2659 | @noindent |
| 2715 | Thus the tool bar map is derived dynamically from the value of variable | 2660 | The function @code{tool-bar-make-keymap}, in turn, derives the actual |
| 2716 | @code{tool-bar-map} and you should normally adjust the default (global) | 2661 | tool bar map dynamically from the value of the variable |
| 2717 | tool bar by changing that map. Major modes may replace the global bar | 2662 | @code{tool-bar-map}. Hence, you should normally adjust the default |
| 2718 | completely by making @code{tool-bar-map} buffer-local and set to a | 2663 | (global) tool bar by changing that map. Some major modes, such as |
| 2719 | keymap containing only the desired items. Info mode provides an | 2664 | Info mode, completely replace the global tool bar by making |
| 2720 | example. | 2665 | @code{tool-bar-map} buffer-local and setting it to a different keymap. |
| 2721 | @end defvar | 2666 | @end defvar |
| 2722 | 2667 | ||
| 2723 | There are two convenience functions for defining tool bar items, as | 2668 | There are two convenience functions for defining tool bar items, as |
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index dca88d2b7c7..de9e1c405f0 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi | |||
| @@ -605,7 +605,7 @@ either. | |||
| 605 | 605 | ||
| 606 | Within a macro definition, you can use the @code{declare} form | 606 | Within a macro definition, you can use the @code{declare} form |
| 607 | (@pxref{Defining Macros}) to specify how to @key{TAB} should indent | 607 | (@pxref{Defining Macros}) to specify how to @key{TAB} should indent |
| 608 | calls to the macro. An indentation specifiction is written like this: | 608 | calls to the macro. An indentation specification is written like this: |
| 609 | 609 | ||
| 610 | @example | 610 | @example |
| 611 | (declare (indent @var{indent-spec})) | 611 | (declare (indent @var{indent-spec})) |
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index a71138f5268..1224d80fdf8 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -633,6 +633,7 @@ for reading certain kinds of names with completion. | |||
| 633 | shell commands. | 633 | shell commands. |
| 634 | * Completion Styles:: Specifying rules for performing completion. | 634 | * Completion Styles:: Specifying rules for performing completion. |
| 635 | * Programmed Completion:: Writing your own completion-function. | 635 | * Programmed Completion:: Writing your own completion-function. |
| 636 | * Completion in Buffers:: Completing text in ordinary buffers. | ||
| 636 | @end menu | 637 | @end menu |
| 637 | 638 | ||
| 638 | @node Basic Completion | 639 | @node Basic Completion |
| @@ -644,10 +645,12 @@ higher-level completion features that do use the minibuffer. | |||
| 644 | 645 | ||
| 645 | @defun try-completion string collection &optional predicate | 646 | @defun try-completion string collection &optional predicate |
| 646 | This function returns the longest common substring of all possible | 647 | This function returns the longest common substring of all possible |
| 647 | completions of @var{string} in @var{collection}. The value of | 648 | completions of @var{string} in @var{collection}. |
| 648 | @var{collection} must be a list of strings, an alist whose keys are | 649 | |
| 649 | strings or symbols, an obarray, a hash table, or a completion function | 650 | @cindex completion table |
| 650 | (@pxref{Programmed Completion}). | 651 | The @var{collection} argument is called the @dfn{completion table}. |
| 652 | Its value must be a list of strings, an alist whose keys are strings | ||
| 653 | or symbols, an obarray, a hash table, or a completion function. | ||
| 651 | 654 | ||
| 652 | Completion compares @var{string} against each of the permissible | 655 | Completion compares @var{string} against each of the permissible |
| 653 | completions specified by @var{collection}. If no permissible | 656 | completions specified by @var{collection}. If no permissible |
| @@ -678,13 +681,13 @@ Also, you cannot intern a given symbol in more than one obarray. | |||
| 678 | If @var{collection} is a hash table, then the keys that are strings | 681 | If @var{collection} is a hash table, then the keys that are strings |
| 679 | are the possible completions. Other keys are ignored. | 682 | are the possible completions. Other keys are ignored. |
| 680 | 683 | ||
| 681 | You can also use a function as @var{collection}. | 684 | You can also use a function as @var{collection}. Then the function is |
| 682 | Then the function is solely responsible for performing completion; | 685 | solely responsible for performing completion; @code{try-completion} |
| 683 | @code{try-completion} returns whatever this function returns. The | 686 | returns whatever this function returns. The function is called with |
| 684 | function is called with three arguments: @var{string}, @var{predicate} | 687 | three arguments: @var{string}, @var{predicate} and @code{nil} (the |
| 685 | and @code{nil} (the reason for the third argument is so that the same | 688 | reason for the third argument is so that the same function can be used |
| 686 | function can be used in @code{all-completions} and do the appropriate | 689 | in @code{all-completions} and do the appropriate thing in either |
| 687 | thing in either case). @xref{Programmed Completion}. | 690 | case). @xref{Programmed Completion}. |
| 688 | 691 | ||
| 689 | If the argument @var{predicate} is non-@code{nil}, then it must be a | 692 | If the argument @var{predicate} is non-@code{nil}, then it must be a |
| 690 | function of one argument, unless @var{collection} is a hash table, in | 693 | function of one argument, unless @var{collection} is a hash table, in |
| @@ -862,30 +865,13 @@ proper value is done the first time you do completion using @var{var}. | |||
| 862 | It is done by calling @var{fun} with no arguments. The | 865 | It is done by calling @var{fun} with no arguments. The |
| 863 | value @var{fun} returns becomes the permanent value of @var{var}. | 866 | value @var{fun} returns becomes the permanent value of @var{var}. |
| 864 | 867 | ||
| 865 | Here is an example of use: | 868 | Here is a usage example: |
| 866 | 869 | ||
| 867 | @smallexample | 870 | @smallexample |
| 868 | (defvar foo (lazy-completion-table foo make-my-alist)) | 871 | (defvar foo (lazy-completion-table foo make-my-alist)) |
| 869 | @end smallexample | 872 | @end smallexample |
| 870 | @end defmac | 873 | @end defmac |
| 871 | 874 | ||
| 872 | The function @code{completion-in-region} provides a convenient way to | ||
| 873 | perform completion on an arbitrary stretch of text in an Emacs buffer: | ||
| 874 | |||
| 875 | @defun completion-in-region start end collection &optional predicate | ||
| 876 | This function completes the text in the current buffer between the | ||
| 877 | positions @var{start} and @var{end}, using @var{collection}. The | ||
| 878 | argument @var{collection} has the same meaning as in | ||
| 879 | @code{try-completion} (@pxref{Basic Completion}). | ||
| 880 | |||
| 881 | This function inserts the completion text directly into the current | ||
| 882 | buffer. Unlike @code{completing-read} (@pxref{Minibuffer | ||
| 883 | Completion}), it does not activate the minibuffer. | ||
| 884 | |||
| 885 | For this function to work, point must be somewhere between @var{start} | ||
| 886 | and @var{end}. | ||
| 887 | @end defun | ||
| 888 | |||
| 889 | @node Minibuffer Completion | 875 | @node Minibuffer Completion |
| 890 | @subsection Completion and the Minibuffer | 876 | @subsection Completion and the Minibuffer |
| 891 | @cindex minibuffer completion | 877 | @cindex minibuffer completion |
| @@ -899,13 +885,14 @@ This function reads a string in the minibuffer, assisting the user by | |||
| 899 | providing completion. It activates the minibuffer with prompt | 885 | providing completion. It activates the minibuffer with prompt |
| 900 | @var{prompt}, which must be a string. | 886 | @var{prompt}, which must be a string. |
| 901 | 887 | ||
| 902 | The actual completion is done by passing @var{collection} and | 888 | The actual completion is done by passing the completion table |
| 903 | @var{predicate} to the function @code{try-completion} (@pxref{Basic | 889 | @var{collection} and the completion predicate @var{predicate} to the |
| 904 | Completion}). This happens in certain commands bound in the local | 890 | function @code{try-completion} (@pxref{Basic Completion}). This |
| 905 | keymaps used for completion. Some of these commands also call | 891 | happens in certain commands bound in the local keymaps used for |
| 906 | @code{test-completion}. Thus, if @var{predicate} is non-@code{nil}, | 892 | completion. Some of these commands also call @code{test-completion}. |
| 907 | it should be compatible with @var{collection} and | 893 | Thus, if @var{predicate} is non-@code{nil}, it should be compatible |
| 908 | @code{completion-ignore-case}. @xref{Definition of test-completion}. | 894 | with @var{collection} and @code{completion-ignore-case}. |
| 895 | @xref{Definition of test-completion}. | ||
| 909 | 896 | ||
| 910 | The value of the optional argument @var{require-match} determines how | 897 | The value of the optional argument @var{require-match} determines how |
| 911 | the user may exit the minibuffer: | 898 | the user may exit the minibuffer: |
| @@ -1005,10 +992,11 @@ They are described in the following section. | |||
| 1005 | in the minibuffer to do completion. | 992 | in the minibuffer to do completion. |
| 1006 | 993 | ||
| 1007 | @defvar minibuffer-completion-table | 994 | @defvar minibuffer-completion-table |
| 1008 | The value of this variable is the collection used for completion in | 995 | The value of this variable is the completion table used for completion |
| 1009 | the minibuffer. This is the global variable that contains what | 996 | in the minibuffer. This is the global variable that contains what |
| 1010 | @code{completing-read} passes to @code{try-completion}. It is used by | 997 | @code{completing-read} passes to @code{try-completion}. It is used by |
| 1011 | minibuffer completion commands such as @code{minibuffer-complete-word}. | 998 | minibuffer completion commands such as |
| 999 | @code{minibuffer-complete-word}. | ||
| 1012 | @end defvar | 1000 | @end defvar |
| 1013 | 1001 | ||
| 1014 | @defvar minibuffer-completion-predicate | 1002 | @defvar minibuffer-completion-predicate |
| @@ -1717,6 +1705,87 @@ completion via the variable @code{minibuffer-completion-table} | |||
| 1717 | (@pxref{Completion Commands}). | 1705 | (@pxref{Completion Commands}). |
| 1718 | @end defvar | 1706 | @end defvar |
| 1719 | 1707 | ||
| 1708 | @node Completion in Buffers | ||
| 1709 | @subsection Completion in Ordinary Buffers | ||
| 1710 | @cindex inline completion | ||
| 1711 | |||
| 1712 | @findex completion-at-point | ||
| 1713 | Although completion is usually done in the minibuffer, the | ||
| 1714 | completion facility can also be used on the text in ordinary Emacs | ||
| 1715 | buffers. In many major modes, in-buffer completion is performed by | ||
| 1716 | the @kbd{C-M-i} or @kbd{M-@key{TAB}} command, bound to | ||
| 1717 | @code{completion-at-point}. @xref{Symbol Completion,,, emacs, The GNU | ||
| 1718 | Emacs Manual}. This command uses the abnormal hook variable | ||
| 1719 | @code{completion-at-point-functions}: | ||
| 1720 | |||
| 1721 | @defvar completion-at-point-functions | ||
| 1722 | The value of this abnormal hook should be a list of functions, which | ||
| 1723 | are used to compute a completion table for completing the text at | ||
| 1724 | point. It can be used by major modes to provide mode-specific | ||
| 1725 | completion tables (@pxref{Major Mode Conventions}). | ||
| 1726 | |||
| 1727 | When the command @code{completion-at-point} runs, it calls the | ||
| 1728 | functions in the list one by one, without any argument. Each function | ||
| 1729 | should return @code{nil} if it is unable to produce a completion table | ||
| 1730 | for the text at point. Otherwise it should return a list of the form | ||
| 1731 | |||
| 1732 | @example | ||
| 1733 | (@var{start} @var{end} @var{collection} . @var{props}) | ||
| 1734 | @end example | ||
| 1735 | |||
| 1736 | @noindent | ||
| 1737 | @var{start} and @var{end} delimit the text to complete (which should | ||
| 1738 | enclose point). @var{collection} is a completion table for completing | ||
| 1739 | that text, in a form suitable for passing as the second argument to | ||
| 1740 | @code{try-completion} (@pxref{Basic Completion}); completion | ||
| 1741 | alternatives will be generated from this completion table in the usual | ||
| 1742 | way, via the completion styles defined in @code{completion-styles} | ||
| 1743 | (@pxref{Completion Styles}). @var{props} is a property list for | ||
| 1744 | additional information; the following optional properties are | ||
| 1745 | recognized: | ||
| 1746 | |||
| 1747 | @table @code | ||
| 1748 | @item :predicate | ||
| 1749 | The value should be a predicate that completion candidates need to | ||
| 1750 | satisfy. | ||
| 1751 | |||
| 1752 | @item :exclusive | ||
| 1753 | If the value is @code{no}, then if the completion table fails to match | ||
| 1754 | the text at point, then @code{completion-at-point} moves on to the | ||
| 1755 | next function in @code{completion-at-point-functions} instead of | ||
| 1756 | reporting a completion failure. | ||
| 1757 | @end table | ||
| 1758 | |||
| 1759 | A function in @code{completion-at-point-functions} may also return a | ||
| 1760 | function. In that case, that returned function is called, with no | ||
| 1761 | argument, and it is entirely responsible for performing the | ||
| 1762 | completion. We discourage this usage; it is intended to help convert | ||
| 1763 | old code to using @code{completion-at-point}. | ||
| 1764 | |||
| 1765 | The first function in @code{completion-at-point-functions} to return a | ||
| 1766 | non-@code{nil} value is used by @code{completion-at-point}. The | ||
| 1767 | remaining functions are not called. The exception to this is when | ||
| 1768 | there is a @code{:exclusive} specification, as described above. | ||
| 1769 | @end defvar | ||
| 1770 | |||
| 1771 | The following function provides a convenient way to perform | ||
| 1772 | completion on an arbitrary stretch of text in an Emacs buffer: | ||
| 1773 | |||
| 1774 | @defun completion-in-region start end collection &optional predicate | ||
| 1775 | This function completes the text in the current buffer between the | ||
| 1776 | positions @var{start} and @var{end}, using @var{collection}. The | ||
| 1777 | argument @var{collection} has the same meaning as in | ||
| 1778 | @code{try-completion} (@pxref{Basic Completion}). | ||
| 1779 | |||
| 1780 | This function inserts the completion text directly into the current | ||
| 1781 | buffer. Unlike @code{completing-read} (@pxref{Minibuffer | ||
| 1782 | Completion}), it does not activate the minibuffer. | ||
| 1783 | |||
| 1784 | For this function to work, point must be somewhere between @var{start} | ||
| 1785 | and @var{end}. | ||
| 1786 | @end defun | ||
| 1787 | |||
| 1788 | |||
| 1720 | @node Yes-or-No Queries | 1789 | @node Yes-or-No Queries |
| 1721 | @section Yes-or-No Queries | 1790 | @section Yes-or-No Queries |
| 1722 | @cindex asking the user questions | 1791 | @cindex asking the user questions |
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 0b020bee0b0..94ae767586b 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi | |||
| @@ -48,17 +48,16 @@ you it is normal. We try to make all hooks normal, as much as | |||
| 48 | possible, so that you can use them in a uniform way. | 48 | possible, so that you can use them in a uniform way. |
| 49 | 49 | ||
| 50 | Every major mode command is supposed to run a normal hook called the | 50 | Every major mode command is supposed to run a normal hook called the |
| 51 | @dfn{mode hook} as the one of the last steps of initialization. This | 51 | @dfn{mode hook} as one of the last steps of initialization. This makes |
| 52 | makes it easy for a user to customize the behavior of the mode, by | 52 | it easy for a user to customize the behavior of the mode, by overriding |
| 53 | overriding the buffer-local variable assignments already made by the | 53 | the buffer-local variable assignments already made by the mode. Most |
| 54 | mode. Most minor mode functions also run a mode hook at the end. But | 54 | minor mode functions also run a mode hook at the end. But hooks are |
| 55 | hooks are used in other contexts too. For example, the hook | 55 | used in other contexts too. For example, the hook @code{suspend-hook} |
| 56 | @code{suspend-hook} runs just before Emacs suspends itself | 56 | runs just before Emacs suspends itself (@pxref{Suspending Emacs}). |
| 57 | (@pxref{Suspending Emacs}). | 57 | |
| 58 | 58 | The recommended way to add a hook function to a hook is by calling | |
| 59 | The recommended way to add a hook function to a normal hook is by | 59 | @code{add-hook} (@pxref{Setting Hooks}). The hook functions may be any |
| 60 | calling @code{add-hook} (see below). The hook functions may be any of | 60 | of the valid kinds of functions that @code{funcall} accepts (@pxref{What |
| 61 | the valid kinds of functions that @code{funcall} accepts (@pxref{What | ||
| 62 | Is a Function}). Most normal hook variables are initially void; | 61 | Is a Function}). Most normal hook variables are initially void; |
| 63 | @code{add-hook} knows how to deal with this. You can add hooks either | 62 | @code{add-hook} knows how to deal with this. You can add hooks either |
| 64 | globally or buffer-locally with @code{add-hook}. | 63 | globally or buffer-locally with @code{add-hook}. |
| @@ -178,7 +177,7 @@ calls @code{wrap-function} with arguments @code{fun} and @code{args}. | |||
| 178 | in Lisp Interaction mode: | 177 | in Lisp Interaction mode: |
| 179 | 178 | ||
| 180 | @example | 179 | @example |
| 181 | (add-hook 'lisp-interaction-mode-hook 'turn-on-auto-fill) | 180 | (add-hook 'lisp-interaction-mode-hook 'auto-fill-mode) |
| 182 | @end example | 181 | @end example |
| 183 | 182 | ||
| 184 | @defun add-hook hook function &optional append local | 183 | @defun add-hook hook function &optional append local |
| @@ -202,13 +201,13 @@ If @var{function} has a non-@code{nil} property | |||
| 202 | changing major modes) won't delete it from the hook variable's local | 201 | changing major modes) won't delete it from the hook variable's local |
| 203 | value. | 202 | value. |
| 204 | 203 | ||
| 205 | It is best to design your hook functions so that the order in which | 204 | For a normal hook, hook functions should be designed so that the order |
| 206 | they are executed does not matter. Any dependence on the order is | 205 | in which they are executed does not matter. Any dependence on the order |
| 207 | asking for trouble. However, the order is predictable: normally, | 206 | is asking for trouble. However, the order is predictable: normally, |
| 208 | @var{function} goes at the front of the hook list, so it will be | 207 | @var{function} goes at the front of the hook list, so it is executed |
| 209 | executed first (barring another @code{add-hook} call). If the | 208 | first (barring another @code{add-hook} call). If the optional argument |
| 210 | optional argument @var{append} is non-@code{nil}, the new hook | 209 | @var{append} is non-@code{nil}, the new hook function goes at the end of |
| 211 | function goes at the end of the hook list and will be executed last. | 210 | the hook list and is executed last. |
| 212 | 211 | ||
| 213 | @code{add-hook} can handle the cases where @var{hook} is void or its | 212 | @code{add-hook} can handle the cases where @var{hook} is void or its |
| 214 | value is a single function; it sets or changes the value to a list of | 213 | value is a single function; it sets or changes the value to a list of |
| @@ -302,8 +301,8 @@ initialization, function and variable names, and hooks. | |||
| 302 | 301 | ||
| 303 | If you use the @code{define-derived-mode} macro, it will take care of | 302 | If you use the @code{define-derived-mode} macro, it will take care of |
| 304 | many of these conventions automatically. @xref{Derived Modes}. Note | 303 | many of these conventions automatically. @xref{Derived Modes}. Note |
| 305 | also that fundamental mode is an exception to many of these conventions, | 304 | also that Fundamental mode is an exception to many of these conventions, |
| 306 | because its definition is to present the global state of Emacs. | 305 | because it represents the default state of Emacs. |
| 307 | 306 | ||
| 308 | The following list of conventions is only partial. Each major mode | 307 | The following list of conventions is only partial. Each major mode |
| 309 | should aim for consistency in general with other Emacs major modes, as | 308 | should aim for consistency in general with other Emacs major modes, as |
| @@ -460,8 +459,9 @@ The mode can specify a local value for | |||
| 460 | this mode. | 459 | this mode. |
| 461 | 460 | ||
| 462 | @item | 461 | @item |
| 463 | The mode can specify how to complete various keywords by adding | 462 | The mode can specify how to complete various keywords by adding one or |
| 464 | to the special hook @code{completion-at-point-functions}. | 463 | more buffer-local entries to the special hook |
| 464 | @code{completion-at-point-functions}. @xref{Completion in Buffers}. | ||
| 465 | 465 | ||
| 466 | @item | 466 | @item |
| 467 | Use @code{defvar} or @code{defcustom} to set mode-related variables, so | 467 | Use @code{defvar} or @code{defcustom} to set mode-related variables, so |
| @@ -555,16 +555,15 @@ In the comments that document the file, you should provide a sample | |||
| 555 | @cindex mode loading | 555 | @cindex mode loading |
| 556 | The top-level forms in the file defining the mode should be written so | 556 | The top-level forms in the file defining the mode should be written so |
| 557 | that they may be evaluated more than once without adverse consequences. | 557 | that they may be evaluated more than once without adverse consequences. |
| 558 | Even if you never load the file more than once, someone else will. | ||
| 559 | @end itemize | 558 | @end itemize |
| 560 | 559 | ||
| 561 | @node Auto Major Mode | 560 | @node Auto Major Mode |
| 562 | @subsection How Emacs Chooses a Major Mode | 561 | @subsection How Emacs Chooses a Major Mode |
| 563 | @cindex major mode, automatic selection | 562 | @cindex major mode, automatic selection |
| 564 | 563 | ||
| 565 | Based on information in the file name or in the file itself, Emacs | 564 | When Emacs visits a file, it automatically selects a major mode for |
| 566 | automatically selects a major mode for the new buffer when a file is | 565 | the buffer based on information in the file name or in the file itself. |
| 567 | visited. It also processes local variables specified in the file text. | 566 | It also processes local variables specified in the file text. |
| 568 | 567 | ||
| 569 | @deffn Command normal-mode &optional find-file | 568 | @deffn Command normal-mode &optional find-file |
| 570 | This function establishes the proper major mode and buffer-local variable | 569 | This function establishes the proper major mode and buffer-local variable |
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 4cfc954cd1f..d91800fcb80 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi | |||
| @@ -1939,9 +1939,13 @@ queued but input may be lost. You can use the function | |||
| 1939 | @code{process-command} to determine whether a network connection or | 1939 | @code{process-command} to determine whether a network connection or |
| 1940 | server is stopped; a non-@code{nil} value means yes. | 1940 | server is stopped; a non-@code{nil} value means yes. |
| 1941 | 1941 | ||
| 1942 | @defun open-network-stream name buffer-or-name host service | 1942 | @cindex network connection, encrypted |
| 1943 | This function opens a TCP connection, and returns a process object | 1943 | @cindex encrypted network connections |
| 1944 | that represents the connection. | 1944 | @cindex TLS network connections |
| 1945 | @cindex STARTTLS network connections | ||
| 1946 | @defun open-network-stream name buffer-or-name host service &rest parameters | ||
| 1947 | This function opens a TCP connection, with optional encryption, and | ||
| 1948 | returns a process object that represents the connection. | ||
| 1945 | 1949 | ||
| 1946 | The @var{name} argument specifies the name for the process object. It | 1950 | The @var{name} argument specifies the name for the process object. It |
| 1947 | is modified as necessary to make it unique. | 1951 | is modified as necessary to make it unique. |
| @@ -1955,6 +1959,83 @@ associated with any buffer. | |||
| 1955 | The arguments @var{host} and @var{service} specify where to connect to; | 1959 | The arguments @var{host} and @var{service} specify where to connect to; |
| 1956 | @var{host} is the host name (a string), and @var{service} is the name of | 1960 | @var{host} is the host name (a string), and @var{service} is the name of |
| 1957 | a defined network service (a string) or a port number (an integer). | 1961 | a defined network service (a string) or a port number (an integer). |
| 1962 | |||
| 1963 | @c FIXME? Is this too lengthy for the printed manual? | ||
| 1964 | The remaining arguments @var{parameters} are keyword/argument pairs | ||
| 1965 | that are mainly relevant to encrypted connections: | ||
| 1966 | |||
| 1967 | @table @code | ||
| 1968 | |||
| 1969 | @item :nowait @var{boolean} | ||
| 1970 | If non-@code{nil}, try to make an asynchronous connection. | ||
| 1971 | |||
| 1972 | @item :type @var{type} | ||
| 1973 | The type of connection. Options are: | ||
| 1974 | |||
| 1975 | @table @code | ||
| 1976 | @item plain | ||
| 1977 | An ordinary, unencrypted connection. | ||
| 1978 | @item tls | ||
| 1979 | @itemx ssl | ||
| 1980 | A TLS (``Transport Layer Security'') connection. | ||
| 1981 | @item nil | ||
| 1982 | @itemx network | ||
| 1983 | Start with a plain connection, and if parameters @samp{:success} | ||
| 1984 | and @samp{:capability-command} are supplied, try to upgrade to an encrypted | ||
| 1985 | connection via STARTTLS. If that fails, retain the unencrypted connection. | ||
| 1986 | @item starttls | ||
| 1987 | As for @code{nil}, but if STARTTLS fails drop the connection. | ||
| 1988 | @item shell | ||
| 1989 | A shell connection. | ||
| 1990 | @end table | ||
| 1991 | |||
| 1992 | @item :always-query-capabilities @var{boolean} | ||
| 1993 | If non-@code{nil}, always ask for the server's capabilities, even when | ||
| 1994 | doing a @samp{plain} connection. | ||
| 1995 | |||
| 1996 | @item :capability-command @var{capability-command} | ||
| 1997 | Command string to query the host capabilities. | ||
| 1998 | |||
| 1999 | @item :end-of-command @var{regexp} | ||
| 2000 | @itemx :end-of-capability @var{regexp} | ||
| 2001 | Regular expression matching the end of a command, or the end of the | ||
| 2002 | command @var{capability-command}. The latter defaults to the former. | ||
| 2003 | |||
| 2004 | @item :starttls-function @var{function} | ||
| 2005 | Function of one argument (the response to @var{capability-command}), | ||
| 2006 | which returns either @code{nil}, or the command to activate STARTTLS | ||
| 2007 | if supported. | ||
| 2008 | |||
| 2009 | @item :success @var{regexp} | ||
| 2010 | Regular expression matching a successful STARTTLS negotiation. | ||
| 2011 | |||
| 2012 | @item :use-starttls-if-possible @var{boolean} | ||
| 2013 | If non-@code{nil}, do opportunistic STARTTLS upgrades even if Emacs | ||
| 2014 | doesn't have built-in TLS support. | ||
| 2015 | |||
| 2016 | @item :client-certificate @var{list-or-t} | ||
| 2017 | Either a list of the form @code{(@var{key-file} @var{cert-file})}, | ||
| 2018 | naming the certificate key file and certificate file itself, or | ||
| 2019 | @code{t}, meaning to query @code{auth-source} for this information | ||
| 2020 | (@pxref{Top,,auth-source, auth, Emacs auth-source Library}). | ||
| 2021 | Only used for TLS or STARTTLS. | ||
| 2022 | |||
| 2023 | @item :return-list @var{cons-or-nil} | ||
| 2024 | The return value of this function. If omitted or @code{nil}, return a | ||
| 2025 | process object. Otherwise, a cons of the form @code{(@var{process-object} | ||
| 2026 | . @var{plist})}, where @var{plist} has keywords: | ||
| 2027 | |||
| 2028 | @table @code | ||
| 2029 | @item :greeting @var{string-or-nil} | ||
| 2030 | If non-@code{nil}, the greeting string returned by the host. | ||
| 2031 | @item :capabilities @var{string-or-nil} | ||
| 2032 | If non-@code{nil}, the host's capability string. | ||
| 2033 | @item :type @var{symbol} | ||
| 2034 | The connection type: @samp{plain} or @samp{tls}. | ||
| 2035 | @end table | ||
| 2036 | |||
| 2037 | @end table | ||
| 2038 | |||
| 1958 | @end defun | 2039 | @end defun |
| 1959 | 2040 | ||
| 1960 | @node Network Servers | 2041 | @node Network Servers |
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index ab3a4edc0ac..94e71c96d0a 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi | |||
| @@ -303,7 +303,7 @@ If a variable is void, trying to evaluate the variable signals a | |||
| 303 | 303 | ||
| 304 | Under lexical binding rules, the value cell only holds the | 304 | Under lexical binding rules, the value cell only holds the |
| 305 | variable's global value, i.e.@: the value outside of any lexical | 305 | variable's global value, i.e.@: the value outside of any lexical |
| 306 | binding contruct. When a variable is lexically bound, the local value | 306 | binding construct. When a variable is lexically bound, the local value |
| 307 | is determined by the lexical environment; the variable may have a | 307 | is determined by the lexical environment; the variable may have a |
| 308 | local value if its symbol's value cell is unassigned. | 308 | local value if its symbol's value cell is unassigned. |
| 309 | 309 | ||
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi index cc96726745f..dbab287b273 100644 --- a/doc/lispref/vol1.texi +++ b/doc/lispref/vol1.texi | |||
| @@ -675,6 +675,7 @@ Completion | |||
| 675 | shell commands. | 675 | shell commands. |
| 676 | * Completion Styles:: Specifying rules for performing completion. | 676 | * Completion Styles:: Specifying rules for performing completion. |
| 677 | * Programmed Completion:: Writing your own completion-function. | 677 | * Programmed Completion:: Writing your own completion-function. |
| 678 | * Completion in Buffers:: Completing text in ordinary buffers. | ||
| 678 | 679 | ||
| 679 | Command Loop | 680 | Command Loop |
| 680 | 681 | ||
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi index 33246cb567d..38e2f1dc5e9 100644 --- a/doc/lispref/vol2.texi +++ b/doc/lispref/vol2.texi | |||
| @@ -674,6 +674,7 @@ Completion | |||
| 674 | shell commands. | 674 | shell commands. |
| 675 | * Completion Styles:: Specifying rules for performing completion. | 675 | * Completion Styles:: Specifying rules for performing completion. |
| 676 | * Programmed Completion:: Writing your own completion-function. | 676 | * Programmed Completion:: Writing your own completion-function. |
| 677 | * Completion in Buffers:: Completing text in ordinary buffers. | ||
| 677 | 678 | ||
| 678 | Command Loop | 679 | Command Loop |
| 679 | 680 | ||
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index adad93ef89c..a88ac5f0bd4 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-02-15 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * smtpmail.texi (Emacs Speaks SMTP): General update for 24.1. | ||
| 4 | (Encryption): New chapter, split out from previous. | ||
| 5 | |||
| 1 | 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org> | 6 | 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org> |
| 2 | 7 | ||
| 3 | * gnus.texi (Customizing the IMAP Connection): Mention | 8 | * gnus.texi (Customizing the IMAP Connection): Mention |
diff --git a/doc/misc/smtpmail.texi b/doc/misc/smtpmail.texi index af09783f445..4e4df3f0bbb 100644 --- a/doc/misc/smtpmail.texi +++ b/doc/misc/smtpmail.texi | |||
| @@ -47,6 +47,7 @@ developing GNU and promoting software freedom.'' | |||
| 47 | * How Mail Works:: Brief introduction to mail concepts. | 47 | * How Mail Works:: Brief introduction to mail concepts. |
| 48 | * Emacs Speaks SMTP:: How to use the SMTP library in Emacs. | 48 | * Emacs Speaks SMTP:: How to use the SMTP library in Emacs. |
| 49 | * Authentication:: Authenticating yourself to the server. | 49 | * Authentication:: Authenticating yourself to the server. |
| 50 | * Encryption:: Protecting your connection to the server. | ||
| 50 | * Queued delivery:: Sending mail without an internet connection. | 51 | * Queued delivery:: Sending mail without an internet connection. |
| 51 | * Server workarounds:: Mail servers with special requirements. | 52 | * Server workarounds:: Mail servers with special requirements. |
| 52 | * Debugging:: Tracking down problems. | 53 | * Debugging:: Tracking down problems. |
| @@ -129,24 +130,37 @@ be useful if you don't have a MTA set up on your host, or if your | |||
| 129 | machine is often disconnected from the internet. | 130 | machine is often disconnected from the internet. |
| 130 | 131 | ||
| 131 | Sending mail via SMTP requires configuring your mail user agent | 132 | Sending mail via SMTP requires configuring your mail user agent |
| 132 | (@pxref{Mail Methods,,,emacs}) to use the SMTP library. How to do | 133 | (@pxref{Mail Methods,,,emacs}) to use the SMTP library. If you |
| 133 | this should be described for each mail user agent; for the default | 134 | have not configured anything, then in Emacs 24.1 and later the first |
| 134 | mail user agent the variable @code{send-mail-function} (@pxref{Mail | 135 | time you try to send a mail Emacs will ask how you want to send |
| 135 | Sending,,,emacs}) is used; for the Message and Gnus user agents the | 136 | mail. To use this library, answer @samp{smtp} when prompted. Emacs |
| 136 | variable @code{message-send-mail-function} (@pxref{Mail | 137 | then asks for the name of the SMTP server. |
| 137 | Variables,,,message}) is used. | 138 | |
| 138 | 139 | If you prefer, or if you are using a non-standard mail user agent, | |
| 139 | @example | 140 | you can configure this yourself. The normal way to do this is to set |
| 140 | ;; If you use the default mail user agent. | 141 | the variable @code{send-mail-function} (@pxref{Mail |
| 142 | Sending,,,emacs}) to the value you want to use. To use this library: | ||
| 143 | |||
| 144 | @smallexample | ||
| 141 | (setq send-mail-function 'smtpmail-send-it) | 145 | (setq send-mail-function 'smtpmail-send-it) |
| 142 | ;; If you use Message or Gnus. | 146 | @end smallexample |
| 143 | (setq message-send-mail-function 'smtpmail-send-it) | 147 | |
| 144 | @end example | 148 | @noindent |
| 149 | The default value for this variable is @code{sendmail-query-once}, | ||
| 150 | which interactively asks how you want to send mail. | ||
| 151 | |||
| 152 | Your mail user agent might use a different variable for this purpose. | ||
| 153 | It should inherit from @code{send-mail-function}, but if it does not, | ||
| 154 | or if you prefer, you can set that variable directly. Consult your | ||
| 155 | mail user agent's documentation for more details. For example, | ||
| 156 | (@pxref{Mail Variables,,,message}). | ||
| 145 | 157 | ||
| 146 | Before using SMTP you must find out the hostname of the SMTP server | 158 | Before using SMTP you must find out the hostname of the SMTP server |
| 147 | to use. Your system administrator should provide you with this | 159 | to use. Your system administrator or mail service provider should |
| 148 | information, but often it is the same as the server you receive mail | 160 | supply this information. Often it is some variant of the server you |
| 149 | from. | 161 | receive mail from. If your email address is |
| 162 | @samp{yourname@@example.com}, then the name of the SMTP server is | ||
| 163 | may be something like @samp{smtp.example.com}. | ||
| 150 | 164 | ||
| 151 | @table @code | 165 | @table @code |
| 152 | @item smtpmail-smtp-server | 166 | @item smtpmail-smtp-server |
| @@ -201,101 +215,114 @@ The following example illustrates what you could put in | |||
| 201 | @node Authentication | 215 | @node Authentication |
| 202 | @chapter Authentication | 216 | @chapter Authentication |
| 203 | 217 | ||
| 218 | @cindex password | ||
| 219 | @cindex user name | ||
| 220 | Most SMTP servers require clients to authenticate themselves before | ||
| 221 | they are allowed to send mail. Authentication usually involves | ||
| 222 | supplying a user name and password. | ||
| 223 | |||
| 224 | If you have not configured anything, then the first time you try to | ||
| 225 | send mail via a server, Emacs (version 24.1 and later) prompts you | ||
| 226 | for the user name and password to use, and then offers to save the | ||
| 227 | information. By default, Emacs stores authentication information in | ||
| 228 | a file @file{~/.authinfo}. | ||
| 229 | |||
| 230 | @cindex authinfo | ||
| 231 | The basic format of the @file{~/.authinfo} file is one line for each | ||
| 232 | set of credentials. Each line consists of pairs of variables and | ||
| 233 | values. A simple example would be: | ||
| 234 | |||
| 235 | @smallexample | ||
| 236 | machine mail.example.org port 25 login myuser password mypassword | ||
| 237 | @end smallexample | ||
| 238 | |||
| 239 | @noindent | ||
| 240 | This specifies that when using the SMTP server called @samp{mail.example.org} | ||
| 241 | on port 25, Emacs should send the user name @samp{myuser} and the | ||
| 242 | password @samp{mypassword}. Either or both of the login and password | ||
| 243 | fields may be absent, in which case Emacs prompts for the information | ||
| 244 | when you try to send mail. (This replaces the old | ||
| 245 | @code{smtpmail-auth-credentials} variable used prior to Emacs 24.1.) | ||
| 246 | |||
| 247 | @vindex smtpmail-smtp-user | ||
| 248 | When the SMTP library connects to a host on a certain port, it | ||
| 249 | searches the @file{~/.authinfo} file for a matching entry. If an | ||
| 250 | entry is found, the authentication process is invoked and the | ||
| 251 | credentials are used. If the variable @code{smtpmail-smtp-user} is | ||
| 252 | set to a non-@code{nil} value, then only entries for that user are | ||
| 253 | considered. For more information on the @file{~/.authinfo} | ||
| 254 | file, @pxref{Top,,auth-source, auth, Emacs auth-source Library}. | ||
| 255 | |||
| 204 | @cindex SASL | 256 | @cindex SASL |
| 205 | @cindex CRAM-MD5 | 257 | @cindex CRAM-MD5 |
| 258 | @cindex PLAIN | ||
| 206 | @cindex LOGIN | 259 | @cindex LOGIN |
| 260 | The process by which the SMTP library authenticates you to the server | ||
| 261 | is known as ``Simple Authentication and Security Layer'' (SASL). | ||
| 262 | There are various SASL mechanisms, and this library supports three of | ||
| 263 | them: CRAM-MD5, PLAIN, and LOGIN. It tries each of them, in that order, | ||
| 264 | until one succeeds. The first uses a form of encryption to obscure | ||
| 265 | your password, while the other two do not. | ||
| 266 | |||
| 267 | |||
| 268 | @node Encryption | ||
| 269 | @chapter Encryption | ||
| 270 | |||
| 207 | @cindex STARTTLS | 271 | @cindex STARTTLS |
| 208 | @cindex TLS | 272 | @cindex TLS |
| 209 | @cindex SSL | 273 | @cindex SSL |
| 210 | Many environments require SMTP clients to authenticate themselves | 274 | For greater security, you can encrypt your connection to the SMTP |
| 211 | before they are allowed to route mail via a server. The two following | 275 | server. If this is to work, both Emacs and the server must support it. |
| 212 | variables contains the authentication information needed for this. | 276 | |
| 213 | 277 | The SMTP library supports the ``Transport Layer Security'' (TLS), and | |
| 214 | The first variable, @code{smtpmail-auth-credentials}, instructs the | 278 | the older ``Secure Sockets Layer'' (SSL) encryption mechanisms. |
| 215 | SMTP library to use a SASL authentication step, currently only the | 279 | It also supports STARTTLS, which is a variant of TLS in which the |
| 216 | CRAM-MD5 and LOGIN mechanisms are supported and will be selected in | 280 | initial connection to the server is made in plain text, requesting a |
| 217 | that order if the server support both. | 281 | switch to an encrypted channel for the rest of the process. |
| 218 | 282 | ||
| 219 | The second variable, @code{smtpmail-starttls-credentials}, instructs | 283 | @vindex smtpmail-stream-type |
| 220 | the SMTP library to connect to the server using STARTTLS. This means | 284 | The variable @code{smtpmail-stream-type} controls what form of |
| 221 | the protocol exchange may be integrity protected and confidential by | 285 | connection the SMTP library uses. The default value is @code{nil}, |
| 222 | using the Transport Layer Security (TLS) protocol, and optionally also | 286 | which means to use a plain connection, but try to switch to a STARTTLS |
| 223 | authentication of the client and server. | 287 | encrypted connection if the server supports it. Other possible values |
| 224 | 288 | are: @code{starttls} - insist on STARTTLS; @code{ssl} - use TLS/SSL; | |
| 225 | TLS is a security protocol that is also known as SSL, although | 289 | and @code{plain} - no encryption. |
| 226 | strictly speaking, SSL is an older variant of TLS. TLS is backwards | 290 | |
| 227 | compatible with SSL. In most mundane situations, the two terms are | 291 | Use of any form of TLS/SSL requires support in Emacs. You can either |
| 228 | equivalent. | 292 | use the built-in support (in Emacs 24.1 and later), or the |
| 229 | 293 | @file{starttls.el} Lisp library. The built-in support uses the GnuTLS | |
| 230 | The TLS feature uses the elisp package @file{starttls.el} (see it for | 294 | @footnote{@url{http://www.gnu.org/software/gnutls/}} library. |
| 231 | more information on customization), which in turn require that at | 295 | If your Emacs has GnuTLS support built-in, the function |
| 232 | least one of the following external tools are installed: | 296 | @code{gnutls-available-p} is defined and returns non-@code{nil}. |
| 297 | Otherwise, you must use the @file{starttls.el} library (see that file for | ||
| 298 | more information on customization options, etc.). The Lisp library | ||
| 299 | requires one of the following external tools to be installed: | ||
| 233 | 300 | ||
| 234 | @enumerate | 301 | @enumerate |
| 235 | @item | 302 | @item |
| 236 | The GnuTLS command line tool @samp{gnutls-cli}, you can get it from | 303 | The GnuTLS command line tool @samp{gnutls-cli}, which you can get from |
| 237 | @url{http://www.gnu.org/software/gnutls/}. This is the recommended | 304 | @url{http://www.gnu.org/software/gnutls/}. This is the recommended |
| 238 | tool, mainly because it can verify the server certificates. | 305 | tool, mainly because it can verify server certificates. |
| 239 | 306 | ||
| 240 | @item | 307 | @item |
| 241 | The @samp{starttls} external program, you can get it from | 308 | The @samp{starttls} external program, which you can get from |
| 242 | @file{starttls-*.tar.gz} from @uref{ftp://ftp.opaopa.org/pub/elisp/}. | 309 | @file{starttls-*.tar.gz} from @uref{ftp://ftp.opaopa.org/pub/elisp/}. |
| 243 | @end enumerate | 310 | @end enumerate |
| 244 | 311 | ||
| 245 | It is not uncommon to use both these mechanisms, e.g., to use STARTTLS | 312 | @cindex certificates |
| 246 | to achieve integrity and confidentiality and then use SASL for client | 313 | @cindex keys |
| 247 | authentication. | 314 | The SMTP server may also request that you verify your identity by |
| 315 | sending a certificate and the associated encryption key to the server. | ||
| 316 | If you need to do this, you can use an @file{~/.authinfo} entry like this: | ||
| 248 | 317 | ||
| 249 | @table @code | 318 | @smallexample |
| 250 | @item smtpmail-auth-credentials | 319 | machine mail.example.org port 25 key "~/.my_smtp_tls.key" cert "~/.my_smtp_tls.cert" |
| 251 | @vindex smtpmail-auth-credentials | 320 | @end smallexample |
| 252 | The variable @code{smtpmail-auth-credentials} contains a list of | ||
| 253 | hostname, port, username and password tuples. When the SMTP library | ||
| 254 | connects to a host on a certain port, this variable is searched to | ||
| 255 | find a matching entry for that hostname and port. If an entry is | ||
| 256 | found, the authentication process is invoked and the credentials are | ||
| 257 | used. | ||
| 258 | |||
| 259 | The hostname field follows the same format as | ||
| 260 | @code{smtpmail-smtp-server} (i.e., a string) and the port field the | ||
| 261 | same format as @code{smtpmail-smtp-service} (i.e., a string or an | ||
| 262 | integer). The username and password fields, which either can be | ||
| 263 | @code{nil} to indicate that the user is prompted for the value | ||
| 264 | interactively, should be strings with the username and password, | ||
| 265 | respectively, information that is normally provided by system | ||
| 266 | administrators. | ||
| 267 | |||
| 268 | @item smtpmail-starttls-credentials | ||
| 269 | @vindex smtpmail-starttls-credentials | ||
| 270 | The variable @code{smtpmail-starttls-credentials} contains a list of | ||
| 271 | tuples with hostname, port, name of file containing client key, and | ||
| 272 | name of file containing client certificate. The processing is similar | ||
| 273 | to the previous variable. The client key and certificate may be | ||
| 274 | @code{nil} if you do not wish to use client authentication. | ||
| 275 | @end table | ||
| 276 | 321 | ||
| 277 | The following example illustrates what you could put in | 322 | @noindent |
| 278 | @file{~/.emacs} to enable both SASL authentication and STARTTLS. The | 323 | (This replaces the old @code{smtpmail-starttls-credentials} variable used |
| 279 | server name (@code{smtpmail-smtp-server}) is @var{hostname}, the | 324 | prior to Emacs 24.1.) |
| 280 | server port (@code{smtpmail-smtp-service}) is @var{port}, and the | ||
| 281 | username and password are @var{username} and @var{password} | ||
| 282 | respectively. | ||
| 283 | 325 | ||
| 284 | @example | ||
| 285 | ;; Authenticate using this username and password against my server. | ||
| 286 | (setq smtpmail-auth-credentials | ||
| 287 | '(("@var{hostname}" "@var{port}" "@var{username}" "@var{password}"))) | ||
| 288 | |||
| 289 | ;; Note that if @var{port} is an integer, you must not quote it as a | ||
| 290 | ;; string. Normally @var{port} should be the integer 25, and the example | ||
| 291 | ;; become: | ||
| 292 | (setq smtpmail-auth-credentials | ||
| 293 | '(("@var{hostname}" 25 "@var{username}" "@var{password}"))) | ||
| 294 | |||
| 295 | ;; Use STARTTLS without authentication against the server. | ||
| 296 | (setq smtpmail-starttls-credentials | ||
| 297 | '(("@var{hostname}" "@var{port}" nil nil))) | ||
| 298 | @end example | ||
| 299 | 326 | ||
| 300 | @node Queued delivery | 327 | @node Queued delivery |
| 301 | @chapter Queued delivery | 328 | @chapter Queued delivery |
| @@ -141,22 +141,22 @@ For example, this is used by Rmail to optionally delete a mail window. | |||
| 141 | 141 | ||
| 142 | *** smtpmail | 142 | *** smtpmail |
| 143 | 143 | ||
| 144 | **** smtpmail now uses encrypted connections (via STARTTLS) if the | 144 | +++ |
| 145 | mail server supports them. It also uses the auth-source framework for | 145 | **** smtpmail now uses encrypted connections (via STARTTLS) by default |
| 146 | getting credentials. | 146 | if the mail server supports them. This uses either built-in GnuTLS |
| 147 | support, or the starttls.el library. Customize `smtpmail-stream-type' | ||
| 148 | to change this. | ||
| 147 | 149 | ||
| 150 | +++ | ||
| 148 | **** The variable `smtpmail-auth-credentials' has been removed. | 151 | **** The variable `smtpmail-auth-credentials' has been removed. |
| 149 | That variable used to have the default value "~/.authinfo", in which | 152 | By default, the information is now stored in the file ~/.authinfo. |
| 150 | case you won't see any difference. But if you changed it to be a list | 153 | This was the default value of smtpmail-auth-credentials. |
| 151 | of user names and passwords, that setting is now ignored; you will be | 154 | If you had customized smtpmail-auth-credentials to a list of user |
| 152 | prompted for the user name and the password, which will then be saved | 155 | names and passwords, those settings will not be used. Your first |
| 153 | to ~/.authinfo. (To control where and how the credentials are stored, | 156 | connection to the smtp server will prompt for the user name and password, |
| 154 | see the auth-source manual. You may want to change the auth-source | 157 | and then offer to save them to the ~/.authinfo file. Or you can |
| 155 | preferences if you want to store the credentials encrypted, for | 158 | manually copy the credentials to your ~/.authinfo files. For example, |
| 156 | instance.) | 159 | if you had |
| 157 | |||
| 158 | You can also manually copy the credentials to your ~/.authinfo file. | ||
| 159 | For example, if you had | ||
| 160 | 160 | ||
| 161 | (setq smtpmail-auth-credentials | 161 | (setq smtpmail-auth-credentials |
| 162 | '(("mail.example.org" 25 "jim" "s!cret"))) | 162 | '(("mail.example.org" 25 "jim" "s!cret"))) |
| @@ -165,6 +165,10 @@ then the equivalent line in ~/.authinfo would be | |||
| 165 | 165 | ||
| 166 | machine mail.example.org port 25 login jim password s!cret | 166 | machine mail.example.org port 25 login jim password s!cret |
| 167 | 167 | ||
| 168 | See the auth-source manual for more information, e.g. on encrypting | ||
| 169 | the credentials file. | ||
| 170 | |||
| 171 | +++ | ||
| 168 | **** The variable `smtpmail-starttls-credentials' has been removed. | 172 | **** The variable `smtpmail-starttls-credentials' has been removed. |
| 169 | 173 | ||
| 170 | If you had that set, then you need to put | 174 | If you had that set, then you need to put |
| @@ -1107,7 +1111,10 @@ font-lock-defaults-alist (font-lock-defaults), and e (float-e). | |||
| 1107 | ** The following obsolete files were removed: | 1111 | ** The following obsolete files were removed: |
| 1108 | sc.el, x-menu.el, rnews.el, rnewspost.el | 1112 | sc.el, x-menu.el, rnews.el, rnewspost.el |
| 1109 | 1113 | ||
| 1110 | ** FIXME finder-inf.el changes. | 1114 | --- |
| 1115 | ** The format of the finder-inf.el file has changed, since the finder | ||
| 1116 | mechanism is now based on the package concept. The variable | ||
| 1117 | finder-package-info is replaced by package--builtins and finder-keywords-hash. | ||
| 1111 | 1118 | ||
| 1112 | 1119 | ||
| 1113 | * Lisp changes in Emacs 24.1 | 1120 | * Lisp changes in Emacs 24.1 |
| @@ -1282,6 +1289,7 @@ behavior of `completing-read'. | |||
| 1282 | ** `glyphless-char-display' can now distinguish between graphical and | 1289 | ** `glyphless-char-display' can now distinguish between graphical and |
| 1283 | text terminal display, via a char-table entry that is a cons cell. | 1290 | text terminal display, via a char-table entry that is a cons cell. |
| 1284 | 1291 | ||
| 1292 | +++ | ||
| 1285 | ** `open-network-stream' can now be used to open an encrypted stream. | 1293 | ** `open-network-stream' can now be used to open an encrypted stream. |
| 1286 | It now accepts an optional `:type' parameter for initiating a TLS | 1294 | It now accepts an optional `:type' parameter for initiating a TLS |
| 1287 | connection, directly or via STARTTLS. To do STARTTLS, additional | 1295 | connection, directly or via STARTTLS. To do STARTTLS, additional |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c7e8f2e8f8..bdbe99d5452 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,34 @@ | |||
| 1 | 2012-02-15 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * shell.el (shell-delimiter-argument-list): | ||
| 4 | Revert 2011-02-17 change. (Bug#8027) | ||
| 5 | |||
| 6 | 2012-02-15 Chong Yidong <cyd@gnu.org> | ||
| 7 | |||
| 8 | * minibuffer.el (completion-at-point-functions): Doc fix. | ||
| 9 | |||
| 10 | * custom.el (defcustom): Doc fix; note use of defvar. | ||
| 11 | |||
| 12 | 2012-02-15 Glenn Morris <rgm@gnu.org> | ||
| 13 | |||
| 14 | * mail/smtpmail.el (smtpmail-smtp-user, smtpmail-stream-type): | ||
| 15 | Doc fixes. | ||
| 16 | |||
| 17 | 2012-02-14 Glenn Morris <rgm@gnu.org> | ||
| 18 | |||
| 19 | * mail/smtpmail.el (smtpmail-query-smtp-server): Give it a doc. | ||
| 20 | |||
| 21 | 2012-02-14 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 22 | |||
| 23 | * mail/smtpmail.el (smtpmail-query-smtp-server): Fix typo in the | ||
| 24 | way the ports list is computed. | ||
| 25 | (smtpmail-query-smtp-server): Prompt the user for a port number if | ||
| 26 | we can't connect to any of the standard ports (bug#10810). | ||
| 27 | |||
| 28 | 2012-02-14 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 29 | |||
| 30 | * net/gnutls.el (gnutls-trustfiles): Add Cygwin location. | ||
| 31 | |||
| 1 | 2012-02-13 Glenn Morris <rgm@gnu.org> | 32 | 2012-02-13 Glenn Morris <rgm@gnu.org> |
| 2 | 33 | ||
| 3 | * minibuffer.el (read-file-name): Doc fix. (Bug#10798) | 34 | * minibuffer.el (read-file-name): Doc fix. (Bug#10798) |
diff --git a/lisp/custom.el b/lisp/custom.el index 2d880d23955..810b78144a4 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -208,7 +208,11 @@ is unbound. The expression itself is also stored, so that | |||
| 208 | Customize can re-evaluate it later to get the standard value. | 208 | Customize can re-evaluate it later to get the standard value. |
| 209 | DOC is the variable documentation. | 209 | DOC is the variable documentation. |
| 210 | 210 | ||
| 211 | The remaining arguments should have the form | 211 | This macro uses `defvar' as a subroutine, which also marks the |
| 212 | variable as \"special\", so that it is always dynamically bound | ||
| 213 | even when `lexical-binding' is t. | ||
| 214 | |||
| 215 | The remaining arguments to `defcustom' should have the form | ||
| 212 | 216 | ||
| 213 | [KEYWORD VALUE]... | 217 | [KEYWORD VALUE]... |
| 214 | 218 | ||
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 99554cd9ffe..9ac21e5a33e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2012-02-15 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * shr.el (shr-remove-trailing-whitespace): Really delete the padding on | ||
| 4 | too-wide lines. | ||
| 5 | |||
| 6 | 2012-02-15 Paul Eggert <eggert@cs.ucla.edu> | ||
| 7 | |||
| 8 | * shr.el (shr-rescale-image): Undo previous change; see | ||
| 9 | <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>. | ||
| 10 | |||
| 1 | 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org> | 11 | 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org> |
| 2 | 12 | ||
| 3 | * nnimap.el (nnimap-record-commands): New variable. | 13 | * nnimap.el (nnimap-record-commands): New variable. |
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index 47622f5183d..f3d75032926 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el | |||
| @@ -160,7 +160,7 @@ DOM should be a parse tree as generated by | |||
| 160 | (goto-char start) | 160 | (goto-char start) |
| 161 | (while (not (eobp)) | 161 | (while (not (eobp)) |
| 162 | (end-of-line) | 162 | (end-of-line) |
| 163 | (when (> (current-column) width) | 163 | (when (> (shr-previous-newline-padding-width (current-column)) width) |
| 164 | (dolist (overlay (overlays-at (point))) | 164 | (dolist (overlay (overlays-at (point))) |
| 165 | (when (overlay-get overlay 'before-string) | 165 | (when (overlay-get overlay 'before-string) |
| 166 | (overlay-put overlay 'before-string nil)))) | 166 | (overlay-put overlay 'before-string nil)))) |
| @@ -557,8 +557,7 @@ the URL of the image to the kill buffer instead." | |||
| 557 | (insert alt))) | 557 | (insert alt))) |
| 558 | 558 | ||
| 559 | (defun shr-rescale-image (data) | 559 | (defun shr-rescale-image (data) |
| 560 | (let* ((max-image-size nil) | 560 | (let ((image (create-image data nil t :ascent 100))) |
| 561 | (image (create-image data nil t :ascent 100))) | ||
| 562 | (if (or (not (fboundp 'imagemagick-types)) | 561 | (if (or (not (fboundp 'imagemagick-types)) |
| 563 | (not (get-buffer-window (current-buffer)))) | 562 | (not (get-buffer-window (current-buffer)))) |
| 564 | image | 563 | image |
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 99283bebf9d..3233cff2768 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail | 1 | ;;; smtpmail.el --- simple SMTP protocol (RFC 821) for sending mail |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp> | 5 | ;; Author: Tomoji Kagatani <kagatani@rbc.ncl.omron.co.jp> |
| 6 | ;; Maintainer: Simon Josefsson <simon@josefsson.org> | 6 | ;; Maintainer: Simon Josefsson <simon@josefsson.org> |
| @@ -86,7 +86,8 @@ The default value would be \"smtp\" or 25." | |||
| 86 | :group 'smtpmail) | 86 | :group 'smtpmail) |
| 87 | 87 | ||
| 88 | (defcustom smtpmail-smtp-user nil | 88 | (defcustom smtpmail-smtp-user nil |
| 89 | "User name to use when looking up credentials." | 89 | "User name to use when looking up credentials in the authinfo file. |
| 90 | If non-nil, only consider credentials for the specified user." | ||
| 90 | :version "24.1" | 91 | :version "24.1" |
| 91 | :type '(choice (const nil) string) | 92 | :type '(choice (const nil) string) |
| 92 | :group 'smtpmail) | 93 | :group 'smtpmail) |
| @@ -99,11 +100,10 @@ don't define this value." | |||
| 99 | :group 'smtpmail) | 100 | :group 'smtpmail) |
| 100 | 101 | ||
| 101 | (defcustom smtpmail-stream-type nil | 102 | (defcustom smtpmail-stream-type nil |
| 102 | "Connection type SMTP connections. | 103 | "Type of SMTP connections to use. |
| 103 | This may be either nil (possibly upgraded to STARTTLS if | 104 | This may be either nil (possibly upgraded to STARTTLS if possible), |
| 104 | possible), or `starttls' (refuse to send if STARTTLS isn't | 105 | or `starttls' (refuse to send if STARTTLS isn't available), or `plain' |
| 105 | available), or `plain' (never use STARTTLS), or `ssl' (to use | 106 | \(never use STARTTLS), or `ssl' (to use TLS/SSL)." |
| 106 | TLS/SSL)." | ||
| 107 | :version "24.1" | 107 | :version "24.1" |
| 108 | :group 'smtpmail | 108 | :group 'smtpmail |
| 109 | :type '(choice (const :tag "Possibly upgrade to STARTTLS" nil) | 109 | :type '(choice (const :tag "Possibly upgrade to STARTTLS" nil) |
| @@ -596,18 +596,31 @@ The list is in preference order.") | |||
| 596 | (mapconcat 'identity (cdr response) "\n")) | 596 | (mapconcat 'identity (cdr response) "\n")) |
| 597 | 597 | ||
| 598 | (defun smtpmail-query-smtp-server () | 598 | (defun smtpmail-query-smtp-server () |
| 599 | "Query for an SMTP server and try to contact it. | ||
| 600 | If the contact succeeds, customizes and saves `smtpmail-smtp-server' | ||
| 601 | and `smtpmail-smtp-service'. This tries standard SMTP ports, and if | ||
| 602 | none works asks you to supply one. If you know that you need to use | ||
| 603 | a non-standard port, you can set `smtpmail-smtp-service' in advance. | ||
| 604 | Returns an error if the server cannot be contacted." | ||
| 599 | (let ((server (read-string "Outgoing SMTP mail server: ")) | 605 | (let ((server (read-string "Outgoing SMTP mail server: ")) |
| 600 | (ports '("smtp" 587)) | 606 | (ports '(25 587)) |
| 601 | stream port) | 607 | stream port prompted) |
| 602 | (when (and smtpmail-smtp-server | 608 | (when (and smtpmail-smtp-service |
| 603 | (not (member smtpmail-smtp-server ports))) | 609 | (not (member smtpmail-smtp-service ports))) |
| 604 | (push smtpmail-smtp-server ports)) | 610 | (push smtpmail-smtp-service ports)) |
| 605 | (while (and (not smtpmail-smtp-server) | 611 | (while (and (not smtpmail-smtp-server) |
| 606 | (setq port (pop ports))) | 612 | (setq port (pop ports))) |
| 607 | (when (setq stream (condition-case () | 613 | (if (not (setq stream (condition-case () |
| 608 | (open-network-stream "smtp" nil server port) | 614 | (open-network-stream "smtp" nil server port) |
| 609 | (quit nil) | 615 | (quit nil) |
| 610 | (error nil))) | 616 | (error nil)))) |
| 617 | ;; We've used up the list of default ports, so query the user. | ||
| 618 | (when (and (not ports) | ||
| 619 | (not prompted)) | ||
| 620 | (push (read-number (format "Port number to use when contacting %s? " | ||
| 621 | server)) | ||
| 622 | ports) | ||
| 623 | (setq prompted t)) | ||
| 611 | (customize-save-variable 'smtpmail-smtp-server server) | 624 | (customize-save-variable 'smtpmail-smtp-server server) |
| 612 | (customize-save-variable 'smtpmail-smtp-service port) | 625 | (customize-save-variable 'smtpmail-smtp-service port) |
| 613 | (delete-process stream))) | 626 | (delete-process stream))) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 611df1eb6d9..8564cc2009b 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -1550,16 +1550,16 @@ the mode if ARG is omitted or nil." | |||
| 1550 | Each function on this hook is called in turns without any argument and should | 1550 | Each function on this hook is called in turns without any argument and should |
| 1551 | return either nil to mean that it is not applicable at point, | 1551 | return either nil to mean that it is not applicable at point, |
| 1552 | or a function of no argument to perform completion (discouraged), | 1552 | or a function of no argument to perform completion (discouraged), |
| 1553 | or a list of the form (START END COLLECTION &rest PROPS) where | 1553 | or a list of the form (START END COLLECTION . PROPS) where |
| 1554 | START and END delimit the entity to complete and should include point, | 1554 | START and END delimit the entity to complete and should include point, |
| 1555 | COLLECTION is the completion table to use to complete it, and | 1555 | COLLECTION is the completion table to use to complete it, and |
| 1556 | PROPS is a property list for additional information. | 1556 | PROPS is a property list for additional information. |
| 1557 | Currently supported properties are all the properties that can appear in | 1557 | Currently supported properties are all the properties that can appear in |
| 1558 | `completion-extra-properties' plus: | 1558 | `completion-extra-properties' plus: |
| 1559 | `:predicate' a predicate that completion candidates need to satisfy. | 1559 | `:predicate' a predicate that completion candidates need to satisfy. |
| 1560 | `:exclusive' If `no', means that if the completion data does not match the | 1560 | `:exclusive' If `no', means that if the completion table fails to |
| 1561 | text at point failure, then instead of reporting a completion failure, | 1561 | match the text at point, then instead of reporting a completion |
| 1562 | the completion should try the next completion function.") | 1562 | failure, the completion should try the next completion function.") |
| 1563 | 1563 | ||
| 1564 | (defvar completion--capf-misbehave-funs nil | 1564 | (defvar completion--capf-misbehave-funs nil |
| 1565 | "List of functions found on `completion-at-point-functions' that misbehave. | 1565 | "List of functions found on `completion-at-point-functions' that misbehave. |
diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 9b734637103..2fd276cf1c6 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el | |||
| @@ -56,6 +56,7 @@ set this variable to \"normal:-dhe-rsa\"." | |||
| 56 | "/etc/ssl/certs/ca-certificates.crt" ; Debian, Ubuntu, Gentoo and Arch Linux | 56 | "/etc/ssl/certs/ca-certificates.crt" ; Debian, Ubuntu, Gentoo and Arch Linux |
| 57 | "/etc/pki/tls/certs/ca-bundle.crt" ; Fedora and RHEL | 57 | "/etc/pki/tls/certs/ca-bundle.crt" ; Fedora and RHEL |
| 58 | "/etc/ssl/ca-bundle.pem" ; Suse | 58 | "/etc/ssl/ca-bundle.pem" ; Suse |
| 59 | "/usr/ssl/cert/ca-bundle.crt" ; Cygwin | ||
| 59 | ) | 60 | ) |
| 60 | "List of CA bundle location filenames or a function returning said list. | 61 | "List of CA bundle location filenames or a function returning said list. |
| 61 | The files may be in PEM or DER format, as per the GnuTLS documentation. | 62 | The files may be in PEM or DER format, as per the GnuTLS documentation. |
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 2a188c5a736..a2f83eecce5 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-02-14 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * org-footnote.el: Remove bogus defvar values (Bug#10745). | ||
| 4 | |||
| 1 | 2012-01-05 Eric Schulte <eric.schulte@gmx.com> | 5 | 2012-01-05 Eric Schulte <eric.schulte@gmx.com> |
| 2 | 6 | ||
| 3 | * ob.el (org-babel-expand-noweb-references): Resurrect dropped | 7 | * ob.el (org-babel-expand-noweb-references): Resurrect dropped |
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index f9cf59c879c..573bd648959 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el | |||
| @@ -475,7 +475,7 @@ or new, let the user edit the definition of the footnote." | |||
| 475 | (org-footnote-create-definition label) | 475 | (org-footnote-create-definition label) |
| 476 | (org-footnote-auto-adjust-maybe))))) | 476 | (org-footnote-auto-adjust-maybe))))) |
| 477 | 477 | ||
| 478 | (defvar org-blank-before-new-entry nil) ; silence byte-compiler | 478 | (defvar org-blank-before-new-entry) ; silence byte-compiler |
| 479 | (defun org-footnote-create-definition (label) | 479 | (defun org-footnote-create-definition (label) |
| 480 | "Start the definition of a footnote with label LABEL." | 480 | "Start the definition of a footnote with label LABEL." |
| 481 | (interactive "sLabel: ") | 481 | (interactive "sLabel: ") |
| @@ -595,8 +595,8 @@ With prefix arg SPECIAL, offer additional commands in a menu." | |||
| 595 | (defvar org-footnote-insert-pos-for-preprocessor 'point-max | 595 | (defvar org-footnote-insert-pos-for-preprocessor 'point-max |
| 596 | "See `org-footnote-normalize'.") | 596 | "See `org-footnote-normalize'.") |
| 597 | 597 | ||
| 598 | (defvar org-export-footnotes-seen nil) ; silence byte-compiler | 598 | (defvar org-export-footnotes-seen) ; silence byte-compiler |
| 599 | (defvar org-export-footnotes-data nil) ; silence byte-compiler | 599 | (defvar org-export-footnotes-data) ; silence byte-compiler |
| 600 | 600 | ||
| 601 | ;;;###autoload | 601 | ;;;###autoload |
| 602 | (defun org-footnote-normalize (&optional sort-only export-props) | 602 | (defun org-footnote-normalize (&optional sort-only export-props) |
diff --git a/lisp/shell.el b/lisp/shell.el index e7a8953ecbe..b4b388655c8 100644 --- a/lisp/shell.el +++ b/lisp/shell.el | |||
| @@ -153,13 +153,14 @@ This is a fine thing to set in your `.emacs' file." | |||
| 153 | :type '(repeat (string :tag "Suffix")) | 153 | :type '(repeat (string :tag "Suffix")) |
| 154 | :group 'shell) | 154 | :group 'shell) |
| 155 | 155 | ||
| 156 | (defcustom shell-delimiter-argument-list nil ; '(?\| ?& ?< ?> ?\( ?\) ?\;) | 156 | (defcustom shell-delimiter-argument-list '(?\| ?& ?< ?> ?\( ?\) ?\;) |
| 157 | "List of characters to recognize as separate arguments. | 157 | "List of characters to recognize as separate arguments. |
| 158 | This variable is used to initialize `comint-delimiter-argument-list' in the | 158 | This variable is used to initialize `comint-delimiter-argument-list' in the |
| 159 | shell buffer. The value may depend on the operating system or shell." | 159 | shell buffer. The value may depend on the operating system or shell." |
| 160 | :type '(choice (const nil) | 160 | :type '(choice (const nil) |
| 161 | (repeat :tag "List of characters" character)) | 161 | (repeat :tag "List of characters" character)) |
| 162 | :version "24.1" ; changed to nil (bug#8027) | 162 | ;; Reverted. |
| 163 | ;; :version "24.1" ; changed to nil (bug#8027) | ||
| 163 | :group 'shell) | 164 | :group 'shell) |
| 164 | 165 | ||
| 165 | (defvar shell-file-name-chars | 166 | (defvar shell-file-name-chars |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index c53f7294aef..8f3e3997869 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2012-02-14 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * url-queue.el (url-queue-kill-job): Refactored out code. | ||
| 4 | (url-queue-remove-jobs-from-host): Use it to kill jobs that are in | ||
| 5 | flight. | ||
| 6 | |||
| 7 | 2012-02-14 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 8 | |||
| 9 | * url-future.el: Minor doc update. | ||
| 10 | |||
| 1 | 2012-02-14 Leo Liu <sdl.web@gmail.com> | 11 | 2012-02-14 Leo Liu <sdl.web@gmail.com> |
| 2 | 12 | ||
| 3 | * url-future.el: Fix last change. | 13 | * url-future.el: Fix last change. |
diff --git a/lisp/url/url-future.el b/lisp/url/url-future.el index 38ac09c06bb..8cdd6916a35 100644 --- a/lisp/url/url-future.el +++ b/lisp/url/url-future.el | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | ;; So, to get the value: | 36 | ;; So, to get the value: |
| 37 | ;; (when (url-future-completed-p future) (url-future-value future)) | 37 | ;; (when (url-future-completed-p future) (url-future-value future)) |
| 38 | 38 | ||
| 39 | ;; See the ERT tests and the code for further details. | 39 | ;; See `url-future-tests' and the code below for further details. |
| 40 | 40 | ||
| 41 | ;;; Code: | 41 | ;;; Code: |
| 42 | 42 | ||
diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el index 9dfee485918..1fc33dd22f1 100644 --- a/lisp/url/url-queue.el +++ b/lisp/url/url-queue.el | |||
| @@ -127,6 +127,7 @@ The variable `url-queue-timeout' sets a timeout." | |||
| 127 | host) | 127 | host) |
| 128 | (push job jobs))) | 128 | (push job jobs))) |
| 129 | (dolist (job jobs) | 129 | (dolist (job jobs) |
| 130 | (url-queue-kill-job job) | ||
| 130 | (setq url-queue (delq job url-queue))))) | 131 | (setq url-queue (delq job url-queue))))) |
| 131 | 132 | ||
| 132 | (defun url-queue-start-retrieve (job) | 133 | (defun url-queue-start-retrieve (job) |
| @@ -146,14 +147,17 @@ The variable `url-queue-timeout' sets a timeout." | |||
| 146 | url-queue-timeout)) | 147 | url-queue-timeout)) |
| 147 | (push job dead-jobs))) | 148 | (push job dead-jobs))) |
| 148 | (dolist (job dead-jobs) | 149 | (dolist (job dead-jobs) |
| 149 | (when (bufferp (url-queue-buffer job)) | 150 | (url-queue-kill-job job) |
| 150 | (while (get-buffer-process (url-queue-buffer job)) | ||
| 151 | (ignore-errors | ||
| 152 | (delete-process (get-buffer-process (url-queue-buffer job))))) | ||
| 153 | (ignore-errors | ||
| 154 | (kill-buffer (url-queue-buffer job)))) | ||
| 155 | (setq url-queue (delq job url-queue))))) | 151 | (setq url-queue (delq job url-queue))))) |
| 156 | 152 | ||
| 153 | (defun url-queue-kill-job (job) | ||
| 154 | (when (bufferp (url-queue-buffer job)) | ||
| 155 | (while (get-buffer-process (url-queue-buffer job)) | ||
| 156 | (ignore-errors | ||
| 157 | (delete-process (get-buffer-process (url-queue-buffer job))))) | ||
| 158 | (ignore-errors | ||
| 159 | (kill-buffer (url-queue-buffer job))))) | ||
| 160 | |||
| 157 | (provide 'url-queue) | 161 | (provide 'url-queue) |
| 158 | 162 | ||
| 159 | ;;; url-queue.el ends here | 163 | ;;; url-queue.el ends here |
diff --git a/src/ChangeLog b/src/ChangeLog index 7893cd68396..12b4fa97c33 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2012-02-15 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see | ||
| 4 | <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>. | ||
| 5 | |||
| 6 | 2012-02-15 Chong Yidong <cyd@gnu.org> | ||
| 7 | |||
| 8 | * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is | ||
| 9 | marked as special. Also, starting docstrings with * is obsolete. | ||
| 10 | |||
| 1 | 2012-02-13 Andreas Schwab <schwab@linux-m68k.org> | 11 | 2012-02-13 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 12 | ||
| 3 | * gnutls.c (emacs_gnutls_write): Fix last change. | 13 | * gnutls.c (emacs_gnutls_write): Fix last change. |
diff --git a/src/eval.c b/src/eval.c index dbd06e7c1b1..344228741cb 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -780,17 +780,15 @@ The return value is BASE-VARIABLE. */) | |||
| 780 | 780 | ||
| 781 | DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0, | 781 | DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0, |
| 782 | doc: /* Define SYMBOL as a variable, and return SYMBOL. | 782 | doc: /* Define SYMBOL as a variable, and return SYMBOL. |
| 783 | You are not required to define a variable in order to use it, | 783 | You are not required to define a variable in order to use it, but |
| 784 | but the definition can supply documentation and an initial value | 784 | defining it lets you supply an initial value and documentation, which |
| 785 | in a way that tags can recognize. | 785 | can be referred to by the Emacs help facilities and other programming |
| 786 | 786 | tools. The `defvar' form also declares the variable as \"special\", | |
| 787 | INITVALUE is evaluated, and used to set SYMBOL, only if SYMBOL's value is void. | 787 | so that it is always dynamically bound even if `lexical-binding' is t. |
| 788 | If SYMBOL is buffer-local, its default value is what is set; | 788 | |
| 789 | buffer-local values are not affected. | 789 | The optional argument INITVALUE is evaluated, and used to set SYMBOL, |
| 790 | INITVALUE and DOCSTRING are optional. | 790 | only if SYMBOL's value is void. If SYMBOL is buffer-local, its |
| 791 | If DOCSTRING starts with *, this variable is identified as a user option. | 791 | default value is what is set; buffer-local values are not affected. |
| 792 | This means that M-x set-variable recognizes it. | ||
| 793 | See also `user-variable-p'. | ||
| 794 | If INITVALUE is missing, SYMBOL's value is not set. | 792 | If INITVALUE is missing, SYMBOL's value is not set. |
| 795 | 793 | ||
| 796 | If SYMBOL has a local binding, then this form affects the local | 794 | If SYMBOL has a local binding, then this form affects the local |
| @@ -799,6 +797,13 @@ load a file defining variables, with this form or with `defconst' or | |||
| 799 | `defcustom', you should always load that file _outside_ any bindings | 797 | `defcustom', you should always load that file _outside_ any bindings |
| 800 | for these variables. \(`defconst' and `defcustom' behave similarly in | 798 | for these variables. \(`defconst' and `defcustom' behave similarly in |
| 801 | this respect.) | 799 | this respect.) |
| 800 | |||
| 801 | The optional argument DOCSTRING is a documentation string for the | ||
| 802 | variable. | ||
| 803 | |||
| 804 | To define a user option, use `defcustom' instead of `defvar'. | ||
| 805 | The function `user-variable-p' also identifies a variable as a user | ||
| 806 | option if its DOCSTRING starts with *, but this behavior is obsolete. | ||
| 802 | usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) | 807 | usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) |
| 803 | (Lisp_Object args) | 808 | (Lisp_Object args) |
| 804 | { | 809 | { |
| @@ -873,15 +878,19 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) | |||
| 873 | 878 | ||
| 874 | DEFUN ("defconst", Fdefconst, Sdefconst, 2, UNEVALLED, 0, | 879 | DEFUN ("defconst", Fdefconst, Sdefconst, 2, UNEVALLED, 0, |
| 875 | doc: /* Define SYMBOL as a constant variable. | 880 | doc: /* Define SYMBOL as a constant variable. |
| 876 | The intent is that neither programs nor users should ever change this value. | 881 | This declares that neither programs nor users should ever change the |
| 877 | Always sets the value of SYMBOL to the result of evalling INITVALUE. | 882 | value. This constancy is not actually enforced by Emacs Lisp, but |
| 878 | If SYMBOL is buffer-local, its default value is what is set; | 883 | SYMBOL is marked as a special variable so that it is never lexically |
| 879 | buffer-local values are not affected. | 884 | bound. |
| 880 | DOCSTRING is optional. | 885 | |
| 881 | 886 | The `defconst' form always sets the value of SYMBOL to the result of | |
| 882 | If SYMBOL has a local binding, then this form sets the local binding's | 887 | evalling INITVALUE. If SYMBOL is buffer-local, its default value is |
| 883 | value. However, you should normally not make local bindings for | 888 | what is set; buffer-local values are not affected. If SYMBOL has a |
| 884 | variables defined with this form. | 889 | local binding, then this form sets the local binding's value. |
| 890 | However, you should normally not make local bindings for variables | ||
| 891 | defined with this form. | ||
| 892 | |||
| 893 | The optional DOCSTRING specifies the variable's documentation string. | ||
| 885 | usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */) | 894 | usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */) |
| 886 | (Lisp_Object args) | 895 | (Lisp_Object args) |
| 887 | { | 896 | { |
diff --git a/src/image.c b/src/image.c index b2951dd70fb..73490fe2865 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -976,7 +976,7 @@ or omitted means use the selected frame. */) | |||
| 976 | 976 | ||
| 977 | static void free_image (struct frame *f, struct image *img); | 977 | static void free_image (struct frame *f, struct image *img); |
| 978 | 978 | ||
| 979 | #define MAX_IMAGE_SIZE 6.0 | 979 | #define MAX_IMAGE_SIZE 10.0 |
| 980 | /* Allocate and return a new image structure for image specification | 980 | /* Allocate and return a new image structure for image specification |
| 981 | SPEC. SPEC has a hash value of HASH. */ | 981 | SPEC. SPEC has a hash value of HASH. */ |
| 982 | 982 | ||