aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1995-12-01 20:18:18 +0000
committerRichard M. Stallman1995-12-01 20:18:18 +0000
commitf3acf6f52a3d85421490a8fe7843a14e22cbe329 (patch)
treeb44d908c0ad52b4c794638b0501d2ec576f18f7e /lisp
parent80e0c45c3896e5552a387a2b533b5235b42094ce (diff)
downloademacs-f3acf6f52a3d85421490a8fe7843a14e22cbe329.tar.gz
emacs-f3acf6f52a3d85421490a8fe7843a14e22cbe329.zip
(isearch-edit-string): Consider the case when
iserch-string is empty and so are the search rings.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/isearch.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index cd035b08b3e..bbcc08bf00b 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -552,7 +552,7 @@ is treated as a regexp. See \\[isearch-forward] for more info."
552 (or (and transient-mark-mode mark-active) 552 (or (and transient-mark-mode mark-active)
553 (progn 553 (progn
554 (push-mark isearch-opoint t) 554 (push-mark isearch-opoint t)
555 (or executing-macro (> (minibuffer-depth) 0) 555 (or executing-kbd-macro (> (minibuffer-depth) 0)
556 (message "Mark saved where search started")))))) 556 (message "Mark saved where search started"))))))
557 557
558 (setq isearch-mode nil) 558 (setq isearch-mode nil)
@@ -726,8 +726,10 @@ If first char entered is \\[isearch-yank-word], then do word search instead."
726 726
727 ;; Empty isearch-string means use default. 727 ;; Empty isearch-string means use default.
728 (if (= 0 (length isearch-string)) 728 (if (= 0 (length isearch-string))
729 (setq isearch-string (car (if isearch-regexp regexp-search-ring 729 (setq isearch-string (or (car (if isearch-regexp
730 search-ring))) 730 regexp-search-ring
731 search-ring))
732 ""))
731 ;; This used to set the last search string, 733 ;; This used to set the last search string,
732 ;; but I think it is not right to do that here. 734 ;; but I think it is not right to do that here.
733 ;; Only the string actually used should be saved. 735 ;; Only the string actually used should be saved.