diff options
Diffstat (limited to 'lisp/subr.el')
| -rw-r--r-- | lisp/subr.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 48d208235dd..1a850b1eabf 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -3972,11 +3972,16 @@ The properties used on SYMBOL are `composefunc', `sendfunc', | |||
| 3972 | (put symbol 'hookvar (or hookvar 'mail-send-hook))) | 3972 | (put symbol 'hookvar (or hookvar 'mail-send-hook))) |
| 3973 | 3973 | ||
| 3974 | (defun set-temporary-overlay-map (map &optional keep-pred) | 3974 | (defun set-temporary-overlay-map (map &optional keep-pred) |
| 3975 | "Set MAP as a temporary overlay map. | 3975 | "Set MAP as a temporary keymap taking precedence over most other keymaps. |
| 3976 | When KEEP-PRED is `t', using a key from the temporary keymap | 3976 | Note that this does NOT take precedence over the \"overriding\" maps |
| 3977 | leaves this keymap activated. KEEP-PRED can also be a function, | 3977 | `overriding-terminal-local-map' and `overriding-local-map' (or the |
| 3978 | which will have the same effect when it returns `t'. | 3978 | `keymap' text property). Unlike those maps, if no match for a key is |
| 3979 | When KEEP-PRED is nil, the temporary keymap is used only once." | 3979 | found in MAP, the normal key lookup sequence then continues. |
| 3980 | |||
| 3981 | Normally, MAP is used only once. If the optional argument | ||
| 3982 | KEEP-PRED is t, MAP stays active if a key from MAP is used. | ||
| 3983 | KEEP-PRED can also be a function of no arguments: if it returns | ||
| 3984 | non-nil then MAP stays active." | ||
| 3980 | (let* ((clearfunsym (make-symbol "clear-temporary-overlay-map")) | 3985 | (let* ((clearfunsym (make-symbol "clear-temporary-overlay-map")) |
| 3981 | (overlaysym (make-symbol "t")) | 3986 | (overlaysym (make-symbol "t")) |
| 3982 | (alist (list (cons overlaysym map))) | 3987 | (alist (list (cons overlaysym map))) |