aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/checkdoc.el28
1 files changed, 16 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index f6100122730..17aab149a47 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -1592,18 +1592,22 @@ function,command,variable,option or symbol." ms1))))))
1592 ;; If the doc string starts with "Non-nil means" 1592 ;; If the doc string starts with "Non-nil means"
1593 (if (and (looking-at "\"\\*?Non-nil\\s-+means\\s-+") 1593 (if (and (looking-at "\"\\*?Non-nil\\s-+means\\s-+")
1594 (not (string-match "-flag$" (car fp)))) 1594 (not (string-match "-flag$" (car fp))))
1595 (if (checkdoc-y-or-n-p 1595 (let ((newname
1596 (format 1596 (if (string-match "-p$" (car fp))
1597 "Rename to %s and Query-Replace all occurances? " 1597 (concat (substring (car fp) 0 -2) "-flag")
1598 (concat (car fp) "-flag"))) 1598 (concat (car fp) "-flag"))))
1599 (progn 1599 (if (checkdoc-y-or-n-p
1600 (beginning-of-defun) 1600 (format
1601 (query-replace-regexp 1601 "Rename to %s and Query-Replace all occurances? "
1602 (concat "\\<" (regexp-quote (car fp)) "\\>") 1602 newname))
1603 (concat (car fp) "-flag"))) 1603 (progn
1604 (checkdoc-create-error 1604 (beginning-of-defun)
1605 "Flag variable names should normally end in `-flag'" s 1605 (query-replace-regexp
1606 (marker-position e)))) 1606 (concat "\\<" (regexp-quote (car fp)) "\\>")
1607 newname))
1608 (checkdoc-create-error
1609 "Flag variable names should normally end in `-flag'" s
1610 (marker-position e)))))
1607 ;; Done with variables 1611 ;; Done with variables
1608 )) 1612 ))
1609 (t 1613 (t