aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-04 06:40:45 +0000
committerRichard M. Stallman1993-06-04 06:40:45 +0000
commit704182054c50e4646480ec9de60fded779ff7043 (patch)
tree96270e6120eb2d41c5c4ac8b3f24c8b5f1773671
parentb9078b9d167434ea8ac6d63527381dfcef97d001 (diff)
downloademacs-704182054c50e4646480ec9de60fded779ff7043.tar.gz
emacs-704182054c50e4646480ec9de60fded779ff7043.zip
(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.
-rw-r--r--lisp/isearch.el25
1 files changed, 19 insertions, 6 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index ff85d932923..6a3979cc586 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> 5;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
6 6
7;; |$Date: 1993/05/29 06:27:47 $|$Revision: 1.38 $ 7;; |$Date: 1993/06/01 04:52:28 $|$Revision: 1.39 $
8 8
9;; This file is not yet part of GNU Emacs, but it is based almost 9;; This file is not yet part of GNU Emacs, but it is based almost
10;; entirely on isearch.el which is part of GNU Emacs. 10;; 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."
500 isearch-small-window nil 500 isearch-small-window nil
501 501
502 isearch-opoint (point) 502 isearch-opoint (point)
503 isearch-window-configuration (current-window-configuration)
504 isearch-old-local-map (current-local-map) 503 isearch-old-local-map (current-local-map)
505 search-ring-yank-pointer nil 504 search-ring-yank-pointer nil
506 regexp-search-ring-yank-pointer nil) 505 regexp-search-ring-yank-pointer nil)
506 (if isearch-slow-terminal-mode
507 (setq isearch-window-configuration (current-window-configuration)))
508
507;; This was for Lucid Emacs. But now that we have pre-command-hook, 509;; This was for Lucid Emacs. But now that we have pre-command-hook,
508;; it causes trouble. 510;; it causes trouble.
509;; (if isearch-pre-command-hook-exists 511;; (if isearch-pre-command-hook-exists
@@ -581,7 +583,8 @@ is treated as a regexp. See \\[isearch-forward] for more info."
581 (isearch-dehighlight t) 583 (isearch-dehighlight t)
582 (let ((found-start (window-start (selected-window))) 584 (let ((found-start (window-start (selected-window)))
583 (found-point (point))) 585 (found-point (point)))
584 (set-window-configuration isearch-window-configuration) 586 (if isearch-window-configuration
587 (set-window-configuration isearch-window-configuration))
585 588
586 ;; If there was movement, mark the starting position. 589 ;; If there was movement, mark the starting position.
587 ;; Maybe should test difference between and set mark iff > threshold. 590 ;; 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."
1006 (apply 'isearch-unread (listify-key-sequence key))) 1009 (apply 'isearch-unread (listify-key-sequence key)))
1007 (isearch-edit-string)) 1010 (isearch-edit-string))
1008 (search-exit-option 1011 (search-exit-option
1009 (let ((key (this-command-keys))) 1012 (let ((key (this-command-keys))
1010 (apply 'isearch-unread (listify-key-sequence key))) 1013 window)
1011 (isearch-done)) 1014 (apply 'isearch-unread (listify-key-sequence key))
1015 ;; If we got a mouse click, maybe it was read with the buffer
1016 ;; it was clicked on. If so, that buffer, not the current one,
1017 ;; is in isearch mode. So end the search in that buffer.
1018 (if (and (listp (aref key 0))
1019 (setq window (posn-window (event-start (aref key 0))))
1020 (windowp window))
1021 (save-excursion
1022 (set-buffer (window-buffer window))
1023 (isearch-done))
1024 (isearch-done))))
1012 (t;; otherwise nil 1025 (t;; otherwise nil
1013 (isearch-process-search-string (this-command-keys) 1026 (isearch-process-search-string (this-command-keys)
1014 (this-command-keys))))) 1027 (this-command-keys)))))