emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog emacs-lisp/bytecomp.el


From: Glenn Morris
Subject: [Emacs-diffs] emacs/lisp ChangeLog emacs-lisp/bytecomp.el
Date: Tue, 03 Nov 2009 03:16:27 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       09/11/03 03:16:26

Modified files:
        lisp           : ChangeLog 
        lisp/emacs-lisp: bytecomp.el 

Log message:
        (byte-compile-file-form-defvar)
        (byte-compile-file-form-define-abbrev-table)
        (byte-compile-file-form-custom-declare-variable)
        (byte-compile-variable-ref, byte-compile-defvar):
        Whether or not a warning is enabled should only affect whether we issue
        the warning, not whether or not we collect the relevant data.
        Eg warnings can be turned on and off throughout the course of a file.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16546&r2=1.16547
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emacs-lisp/bytecomp.el?cvsroot=emacs&r1=2.267&r2=2.268

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16546
retrieving revision 1.16547
diff -u -b -r1.16546 -r1.16547
--- ChangeLog   3 Nov 2009 03:14:47 -0000       1.16546
+++ ChangeLog   3 Nov 2009 03:16:23 -0000       1.16547
@@ -1,5 +1,13 @@
 2009-11-03  Glenn Morris  <address@hidden>
 
+       * emacs-lisp/bytecomp.el (byte-compile-file-form-defvar)
+       (byte-compile-file-form-define-abbrev-table)
+       (byte-compile-file-form-custom-declare-variable)
+       (byte-compile-variable-ref, byte-compile-defvar):
+       Whether or not a warning is enabled should only affect whether we issue
+       the warning, not whether or not we collect the relevant data.
+       Eg warnings can be turned on and off throughout the course of a file.
+
        * eshell/esh-mode.el (ansi-color-apply-on-region): Autoload it...
        (eshell-handle-ansi-color): ... Rather than requiring ansi-color.
 

Index: emacs-lisp/bytecomp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.267
retrieving revision 2.268
diff -u -b -r2.267 -r2.268
--- emacs-lisp/bytecomp.el      31 Oct 2009 02:10:46 -0000      2.267
+++ emacs-lisp/bytecomp.el      3 Nov 2009 03:16:26 -0000       2.268
@@ -2313,10 +2313,9 @@
       ;; Since there is no doc string, we can compile this as a normal form,
       ;; and not do a file-boundary.
       (byte-compile-keep-pending form)
-    (when (byte-compile-warning-enabled-p 'free-vars)
       (push (nth 1 form) byte-compile-bound-variables)
       (if (eq (car form) 'defconst)
-         (push (nth 1 form) byte-compile-const-variables)))
+       (push (nth 1 form) byte-compile-const-variables))
     (cond ((consp (nth 2 form))
           (setq form (copy-sequence form))
           (setcar (cdr (cdr form))
@@ -2325,8 +2324,7 @@
 
 (put 'define-abbrev-table 'byte-hunk-handler 
'byte-compile-file-form-define-abbrev-table)
 (defun byte-compile-file-form-define-abbrev-table (form)
-  (when (and (byte-compile-warning-enabled-p 'free-vars)
-             (eq 'quote (car-safe (car-safe (cdr form)))))
+  (if (eq 'quote (car-safe (car-safe (cdr form))))
     (push (car-safe (cdr (cadr form))) byte-compile-bound-variables))
   (byte-compile-keep-pending form))
 
@@ -2335,8 +2333,7 @@
 (defun byte-compile-file-form-custom-declare-variable (form)
   (when (byte-compile-warning-enabled-p 'callargs)
     (byte-compile-nogroup-warn form))
-  (when (byte-compile-warning-enabled-p 'free-vars)
-    (push (nth 1 (nth 1 form)) byte-compile-bound-variables))
+  (push (nth 1 (nth 1 form)) byte-compile-bound-variables)
   ;; Don't compile the expression because it may be displayed to the user.
   ;; (when (eq (car-safe (nth 2 form)) 'quote)
   ;;   ;; (nth 2 form) is meant to evaluate to an expression, so if we have the
@@ -3025,10 +3022,10 @@
     (and (get bytecomp-var 'byte-obsolete-variable)
         (not (memq bytecomp-var byte-compile-not-obsolete-vars))
         (byte-compile-warn-obsolete bytecomp-var))
-    (if (byte-compile-warning-enabled-p 'free-vars)
        (if (eq base-op 'byte-varbind)
            (push bytecomp-var byte-compile-bound-variables)
-         (or (boundp bytecomp-var)
+      (or (not (byte-compile-warning-enabled-p 'free-vars))
+         (boundp bytecomp-var)
              (memq bytecomp-var byte-compile-bound-variables)
              (if (eq base-op 'byte-varset)
                  (or (memq bytecomp-var byte-compile-free-assignments)
@@ -3040,7 +3037,7 @@
                    (progn
                      (byte-compile-warn "reference to free variable `%s'"
                                         bytecomp-var)
-                     (push bytecomp-var byte-compile-free-references))))))))
+                 (push bytecomp-var byte-compile-free-references)))))))
   (let ((tmp (assq bytecomp-var byte-compile-variables)))
     (unless tmp
       (setq tmp (list bytecomp-var))
@@ -4015,10 +4012,9 @@
         (if (= 1 ncall) "" "s")
         (if (< ncall 2) "requires" "accepts only")
         "2-3")))
-    (when (byte-compile-warning-enabled-p 'free-vars)
       (push var byte-compile-bound-variables)
       (if (eq fun 'defconst)
-         (push var byte-compile-const-variables)))
+       (push var byte-compile-const-variables))
     (byte-compile-body-do-effect
      (list
       ;; Put the defined variable in this library's load-history entry




reply via email to

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