summaryrefslogtreecommitdiff
path: root/lisp/help-macro.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2008-09-18 08:37:14 +0000
committerMartin Rudalics <rudalics@gmx.at>2008-09-18 08:37:14 +0000
commitb1b6d77d47a347aadba27496d878970b58cf9d19 (patch)
tree2365475c7086e303aebc0a69f210409de25d3307 /lisp/help-macro.el
parentea8ba975fbb4da1be8fdee56b0bcc1a9adb78ad2 (diff)
downloademacs-b1b6d77d47a347aadba27496d878970b58cf9d19.tar.gz
(make-help-screen): Preserve key bindings
established in help-mode call when exiting this macro.
Diffstat (limited to 'lisp/help-macro.el')
-rw-r--r--lisp/help-macro.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/help-macro.el b/lisp/help-macro.el
index 6ad9a81a97d..cbe725e3274 100644
--- a/lisp/help-macro.el
+++ b/lisp/help-macro.el
@@ -103,7 +103,7 @@ and then returns."
;; sections, *excluding* where we switch buffers
;; and where we execute the chosen help command.
(local-map (make-sparse-keymap))
- (minor-mode-map-alist nil)
+ (new-minor-mode-map-alist minor-mode-map-alist)
(prev-frame (selected-frame))
config new-frame key char)
(if (string-match "%THIS-KEY%" help-screen)
@@ -111,7 +111,7 @@ and then returns."
(replace-match (key-description (substring (this-command-keys) 0 -1))
t t help-screen)))
(unwind-protect
- (progn
+ (let ((minor-mode-map-alist nil))
(setcdr local-map ,helped-map)
(define-key local-map [t] 'undefined)
;; Make the scroll bar keep working normally.
@@ -140,7 +140,9 @@ and then returns."
(let ((inhibit-read-only t))
(erase-buffer)
(insert help-screen))
- (help-mode)
+ (let ((minor-mode-map-alist new-minor-mode-map-alist))
+ (help-mode)
+ (setq new-minor-mode-map-alist minor-mode-map-alist))
(goto-char (point-min))
(while (or (memq char (append help-event-list
(cons help-char '(?? ?\C-v ?\s ?\177 delete backspace vertical-scroll-bar ?\M-v))))
@@ -191,8 +193,8 @@ and then returns."
(ding)))))
(if new-frame (iconify-frame new-frame))
(if config
- (set-window-configuration config))))))
- )))
+ (set-window-configuration config))
+ (setq minor-mode-map-alist new-minor-mode-map-alist))))))))
(provide 'help-macro)