Don't bind same-window-* in isearch.el commands.
authorJuri Linkov <juri@jurta.org>
Sun, 4 Nov 2012 03:24:00 +0000 (11:24 +0800)
committerChong Yidong <cyd@gnu.org>
Sun, 4 Nov 2012 03:24:00 +0000 (11:24 +0800)
* isearch.el (isearch-help-for-help, isearch-describe-bindings)
(isearch-describe-key, isearch-describe-mode): Use a display
action instead of binding same-window-* variables.

Fixes: debbugs:10040

lisp/ChangeLog
lisp/isearch.el

index c9a389b..84d70cc 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-04  Juri Linkov  <juri@jurta.org>
+
+       * isearch.el (isearch-help-for-help, isearch-describe-bindings)
+       (isearch-describe-key, isearch-describe-mode): Use a display
+       action instead of binding same-window-* variables (Bug#10040).
+
 2012-11-03  Glenn Morris  <rgm@gnu.org>
 
        * emacs-lisp/cl-macs.el (cl-parse-loop-clause):
index 0bfda88..54ec3f2 100644 (file)
@@ -374,10 +374,12 @@ but outside of this help window when you type them in Isearch mode,
 they exit Isearch mode before displaying global help."
   isearch-help-map)
 
+(defvar isearch--display-help-action '(nil (inhibit-same-window . t)))
+
 (defun isearch-help-for-help ()
   "Display Isearch help menu."
   (interactive)
-  (let (same-window-buffer-names same-window-regexps)
+  (let ((display-buffer-overriding-action isearch--display-help-action))
     (isearch-help-for-help-internal))
   (isearch-update))
 
@@ -385,7 +387,7 @@ they exit Isearch mode before displaying global help."
   "Show a list of all keys defined in Isearch mode, and their definitions.
 This is like `describe-bindings', but displays only Isearch keys."
   (interactive)
-  (let (same-window-buffer-names same-window-regexps)
+  (let ((display-buffer-overriding-action isearch--display-help-action))
     (with-help-window "*Help*"
       (with-current-buffer standard-output
        (princ "Isearch Mode Bindings:\n")
@@ -394,14 +396,14 @@ This is like `describe-bindings', but displays only Isearch keys."
 (defun isearch-describe-key ()
   "Display documentation of the function invoked by isearch key."
   (interactive)
-  (let (same-window-buffer-names same-window-regexps)
+  (let ((display-buffer-overriding-action isearch--display-help-action))
     (call-interactively 'describe-key))
   (isearch-update))
 
 (defun isearch-describe-mode ()
   "Display documentation of Isearch mode."
   (interactive)
-  (let (same-window-buffer-names same-window-regexps)
+  (let ((display-buffer-overriding-action isearch--display-help-action))
     (describe-function 'isearch-forward))
   (isearch-update))