* lisp/subr.el (set-temporary-overlay-map): Doc fix.
authorGlenn Morris <rgm@gnu.org>
Wed, 14 Nov 2012 08:29:25 +0000 (00:29 -0800)
committerGlenn Morris <rgm@gnu.org>
Wed, 14 Nov 2012 08:29:25 +0000 (00:29 -0800)
* etc/NEWS: Related edit.

etc/NEWS
lisp/ChangeLog
lisp/subr.el

index 9fcb2d1..e7e1787 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -932,7 +932,9 @@ describing the cycle.
 *** `function-get' fetches a function property, following aliases.
 +++
 *** `posnp' tests if an object is a `posn'.
-*** `set-temporary-overlay-map' sets up a temporary overlay map.
+
+*** `set-temporary-overlay-map' sets up a temporary keymap that
+takes precedence over most other maps for a short while (normally one key).
 +++
 *** `system-users' returns the user names on the system.
 +++
index c13ef12..80ae61d 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-14  Glenn Morris  <rgm@gnu.org>
+
+       * subr.el (set-temporary-overlay-map): Doc fix.
+
 2012-11-13  Martin Rudalics  <rudalics@gmx.at>
 
        * window.el (record-window-buffer)
index d328b7c..d02b889 100644 (file)
@@ -3960,11 +3960,16 @@ The properties used on SYMBOL are `composefunc', `sendfunc',
   (put symbol 'hookvar (or hookvar 'mail-send-hook)))
 \f
 (defun set-temporary-overlay-map (map &optional keep-pred)
-  "Set MAP as a temporary overlay map.
-When KEEP-PRED is `t', using a key from the temporary keymap
-leaves this keymap activated.  KEEP-PRED can also be a function,
-which will have the same effect when it returns `t'.
-When KEEP-PRED is nil, the temporary keymap is used only once."
+  "Set MAP as a temporary keymap taking precedence over most other keymaps.
+Note that this does NOT take precedence over the \"overriding\" maps
+`overriding-terminal-local-map' and `overriding-local-map' (or the
+`keymap' text property).  Unlike those maps, if no match for a key is
+found in MAP, the normal key lookup sequence then continues.
+
+Normally, MAP is used only once.  If the optional argument
+KEEP-PRED is `t', MAP stays active if a key from MAP is used.
+KEEP-PRED can also be a function of no arguments: if it returns
+non-nil then MAP stays active."
   (let* ((clearfunsym (make-symbol "clear-temporary-overlay-map"))
          (overlaysym (make-symbol "t"))
          (alist (list (cons overlaysym map)))