aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2008-03-14 01:02:45 +0000
committerJuri Linkov2008-03-14 01:02:45 +0000
commita71a98cf8336c6e11d2fad89ebf74a92f13e5e1c (patch)
treea5f567dc132c435222baf1c6bf5176076edbd34a
parent0199e76544762c58e0842c314a73390260b34ee5 (diff)
downloademacs-a71a98cf8336c6e11d2fad89ebf74a92f13e5e1c.tar.gz
emacs-a71a98cf8336c6e11d2fad89ebf74a92f13e5e1c.zip
(isearch-edit-string): Remove one call to
`isearch-push-state' not to push an inconsistent state, but keep another correct call to `isearch-push-state'. (isearch-ring-adjust): Call `isearch-push-state' only when `search-ring-update' is non-nil since `isearch-edit-string' already pushes its state. (isearch-message): Improve matching the failed part by checking if the original message starts with the last successful message.
-rw-r--r--lisp/ChangeLog20
-rw-r--r--lisp/isearch.el27
2 files changed, 38 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 93edc4addcd..75913bef6c4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,23 @@
12008-03-14 Juri Linkov <juri@jurta.org>
2
3 * isearch.el (isearch-edit-string): Remove one call to
4 `isearch-push-state' not to push an inconsistent state,
5 but keep another correct call to `isearch-push-state'.
6 (isearch-ring-adjust): Call `isearch-push-state' only when
7 `search-ring-update' is non-nil since `isearch-edit-string'
8 already pushes its state.
9 (isearch-message): Improve matching the failed part by checking
10 if the original message starts with the last successful message.
11
12 * dired.el (dired-warn-writable): Rename to `dired-perm-write'.
13 (dired-perm-write): Renamed from `dired-warn-writable'.
14 Change parent face from `font-lock-warning-face' to
15 `font-lock-comment-delimiter-face'.
16 (dired-warn-writable-face): Rename to `dired-perm-write-face'.
17 (dired-perm-write-face): Renamed from `dired-warn-writable-face'.
18 (dired-font-lock-keywords): Replace `dired-warn-writable-face'
19 with `dired-perm-write-face'.
20
12008-03-13 Tassilo Horn <tassilo@member.fsf.org> 212008-03-13 Tassilo Horn <tassilo@member.fsf.org>
2 22
3 * doc-view.el (doc-view-doc->txt, doc-view-convert-current-doc): 23 * doc-view.el (doc-view-doc->txt, doc-view-convert-current-doc):
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 750ed129b7e..c115193d394 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1096,12 +1096,15 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst
1096 ;; Only the string actually used should be saved. 1096 ;; Only the string actually used should be saved.
1097 )) 1097 ))
1098 1098
1099 ;; Push the state as of before this C-s. 1099 ;; This used to push the state as of before this C-s, but it adds
1100 (isearch-push-state) 1100 ;; an inconsistent state where part of variables are from the
1101 ;; previous search (e.g. `isearch-success'), and part of variables
1102 ;; are just entered from the minibuffer (e.g. `isearch-string').
1103 ;; (isearch-push-state)
1101 1104
1102 ;; Reinvoke the pending search. 1105 ;; Reinvoke the pending search.
1103 (isearch-search) 1106 (isearch-search)
1104 (isearch-push-state) 1107 (isearch-push-state) ; this pushes the correct state
1105 (isearch-update) 1108 (isearch-update)
1106 (if isearch-nonincremental 1109 (if isearch-nonincremental
1107 (progn 1110 (progn
@@ -1895,10 +1898,12 @@ Isearch mode."
1895 (if search-ring-update 1898 (if search-ring-update
1896 (progn 1899 (progn
1897 (isearch-search) 1900 (isearch-search)
1901 (isearch-push-state)
1898 (isearch-update)) 1902 (isearch-update))
1899 (isearch-edit-string) 1903 ;; Otherwise, edit the search string instead. Note that there is
1900 ) 1904 ;; no need to push the search state after isearch-edit-string here
1901 (isearch-push-state)) 1905 ;; since isearch-edit-string already pushes its state
1906 (isearch-edit-string)))
1902 1907
1903(defun isearch-ring-advance () 1908(defun isearch-ring-advance ()
1904 "Advance to the next search string in the ring." 1909 "Advance to the next search string in the ring."
@@ -1975,9 +1980,13 @@ If there is no completion possible, say so and continue searching."
1975 (pop cmds)) 1980 (pop cmds))
1976 (setq succ-msg (and cmds (isearch-message-state (car cmds))) 1981 (setq succ-msg (and cmds (isearch-message-state (car cmds)))
1977 m (copy-sequence m)) 1982 m (copy-sequence m))
1978 (when (and (stringp succ-msg) (< (length succ-msg) (length m))) 1983 (add-text-properties
1979 (add-text-properties (length succ-msg) (length m) 1984 (if (and (stringp succ-msg)
1980 '(face isearch-fail) m)) 1985 (< (length succ-msg) (length m))
1986 (equal succ-msg (substring m 0 (length succ-msg))))
1987 (length succ-msg)
1988 0)
1989 (length m) '(face isearch-fail) m)
1981 ;; Highlight failed trailing whitespace 1990 ;; Highlight failed trailing whitespace
1982 (when (string-match " +$" m) 1991 (when (string-match " +$" m)
1983 (add-text-properties (match-beginning 0) (match-end 0) 1992 (add-text-properties (match-beginning 0) (match-end 0)