Mercurial > emacs
changeset 67103:27f5bb6b18ad
(isearch-repeat): With empty search ring set `isearch-error' to the
error string instead of signaling error with the function `error'.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Thu, 24 Nov 2005 09:59:11 +0000 |
parents | cb7a3d503153 |
children | 908817f6b0b5 |
files | lisp/isearch.el |
diffstat | 1 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/isearch.el Thu Nov 24 08:20:41 2005 +0000 +++ b/lisp/isearch.el Thu Nov 24 09:59:11 2005 +0000 @@ -1138,15 +1138,16 @@ ;; C-s in forward or C-r in reverse. (if (equal isearch-string "") ;; If search string is empty, use last one. - (setq isearch-string - (or (if isearch-regexp - (car regexp-search-ring) - (car search-ring)) - (error "No previous search string")) - isearch-message - (mapconcat 'isearch-text-char-description - isearch-string "") - isearch-case-fold-search isearch-last-case-fold-search) + (if (null (if isearch-regexp regexp-search-ring search-ring)) + (setq isearch-error "No previous search string") + (setq isearch-string + (if isearch-regexp + (car regexp-search-ring) + (car search-ring)) + isearch-message + (mapconcat 'isearch-text-char-description + isearch-string "") + isearch-case-fold-search isearch-last-case-fold-search)) ;; If already have what to search for, repeat it. (or isearch-success (progn