mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
(isearch-edit-string): Save old point and
isearch-other-end to old-point and old-other-end before reading the search string from minibuffer. After exiting minibuffer set point to old-other-end if point and the search direction is the same as before reading the search string. (isearch-del-char): Don't set isearch-yank-flag to t. Put point to isearch-other-end. Instead of isearch-search-and-update call three functions isearch-search, isearch-push-state and isearch-update.
This commit is contained in:
parent
49bbf1b953
commit
e81ab98642
2 changed files with 31 additions and 5 deletions
|
|
@ -1,3 +1,14 @@
|
|||
2007-07-22 Juri Linkov <juri@jurta.org>
|
||||
|
||||
* isearch.el (isearch-edit-string): Save old point and
|
||||
isearch-other-end to old-point and old-other-end before reading
|
||||
the search string from minibuffer. After exiting minibuffer set
|
||||
point to old-other-end if point and the search direction is the
|
||||
same as before reading the search string.
|
||||
(isearch-del-char): Don't set isearch-yank-flag to t. Put point
|
||||
to isearch-other-end. Instead of isearch-search-and-update call
|
||||
three functions isearch-search, isearch-push-state and isearch-update.
|
||||
|
||||
2007-07-22 Ralf Angeli <angeli@caeruleus.net>
|
||||
|
||||
* textmodes/reftex.el (reftex-access-parse-file): Do not risk
|
||||
|
|
|
|||
|
|
@ -992,7 +992,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
|
|||
isearch-original-minibuffer-message-timeout)
|
||||
(isearch-original-minibuffer-message-timeout
|
||||
isearch-original-minibuffer-message-timeout)
|
||||
)
|
||||
old-point old-other-end)
|
||||
|
||||
;; Actually terminate isearching until editing is done.
|
||||
;; This is so that the user can do anything without failure,
|
||||
|
|
@ -1001,6 +1001,10 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
|
|||
(isearch-done t t)
|
||||
(exit nil)) ; was recursive editing
|
||||
|
||||
;; Save old point and isearch-other-end before reading from minibuffer
|
||||
;; that can change their values.
|
||||
(setq old-point (point) old-other-end isearch-other-end)
|
||||
|
||||
(isearch-message) ;; for read-char
|
||||
(unwind-protect
|
||||
(let* (;; Why does following read-char echo?
|
||||
|
|
@ -1036,6 +1040,14 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
|
|||
isearch-new-message
|
||||
(mapconcat 'isearch-text-char-description
|
||||
isearch-new-string "")))
|
||||
|
||||
;; Set point at the start (end) of old match if forward (backward),
|
||||
;; so after exiting minibuffer isearch resumes at the start (end)
|
||||
;; of this match and can find it again.
|
||||
(if (and old-other-end (eq old-point (point))
|
||||
(eq isearch-forward isearch-new-forward))
|
||||
(goto-char old-other-end))
|
||||
|
||||
;; Always resume isearching by restarting it.
|
||||
(isearch-mode isearch-forward
|
||||
isearch-regexp
|
||||
|
|
@ -1260,10 +1272,13 @@ If search string is empty, just beep."
|
|||
(ding)
|
||||
(setq isearch-string (substring isearch-string 0 (- (or arg 1)))
|
||||
isearch-message (mapconcat 'isearch-text-char-description
|
||||
isearch-string "")
|
||||
;; Don't move cursor in reverse search.
|
||||
isearch-yank-flag t))
|
||||
(isearch-search-and-update))
|
||||
isearch-string "")))
|
||||
;; Use the isearch-other-end as new starting point to be able
|
||||
;; to find the remaining part of the search string again.
|
||||
(if isearch-other-end (goto-char isearch-other-end))
|
||||
(isearch-search)
|
||||
(isearch-push-state)
|
||||
(isearch-update))
|
||||
|
||||
(defun isearch-yank-string (string)
|
||||
"Pull STRING into search string."
|
||||
|
|
|
|||
Loading…
Reference in a new issue