aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2013-12-27 11:38:26 +0800
committerChong Yidong2013-12-27 11:38:26 +0800
commit0f1d29342f29e666bb6abe4073a30b425a63d26c (patch)
treeea14e45e38b0618be18ba70606e5e68c93c3c6af
parent9cab7521b388464b6028dbd27751019ff2afcdba (diff)
downloademacs-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/ChangeLog11
-rw-r--r--doc/lispref/commands.texi9
-rw-r--r--doc/lispref/eval.texi18
-rw-r--r--doc/lispref/functions.texi18
-rw-r--r--doc/lispref/keymaps.texi56
-rw-r--r--doc/lispref/nonascii.texi32
-rw-r--r--etc/NEWS14
-rw-r--r--src/ChangeLog6
-rw-r--r--src/data.c2
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 @@
12013-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
12013-12-26 Chong Yidong <cyd@gnu.org> 122013-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
2398This function reads and returns the next event of command input, waiting 2398This function reads and returns the next event of command input,
2399if necessary until an event is available. Events can come directly from 2399waiting if necessary until an event is available.
2400the user or from a keyboard macro. 2400
2401The returned event may come directly from the user, or from a keyboard
2402macro. It is not decoded by the keyboard's input coding system
2403(@pxref{Terminal I/O Encoding}).
2401 2404
2402If the optional argument @var{prompt} is non-@code{nil}, it should be a 2405If the optional argument @var{prompt} is non-@code{nil}, it should be a
2403string to display in the echo area as a prompt. Otherwise, 2406string 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
242about symbol function indirection. 242about 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
245event that a symbol's function cell refers to the same symbol. Or a 245event that a symbol's function cell refers to the same symbol.
246symbol may have a void function cell, in which case the subroutine 246Otherwise, we eventually obtain a non-symbol, which ought to be a
247@code{symbol-function} signals a @code{void-function} error. But if 247function or other suitable object.
248neither of these things happens, we eventually obtain a non-symbol,
249which 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
255described in one of the following sections. If the object is not one 253described in one of the following sections. If the object is not one
256of these types, Emacs signals an @code{invalid-function} error. 254of 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.
259use @code{fset} to set the function cell of a symbol and 257We 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
262into 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
263the 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
1004This returns the object in the function cell of @var{symbol}. If the 1004This returns the object in the function cell of @var{symbol}. It does
1005symbol's function cell is void, a @code{void-function} error is 1005not check that the returned object is a legitimate function.
1006signaled.
1007 1006
1008This function does not check that the returned object is a legitimate 1007If the function cell is void, the return value is @code{nil}. To
1009function. 1008distinguish 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
1030that symbol's function cell is @dfn{void}. In other words, the function 1030that that symbol's function cell is @dfn{void}. In other words, the
1031cell does not have any Lisp object in it. If you try to call such a symbol 1031function cell does not have any Lisp object in it. If you try to call
1032as a function, it signals a @code{void-function} error. 1032the 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
1557sequence, 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 1559translate certain event sequences into others. The translation
1559being read, as it is read, against @code{input-decode-map}, then 1560keymaps are @code{input-decode-map}, @code{local-function-key-map},
1560@code{local-function-key-map}, and then against @code{key-translation-map}. 1561and @code{key-translation-map} (in order of priority).
1561 1562
1562These keymaps have the same structure as other keymaps, but they are used 1563 Translation keymaps have the same structure as other keymaps, but
1563differently: they specify translations to make while reading key sequences, 1564are used differently: they specify translations to make while reading
1564rather than bindings for key sequences. 1565key sequences, rather than bindings for complete key sequences. As
1565 1566each key sequence is read, it is checked against each translation
1566If one of these keymaps ``binds'' a key sequence @var{k} to a vector 1567keymap. 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 1568vector @var{v}, then whenever @var{k} appears as a sub-sequence
1568key sequence, it is replaced with the events in @var{v}. 1569@emph{anywhere} in a key sequence, that sub-sequence is replaced with
1569 1570the events in @var{v}.
1570For example, VT100 terminals send @kbd{@key{ESC} O P} when the 1571
1571keypad @key{PF1} key is pressed. Therefore, we want Emacs to translate 1572 For example, VT100 terminals send @kbd{@key{ESC} O P} when the
1572that sequence of events into the single event @code{pf1}. We accomplish 1573keypad key @key{PF1} is pressed. On such terminals, Emacs must
1573this by ``binding'' @kbd{@key{ESC} O P} to @code{[pf1]} in 1574translate that sequence of events into a single event @code{pf1}.
1574@code{input-decode-map}, when using a VT100. 1575This 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
1576Thus, typing @kbd{C-c @key{PF1}} sends the character sequence @kbd{C-c 1577the 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
1578this 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
1582keyboard 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
1582This variable holds a keymap that describes the character sequences sent 1586This 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
1669translations listed above. @xref{Terminal I/O Encoding}.
1670
1671@subsection Interaction with normal keymaps 1671@subsection Interaction with normal keymaps
1672 1672
1673The end of a key sequence is detected when that key sequence either is bound 1673The 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
1811terminal output. This is useful for terminals that transmit or 1811terminal output. This is useful for terminals that transmit or
1812display text using a particular encoding such as Latin-1. Emacs does 1812display text using a particular encoding, such as Latin-1. Emacs does
1813not set @code{last-coding-system-used} for encoding or decoding of 1813not set @code{last-coding-system-used} when encoding or decoding
1814terminal I/O. 1814terminal I/O.
1815 1815
1816@defun keyboard-coding-system &optional terminal 1816@defun keyboard-coding-system &optional terminal
1817This function returns the coding system that is in use for decoding 1817This function returns the coding system used for decoding keyboard
1818keyboard input from @var{terminal}---or @code{nil} if no coding system 1818input from @var{terminal}. A value of @code{no-conversion} means no
1819is to be used for that terminal. If @var{terminal} is omitted or 1819decoding is done. If @var{terminal} is omitted or @code{nil}, it
1820@code{nil}, it means the selected frame's terminal. @xref{Multiple 1820means the selected frame's terminal. @xref{Multiple Terminals}.
1821Terminals}.
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
1825This command specifies @var{coding-system} as the coding system to use 1824This command specifies @var{coding-system} as the coding system to use
1826for decoding keyboard input from @var{terminal}. If 1825for 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
1828input. If @var{terminal} is a frame, it means that frame's terminal; 1827input. If @var{terminal} is a frame, it means that frame's terminal;
1829if it is @code{nil}, that means the currently selected frame's 1828if it is @code{nil}, that means the currently selected frame's
1830terminal. @xref{Multiple Terminals}. 1829terminal. @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
1834This function returns the coding system that is in use for encoding 1833This function returns the coding system that is in use for encoding
1835terminal output from @var{terminal}---or @code{nil} if the output is 1834terminal output from @var{terminal}. A value of @code{no-conversion}
1836not encoded. If @var{terminal} is a frame, it means that frame's 1835means no encoding is done. If @var{terminal} is a frame, it means
1837terminal; if it is @code{nil}, that means the currently selected 1836that frame's terminal; if it is @code{nil}, that means the currently
1838frame's terminal. 1837selected 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
1842This command specifies @var{coding-system} as the coding system to use 1841This command specifies @var{coding-system} as the coding system to use
1843for encoding terminal output from @var{terminal}. If 1842for 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 1844output. If @var{terminal} is a frame, it means that frame's terminal;
1846@code{nil}, that means the currently selected frame's terminal. 1845if it is @code{nil}, that means the currently selected frame's
1846terminal.
1847@end deffn 1847@end deffn
1848 1848
1849@node Input Methods 1849@node Input Methods
diff --git a/etc/NEWS b/etc/NEWS
index 79004d091f1..a9fd1eac038 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -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.
918Instead they default to a function which does what the nil value used to do. 918Instead 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.
921Just as was the case in Emacs-22 and before, decoding of tty input according to 922As was the case in Emacs 22 and before, the decoding of terminal
922keyboard-coding-system is not performed in read-event any more. But contrary 923input, according to `keyboard-coding-system', is not performed in
923to 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
925done 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/...
930More specifically, the redisplay does not bother to check for a frame-local 932More specifically, the redisplay does not bother to check for a frame-local
931value when looking up variables. 933value 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. 938To 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
938special-forms any more. 942special-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 @@
12013-12-27 Chong Yidong <cyd@gnu.org>
2
3 * data.c (Fsymbol_function): Doc fix.
4
12013-12-26 Martin Rudalics <rudalics@gmx.at> 52013-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
688DEFUN ("symbol-function", Fsymbol_function, Ssymbol_function, 1, 1, 0, 688DEFUN ("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);