emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/checkdoc.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/checkdoc.el,v
Date: Fri, 30 May 2008 14:51:49 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/05/30 14:51:48

Index: emacs-lisp/checkdoc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/checkdoc.el,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -b -r1.68 -r1.69
--- emacs-lisp/checkdoc.el      6 May 2008 03:21:11 -0000       1.68
+++ emacs-lisp/checkdoc.el      30 May 2008 14:51:48 -0000      1.69
@@ -1636,25 +1636,28 @@
                 (checkdoc-create-error
                  "Flag variable doc strings should usually start: Non-nil 
means"
                  s (marker-position e) t))
+             ;; Don't rename variable to "foo-flag".  This is unnecessary
+             ;; and such names often end up inconvenient when the variable
+             ;; is later expanded to non-boolean values. --Stef
             ;; If the doc string starts with "Non-nil means"
-            (if (and (looking-at "\"\\*?Non-nil\\s-+means\\s-+")
-                     (not (string-match "-flag$" (car fp))))
-                (let ((newname
-                       (if (string-match "-p$" (car fp))
-                           (concat (substring (car fp) 0 -2) "-flag")
-                         (concat (car fp) "-flag"))))
-                  (if (checkdoc-y-or-n-p
-                       (format
-                        "Rename to %s and Query-Replace all occurrences? "
-                        newname))
-                      (progn
-                        (beginning-of-defun)
-                        (query-replace-regexp
-                         (concat "\\<" (regexp-quote (car fp)) "\\>")
-                         newname))
-                    (checkdoc-create-error
-                     "Flag variable names should normally end in `-flag'" s
-                     (marker-position e)))))
+            ;; (if (and (looking-at "\"\\*?Non-nil\\s-+means\\s-+")
+            ;;          (not (string-match "-flag$" (car fp))))
+            ;;     (let ((newname
+            ;;         (if (string-match "-p$" (car fp))
+            ;;             (concat (substring (car fp) 0 -2) "-flag")
+            ;;           (concat (car fp) "-flag"))))
+            ;;       (if (checkdoc-y-or-n-p
+            ;;         (format
+            ;;          "Rename to %s and Query-Replace all occurrences? "
+            ;;          newname))
+            ;;           (progn
+            ;;          (beginning-of-defun)
+            ;;          (query-replace-regexp
+            ;;           (concat "\\<" (regexp-quote (car fp)) "\\>")
+            ;;           newname))
+            ;;         (checkdoc-create-error
+            ;;          "Flag variable names should normally end in `-flag'" s
+            ;;          (marker-position e)))))
             ;; Done with variables
             ))
           (t




reply via email to

[Prev in Thread] Current Thread [Next in Thread]