summaryrefslogtreecommitdiff
path: root/lisp/vc/add-log.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2018-04-23 01:10:49 +0300
committerJuri Linkov <juri@linkov.net>2018-04-23 01:10:49 +0300
commit7abd3f2dcf1d31e31f40ca817666e8f66a17284f (patch)
tree880199c2f4902fb30fab689dd7495106493a1a07 /lisp/vc/add-log.el
parentb26872a3b13f69f7f67a4964722d2ef155964c45 (diff)
downloademacs-7abd3f2dcf1d31e31f40ca817666e8f66a17284f.tar.gz
Improve Isearch error handling
* lisp/isearch.el (isearch--momentary-message): Propertize message suffix with minibuffer-prompt face. (isearch--describe-regexp-mode): Do not omit description in case of error in default non-literal search. (isearch-message-prefix): Display “case-sensitive” in case of error. (isearch-message-suffix): Propertize message suffix with minibuffer-prompt face. (isearch-search-fun-default): Remove unused error handling. * lisp/vc/add-log.el (change-log-next-buffer): Better handle errors during wrapping.
Diffstat (limited to 'lisp/vc/add-log.el')
-rw-r--r--lisp/vc/add-log.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index 41a99916994..4c64ae1f60b 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -1099,9 +1099,17 @@ file were isearch was started."
;; If there are no files that match the default pattern ChangeLog.[0-9],
;; return the current buffer to force isearch wrapping to its beginning.
;; If file is nil, multi-isearch-search-fun will signal "end of multi".
- (if (and file (file-exists-p file))
- (find-file-noselect file)
- (current-buffer))))
+ (cond
+ ;; Wrapping doesn't catch errors from the nil arg of file-exists-p,
+ ;; so handle it explicitly.
+ ((and wrap (null file))
+ (current-buffer))
+ ;; When there is no next file, file-exists-p raises the error to be
+ ;; catched by the search function that displays the error message.
+ ((file-exists-p file)
+ (find-file-noselect file))
+ (t
+ (current-buffer)))))
(defun change-log-fill-forward-paragraph (n)
"Cut paragraphs so filling preserves open parentheses at beginning of lines."