changeset 94386:a674a09b0ac8

Johan Bockg? <bojohan at gnu.org> (byte-compile-find-cl-functions): Simplify. Collect `defun' and `autoload' entries. Avoid modifying load-history.
author Glenn Morris <rgm@gnu.org>
date Sun, 27 Apr 2008 01:16:49 +0000
parents 303153b94dbc
children 5d266b6d0d3d
files lisp/emacs-lisp/bytecomp.el
diffstat 1 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/bytecomp.el	Sat Apr 26 21:37:57 2008 +0000
+++ b/lisp/emacs-lisp/bytecomp.el	Sun Apr 27 01:16:49 2008 +0000
@@ -1405,15 +1405,9 @@
       (when (and (stringp (car elt))
 		 (string-match
 		  "^cl\\>" (file-name-nondirectory (car elt))))
-	(setq byte-compile-cl-functions
-	      (append byte-compile-cl-functions
-		      (cdr elt)))))
-    (let ((tail byte-compile-cl-functions))
-      (while tail
-	(if (and (consp (car tail))
-		 (eq (car (car tail)) 'autoload))
-	    (setcar tail (cdr (car tail))))
-	(setq tail (cdr tail))))))
+	(dolist (e (cdr elt))
+          (when (memq (car-safe e) '(autoload defun))
+            (push (cdr e) byte-compile-cl-functions)))))))
 
 (defun byte-compile-cl-warn (form)
   "Warn if FORM is a call of a function from the CL package."