aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2000-03-26 19:52:27 +0000
committerStefan Monnier <[email protected]>2000-03-26 19:52:27 +0000
commitea4b0ca303f8ac30f87fd2ee905a6db53951c636 (patch)
tree13cf9d6d0553f2592ca102f7160f0307034e5d75 /lisp
parent3d4ff2dd8dc1d75ccabc1408b4628f702fa1ad7a (diff)
(byte-compile-eval): Fix and reenable the code.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/emacs-lisp/bytecomp.el31
2 files changed, 28 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7e441cd66e..b471f3918e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2000-03-26 Stefan Monnier <[email protected]>
+
+ * emacs-lisp/bytecomp.el (byte-compile-eval): Fix and reenable
+ the code.
+
2000-03-26 Dave Love <[email protected]>
* net/browse-url.el (browse-url): Re-fix case of
@@ -14,6 +19,10 @@
compatible with inf-lisp version.
(eval-defun-1): Fix custom-declare-variable case.
+2000-03-25 Stefan Monnier <[email protected]>
+
+ * cus-edit.el (hook): Use `dolist' instead of CL's `mapc'.
+
2000-03-24 Gerd Moellmann <[email protected]>
* Makefile (COMPILE_FIRST): New macro.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index b4ef87f0ab..0dab1048d0 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: 1.1 $")
+(defconst byte-compile-version "$Revision: 2.65 $")
;; This file is part of GNU Emacs.
@@ -762,25 +762,32 @@ otherwise pop it")
;;; compile-time evaluation
-(defun byte-compile-eval (x)
+(defun byte-compile-eval (form)
+ "Eval FORM and mark the functions defined therein.
+Each function's symbol gets marked with the `byte-compile-noruntime' property."
(let ((hist-orig load-history)
(hist-nil-orig current-load-list))
- (prog1 (eval x)
- (when (and nil (memq 'noruntime byte-compile-warnings))
+ (prog1 (eval form)
+ (when (memq 'noruntime byte-compile-warnings)
(let ((hist-new load-history)
(hist-nil-new current-load-list))
- (while (not (eq hist-new hist-orig))
- (dolist (s (pop hist-new))
- (cond
- ((symbolp s) (put s 'byte-compile-noruntime t))
- ((and (consp s) (eq 'autoload (car s)))
- (put (cdr s) 'byte-compile-noruntime t)))))
- (while (not (eq hist-nil-new hist-nil-orig))
+ ;; 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)))
+ ;; 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))
+ ((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)))))))))
-
;;; byte compiler messages