diff options
| author | Eric S. Raymond | 2008-05-05 18:13:39 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2008-05-05 18:13:39 +0000 |
| commit | 1ef5eecc2fb635c6aae55c0e7634d7b4f8ae605a (patch) | |
| tree | fbe371be868112546c0f7c5de56e6bf1a6742e9b /doc | |
| parent | d5079317f7dd989cb3f392055fd68379c398132a (diff) | |
| download | emacs-1ef5eecc2fb635c6aae55c0e7634d7b4f8ae605a.tar.gz emacs-1ef5eecc2fb635c6aae55c0e7634d7b4f8ae605a.zip | |
Document the fact that (current-local-map) and (urrent-global-map)
return references, not copies.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/keymaps.texi | 12 |
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 @@ | |||
| 1 | 2008-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 | |||
| 1 | 2008-05-02 Juri Linkov <juri@jurta.org> | 6 | 2008-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 |
| 769 | This function returns the current global keymap. This is the | 769 | This function returns the current global keymap. This is the same as |
| 770 | same as the value of @code{global-map} unless you change one or the | 770 | the value of @code{global-map} unless you change one or the other. |
| 771 | other. | 771 | The return value is a reference, not a copy; if you use |
| 772 | @code{define-key} or other functions on it you will alter global | ||
| 773 | bindings. | ||
| 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 | ||
| 808 | a copy of it; if you use @code{define-key} or other functions on it | ||
| 809 | you will alter local bindings. | ||
| 810 | |||
| 805 | @defun current-minor-mode-maps | 811 | @defun current-minor-mode-maps |
| 806 | This function returns a list of the keymaps of currently enabled minor modes. | 812 | This function returns a list of the keymaps of currently enabled minor modes. |
| 807 | @end defun | 813 | @end defun |