diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-07-14 02:50:06 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-07-14 02:50:06 +0000 |
commit | aaa99cbe2afcc27ae98bbc086ba4fd77537ac5ae (patch) | |
tree | eca1434eb0fdfcc10bae1ab02c471ae7d47732db /lisp/help-macro.el | |
parent | 20e15dfd12e30a599ba480c73aca0b1662c4cd80 (diff) | |
download | emacs-aaa99cbe2afcc27ae98bbc086ba4fd77537ac5ae.tar.gz |
(make-help-screen): Bind overriding-local-map
just for short sections of code.
Diffstat (limited to 'lisp/help-macro.el')
-rw-r--r-- | lisp/help-macro.el | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lisp/help-macro.el b/lisp/help-macro.el index 10453e0505c..ffce7d762e6 100644 --- a/lisp/help-macro.el +++ b/lisp/help-macro.el @@ -94,15 +94,19 @@ and then returns." (if three-step-help (message line-prompt)) (let* ((help-screen (documentation (quote (, fname)))) - (overriding-local-map (make-sparse-keymap)) + ;; We bind overriding-local-map for very small + ;; sections, *excluding* where we switch buffers + ;; and where we execute the chosen help command. + (local-map (make-sparse-keymap)) (minor-mode-map-alist nil) config key char) (unwind-protect (progn - (setcdr overriding-local-map (, helped-map)) - (define-key overriding-local-map [t] 'undefined) + (setcdr local-map (, helped-map)) + (define-key local-map [t] 'undefined) (if three-step-help - (setq key (read-key-sequence nil) + (setq key (let ((overriding-local-map local-map)) + (read-key-sequence nil)) char (aref key 0)) (setq char ??)) (if (or (eq char ??) (eq char help-char)) @@ -122,7 +126,8 @@ and then returns." (equal key "\M-v")) (scroll-down))) (error nil)) - (let ((cursor-in-echo-area t)) + (let ((cursor-in-echo-area t) + (overriding-local-map local-map)) (setq key (read-key-sequence (format "Type one of the options listed%s: " (if (pos-visible-in-window-p @@ -135,7 +140,9 @@ and then returns." (setq unread-command-events (cons char unread-command-events) config nil) - (let ((defn (key-binding key))) + (let ((defn + (let ((overriding-local-map local-map)) + (key-binding key)))) (if defn (progn (if config |