Commit 1c511be4 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(checkdoc-this-string-valid-engine):

Replace foo-p as var name with foo-flag, not foo-p-flag.
parent e711842f
...@@ -1592,18 +1592,22 @@ function,command,variable,option or symbol." ms1)))))) ...@@ -1592,18 +1592,22 @@ function,command,variable,option or symbol." ms1))))))
;; If the doc string starts with "Non-nil means" ;; If the doc string starts with "Non-nil means"
(if (and (looking-at "\"\\*?Non-nil\\s-+means\\s-+") (if (and (looking-at "\"\\*?Non-nil\\s-+means\\s-+")
(not (string-match "-flag$" (car fp)))) (not (string-match "-flag$" (car fp))))
(if (checkdoc-y-or-n-p (let ((newname
(format (if (string-match "-p$" (car fp))
"Rename to %s and Query-Replace all occurances? " (concat (substring (car fp) 0 -2) "-flag")
(concat (car fp) "-flag"))) (concat (car fp) "-flag"))))
(progn (if (checkdoc-y-or-n-p
(beginning-of-defun) (format
(query-replace-regexp "Rename to %s and Query-Replace all occurances? "
(concat "\\<" (regexp-quote (car fp)) "\\>") newname))
(concat (car fp) "-flag"))) (progn
(checkdoc-create-error (beginning-of-defun)
"Flag variable names should normally end in `-flag'" s (query-replace-regexp
(marker-position e)))) (concat "\\<" (regexp-quote (car fp)) "\\>")
newname))
(checkdoc-create-error
"Flag variable names should normally end in `-flag'" s
(marker-position e)))))
;; Done with variables ;; Done with variables
)) ))
(t (t
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment