]> code.delx.au - gnu-emacs/commitdiff
(make-help-screen): Preserve key bindings
authorMartin Rudalics <rudalics@gmx.at>
Thu, 18 Sep 2008 08:37:14 +0000 (08:37 +0000)
committerMartin Rudalics <rudalics@gmx.at>
Thu, 18 Sep 2008 08:37:14 +0000 (08:37 +0000)
established in help-mode call when exiting this macro.

lisp/ChangeLog
lisp/help-macro.el

index ec8c0c21d897950e937734fa73b494b4328e1cb3..4c4e7fcceb49473fa3de3c26bce036ac3a687348 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-18  Martin Rudalics  <rudalics@gmx.at>
+
+       * help-macro.el (make-help-screen): Preserve key bindings
+       established in help-mode call when exiting this macro.
+
 2008-09-17  Kenichi Handa  <handa@m17n.org>
 
        * language/burmese.el: Fix setting of composition-function-table.
index 6ad9a81a97d7625523cf5cb75e112f68b36b3dd2..cbe725e3274765f7d76112be5f3510bfa5c7098c 100644 (file)
@@ -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)