diff options
author | Juri Linkov <juri@linkov.net> | 2019-04-10 23:48:13 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2019-04-10 23:48:13 +0300 |
commit | 8ecce6af471b4b0cbe022c76e322170914c55e1b (patch) | |
tree | 2bc9367d708159cbf123c5a9e212366520177373 /lisp/replace.el | |
parent | d2255c6065b0bc3949d494edf8864a2bd13918f3 (diff) | |
download | emacs-8ecce6af471b4b0cbe022c76e322170914c55e1b.tar.gz |
Inhibit displaying help buffer in main window in perform-replace
* lisp/replace.el (perform-replace): Use
display-buffer-overriding-action with inhibit-same-window to prevent
the help buffer from being displayed in the main window. (Bug#34972)
Author: MichaĆ Krzywkowski <k.michal@zoho.com>
Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/replace.el')
-rw-r--r-- | lisp/replace.el | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 318a9fb0253..9d1b7bf747d 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2643,22 +2643,24 @@ characters." (setq def (lookup-key map key)) ;; Restore the match data while we process the command. (cond ((eq def 'help) - (with-output-to-temp-buffer "*Help*" - (princ - (concat "Query replacing " - (if backward "backward " "") - (if delimited-flag - (or (and (symbolp delimited-flag) - (get delimited-flag - 'isearch-message-prefix)) - "word ") "") - (if regexp-flag "regexp " "") - from-string " with " - next-replacement ".\n\n" - (substitute-command-keys - query-replace-help))) - (with-current-buffer standard-output - (help-mode)))) + (let ((display-buffer-overriding-action + '(nil (inhibit-same-window . t)))) + (with-output-to-temp-buffer "*Help*" + (princ + (concat "Query replacing " + (if backward "backward " "") + (if delimited-flag + (or (and (symbolp delimited-flag) + (get delimited-flag + 'isearch-message-prefix)) + "word ") "") + (if regexp-flag "regexp " "") + from-string " with " + next-replacement ".\n\n" + (substitute-command-keys + query-replace-help))) + (with-current-buffer standard-output + (help-mode))))) ((eq def 'exit) (setq keep-going nil) (setq done t)) |