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/bytecomp.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el,v
Date: Fri, 21 Sep 2007 07:13:29 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       07/09/21 07:13:29

Index: bytecomp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.210
retrieving revision 2.211
diff -u -b -r2.210 -r2.211
--- bytecomp.el 21 Sep 2007 04:24:18 -0000      2.210
+++ bytecomp.el 21 Sep 2007 07:13:28 -0000      2.211
@@ -103,6 +103,7 @@
 ;;                                                not good to call from Lisp)
 ;;                             `make-local' (dubious calls to
 ;;                                           `make-variable-buffer-local')
+;;                              `mapcar'     (mapcar called for effect)
 ;; byte-compile-compatibility  Whether the compiler should
 ;;                             generate .elc files which can be loaded into
 ;;                             generic emacs 18.
@@ -359,7 +360,8 @@
                  distinguished from macros and aliases).
   interactive-only
              commands that normally shouldn't be called from Lisp code.
-  make-local  calls to make-variable-buffer-local that may be incorrect."
+  make-local  calls to make-variable-buffer-local that may be incorrect.
+  mapcar      mapcar called for effect."
   :group 'bytecomp
   :type `(choice (const :tag "All" t)
                 (set :menu-tag "Some"
@@ -367,7 +369,7 @@
                      (const callargs) (const redefine)
                      (const obsolete) (const noruntime)
                      (const cl-functions) (const interactive-only)
-                     (const make-local))))
+                     (const make-local) (const mapcar))))
 (put 'byte-compile-warnings 'safe-local-variable 'byte-compile-warnings-safe-p)
 ;;;###autoload
 (defun byte-compile-warnings-safe-p (x)
@@ -378,7 +380,8 @@
                     (when (memq e '(free-vars unresolved
                                     callargs redefine
                                     obsolete noruntime
-                                    cl-functions interactive-only make-local))
+                                    cl-functions interactive-only
+                                    make-local mapcar))
                       e))
                   x)
                  x))))
@@ -2831,7 +2834,8 @@
 (defun byte-compile-normal-call (form)
   (if byte-compile-generate-call-tree
       (byte-compile-annotate-call-tree form))
-  (when (and for-effect (eq (car form) 'mapcar))
+  (when (and for-effect (eq (car form) 'mapcar)
+            (memq 'mapcar byte-compile-warnings))
     (byte-compile-set-symbol-position 'mapcar)
     (byte-compile-warn
      "`mapcar' called for effect; use `mapc' or `dolist' instead"))
@@ -4238,7 +4242,7 @@
       (assq 'byte-code (symbol-function 'byte-compile-form))
       (let ((byte-optimize nil)                ; do it fast
            (byte-compile-warnings nil))
-       (mapcar (lambda (x)
+       (mapc (lambda (x)
                  (or noninteractive (message "compiling %s..." x))
                  (byte-compile x)
                  (or noninteractive (message "compiling %s...done" x)))




reply via email to

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