diff options
| author | Stefan Monnier | 2000-03-26 19:52:27 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-03-26 19:52:27 +0000 |
| commit | ea4b0ca303f8ac30f87fd2ee905a6db53951c636 (patch) | |
| tree | 13cf9d6d0553f2592ca102f7160f0307034e5d75 | |
| parent | 3d4ff2dd8dc1d75ccabc1408b4628f702fa1ad7a (diff) | |
| download | emacs-ea4b0ca303f8ac30f87fd2ee905a6db53951c636.tar.gz emacs-ea4b0ca303f8ac30f87fd2ee905a6db53951c636.zip | |
(byte-compile-eval): Fix and reenable the code.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 31 |
2 files changed, 28 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7e441cd66e3..b471f3918e7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-03-26 Stefan Monnier <monnier@cs.yale.edu> | ||
| 2 | |||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-eval): Fix and reenable | ||
| 4 | the code. | ||
| 5 | |||
| 1 | 2000-03-26 Dave Love <fx@gnu.org> | 6 | 2000-03-26 Dave Love <fx@gnu.org> |
| 2 | 7 | ||
| 3 | * net/browse-url.el (browse-url): Re-fix case of | 8 | * net/browse-url.el (browse-url): Re-fix case of |
| @@ -14,6 +19,10 @@ | |||
| 14 | compatible with inf-lisp version. | 19 | compatible with inf-lisp version. |
| 15 | (eval-defun-1): Fix custom-declare-variable case. | 20 | (eval-defun-1): Fix custom-declare-variable case. |
| 16 | 21 | ||
| 22 | 2000-03-25 Stefan Monnier <monnier@cs.yale.edu> | ||
| 23 | |||
| 24 | * cus-edit.el (hook): Use `dolist' instead of CL's `mapc'. | ||
| 25 | |||
| 17 | 2000-03-24 Gerd Moellmann <gerd@gnu.org> | 26 | 2000-03-24 Gerd Moellmann <gerd@gnu.org> |
| 18 | 27 | ||
| 19 | * Makefile (COMPILE_FIRST): New macro. | 28 | * Makefile (COMPILE_FIRST): New macro. |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index b4ef87f0ab2..0dab1048d0f 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | ;;; This version incorporates changes up to version 2.10 of the | 11 | ;;; This version incorporates changes up to version 2.10 of the |
| 12 | ;;; Zawinski-Furuseth compiler. | 12 | ;;; Zawinski-Furuseth compiler. |
| 13 | (defconst byte-compile-version "$Revision: 1.1 $") | 13 | (defconst byte-compile-version "$Revision: 2.65 $") |
| 14 | 14 | ||
| 15 | ;; This file is part of GNU Emacs. | 15 | ;; This file is part of GNU Emacs. |
| 16 | 16 | ||
| @@ -762,25 +762,32 @@ otherwise pop it") | |||
| 762 | 762 | ||
| 763 | ;;; compile-time evaluation | 763 | ;;; compile-time evaluation |
| 764 | 764 | ||
| 765 | (defun byte-compile-eval (x) | 765 | (defun byte-compile-eval (form) |
| 766 | "Eval FORM and mark the functions defined therein. | ||
| 767 | Each function's symbol gets marked with the `byte-compile-noruntime' property." | ||
| 766 | (let ((hist-orig load-history) | 768 | (let ((hist-orig load-history) |
| 767 | (hist-nil-orig current-load-list)) | 769 | (hist-nil-orig current-load-list)) |
| 768 | (prog1 (eval x) | 770 | (prog1 (eval form) |
| 769 | (when (and nil (memq 'noruntime byte-compile-warnings)) | 771 | (when (memq 'noruntime byte-compile-warnings) |
| 770 | (let ((hist-new load-history) | 772 | (let ((hist-new load-history) |
| 771 | (hist-nil-new current-load-list)) | 773 | (hist-nil-new current-load-list)) |
| 772 | (while (not (eq hist-new hist-orig)) | 774 | ;; Go through load-history, look for newly loaded files |
| 773 | (dolist (s (pop hist-new)) | 775 | ;; and mark all the functions defined therein. |
| 774 | (cond | 776 | (while (and hist-new (not (eq hist-new hist-orig))) |
| 775 | ((symbolp s) (put s 'byte-compile-noruntime t)) | 777 | (let ((xs (pop hist-new))) |
| 776 | ((and (consp s) (eq 'autoload (car s))) | 778 | ;; Make sure the file was not already loaded before. |
| 777 | (put (cdr s) 'byte-compile-noruntime t))))) | 779 | (unless (assoc (car xs) hist-orig) |
| 778 | (while (not (eq hist-nil-new hist-nil-orig)) | 780 | (dolist (s xs) |
| 781 | (cond | ||
| 782 | ((symbolp s) (put s 'byte-compile-noruntime t)) | ||
| 783 | ((and (consp s) (eq 'autoload (car s))) | ||
| 784 | (put (cdr s) 'byte-compile-noruntime t))))))) | ||
| 785 | ;; Go through current-load-list for the locally defined funs. | ||
| 786 | (while (and hist-nil-new (not (eq hist-nil-new hist-nil-orig))) | ||
| 779 | (let ((s (pop hist-nil-new))) | 787 | (let ((s (pop hist-nil-new))) |
| 780 | (when (symbolp s) | 788 | (when (symbolp s) |
| 781 | (put s 'byte-compile-noruntime t))))))))) | 789 | (put s 'byte-compile-noruntime t))))))))) |
| 782 | 790 | ||
| 783 | |||
| 784 | 791 | ||
| 785 | ;;; byte compiler messages | 792 | ;;; byte compiler messages |
| 786 | 793 | ||