;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
-;; |$Date: 1993/06/06 22:11:22 $|$Revision: 1.41 $
+;; |$Date: 1993/07/08 22:33:57 $|$Revision: 1.45 $
;; This file is not yet part of GNU Emacs, but it is based almost
;; entirely on isearch.el which is part of GNU Emacs.
(if (/= (point) isearch-opoint)
(progn
(push-mark isearch-opoint t)
- (if transient-mark-mode
- (setq mark-active nil))
+ (deactivate-mark)
(or executing-macro (> (minibuffer-depth) 0)
(message "Mark saved where search started")))
;; (message "") why is this needed?
;; Editing doesn't back up the search point. Should it?
(interactive)
(condition-case err
- (let (isearch-nonincremental ; should search nonincrementally?
+ (let ((isearch-nonincremental isearch-nonincremental)
;; Locally bind all isearch global variables to protect them
;; from recursive isearching.
(isearch-edit-string))
(search-exit-option
(let ((key (this-command-keys))
+ (index 0)
window)
(apply 'isearch-unread (listify-key-sequence key))
+ ;; Properly handle scroll-bar and mode-line clicks
+ ;; for which a dummy prefix event was generated as (aref key 0).
+ (and (> (length key) 1)
+ (symbolp (aref key 0))
+ (listp (aref key 1))
+ (consp (posn-point (event-start (aref key 1))))
+ (setq index 1))
;; 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))))
+ (if (and (listp (aref key index))
+ (setq window (posn-window (event-start (aref key index))))
(windowp window))
(save-excursion
(set-buffer (window-buffer window))
(isearch-process-search-string (this-command-keys)
(this-command-keys)))))
-
(defun isearch-quote-char ()
"Quote special characters for incremental search."
(interactive)
(defvar isearch-overlay nil)
(defun isearch-highlight (beg end)
- (if (or (null search-highlight) (not (internal-find-face 'isearch nil)))
+ (if (null search-highlight)
nil
(or isearch-overlay (setq isearch-overlay (make-overlay beg end)))
(move-overlay isearch-overlay beg end (current-buffer))
- (overlay-put isearch-overlay 'face 'isearch)))
+ (overlay-put isearch-overlay 'face
+ (if (internal-find-face 'isearch nil)
+ 'isearch 'region))))
(defun isearch-dehighlight (totally)
(if isearch-overlay