From: Richard M. Stallman Date: Mon, 1 Jan 2007 21:49:04 +0000 (+0000) Subject: (isearch-done): Use FOUND-POINT or FOUND-START X-Git-Tag: emacs-pretest-22.0.93~309 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d8a4fc444aae4582e22a2bd674d58c230a516b10;p=emacs.git (isearch-done): Use FOUND-POINT or FOUND-START only if we restored isearch-window-configuration. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1cd2f794e5f..ebe0dc9b668 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-01-01 Richard Stallman + + * isearch.el (isearch-done): Use FOUND-POINT or FOUND-START + only if we restored isearch-window-configuration. + 2006-12-31 Romain Francoise * net/tramp.el (tramp-default-method): Don't use `symbol-function'. diff --git a/lisp/isearch.el b/lisp/isearch.el index a7d239aebc2..ca569eeff16 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -784,13 +784,15 @@ NOPUSH is t and EDIT is t." (lazy-highlight-cleanup lazy-highlight-cleanup) (let ((found-start (window-start (selected-window))) (found-point (point))) - (if isearch-window-configuration - (set-window-configuration isearch-window-configuration)) - - (if isearch-small-window - (goto-char found-point) - ;; Exiting the save-window-excursion clobbers window-start; restore it. - (set-window-start (selected-window) found-start t))) + (when isearch-window-configuration + (set-window-configuration isearch-window-configuration) + (if isearch-small-window + (goto-char found-point) + ;; set-window-configuration clobbers window-start; restore it. + ;; This has an annoying side effect of clearing the last_modiff + ;; field of the window, which can cause unwanted scrolling, + ;; so don't do it unless truly necessary. + (set-window-start (selected-window) found-start t)))) (setq isearch-mode nil) (if isearch-input-method-local-p