# HG changeset patch # User Glenn Morris # Date 1251185296 0 # Node ID 2786934ea419bb05ece72cf51bb73450df60ddd6 # Parent dc1af63f6b737d96b8bab1be2a5f4d187f8cccbe (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. diff -r dc1af63f6b73 -r 2786934ea419 lisp/ChangeLog --- a/lisp/ChangeLog Tue Aug 25 07:05:47 2009 +0000 +++ b/lisp/ChangeLog Tue Aug 25 07:28:16 2009 +0000 @@ -4,6 +4,10 @@ 2009-08-25 Glenn Morris + * emacs-lisp/bytecomp.el (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. + * format.el (format-alist): Doc fix. * play/bubbles.el (top-level): Don't require cl at run-time. diff -r dc1af63f6b73 -r 2786934ea419 lisp/emacs-lisp/bytecomp.el --- a/lisp/emacs-lisp/bytecomp.el Tue Aug 25 07:05:47 2009 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Tue Aug 25 07:28:16 2009 +0000 @@ -902,8 +902,10 @@ (while (and hist-new (not (eq hist-new hist-orig))) (let ((xs (pop hist-new))) ;; Make sure the file was not already loaded before. - (when (and (equal (car xs) "cl") (not (assoc (car xs) hist-orig))) - (byte-compile-find-cl-functions))))))))) + (and (stringp (car xs)) + (string-match "^cl\\>" (file-name-nondirectory (car xs))) + (not (assoc (car xs) hist-orig)) + (byte-compile-find-cl-functions))))))))) (defun byte-compile-eval-before-compile (form) "Evaluate FORM for `eval-and-compile'." @@ -2322,8 +2324,10 @@ (let ((args (mapcar 'eval (cdr form)))) (apply 'require args) ;; Detect (require 'cl) in a way that works even if cl is already loaded. - (if (member (car args) '("cl" cl)) - (byte-compile-disable-warning 'cl-functions))) + (when (member (car args) '("cl" cl)) + (if (byte-compile-warning-enabled-p 'cl-functions) + (byte-compile-warn "cl package required at runtime")) + (byte-compile-disable-warning 'cl-functions))) (byte-compile-keep-pending form 'byte-compile-normal-call)) (put 'progn 'byte-hunk-handler 'byte-compile-file-form-progn)