aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-12-07 21:33:19 +0000
committerRichard M. Stallman <[email protected]>2002-12-07 21:33:19 +0000
commitd1a57439f1866099c2b57074c20c5e97ef094a51 (patch)
treeec1ac1c4973a832193670dd7e9fbea258aa3176a
parent4a3c5b3af93caba2d1e1a945e6784436e4246cd3 (diff)
(byte-compile-eval): Handle (t . SYMBOL) elements in load-history.
(byte-compile-cl-warn): No cl warnings for cl-defsubst-expand and cl-struct-setf-expander.
-rw-r--r--lisp/emacs-lisp/bytecomp.el26
1 files changed, 19 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 561b85888e..20ff6fed8c 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -10,7 +10,7 @@
;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler.
-(defconst byte-compile-version "$Revision: 2.117 $")
+(defconst byte-compile-version "$Revision: 2.118 $")
;; This file is part of GNU Emacs.
@@ -782,19 +782,27 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property."
;; Go through load-history, look for newly loaded files
;; and mark all the functions defined therein.
(while (and hist-new (not (eq hist-new hist-orig)))
- (let ((xs (pop hist-new)))
+ (let ((xs (pop hist-new))
+ old-autoloads)
;; Make sure the file was not already loaded before.
(unless (assoc (car xs) hist-orig)
(dolist (s xs)
(cond
- ((symbolp s) (put s 'byte-compile-noruntime t))
+ ((symbolp s)
+ (unless (memq s old-autoloads)
+ (put s 'byte-compile-noruntime t)))
+ ((and (consp s) (eq t (car s)))
+ (push s old-autoloads))
((and (consp s) (eq 'autoload (car s)))
(put (cdr s) 'byte-compile-noruntime t)))))))
;; Go through current-load-list for the locally defined funs.
- (while (and hist-nil-new (not (eq hist-nil-new hist-nil-orig)))
- (let ((s (pop hist-nil-new)))
- (when (symbolp s)
- (put s 'byte-compile-noruntime t)))))))))
+ (let (old-autoloads)
+ (while (and hist-nil-new (not (eq hist-nil-new hist-nil-orig)))
+ (let ((s (pop hist-nil-new)))
+ (when (and (symbolp s) (not (memq s old-autoloads)))
+ (put s 'byte-compile-noruntime t))
+ (when (and (consp s) (eq t (car s)))
+ (push s old-autoloads))))))))))
(defun byte-compile-eval-before-compile (form)
"Evaluate FORM for `eval-and-compile'."
@@ -1245,6 +1253,10 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property."
'(cl-block-wrapper cl-block-throw
multiple-value-call nth-value
copy-seq first second rest endp cl-member
+ ;; These are included in generated code
+ ;; that can't be called except at compile time
+ ;; or unless cl is loaded anyway.
+ cl-defsubst-expand cl-struct-setf-expander
;; These would sometimes be warned about
;; but such warnings are never useful,
;; so don't warn about them.