diff options
| author | Frank Fischer <frank-fischer@shadow-soft.de> | 2014-10-25 22:06:10 +0200 |
|---|---|---|
| committer | Frank Fischer <frank-fischer@shadow-soft.de> | 2014-10-25 22:06:10 +0200 |
| commit | d0a41bd516b103df724540e4f08603515477a372 (patch) | |
| tree | 84cc4d621f45fc10818e13720715bfeb1657f4d4 /evil-search.el | |
| parent | 86954af17bcc686de589ff5a76e2018326c00a07 (diff) | |
replace `error` with `user-error` where appropriate
Diffstat (limited to 'evil-search.el')
| -rw-r--r-- | evil-search.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/evil-search.el b/evil-search.el index a87167a..7d58d96 100644 --- a/evil-search.el +++ b/evil-search.el @@ -231,8 +231,8 @@ one more than the current position." (funcall search-func string) (search-failed (goto-char orig) - (error "\"%s\": %s not found" - string (if regexp-p "pattern" "string")))) + (user-error "\"%s\": %s not found" + string (if regexp-p "pattern" "string")))) (setq isearch-string string) (isearch-update-ring string regexp-p) ;; handle opening and closing of invisible area @@ -274,7 +274,7 @@ otherwise for the word at point." (setq string (evil-find-thing forward (if symbol 'symbol 'word))) (cond ((null string) - (error "No word under point")) + (user-error "No word under point")) (unbounded (setq string (regexp-quote string))) (t @@ -667,7 +667,7 @@ The following properties are supported: (search-failed (setq result (nth 2 lossage))) - (error + (user-error (setq result (format "%s" lossage))))) ;; no pattern, remove all highlights (mapc #'delete-overlay old-ovs) @@ -1022,7 +1022,7 @@ current search result." (string-match "^\\([esb]\\)?\\(\\([-+]\\)?\\([0-9]*\\)\\)$" offset) - (error "Invalid search offset: %s" offset)) + (user-error "Invalid search offset: %s" offset)) (let ((count (if (= (match-beginning 4) (match-end 4)) (cond ((not (match-beginning 3)) 0) @@ -1098,7 +1098,7 @@ point." (let ((string (evil-find-thing (eq direction 'forward) (if symbol 'symbol 'word)))) (if (null string) - (error "No word under point") + (user-error "No word under point") (let ((regex (if unbounded (regexp-quote string) (format (if symbol "\\_<%s\\_>" "\\<%s\\>") @@ -1160,7 +1160,7 @@ This handler highlights the pattern of the current substitution." (end-of-file (evil-ex-pattern-update-ex-info nil "incomplete replacement")) - (error + (user-error (evil-ex-pattern-update-ex-info nil (format "%s" lossage)))))))) |
