summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2008-04-08 11:47:48 +0000
committerJuanma Barranquero <lekktu@gmail.com>2008-04-08 11:47:48 +0000
commit66e9f105e0db4fea80738db3613afe0207dba945 (patch)
tree7ebae266f6459866101fb3c7947976ada02561a8 /lisp
parent80817d7b5e773d3be5ef4e17947ad841e4ccf91a (diff)
downloademacs-66e9f105e0db4fea80738db3613afe0207dba945.tar.gz
emacs-66e9f105e0db4fea80738db3613afe0207dba945.tar.bz2
emacs-66e9f105e0db4fea80738db3613afe0207dba945.zip
(checkdoc-this-string-valid-engine): Use `string-match-p'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/checkdoc.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index b2979693f6c..d833a358d94 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1774,10 +1774,9 @@ function,command,variable,option or symbol." ms1))))))
checkdoc-common-verbs-wrong-voice))
(if (not rs) (error "Verb voice alist corrupted"))
(setq replace (let ((case-fold-search nil))
- (save-match-data
- (if (string-match "^[A-Z]" original)
- (capitalize (cdr rs))
- (cdr rs)))))
+ (if (string-match-p "^[A-Z]" original)
+ (capitalize (cdr rs))
+ (cdr rs))))
(if (checkdoc-autofix-ask-replace
(match-beginning 1) (match-end 1)
(format "Use the imperative for \"%s\". \
@@ -1805,11 +1804,10 @@ Replace with \"%s\"? " original replace)
"[^-([`':a-zA-Z]\\(\\w+[:-]\\(\\w\\|\\s_\\)+\\)[^]']"
e t))
(setq ms (match-string 1))
- (save-match-data
- ;; A . is a \s_ char, so we must remove periods from
- ;; sentences more carefully.
- (if (string-match "\\.$" ms)
- (setq ms (substring ms 0 (1- (length ms))))))
+ ;; A . is a \s_ char, so we must remove periods from
+ ;; sentences more carefully.
+ (when (string-match-p "\\.$" ms)
+ (setq ms (substring ms 0 (1- (length ms)))))
(if (and (not (checkdoc-in-sample-code-p start e))
(not (checkdoc-in-example-string-p start e))
(not (member ms checkdoc-symbol-words))