Commit 70418205 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(isearch-mode): Set isearch-window-configuration only if in slow mode.

(isearch-done): Use isearch-window-configuration only if non-nil.

(isearch-other-control-char): For mouse event, call isearch-done
in the buffer whose keymap was used.
parent b9078b9d
......@@ -4,7 +4,7 @@
;; Author: Daniel LaLiberte <>
;; |$Date: 1993/05/29 06:27:47 $|$Revision: 1.38 $
;; |$Date: 1993/06/01 04:52:28 $|$Revision: 1.39 $
;; This file is not yet part of GNU Emacs, but it is based almost
;; entirely on isearch.el which is part of GNU Emacs.
......@@ -500,10 +500,12 @@ is treated as a regexp. See \\[isearch-forward] for more info."
isearch-small-window nil
isearch-opoint (point)
isearch-window-configuration (current-window-configuration)
isearch-old-local-map (current-local-map)
search-ring-yank-pointer nil
regexp-search-ring-yank-pointer nil)
(if isearch-slow-terminal-mode
(setq isearch-window-configuration (current-window-configuration)))
;; This was for Lucid Emacs. But now that we have pre-command-hook,
;; it causes trouble.
;; (if isearch-pre-command-hook-exists
......@@ -581,7 +583,8 @@ is treated as a regexp. See \\[isearch-forward] for more info."
(isearch-dehighlight t)
(let ((found-start (window-start (selected-window)))
(found-point (point)))
(set-window-configuration isearch-window-configuration)
(if isearch-window-configuration
(set-window-configuration isearch-window-configuration))
;; If there was movement, mark the starting position.
;; Maybe should test difference between and set mark iff > threshold.
......@@ -1006,9 +1009,19 @@ and the meta character is unread so that it applies to editing the string."
(apply 'isearch-unread (listify-key-sequence key)))
(let ((key (this-command-keys)))
(apply 'isearch-unread (listify-key-sequence key)))
(let ((key (this-command-keys))
(apply 'isearch-unread (listify-key-sequence key))
;; If we got a mouse click, maybe it was read with the buffer
;; it was clicked on. If so, that buffer, not the current one,
;; is in isearch mode. So end the search in that buffer.
(if (and (listp (aref key 0))
(setq window (posn-window (event-start (aref key 0))))
(windowp window))
(set-buffer (window-buffer window))
(t;; otherwise nil
(isearch-process-search-string (this-command-keys)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment