Mercurial > emacs
diff lisp/help-macro.el @ 98216:050829529d8b
(make-help-screen): Preserve key bindings
established in help-mode call when exiting this macro.
author | Martin Rudalics <rudalics@gmx.at> |
---|---|
date | Thu, 18 Sep 2008 08:36:42 +0000 |
parents | ee5932bf781d |
children | 77d381812b04 |
line wrap: on
line diff
--- a/lisp/help-macro.el Thu Sep 18 06:20:42 2008 +0000 +++ b/lisp/help-macro.el Thu Sep 18 08:36:42 2008 +0000 @@ -103,7 +103,7 @@ ;; 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 @@ (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 @@ (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 @@ (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)