Mercurial > emacs
changeset 8242:824eeccd8203
(make-help-screen): Bind overriding-local-map
just for short sections of code.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 14 Jul 1994 02:50:06 +0000 |
parents | a16dfe068972 |
children | bf7b3b969ab5 |
files | lisp/help-macro.el |
diffstat | 1 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help-macro.el Wed Jul 13 19:10:27 1994 +0000 +++ b/lisp/help-macro.el Thu Jul 14 02:50:06 1994 +0000 @@ -94,15 +94,19 @@ (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 @@ (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 @@ (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