diff options
| author | Chong Yidong | 2013-12-27 11:38:26 +0800 |
|---|---|---|
| committer | Chong Yidong | 2013-12-27 11:38:26 +0800 |
| commit | 0f1d29342f29e666bb6abe4073a30b425a63d26c (patch) | |
| tree | ea14e45e38b0618be18ba70606e5e68c93c3c6af | |
| parent | 9cab7521b388464b6028dbd27751019ff2afcdba (diff) | |
| download | emacs-0f1d29342f29e666bb6abe4073a30b425a63d26c.tar.gz emacs-0f1d29342f29e666bb6abe4073a30b425a63d26c.zip | |
More doc updates
* commands.texi (Reading One Event): Mention keyboard coding.
* functions.texi (Function Cells):
* eval.texi (Function Indirection): Update for the fact that
symbol-function no longer signals an error.
* keymaps.texi (Translation Keymaps, Translation Keymaps):
* nonascii.texi (Terminal I/O Encoding): Copyedits.
* data.c (Fsymbol_function): Doc fix.
| -rw-r--r-- | doc/lispref/ChangeLog | 11 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 9 | ||||
| -rw-r--r-- | doc/lispref/eval.texi | 18 | ||||
| -rw-r--r-- | doc/lispref/functions.texi | 18 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 56 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 32 | ||||
| -rw-r--r-- | etc/NEWS | 14 | ||||
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/data.c | 2 |
9 files changed, 93 insertions, 73 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 2956b907d77..c4fdfb18a9b 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2013-12-27 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * functions.texi (Function Cells): | ||
| 4 | * eval.texi (Function Indirection): Update for the fact that | ||
| 5 | symbol-function no longer signals an error. | ||
| 6 | |||
| 7 | * commands.texi (Reading One Event): Mention keyboard coding. | ||
| 8 | |||
| 9 | * keymaps.texi (Translation Keymaps, Translation Keymaps): | ||
| 10 | * nonascii.texi (Terminal I/O Encoding): Copyedits. | ||
| 11 | |||
| 1 | 2013-12-26 Chong Yidong <cyd@gnu.org> | 12 | 2013-12-26 Chong Yidong <cyd@gnu.org> |
| 2 | 13 | ||
| 3 | * advice.texi (Advising Functions, Defining Advice): Special forms | 14 | * advice.texi (Advising Functions, Defining Advice): Special forms |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index a9322640880..95cad5c4666 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -2395,9 +2395,12 @@ and key sequences read from keyboard macros being executed. | |||
| 2395 | @code{read-char}, and @code{read-char-exclusive}. | 2395 | @code{read-char}, and @code{read-char-exclusive}. |
| 2396 | 2396 | ||
| 2397 | @defun read-event &optional prompt inherit-input-method seconds | 2397 | @defun read-event &optional prompt inherit-input-method seconds |
| 2398 | This function reads and returns the next event of command input, waiting | 2398 | This function reads and returns the next event of command input, |
| 2399 | if necessary until an event is available. Events can come directly from | 2399 | waiting if necessary until an event is available. |
| 2400 | the user or from a keyboard macro. | 2400 | |
| 2401 | The returned event may come directly from the user, or from a keyboard | ||
| 2402 | macro. It is not decoded by the keyboard's input coding system | ||
| 2403 | (@pxref{Terminal I/O Encoding}). | ||
| 2401 | 2404 | ||
| 2402 | If the optional argument @var{prompt} is non-@code{nil}, it should be a | 2405 | If the optional argument @var{prompt} is non-@code{nil}, it should be a |
| 2403 | string to display in the echo area as a prompt. Otherwise, | 2406 | string to display in the echo area as a prompt. Otherwise, |
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi index 4a63ec2add1..a321bfce6f7 100644 --- a/doc/lispref/eval.texi +++ b/doc/lispref/eval.texi | |||
| @@ -242,11 +242,9 @@ it obtains a non-symbol. @xref{Function Names}, for more information | |||
| 242 | about symbol function indirection. | 242 | about symbol function indirection. |
| 243 | 243 | ||
| 244 | One possible consequence of this process is an infinite loop, in the | 244 | One possible consequence of this process is an infinite loop, in the |
| 245 | event that a symbol's function cell refers to the same symbol. Or a | 245 | event that a symbol's function cell refers to the same symbol. |
| 246 | symbol may have a void function cell, in which case the subroutine | 246 | Otherwise, we eventually obtain a non-symbol, which ought to be a |
| 247 | @code{symbol-function} signals a @code{void-function} error. But if | 247 | function or other suitable object. |
| 248 | neither of these things happens, we eventually obtain a non-symbol, | ||
| 249 | which ought to be a function or other suitable object. | ||
| 250 | 248 | ||
| 251 | @kindex invalid-function | 249 | @kindex invalid-function |
| 252 | More precisely, we should now have a Lisp function (a lambda | 250 | More precisely, we should now have a Lisp function (a lambda |
| @@ -255,12 +253,12 @@ a special form, or an autoload object. Each of these types is a case | |||
| 255 | described in one of the following sections. If the object is not one | 253 | described in one of the following sections. If the object is not one |
| 256 | of these types, Emacs signals an @code{invalid-function} error. | 254 | of these types, Emacs signals an @code{invalid-function} error. |
| 257 | 255 | ||
| 258 | The following example illustrates the symbol indirection process. We | 256 | The following example illustrates the symbol indirection process. |
| 259 | use @code{fset} to set the function cell of a symbol and | 257 | We use @code{fset} to set the function cell of a symbol and |
| 260 | @code{symbol-function} to get the function cell contents | 258 | @code{symbol-function} to get the function cell contents |
| 261 | (@pxref{Function Cells}). Specifically, we store the symbol @code{car} | 259 | (@pxref{Function Cells}). Specifically, we store the symbol |
| 262 | into the function cell of @code{first}, and the symbol @code{first} into | 260 | @code{car} into the function cell of @code{first}, and the symbol |
| 263 | the function cell of @code{erste}. | 261 | @code{first} into the function cell of @code{erste}. |
| 264 | 262 | ||
| 265 | @example | 263 | @example |
| 266 | @group | 264 | @group |
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index f1d8c54f49c..b15d4ac1457 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -1001,12 +1001,12 @@ indirect-function}. | |||
| 1001 | 1001 | ||
| 1002 | @defun symbol-function symbol | 1002 | @defun symbol-function symbol |
| 1003 | @kindex void-function | 1003 | @kindex void-function |
| 1004 | This returns the object in the function cell of @var{symbol}. If the | 1004 | This returns the object in the function cell of @var{symbol}. It does |
| 1005 | symbol's function cell is void, a @code{void-function} error is | 1005 | not check that the returned object is a legitimate function. |
| 1006 | signaled. | ||
| 1007 | 1006 | ||
| 1008 | This function does not check that the returned object is a legitimate | 1007 | If the function cell is void, the return value is @code{nil}. To |
| 1009 | function. | 1008 | distinguish between a function cell that is void and one set to |
| 1009 | @code{nil}, use @code{fboundp} (see below). | ||
| 1010 | 1010 | ||
| 1011 | @example | 1011 | @example |
| 1012 | @group | 1012 | @group |
| @@ -1026,10 +1026,10 @@ function. | |||
| 1026 | @end defun | 1026 | @end defun |
| 1027 | 1027 | ||
| 1028 | @cindex void function cell | 1028 | @cindex void function cell |
| 1029 | If you have never given a symbol any function definition, we say that | 1029 | If you have never given a symbol any function definition, we say |
| 1030 | that symbol's function cell is @dfn{void}. In other words, the function | 1030 | that that symbol's function cell is @dfn{void}. In other words, the |
| 1031 | cell does not have any Lisp object in it. If you try to call such a symbol | 1031 | function cell does not have any Lisp object in it. If you try to call |
| 1032 | as a function, it signals a @code{void-function} error. | 1032 | the symbol as a function, Emacs signals a @code{void-function} error. |
| 1033 | 1033 | ||
| 1034 | Note that void is not the same as @code{nil} or the symbol | 1034 | Note that void is not the same as @code{nil} or the symbol |
| 1035 | @code{void}. The symbols @code{nil} and @code{void} are Lisp objects, | 1035 | @code{void}. The symbols @code{nil} and @code{void} are Lisp objects, |
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index c5ffbc964cc..b9d9aa6ec72 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi | |||
| @@ -1551,32 +1551,36 @@ specifies a list of keymaps to search in. This argument is ignored if | |||
| 1551 | 1551 | ||
| 1552 | @node Translation Keymaps | 1552 | @node Translation Keymaps |
| 1553 | @section Keymaps for Translating Sequences of Events | 1553 | @section Keymaps for Translating Sequences of Events |
| 1554 | @cindex translation keymap | ||
| 1554 | @cindex keymaps for translating events | 1555 | @cindex keymaps for translating events |
| 1555 | 1556 | ||
| 1556 | This section describes keymaps that are used during reading a key | 1557 | When the @code{read-key-sequence} function reads a key sequence |
| 1557 | sequence, to translate certain event sequences into others. | 1558 | (@pxref{Key Sequence Input}), it uses @dfn{translation keymaps} to |
| 1558 | @code{read-key-sequence} checks every subsequence of the key sequence | 1559 | translate certain event sequences into others. The translation |
| 1559 | being read, as it is read, against @code{input-decode-map}, then | 1560 | keymaps are @code{input-decode-map}, @code{local-function-key-map}, |
| 1560 | @code{local-function-key-map}, and then against @code{key-translation-map}. | 1561 | and @code{key-translation-map} (in order of priority). |
| 1561 | 1562 | ||
| 1562 | These keymaps have the same structure as other keymaps, but they are used | 1563 | Translation keymaps have the same structure as other keymaps, but |
| 1563 | differently: they specify translations to make while reading key sequences, | 1564 | are used differently: they specify translations to make while reading |
| 1564 | rather than bindings for key sequences. | 1565 | key sequences, rather than bindings for complete key sequences. As |
| 1565 | 1566 | each key sequence is read, it is checked against each translation | |
| 1566 | If one of these keymaps ``binds'' a key sequence @var{k} to a vector | 1567 | keymap. If one of the translation keymaps ``binds'' @var{k} to a |
| 1567 | @var{v}, then when @var{k} appears as a subsequence @emph{anywhere} in a | 1568 | vector @var{v}, then whenever @var{k} appears as a sub-sequence |
| 1568 | key sequence, it is replaced with the events in @var{v}. | 1569 | @emph{anywhere} in a key sequence, that sub-sequence is replaced with |
| 1569 | 1570 | the events in @var{v}. | |
| 1570 | For example, VT100 terminals send @kbd{@key{ESC} O P} when the | 1571 | |
| 1571 | keypad @key{PF1} key is pressed. Therefore, we want Emacs to translate | 1572 | For example, VT100 terminals send @kbd{@key{ESC} O P} when the |
| 1572 | that sequence of events into the single event @code{pf1}. We accomplish | 1573 | keypad key @key{PF1} is pressed. On such terminals, Emacs must |
| 1573 | this by ``binding'' @kbd{@key{ESC} O P} to @code{[pf1]} in | 1574 | translate that sequence of events into a single event @code{pf1}. |
| 1574 | @code{input-decode-map}, when using a VT100. | 1575 | This is done by ``binding'' @kbd{@key{ESC} O P} to @code{[pf1]} in |
| 1575 | 1576 | @code{input-decode-map}. Thus, when you type @kbd{C-c @key{PF1}} on | |
| 1576 | Thus, typing @kbd{C-c @key{PF1}} sends the character sequence @kbd{C-c | 1577 | the terminal, the terminal emits the character sequence @kbd{C-c |
| 1577 | @key{ESC} O P}; later the function @code{read-key-sequence} translates | 1578 | @key{ESC} O P}, and @code{read-key-sequence} translates this back into |
| 1578 | this back into @kbd{C-c @key{PF1}}, which it returns as the vector | 1579 | @kbd{C-c @key{PF1}} and returns it as the vector @code{[?\C-c pf1]}. |
| 1579 | @code{[?\C-c pf1]}. | 1580 | |
| 1581 | Translation keymaps take effect only after Emacs has decoded the | ||
| 1582 | keyboard input (via the input coding system specified by | ||
| 1583 | @code{keyboard-coding-system}). @xref{Terminal I/O Encoding}. | ||
| 1580 | 1584 | ||
| 1581 | @defvar input-decode-map | 1585 | @defvar input-decode-map |
| 1582 | This variable holds a keymap that describes the character sequences sent | 1586 | This variable holds a keymap that describes the character sequences sent |
| @@ -1664,10 +1668,6 @@ to turn the character that follows into a Hyper character: | |||
| 1664 | @end group | 1668 | @end group |
| 1665 | @end example | 1669 | @end example |
| 1666 | 1670 | ||
| 1667 | If you have enabled keyboard character set decoding using | ||
| 1668 | @code{set-keyboard-coding-system}, decoding is done before the | ||
| 1669 | translations listed above. @xref{Terminal I/O Encoding}. | ||
| 1670 | |||
| 1671 | @subsection Interaction with normal keymaps | 1671 | @subsection Interaction with normal keymaps |
| 1672 | 1672 | ||
| 1673 | The end of a key sequence is detected when that key sequence either is bound | 1673 | The end of a key sequence is detected when that key sequence either is bound |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 7b499159d93..7763f5c788d 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -1807,24 +1807,23 @@ decoding, you can call this function. | |||
| 1807 | @node Terminal I/O Encoding | 1807 | @node Terminal I/O Encoding |
| 1808 | @subsection Terminal I/O Encoding | 1808 | @subsection Terminal I/O Encoding |
| 1809 | 1809 | ||
| 1810 | Emacs can decode keyboard input using a coding system, and encode | 1810 | Emacs can use coding systems to decode keyboard input and encode |
| 1811 | terminal output. This is useful for terminals that transmit or | 1811 | terminal output. This is useful for terminals that transmit or |
| 1812 | display text using a particular encoding such as Latin-1. Emacs does | 1812 | display text using a particular encoding, such as Latin-1. Emacs does |
| 1813 | not set @code{last-coding-system-used} for encoding or decoding of | 1813 | not set @code{last-coding-system-used} when encoding or decoding |
| 1814 | terminal I/O. | 1814 | terminal I/O. |
| 1815 | 1815 | ||
| 1816 | @defun keyboard-coding-system &optional terminal | 1816 | @defun keyboard-coding-system &optional terminal |
| 1817 | This function returns the coding system that is in use for decoding | 1817 | This function returns the coding system used for decoding keyboard |
| 1818 | keyboard input from @var{terminal}---or @code{nil} if no coding system | 1818 | input from @var{terminal}. A value of @code{no-conversion} means no |
| 1819 | is to be used for that terminal. If @var{terminal} is omitted or | 1819 | decoding is done. If @var{terminal} is omitted or @code{nil}, it |
| 1820 | @code{nil}, it means the selected frame's terminal. @xref{Multiple | 1820 | means the selected frame's terminal. @xref{Multiple Terminals}. |
| 1821 | Terminals}. | ||
| 1822 | @end defun | 1821 | @end defun |
| 1823 | 1822 | ||
| 1824 | @deffn Command set-keyboard-coding-system coding-system &optional terminal | 1823 | @deffn Command set-keyboard-coding-system coding-system &optional terminal |
| 1825 | This command specifies @var{coding-system} as the coding system to use | 1824 | This command specifies @var{coding-system} as the coding system to use |
| 1826 | for decoding keyboard input from @var{terminal}. If | 1825 | for decoding keyboard input from @var{terminal}. If |
| 1827 | @var{coding-system} is @code{nil}, that means do not decode keyboard | 1826 | @var{coding-system} is @code{nil}, that means not to decode keyboard |
| 1828 | input. If @var{terminal} is a frame, it means that frame's terminal; | 1827 | input. If @var{terminal} is a frame, it means that frame's terminal; |
| 1829 | if it is @code{nil}, that means the currently selected frame's | 1828 | if it is @code{nil}, that means the currently selected frame's |
| 1830 | terminal. @xref{Multiple Terminals}. | 1829 | terminal. @xref{Multiple Terminals}. |
| @@ -1832,18 +1831,19 @@ terminal. @xref{Multiple Terminals}. | |||
| 1832 | 1831 | ||
| 1833 | @defun terminal-coding-system &optional terminal | 1832 | @defun terminal-coding-system &optional terminal |
| 1834 | This function returns the coding system that is in use for encoding | 1833 | This function returns the coding system that is in use for encoding |
| 1835 | terminal output from @var{terminal}---or @code{nil} if the output is | 1834 | terminal output from @var{terminal}. A value of @code{no-conversion} |
| 1836 | not encoded. If @var{terminal} is a frame, it means that frame's | 1835 | means no encoding is done. If @var{terminal} is a frame, it means |
| 1837 | terminal; if it is @code{nil}, that means the currently selected | 1836 | that frame's terminal; if it is @code{nil}, that means the currently |
| 1838 | frame's terminal. | 1837 | selected frame's terminal. |
| 1839 | @end defun | 1838 | @end defun |
| 1840 | 1839 | ||
| 1841 | @deffn Command set-terminal-coding-system coding-system &optional terminal | 1840 | @deffn Command set-terminal-coding-system coding-system &optional terminal |
| 1842 | This command specifies @var{coding-system} as the coding system to use | 1841 | This command specifies @var{coding-system} as the coding system to use |
| 1843 | for encoding terminal output from @var{terminal}. If | 1842 | for encoding terminal output from @var{terminal}. If |
| 1844 | @var{coding-system} is @code{nil}, terminal output is not encoded. If | 1843 | @var{coding-system} is @code{nil}, that means not to encode terminal |
| 1845 | @var{terminal} is a frame, it means that frame's terminal; if it is | 1844 | output. If @var{terminal} is a frame, it means that frame's terminal; |
| 1846 | @code{nil}, that means the currently selected frame's terminal. | 1845 | if it is @code{nil}, that means the currently selected frame's |
| 1846 | terminal. | ||
| 1847 | @end deffn | 1847 | @end deffn |
| 1848 | 1848 | ||
| 1849 | @node Input Methods | 1849 | @node Input Methods |
| @@ -917,10 +917,12 @@ whereas now it simply has higher precedence. | |||
| 917 | ** Default process filters and sentinels are not nil any more. | 917 | ** Default process filters and sentinels are not nil any more. |
| 918 | Instead they default to a function which does what the nil value used to do. | 918 | Instead they default to a function which does what the nil value used to do. |
| 919 | 919 | ||
| 920 | +++ | ||
| 920 | ** `read-event' does not return decoded chars in ttys any more. | 921 | ** `read-event' does not return decoded chars in ttys any more. |
| 921 | Just as was the case in Emacs-22 and before, decoding of tty input according to | 922 | As was the case in Emacs 22 and before, the decoding of terminal |
| 922 | keyboard-coding-system is not performed in read-event any more. But contrary | 923 | input, according to `keyboard-coding-system', is not performed in |
| 923 | to that past, it is still done before input-decode-map/function-key-map/... | 924 | `read-event' any more. But unlike in Emacs 22, this decoding is still |
| 925 | done before input-decode-map, function-key-map, etc. | ||
| 924 | 926 | ||
| 925 | --- | 927 | --- |
| 926 | ** Removed `inhibit-local-menu-bar-menus'. | 928 | ** Removed `inhibit-local-menu-bar-menus'. |
| @@ -930,10 +932,12 @@ to that past, it is still done before input-decode-map/function-key-map/... | |||
| 930 | More specifically, the redisplay does not bother to check for a frame-local | 932 | More specifically, the redisplay does not bother to check for a frame-local |
| 931 | value when looking up variables. | 933 | value when looking up variables. |
| 932 | 934 | ||
| 935 | +++ | ||
| 933 | ** nil and "unbound" are indistinguishable in `symbol-function'. | 936 | ** nil and "unbound" are indistinguishable in `symbol-function'. |
| 934 | `symbol-function' never signals `void-function' any more. | 937 | `symbol-function' does not signal a `void-function' error any more. |
| 935 | `fboundp' returns non-nil if the symbol was `fset' to nil. | 938 | To determine if a symbol's function definition is void, use `fboundp'. |
| 936 | 939 | ||
| 940 | +++ | ||
| 937 | ** `defadvice' does not honor the `freeze' flag and cannot advise | 941 | ** `defadvice' does not honor the `freeze' flag and cannot advise |
| 938 | special-forms any more. | 942 | special-forms any more. |
| 939 | 943 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 053a498392c..4e8c9a10223 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-12-27 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * data.c (Fsymbol_function): Doc fix. | ||
| 4 | |||
| 1 | 2013-12-26 Martin Rudalics <rudalics@gmx.at> | 5 | 2013-12-26 Martin Rudalics <rudalics@gmx.at> |
| 2 | 6 | ||
| 3 | Some more tinkering with Bug#16051. | 7 | Some more tinkering with Bug#16051. |
| @@ -7649,7 +7653,7 @@ | |||
| 7649 | 7653 | ||
| 7650 | * keyboard.c: Apply keyboard decoding only to events that come directly | 7654 | * keyboard.c: Apply keyboard decoding only to events that come directly |
| 7651 | from the tty, not from unread-command-events (bug#14368). | 7655 | from the tty, not from unread-command-events (bug#14368). |
| 7652 | (read_event_from_main_queue): New function, extracted from read_char). | 7656 | (read_event_from_main_queue): New function, extracted from read_char. |
| 7653 | (read_decoded_char): Remove. | 7657 | (read_decoded_char): Remove. |
| 7654 | (read_decoded_event_from_main_queue): New function to replace it. | 7658 | (read_decoded_event_from_main_queue): New function to replace it. |
| 7655 | (read_char): Use it. | 7659 | (read_char): Use it. |
diff --git a/src/data.c b/src/data.c index 1fe7a1c9b65..fecf9700ff2 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -686,7 +686,7 @@ Return SYMBOL. */) | |||
| 686 | } | 686 | } |
| 687 | 687 | ||
| 688 | DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, | 688 | DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, |
| 689 | doc: /* Return SYMBOL's function definition. Error if that is void. */) | 689 | doc: /* Return SYMBOL's function definition, or nil if that is void. */) |
| 690 | (register Lisp_Object symbol) | 690 | (register Lisp_Object symbol) |
| 691 | { | 691 | { |
| 692 | CHECK_SYMBOL (symbol); | 692 | CHECK_SYMBOL (symbol); |