Mercurial > emacs
comparison lisp/isearch.el @ 4379:36f6f4b28dde
(isearch-done): Move point (for small window)
before deciding whether to set the mark.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 31 Jul 1993 18:39:09 +0000 |
parents | f60102c4b948 |
children | ed1f6abba5c5 |
comparison
equal
deleted
inserted
replaced
4378:088883bdcd70 | 4379:36f6f4b28dde |
---|---|
2 | 2 |
3 ;; Copyright (C) 1992, 1993 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1992, 1993 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> | 5 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> |
6 | 6 |
7 ;; |$Date: 1993/07/08 22:33:57 $|$Revision: 1.45 $ | 7 ;; |$Date: 1993/07/15 03:46:02 $|$Revision: 1.46 $ |
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. |
11 | 11 |
12 ;; GNU Emacs is distributed in the hope that it will be useful, | 12 ;; GNU Emacs is distributed in the hope that it will be useful, |
582 (let ((found-start (window-start (selected-window))) | 582 (let ((found-start (window-start (selected-window))) |
583 (found-point (point))) | 583 (found-point (point))) |
584 (if isearch-window-configuration | 584 (if isearch-window-configuration |
585 (set-window-configuration isearch-window-configuration)) | 585 (set-window-configuration isearch-window-configuration)) |
586 | 586 |
587 (if isearch-small-window | |
588 (goto-char found-point) | |
589 ;; Exiting the save-window-excursion clobbers window-start; restore it. | |
590 (set-window-start (selected-window) found-start t))) | |
591 | |
587 ;; If there was movement, mark the starting position. | 592 ;; If there was movement, mark the starting position. |
588 ;; Maybe should test difference between and set mark iff > threshold. | 593 ;; Maybe should test difference between and set mark iff > threshold. |
589 (if (/= (point) isearch-opoint) | 594 (if (/= (point) isearch-opoint) |
590 (progn | 595 (progn |
591 (push-mark isearch-opoint t) | 596 (push-mark isearch-opoint t) |
592 (deactivate-mark) | 597 (deactivate-mark) |
593 (or executing-macro (> (minibuffer-depth) 0) | 598 (or executing-macro (> (minibuffer-depth) 0) |
594 (message "Mark saved where search started"))) | 599 (message "Mark saved where search started"))) |
595 ;; (message "") why is this needed? | 600 ;; (message "") why is this needed? |
596 ) | 601 ) |
597 (if isearch-small-window | |
598 (goto-char found-point) | |
599 ;; Exiting the save-window-excursion clobbers window-start; restore it. | |
600 (set-window-start (selected-window) found-start t))) | |
601 | 602 |
602 (setq isearch-mode nil) | 603 (setq isearch-mode nil) |
603 (set-buffer-modified-p (buffer-modified-p)) ;; update modeline | 604 (set-buffer-modified-p (buffer-modified-p)) ;; update modeline |
604 | 605 |
605 (if (and (> (length isearch-string) 0) (not nopush)) | 606 (if (and (> (length isearch-string) 0) (not nopush)) |