# HG changeset patch # User Eric S. Raymond # Date 1210011219 0 # Node ID 3493d476ef0f0546da57201a50c1c16a9f9284b5 # Parent 92e5b9eb3f2966749ed39a60f434f78a4407ed29 Document the fact that (current-local-map) and (urrent-global-map) return references, not copies. diff -r 92e5b9eb3f29 -r 3493d476ef0f doc/lispref/ChangeLog --- a/doc/lispref/ChangeLog Mon May 05 15:08:59 2008 +0000 +++ b/doc/lispref/ChangeLog Mon May 05 18:13:39 2008 +0000 @@ -1,3 +1,8 @@ +2008-05-03 Eric S. Raymond + + * keymaps.texi: Clarify that (current-local-map) and + (current-global-map) return references, not copies. + 2008-05-02 Juri Linkov * minibuf.texi (Text from Minibuffer): Document a list of diff -r 92e5b9eb3f29 -r 3493d476ef0f doc/lispref/keymaps.texi --- a/doc/lispref/keymaps.texi Mon May 05 15:08:59 2008 +0000 +++ b/doc/lispref/keymaps.texi Mon May 05 18:13:39 2008 +0000 @@ -766,9 +766,11 @@ @end defvar @defun current-global-map -This function returns the current global keymap. This is the -same as the value of @code{global-map} unless you change one or the -other. +This function returns the current global keymap. This is the same as +the value of @code{global-map} unless you change one or the other. +The return value is a reference, not a copy; if you use +@code{define-key} or other functions on it you will alter global +bindings. @example @group @@ -802,6 +804,10 @@ @end example @end defun +@code{current-local-map} returns a reference to the local keymap, not +a copy of it; if you use @code{define-key} or other functions on it +you will alter local bindings. + @defun current-minor-mode-maps This function returns a list of the keymaps of currently enabled minor modes. @end defun