aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-08-25 07:28:16 +0000
committerGlenn Morris2009-08-25 07:28:16 +0000
commitbac9c66cc78624f5cd7868258308e0ae5a916650 (patch)
tree42a665f7ac50d1b512a8b170683907c219e079a9
parent0d722f983c873435de5b6d920f4d7db39db8b9ba (diff)
downloademacs-bac9c66cc78624f5cd7868258308e0ae5a916650.tar.gz
emacs-bac9c66cc78624f5cd7868258308e0ae5a916650.zip
(byte-compile-eval): Fix test for cl in load-history for absolute file-names.
(byte-compile-file-form-require): Warn about use of the cl package.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
2 files changed, 12 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 998daf37a45..e7eba8aeac1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -4,6 +4,10 @@
4 4
52009-08-25 Glenn Morris <rgm@gnu.org> 52009-08-25 Glenn Morris <rgm@gnu.org>
6 6
7 * emacs-lisp/bytecomp.el (byte-compile-eval): Fix test for cl in
8 load-history for absolute file-names.
9 (byte-compile-file-form-require): Warn about use of the cl package.
10
7 * format.el (format-alist): Doc fix. 11 * format.el (format-alist): Doc fix.
8 12
9 * play/bubbles.el (top-level): Don't require cl at run-time. 13 * play/bubbles.el (top-level): Don't require cl at run-time.
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 4ab701bf55c..70557d5e247 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -902,8 +902,10 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
902 (while (and hist-new (not (eq hist-new hist-orig))) 902 (while (and hist-new (not (eq hist-new hist-orig)))
903 (let ((xs (pop hist-new))) 903 (let ((xs (pop hist-new)))
904 ;; Make sure the file was not already loaded before. 904 ;; Make sure the file was not already loaded before.
905 (when (and (equal (car xs) "cl") (not (assoc (car xs) hist-orig))) 905 (and (stringp (car xs))
906 (byte-compile-find-cl-functions))))))))) 906 (string-match "^cl\\>" (file-name-nondirectory (car xs)))
907 (not (assoc (car xs) hist-orig))
908 (byte-compile-find-cl-functions)))))))))
907 909
908(defun byte-compile-eval-before-compile (form) 910(defun byte-compile-eval-before-compile (form)
909 "Evaluate FORM for `eval-and-compile'." 911 "Evaluate FORM for `eval-and-compile'."
@@ -2322,8 +2324,10 @@ list that represents a doc string reference.
2322 (let ((args (mapcar 'eval (cdr form)))) 2324 (let ((args (mapcar 'eval (cdr form))))
2323 (apply 'require args) 2325 (apply 'require args)
2324 ;; Detect (require 'cl) in a way that works even if cl is already loaded. 2326 ;; Detect (require 'cl) in a way that works even if cl is already loaded.
2325 (if (member (car args) '("cl" cl)) 2327 (when (member (car args) '("cl" cl))
2326 (byte-compile-disable-warning 'cl-functions))) 2328 (if (byte-compile-warning-enabled-p 'cl-functions)
2329 (byte-compile-warn "cl package required at runtime"))
2330 (byte-compile-disable-warning 'cl-functions)))
2327 (byte-compile-keep-pending form 'byte-compile-normal-call)) 2331 (byte-compile-keep-pending form 'byte-compile-normal-call))
2328 2332
2329(put 'progn 'byte-hunk-handler 'byte-compile-file-form-progn) 2333(put 'progn 'byte-hunk-handler 'byte-compile-file-form-progn)