aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2008-05-05 18:13:39 +0000
committerEric S. Raymond2008-05-05 18:13:39 +0000
commit1ef5eecc2fb635c6aae55c0e7634d7b4f8ae605a (patch)
treefbe371be868112546c0f7c5de56e6bf1a6742e9b
parentd5079317f7dd989cb3f392055fd68379c398132a (diff)
downloademacs-1ef5eecc2fb635c6aae55c0e7634d7b4f8ae605a.tar.gz
emacs-1ef5eecc2fb635c6aae55c0e7634d7b4f8ae605a.zip
Document the fact that (current-local-map) and (urrent-global-map)
return references, not copies.
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/keymaps.texi12
2 files changed, 14 insertions, 3 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 17b3ede464d..2214ee0afa6 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12008-05-03 Eric S. Raymond <esr@golux>
2
3 * keymaps.texi: Clarify that (current-local-map) and
4 (current-global-map) return references, not copies.
5
12008-05-02 Juri Linkov <juri@jurta.org> 62008-05-02 Juri Linkov <juri@jurta.org>
2 7
3 * minibuf.texi (Text from Minibuffer): Document a list of 8 * minibuf.texi (Text from Minibuffer): Document a list of
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 576a02fdcd2..f97fc6b790f 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -766,9 +766,11 @@ out with.
766@end defvar 766@end defvar
767 767
768@defun current-global-map 768@defun current-global-map
769This function returns the current global keymap. This is the 769This function returns the current global keymap. This is the same as
770same as the value of @code{global-map} unless you change one or the 770the value of @code{global-map} unless you change one or the other.
771other. 771The return value is a reference, not a copy; if you use
772@code{define-key} or other functions on it you will alter global
773bindings.
772 774
773@example 775@example
774@group 776@group
@@ -802,6 +804,10 @@ keymap.
802@end example 804@end example
803@end defun 805@end defun
804 806
807@code{current-local-map} returns a reference to the local keymap, not
808a copy of it; if you use @code{define-key} or other functions on it
809you will alter local bindings.
810
805@defun current-minor-mode-maps 811@defun current-minor-mode-maps
806This function returns a list of the keymaps of currently enabled minor modes. 812This function returns a list of the keymaps of currently enabled minor modes.
807@end defun 813@end defun