diff options
| author | Chong Yidong | 2013-12-25 18:24:52 +0800 |
|---|---|---|
| committer | Chong Yidong | 2013-12-25 18:24:52 +0800 |
| commit | c93525876d67837669c5e8f89b6606b4cfb55ec4 (patch) | |
| tree | 9518ab8234c570b12cdf9f6964c895e47c9a49e8 | |
| parent | ff1c842a9477dee39fa20f885d64288b4947a040 (diff) | |
| download | emacs-c93525876d67837669c5e8f89b6606b4cfb55ec4.tar.gz emacs-c93525876d67837669c5e8f89b6606b4cfb55ec4.zip | |
Doc updates for several Emacs 24.4 changes.
* doc/lispref/commands.texi (Event Input Misc): Document new arg to
input-pending-p.
* doc/lispref/display.texi (Font Selection): Tweak example.
* doc/lispref/keymaps.texi (Active Keymaps): Re-organize the text.
(Searching Keymaps): Rewrite the pseudo-code for 24.4 changes.
(Controlling Active Maps): Note that set-transient-map uses
overriding-terminal-local-map.
* doc/lispref/nonascii.texi (Specifying Coding Systems): Don't refer to
emacs-mule-dos.
(Lisp and Coding Systems): Describe emacs-mule return value in
modern terms.
* doc/lispref/tips.texi (Coding Conventions): Tweak the coding system tip;
Emacs now uses utf-8 by default for Emacs Lisp source files.
* doc/emacs/glossary.texi (Glossary): Define MULE in modern terms.
* src/keyboard.c (Voverriding_terminal_local_map):
(Voverriding_local_map): Doc fix.
* src/keymap.c (Vemulation_mode_map_alists): Doc fix.
| -rw-r--r-- | doc/emacs/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/emacs/glossary.texi | 12 | ||||
| -rw-r--r-- | doc/emacs/mule.texi | 1 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 20 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 6 | ||||
| -rw-r--r-- | doc/lispref/display.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 196 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 16 | ||||
| -rw-r--r-- | doc/lispref/tips.texi | 13 | ||||
| -rw-r--r-- | etc/NEWS | 13 | ||||
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/keyboard.c | 13 | ||||
| -rw-r--r-- | src/keymap.c | 2 |
13 files changed, 171 insertions, 136 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 9b6868857e8..96008f63e93 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-12-25 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * glossary.texi (Glossary): Define MULE in modern terms. | ||
| 4 | |||
| 1 | 2013-12-25 Xue Fuqiao <xfq.free@gmail.com> | 5 | 2013-12-25 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 6 | ||
| 3 | * files.texi (Diff Mode): Add an index. | 7 | * files.texi (Diff Mode): Add an index. |
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index c8b4b40416f..d6c8477b1c6 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi | |||
| @@ -953,9 +953,15 @@ another. The usual way to move text is by killing (q.v.@:) it and then | |||
| 953 | yanking (q.v.@:) it. @xref{Killing}. | 953 | yanking (q.v.@:) it. @xref{Killing}. |
| 954 | 954 | ||
| 955 | @item MULE | 955 | @item MULE |
| 956 | MULE refers to the Emacs features for editing multilingual | 956 | @cindex MULE |
| 957 | non-@acronym{ASCII} text using multibyte characters (q.v.). | 957 | Prior to Emacs 23, @acronym{MULE} was the name of a software package |
| 958 | @xref{International}. | 958 | which provided a @dfn{MULtilingual Enhancement} to Emacs, by adding |
| 959 | support for multiple character sets (q.v.). @acronym{MULE} was later | ||
| 960 | integrated into Emacs, and much of it was replaced when Emacs gained | ||
| 961 | internal Unicode support in version 23. | ||
| 962 | |||
| 963 | Some parts of Emacs that deal with character set support still use the | ||
| 964 | @acronym{MULE} name. @xref{International}. | ||
| 959 | 965 | ||
| 960 | @item Multibyte Character | 966 | @item Multibyte Character |
| 961 | A multibyte character is a character that takes up several bytes in a | 967 | A multibyte character is a character that takes up several bytes in a |
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 6efbc2b7190..e0653c96f8b 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | @chapter International Character Set Support | 5 | @chapter International Character Set Support |
| 6 | @c This node is referenced in the tutorial. When renaming or deleting | 6 | @c This node is referenced in the tutorial. When renaming or deleting |
| 7 | @c it, the tutorial needs to be adjusted. (TUTORIAL.de) | 7 | @c it, the tutorial needs to be adjusted. (TUTORIAL.de) |
| 8 | @cindex MULE | ||
| 9 | @cindex international scripts | 8 | @cindex international scripts |
| 10 | @cindex multibyte characters | 9 | @cindex multibyte characters |
| 11 | @cindex encoding of characters | 10 | @cindex encoding of characters |
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 738dd417fd2..354efd5f40c 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2013-12-25 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * keymaps.texi (Active Keymaps): Re-organize the text. | ||
| 4 | (Searching Keymaps): Rewrite the pseudo-code for 24.4 changes. | ||
| 5 | (Controlling Active Maps): Note that set-transient-map uses | ||
| 6 | overriding-terminal-local-map. | ||
| 7 | |||
| 8 | * tips.texi (Coding Conventions): Tweak the coding system tip; | ||
| 9 | Emacs now uses utf-8 by default for Emacs Lisp source files. | ||
| 10 | |||
| 11 | * display.texi (Font Selection): Tweak example. | ||
| 12 | |||
| 13 | * commands.texi (Event Input Misc): Document new arg to | ||
| 14 | input-pending-p. | ||
| 15 | |||
| 16 | * nonascii.texi (Specifying Coding Systems): Don't refer to | ||
| 17 | emacs-mule-dos. | ||
| 18 | (Lisp and Coding Systems): Describe emacs-mule return value in | ||
| 19 | modern terms. | ||
| 20 | |||
| 1 | 2013-12-25 Tassilo Horn <tsdh@gnu.org> | 21 | 2013-12-25 Tassilo Horn <tsdh@gnu.org> |
| 2 | 22 | ||
| 3 | * control.texi (Pattern matching case statement): Rephrase lexical | 23 | * control.texi (Pattern matching case statement): Rephrase lexical |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 846d6f3a4a9..a9322640880 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -2739,12 +2739,16 @@ This function converts the string or vector @var{key} to a list of | |||
| 2739 | individual events, which you can put in @code{unread-command-events}. | 2739 | individual events, which you can put in @code{unread-command-events}. |
| 2740 | @end defun | 2740 | @end defun |
| 2741 | 2741 | ||
| 2742 | @defun input-pending-p | 2742 | @defun input-pending-p &optional check-timers |
| 2743 | @cindex waiting for command key input | 2743 | @cindex waiting for command key input |
| 2744 | This function determines whether any command input is currently | 2744 | This function determines whether any command input is currently |
| 2745 | available to be read. It returns immediately, with value @code{t} if | 2745 | available to be read. It returns immediately, with value @code{t} if |
| 2746 | there is available input, @code{nil} otherwise. On rare occasions it | 2746 | there is available input, @code{nil} otherwise. On rare occasions it |
| 2747 | may return @code{t} when no input is available. | 2747 | may return @code{t} when no input is available. |
| 2748 | |||
| 2749 | If the optional argument @var{check-timers} is non-@code{nil}, then if | ||
| 2750 | no input is available, Emacs runs any timers which are ready. | ||
| 2751 | @xref{Timers}. | ||
| 2748 | @end defun | 2752 | @end defun |
| 2749 | 2753 | ||
| 2750 | @defvar last-input-event | 2754 | @defvar last-input-event |
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index ead436ab809..6bb8f64d9eb 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -2962,11 +2962,11 @@ scalable font is enabled for use if its name matches any regular | |||
| 2962 | expression in the list. For example, | 2962 | expression in the list. For example, |
| 2963 | 2963 | ||
| 2964 | @example | 2964 | @example |
| 2965 | (setq scalable-fonts-allowed '("muleindian-2$")) | 2965 | (setq scalable-fonts-allowed '("iso10646-1$")) |
| 2966 | @end example | 2966 | @end example |
| 2967 | 2967 | ||
| 2968 | @noindent | 2968 | @noindent |
| 2969 | allows the use of scalable fonts with registry @code{muleindian-2}. | 2969 | allows the use of scalable fonts with registry @code{iso10646-1}. |
| 2970 | @end defopt | 2970 | @end defopt |
| 2971 | 2971 | ||
| 2972 | @defvar face-font-rescale-alist | 2972 | @defvar face-font-rescale-alist |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 86e205cf14d..c5ffbc964cc 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -622,75 +622,67 @@ string for the keymap. The prompt string should be given for menu keymaps | |||
| 622 | @node Active Keymaps | 622 | @node Active Keymaps |
| 623 | @section Active Keymaps | 623 | @section Active Keymaps |
| 624 | @cindex active keymap | 624 | @cindex active keymap |
| 625 | @cindex global keymap | ||
| 626 | @cindex local keymap | ||
| 627 | 625 | ||
| 628 | Emacs normally contains many keymaps; at any given time, just a few | 626 | Emacs contains many keymaps, but at any time only a few keymaps are |
| 629 | of them are @dfn{active}, meaning that they participate in the | 627 | @dfn{active}. When Emacs receives user input, it translates the input |
| 630 | interpretation of user input. All the active keymaps are used | 628 | event (@pxref{Translation Keymaps}), and looks for a key binding in |
| 631 | together to determine what command to execute when a key is entered. | 629 | the active keymaps. |
| 632 | 630 | ||
| 633 | Normally the active keymaps are the @code{keymap} property keymap, | 631 | Usually, the active keymaps are: (i) the keymap specified by the |
| 634 | the keymaps of any enabled minor modes, the current buffer's local | 632 | @code{keymap} property, (ii) the keymaps of enabled minor modes, (iii) |
| 635 | keymap, and the global keymap, in that order. Emacs searches for each | 633 | the current buffer's local keymap, and (iv) the global keymap, in that |
| 636 | input key sequence in all these keymaps. @xref{Searching Keymaps}, | 634 | order. Emacs searches for each input key sequence in all these |
| 637 | for more details of this procedure. | 635 | keymaps. |
| 638 | 636 | ||
| 639 | When the key sequence starts with a mouse event, | 637 | Of these ``usual'' keymaps, the highest-precedence one is specified |
| 640 | the active keymaps are determined based on the | 638 | by the @code{keymap} text or overlay property at point, if any. (For |
| 641 | position in that event. If the event happened on a string embedded | 639 | a mouse input event, Emacs uses the event position instead of point; |
| 642 | with a @code{display}, @code{before-string}, or @code{after-string} | 640 | @iftex |
| 643 | property (@pxref{Special Properties}), the non-@code{nil} map | 641 | see the next section for details.) |
| 644 | properties of the string override those of the buffer (if the | 642 | @end iftex |
| 645 | underlying buffer text contains map properties in its text properties | 643 | @ifnottex |
| 646 | or overlays, they are ignored). | 644 | @pxref{Searching Keymaps}.) |
| 647 | 645 | @end ifnottex | |
| 648 | The @dfn{global keymap} holds the bindings of keys that are defined | 646 | |
| 649 | regardless of the current buffer, such as @kbd{C-f}. The variable | 647 | Next in precedence are keymaps specified by enabled minor modes. |
| 650 | @code{global-map} holds this keymap, which is always active. | 648 | These keymaps, if any, are specified by the variables |
| 651 | 649 | @code{emulation-mode-map-alists}, | |
| 652 | Each buffer may have another keymap, its @dfn{local keymap}, which | 650 | @code{minor-mode-overriding-map-alist}, and |
| 653 | may contain new or overriding definitions for keys. The current | 651 | @code{minor-mode-map-alist}. @xref{Controlling Active Maps}. |
| 654 | buffer's local keymap is always active except when | ||
| 655 | @code{overriding-local-map} overrides it. The @code{local-map} text | ||
| 656 | or overlay property can specify an alternative local keymap for certain | ||
| 657 | parts of the buffer; see @ref{Special Properties}. | ||
| 658 | |||
| 659 | Each minor mode can have a keymap; if it does, the keymap is active | ||
| 660 | when the minor mode is enabled. Modes for emulation can specify | ||
| 661 | additional active keymaps through the variable | ||
| 662 | @code{emulation-mode-map-alists}. | ||
| 663 | |||
| 664 | The highest precedence normal keymap comes from the @code{keymap} | ||
| 665 | text or overlay property. If that is non-@code{nil}, it is the first | ||
| 666 | keymap to be processed, in normal circumstances. | ||
| 667 | |||
| 668 | However, there are also special ways for programs to substitute | ||
| 669 | other keymaps for some of those. The variable | ||
| 670 | @code{overriding-local-map}, if non-@code{nil}, specifies a keymap | ||
| 671 | that replaces all the usual active keymaps except the global keymap. | ||
| 672 | |||
| 673 | The very highest precedence keymap comes from | ||
| 674 | @code{overriding-terminal-local-map}; it operates on a per-terminal basis and | ||
| 675 | is normally used for modal/transient keybindings. | ||
| 676 | 652 | ||
| 677 | @cindex major mode keymap | 653 | @cindex local keymap |
| 678 | Since every buffer that uses the same major mode normally uses the | 654 | Next in precedence is the buffer's @dfn{local keymap}, containing |
| 679 | same local keymap, you can think of the keymap as local to the mode. A | 655 | key bindings specific to the buffer. The minibuffer also has a local |
| 680 | change to the local keymap of a buffer (using @code{local-set-key}, for | 656 | keymap (@pxref{Intro to Minibuffers}). If there is a @code{local-map} |
| 681 | example) is seen also in the other buffers that share that keymap. | 657 | text or overlay property at point, that specifies the local keymap to |
| 682 | 658 | use, in place of the buffer's default local keymap. | |
| 683 | The local keymaps that are used for Lisp mode and some other major | ||
| 684 | modes exist even if they have not yet been used. These local keymaps are | ||
| 685 | the values of variables such as @code{lisp-mode-map}. For most major | ||
| 686 | modes, which are less frequently used, the local keymap is constructed | ||
| 687 | only when the mode is used for the first time in a session. | ||
| 688 | 659 | ||
| 689 | The minibuffer has local keymaps, too; they contain various completion | 660 | @cindex major mode keymap |
| 690 | and exit commands. @xref{Intro to Minibuffers}. | 661 | The local keymap is normally set by the buffer's major mode, and |
| 662 | every buffer with the same major mode shares the same local keymap. | ||
| 663 | Hence, if you call @code{local-set-key} (@pxref{Key Binding Commands}) | ||
| 664 | to change the local keymap in one buffer, that also affects the local | ||
| 665 | keymaps in other buffers with the same major mode. | ||
| 691 | 666 | ||
| 692 | Emacs has other keymaps that are used in a different way---translating | 667 | @cindex global keymap |
| 693 | events within @code{read-key-sequence}. @xref{Translation Keymaps}. | 668 | Finally, the @dfn{global keymap} contains key bindings that are |
| 669 | defined regardless of the current buffer, such as @kbd{C-f}. It is | ||
| 670 | always active, and is bound to the variable @code{global-map}. | ||
| 671 | |||
| 672 | Apart from the above ``usual'' keymaps, Emacs provides special ways | ||
| 673 | for programs to make other keymaps active. Firstly, the variable | ||
| 674 | @code{overriding-local-map} specifies a keymap that replaces the usual | ||
| 675 | active keymaps, except for the global keymap. Secondly, the | ||
| 676 | terminal-local variable @code{overriding-terminal-local-map} specifies | ||
| 677 | a keymap that takes precedence over @emph{all} other keymaps | ||
| 678 | (including @code{overriding-local-map}); this is normally used for | ||
| 679 | modal/transient keybindings (the function @code{set-transient-map} | ||
| 680 | provides a convenient interface for this). @xref{Controlling Active | ||
| 681 | Maps}, for details. | ||
| 682 | |||
| 683 | Making keymaps active is not the only way to use them. Keymaps are | ||
| 684 | also used in other ways, such as for translating events within | ||
| 685 | @code{read-key-sequence}. @xref{Translation Keymaps}. | ||
| 694 | 686 | ||
| 695 | @xref{Standard Keymaps}, for a list of some standard keymaps. | 687 | @xref{Standard Keymaps}, for a list of some standard keymaps. |
| 696 | 688 | ||
| @@ -727,7 +719,7 @@ If @var{position} is non-@code{nil}, it should be either a buffer | |||
| 727 | position or an event position like the value of @code{event-start}. | 719 | position or an event position like the value of @code{event-start}. |
| 728 | Then the maps consulted are determined based on @var{position}. | 720 | Then the maps consulted are determined based on @var{position}. |
| 729 | 721 | ||
| 730 | An error is signaled if @var{key} is not a string or a vector. | 722 | Emacs signals an error if @var{key} is not a string or a vector. |
| 731 | 723 | ||
| 732 | @example | 724 | @example |
| 733 | @group | 725 | @group |
| @@ -741,49 +733,52 @@ An error is signaled if @var{key} is not a string or a vector. | |||
| 741 | @section Searching the Active Keymaps | 733 | @section Searching the Active Keymaps |
| 742 | @cindex searching active keymaps for keys | 734 | @cindex searching active keymaps for keys |
| 743 | 735 | ||
| 744 | After translation of event subsequences (@pxref{Translation | 736 | Here is a pseudo-Lisp summary of how Emacs searches the active |
| 745 | Keymaps}) Emacs looks for them in the active keymaps. Here is a | 737 | keymaps: |
| 746 | pseudo-Lisp description of the order and conditions for searching | ||
| 747 | them: | ||
| 748 | 738 | ||
| 749 | @lisp | 739 | @lisp |
| 750 | (or (@var{find-in} @var{transient-map}) | 740 | (or (if overriding-terminal-local-map |
| 751 | (cond | 741 | (@var{find-in} overriding-terminal-local-map)) |
| 752 | (overriding-terminal-local-map | 742 | (if overriding-local-map |
| 753 | (@var{find-in} overriding-terminal-local-map)) | 743 | (@var{find-in} overriding-local-map) |
| 754 | (overriding-local-map | 744 | (or (@var{find-in} (get-char-property (point) 'keymap)) |
| 755 | (@var{find-in} overriding-local-map)) | ||
| 756 | ((or (@var{find-in} (get-char-property (point) 'keymap)) | ||
| 757 | (@var{find-in-any} emulation-mode-map-alists) | 745 | (@var{find-in-any} emulation-mode-map-alists) |
| 758 | (@var{find-in-any} minor-mode-overriding-map-alist) | 746 | (@var{find-in-any} minor-mode-overriding-map-alist) |
| 759 | (@var{find-in-any} minor-mode-map-alist) | 747 | (@var{find-in-any} minor-mode-map-alist) |
| 760 | (if (get-text-property (point) 'local-map) | 748 | (if (get-text-property (point) 'local-map) |
| 761 | (@var{find-in} (get-char-property (point) 'local-map)) | 749 | (@var{find-in} (get-char-property (point) 'local-map)) |
| 762 | (@var{find-in} (current-local-map)))))) | 750 | (@var{find-in} (current-local-map))))) |
| 763 | (@var{find-in} (current-global-map))) | 751 | (@var{find-in} (current-global-map))) |
| 764 | @end lisp | 752 | @end lisp |
| 765 | 753 | ||
| 766 | @noindent | 754 | @noindent |
| 767 | Here, @var{find-in} and @var{find-in-any} are pseudo functions that | 755 | Here, @var{find-in} and @var{find-in-any} are pseudo functions that |
| 768 | search in one keymap and in an alist of keymaps, respectively. | 756 | search in one keymap and in an alist of keymaps, respectively. Note |
| 769 | (Searching a single keymap for a binding is called @dfn{key lookup}; | 757 | that the @code{set-transient-map} function works by setting |
| 770 | see @ref{Key Lookup}.) @var{transient-map} is a pseudo variable that | 758 | @code{overriding-terminal-local-map} (@pxref{Controlling Active |
| 771 | represents the effect of a @code{set-transient-map} call | 759 | Maps}). |
| 772 | (@pxref{Controlling Active Maps}). | ||
| 773 | 760 | ||
| 774 | In the above pseudo-code, if a key sequence starts with a mouse | 761 | In the above pseudo-code, if a key sequence starts with a mouse |
| 775 | event, that event's position is used instead of point and the current | 762 | event (@pxref{Mouse Events}), that event's position is used instead of |
| 776 | buffer. Mouse events on an embedded string use non-@code{nil} text | 763 | point, and the event's buffer is used instead of the current buffer. |
| 777 | properties from that string instead of the buffer. | 764 | In particular, this affects how the @code{keymap} and @code{local-map} |
| 778 | 765 | properties are looked up. If a mouse event occurs on a string | |
| 779 | When a match is found (@pxref{Key Lookup}), if the binding in the | 766 | embedded with a @code{display}, @code{before-string}, or |
| 780 | keymap is a function, the search is over. However if the keymap entry | 767 | @code{after-string} property (@pxref{Special Properties}), and the |
| 781 | is a symbol with a value or a string, Emacs replaces the input key | 768 | string has a non-@code{nil} @code{keymap} or @code{local-map} |
| 782 | sequences with the variable's value or the string, and restarts the | 769 | property, that overrides the corresponding property in the underlying |
| 783 | search of the active keymaps. | 770 | buffer text (i.e., the property specified by the underlying text is |
| 784 | 771 | ignored). | |
| 785 | The function finally found might also be remapped. @xref{Remapping | 772 | |
| 786 | Commands}. | 773 | When a key binding is found in one of the active keymaps, and that |
| 774 | binding is a command, the search is over---the command is executed. | ||
| 775 | However, if the binding is a symbol with a value or a string, Emacs | ||
| 776 | replaces the input key sequences with the variable's value or the | ||
| 777 | string, and restarts the search of the active keymaps. @xref{Key | ||
| 778 | Lookup}. | ||
| 779 | |||
| 780 | The command which is finally found might also be remapped. | ||
| 781 | @xref{Remapping Commands}. | ||
| 787 | 782 | ||
| 788 | @node Controlling Active Maps | 783 | @node Controlling Active Maps |
| 789 | @section Controlling the Active Keymaps | 784 | @section Controlling the Active Keymaps |
| @@ -860,7 +855,6 @@ keymap. @code{use-local-map} returns @code{nil}. Most major mode | |||
| 860 | commands use this function. | 855 | commands use this function. |
| 861 | @end defun | 856 | @end defun |
| 862 | 857 | ||
| 863 | @c Emacs 19 feature | ||
| 864 | @defvar minor-mode-map-alist | 858 | @defvar minor-mode-map-alist |
| 865 | @anchor{Definition of minor-mode-map-alist} | 859 | @anchor{Definition of minor-mode-map-alist} |
| 866 | This variable is an alist describing keymaps that may or may not be | 860 | This variable is an alist describing keymaps that may or may not be |
| @@ -945,7 +939,7 @@ event is run directly by @code{read-event}. @xref{Special Events}. | |||
| 945 | @end defvar | 939 | @end defvar |
| 946 | 940 | ||
| 947 | @defvar emulation-mode-map-alists | 941 | @defvar emulation-mode-map-alists |
| 948 | This variable holds a list of keymap alists to use for emulations | 942 | This variable holds a list of keymap alists to use for emulation |
| 949 | modes. It is intended for modes or packages using multiple minor-mode | 943 | modes. It is intended for modes or packages using multiple minor-mode |
| 950 | keymaps. Each element is a keymap alist which has the same format and | 944 | keymaps. Each element is a keymap alist which has the same format and |
| 951 | meaning as @code{minor-mode-map-alist}, or a symbol with a variable | 945 | meaning as @code{minor-mode-map-alist}, or a symbol with a variable |
| @@ -970,11 +964,9 @@ function is called with no arguments, prior to running each command, | |||
| 970 | while @var{keymap} is active; it should return non-@code{nil} if | 964 | while @var{keymap} is active; it should return non-@code{nil} if |
| 971 | @var{keymap} should stay active. | 965 | @var{keymap} should stay active. |
| 972 | 966 | ||
| 973 | The transient keymap takes precedence over the ``overriding'' maps | 967 | This function works by adding and removing @code{keymap} from the |
| 974 | (see above); and unlike them, if no match for a key is found in | 968 | variable @code{overriding-terminal-local-map}, which takes precedence |
| 975 | @var{keymap}, the key lookup process continues. For a pseudo-Lisp | 969 | over all other active keymaps (@pxref{Searching Keymaps}). |
| 976 | description of exactly how and when this keymap applies, | ||
| 977 | @xref{Searching Keymaps}. | ||
| 978 | @end defun | 970 | @end defun |
| 979 | 971 | ||
| 980 | @node Key Lookup | 972 | @node Key Lookup |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index ddbb5aeaa6b..7b499159d93 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -1289,17 +1289,18 @@ Sets}) supported by @var{coding-system}. Some coding systems that | |||
| 1289 | support too many character sets to list them all yield special values: | 1289 | support too many character sets to list them all yield special values: |
| 1290 | @itemize @bullet | 1290 | @itemize @bullet |
| 1291 | @item | 1291 | @item |
| 1292 | If @var{coding-system} supports all the ISO-2022 charsets, the value | ||
| 1293 | is @code{iso-2022}. | ||
| 1294 | @item | ||
| 1295 | If @var{coding-system} supports all Emacs characters, the value is | 1292 | If @var{coding-system} supports all Emacs characters, the value is |
| 1296 | @code{(emacs)}. | 1293 | @code{(emacs)}. |
| 1297 | @item | 1294 | @item |
| 1298 | If @var{coding-system} supports all emacs-mule characters, the value | ||
| 1299 | is @code{emacs-mule}. | ||
| 1300 | @item | ||
| 1301 | If @var{coding-system} supports all Unicode characters, the value is | 1295 | If @var{coding-system} supports all Unicode characters, the value is |
| 1302 | @code{(unicode)}. | 1296 | @code{(unicode)}. |
| 1297 | @item | ||
| 1298 | If @var{coding-system} supports all ISO-2022 charsets, the value is | ||
| 1299 | @code{iso-2022}. | ||
| 1300 | @item | ||
| 1301 | If @var{coding-system} supports all the characters in the internal | ||
| 1302 | coding system used by Emacs version 21 (prior to the implementation of | ||
| 1303 | internal Unicode support), the value is @code{emacs-mule}. | ||
| 1303 | @end itemize | 1304 | @end itemize |
| 1304 | @end defun | 1305 | @end defun |
| 1305 | 1306 | ||
| @@ -1617,8 +1618,7 @@ of the right way to use the variable: | |||
| 1617 | 1618 | ||
| 1618 | @example | 1619 | @example |
| 1619 | ;; @r{Read the file with no character code conversion.} | 1620 | ;; @r{Read the file with no character code conversion.} |
| 1620 | ;; @r{Assume @acronym{crlf} represents end-of-line.} | 1621 | (let ((coding-system-for-read 'no-conversion)) |
| 1621 | (let ((coding-system-for-read 'emacs-mule-dos)) | ||
| 1622 | (insert-file-contents filename)) | 1622 | (insert-file-contents filename)) |
| 1623 | @end example | 1623 | @end example |
| 1624 | 1624 | ||
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 26d81f738fc..159938eedf3 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi | |||
| @@ -223,18 +223,13 @@ only for special-purpose buffers.) People will find Emacs more | |||
| 223 | coherent if all libraries use the same conventions. | 223 | coherent if all libraries use the same conventions. |
| 224 | 224 | ||
| 225 | @item | 225 | @item |
| 226 | If your program contains non-ASCII characters in string or character | 226 | The default file coding system for Emacs Lisp source files is UTF-8 |
| 227 | constants, you should make sure Emacs always decodes these characters | 227 | (@pxref{Text Representations}). In the rare event that your program |
| 228 | the same way, regardless of the user's settings. The easiest way to | 228 | contains characters which are @emph{not} in UTF-8, you should specify |
| 229 | do this is to use the coding system @code{utf-8-emacs} (@pxref{Coding | 229 | an appropriate coding system in the source file's @samp{-*-} line or |
| 230 | System Basics}), and specify that coding in the @samp{-*-} line or the | ||
| 231 | local variables list. @xref{File Variables, , Local Variables in | 230 | local variables list. @xref{File Variables, , Local Variables in |
| 232 | Files, emacs, The GNU Emacs Manual}. | 231 | Files, emacs, The GNU Emacs Manual}. |
| 233 | 232 | ||
| 234 | @example | ||
| 235 | ;; XXX.el -*- coding: utf-8-emacs; -*- | ||
| 236 | @end example | ||
| 237 | |||
| 238 | @item | 233 | @item |
| 239 | Indent the file using the default indentation parameters. | 234 | Indent the file using the default indentation parameters. |
| 240 | 235 | ||
| @@ -545,7 +545,7 @@ using the next face automatically. | |||
| 545 | *** New option `imenu-generic-skip-comments-and-strings'. | 545 | *** New option `imenu-generic-skip-comments-and-strings'. |
| 546 | 546 | ||
| 547 | ** Info | 547 | ** Info |
| 548 | 548 | --- | |
| 549 | *** New face `info-index-match' is used to highlight matches in index | 549 | *** New face `info-index-match' is used to highlight matches in index |
| 550 | entries displayed by `Info-index-next', `Info-virtual-index' and | 550 | entries displayed by `Info-index-next', `Info-virtual-index' and |
| 551 | `info-apropos'. | 551 | `info-apropos'. |
| @@ -849,19 +849,23 @@ low-level libraries gfilenotify.c, inotify.c or w32notify.c. | |||
| 849 | 849 | ||
| 850 | * Incompatible Lisp Changes in Emacs 24.4 | 850 | * Incompatible Lisp Changes in Emacs 24.4 |
| 851 | 851 | ||
| 852 | --- | ||
| 852 | ** `kill-region' lost its `yank-handler' optional argument. | 853 | ** `kill-region' lost its `yank-handler' optional argument. |
| 853 | 854 | ||
| 855 | +++ | ||
| 854 | ** `(input-pending-p)' no longer runs other timers which are ready to | 856 | ** `(input-pending-p)' no longer runs other timers which are ready to |
| 855 | run. The new optional CHECK-TIMERS param allows for the prior behavior. | 857 | run. The new optional CHECK-TIMERS param allows for the prior behavior. |
| 856 | 858 | ||
| 857 | ** `defvar' and `defcustom' in a let-binding affect the "external" default. | 859 | ** `defvar' and `defcustom' in a let-binding affect the "external" default. |
| 858 | 860 | ||
| 861 | --- | ||
| 859 | ** The syntax of ?» and ?« is now punctuation instead of matched parens. | 862 | ** The syntax of ?» and ?« is now punctuation instead of matched parens. |
| 860 | Some languages match those as »...« and others as «...» so better stay neutral. | 863 | Some languages match those as »...« and others as «...» so better stay neutral. |
| 861 | 864 | ||
| 862 | --- | 865 | --- |
| 863 | ** In compiled Lisp files, the header no longer includes a timestamp. | 866 | ** In compiled Lisp files, the header no longer includes a timestamp. |
| 864 | 867 | ||
| 868 | +++ | ||
| 865 | ** The default file coding for Emacs Lisp files is now utf-8. | 869 | ** The default file coding for Emacs Lisp files is now utf-8. |
| 866 | (See `file-coding-system-alist'.) In most cases, this change is | 870 | (See `file-coding-system-alist'.) In most cases, this change is |
| 867 | transparent, but files that contain unusual characters without | 871 | transparent, but files that contain unusual characters without |
| @@ -869,6 +873,7 @@ specifying an explicit coding system may fail to load with obscure | |||
| 869 | errors. You should either convert them to utf-8 or add an explicit | 873 | errors. You should either convert them to utf-8 or add an explicit |
| 870 | `coding:' cookie. | 874 | `coding:' cookie. |
| 871 | 875 | ||
| 876 | +++ | ||
| 872 | ** `overriding-terminal-local-map' no longer replaces the local keymaps. | 877 | ** `overriding-terminal-local-map' no longer replaces the local keymaps. |
| 873 | It used to disable the minor mode, major mode, and text-property keymaps, | 878 | It used to disable the minor mode, major mode, and text-property keymaps, |
| 874 | whereas now it simply has higher precedence. | 879 | whereas now it simply has higher precedence. |
| @@ -881,9 +886,11 @@ Just as was the case in Emacs-22 and before, decoding of tty input according to | |||
| 881 | keyboard-coding-system is not performed in read-event any more. But contrary | 886 | keyboard-coding-system is not performed in read-event any more. But contrary |
| 882 | to that past, it is still done before input-decode-map/function-key-map/... | 887 | to that past, it is still done before input-decode-map/function-key-map/... |
| 883 | 888 | ||
| 884 | ** Removed inhibit-local-menu-bar-menus. | 889 | --- |
| 890 | ** Removed `inhibit-local-menu-bar-menus'. | ||
| 885 | 891 | ||
| 886 | ** frame-local variables that affect redisplay do not work any more. | 892 | --- |
| 893 | ** Frame-local variables that affect redisplay do not work any more. | ||
| 887 | More specifically, the redisplay does not bother to check for a frame-local | 894 | More specifically, the redisplay does not bother to check for a frame-local |
| 888 | value when looking up variables. | 895 | value when looking up variables. |
| 889 | 896 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 1de6122edd0..a883182754d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-12-25 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * keyboard.c (Voverriding_terminal_local_map): | ||
| 4 | (Voverriding_local_map): Doc fix. | ||
| 5 | |||
| 6 | * keymap.c (Vemulation_mode_map_alists): Doc fix. | ||
| 7 | |||
| 1 | 2013-12-24 Eli Zaretskii <eliz@gnu.org> | 8 | 2013-12-24 Eli Zaretskii <eliz@gnu.org> |
| 2 | 9 | ||
| 3 | * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute | 10 | * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute |
diff --git a/src/keyboard.c b/src/keyboard.c index 915ce9dcf23..8ccbf77871c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -11415,18 +11415,19 @@ tool-bar separators natively. Otherwise it is unused (e.g. on GTK). */); | |||
| 11415 | DEFVAR_KBOARD ("overriding-terminal-local-map", | 11415 | DEFVAR_KBOARD ("overriding-terminal-local-map", |
| 11416 | Voverriding_terminal_local_map, | 11416 | Voverriding_terminal_local_map, |
| 11417 | doc: /* Per-terminal keymap that takes precedence over all other keymaps. | 11417 | doc: /* Per-terminal keymap that takes precedence over all other keymaps. |
| 11418 | |||
| 11419 | This variable is intended to let commands such as `universal-argument' | 11418 | This variable is intended to let commands such as `universal-argument' |
| 11420 | set up a different keymap for reading the next command. | 11419 | set up a different keymap for reading the next command. |
| 11421 | 11420 | ||
| 11422 | `overriding-terminal-local-map' has a separate binding for each | 11421 | `overriding-terminal-local-map' has a separate binding for each |
| 11423 | terminal device. | 11422 | terminal device. See Info node `(elisp)Multiple Terminals'. */); |
| 11424 | See Info node `(elisp)Multiple Terminals'. */); | ||
| 11425 | 11423 | ||
| 11426 | DEFVAR_LISP ("overriding-local-map", Voverriding_local_map, | 11424 | DEFVAR_LISP ("overriding-local-map", Voverriding_local_map, |
| 11427 | doc: /* Keymap that overrides almost all other local keymaps. | 11425 | doc: /* Keymap that replaces (overrides) local keymaps. |
| 11428 | If this variable is non-nil, it is used as a keymap--replacing the | 11426 | If this variable is non-nil, Emacs looks up key bindings in this |
| 11429 | buffer's local map, the minor mode keymaps, and char property keymaps. */); | 11427 | keymap INSTEAD OF the keymap char property, minor mode maps, and the |
| 11428 | buffer's local map. Hence, the only active keymaps would be | ||
| 11429 | `overriding-terminal-local-map', this keymap, and `global-keymap', in | ||
| 11430 | order of precedence. */); | ||
| 11430 | Voverriding_local_map = Qnil; | 11431 | Voverriding_local_map = Qnil; |
| 11431 | 11432 | ||
| 11432 | DEFVAR_LISP ("overriding-local-map-menu-flag", Voverriding_local_map_menu_flag, | 11433 | DEFVAR_LISP ("overriding-local-map-menu-flag", Voverriding_local_map_menu_flag, |
diff --git a/src/keymap.c b/src/keymap.c index 562787ee8a5..9ef5a0b294f 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -3753,7 +3753,7 @@ it is provided for major modes to bind locally. */); | |||
| 3753 | Vminor_mode_overriding_map_alist = Qnil; | 3753 | Vminor_mode_overriding_map_alist = Qnil; |
| 3754 | 3754 | ||
| 3755 | DEFVAR_LISP ("emulation-mode-map-alists", Vemulation_mode_map_alists, | 3755 | DEFVAR_LISP ("emulation-mode-map-alists", Vemulation_mode_map_alists, |
| 3756 | doc: /* List of keymap alists to use for emulations modes. | 3756 | doc: /* List of keymap alists to use for emulation modes. |
| 3757 | It is intended for modes or packages using multiple minor-mode keymaps. | 3757 | It is intended for modes or packages using multiple minor-mode keymaps. |
| 3758 | Each element is a keymap alist just like `minor-mode-map-alist', or a | 3758 | Each element is a keymap alist just like `minor-mode-map-alist', or a |
| 3759 | symbol with a variable binding which is a keymap alist, and it is used | 3759 | symbol with a variable binding which is a keymap alist, and it is used |