Mercurial > emacs
comparison lisp/emacs-lisp/bytecomp.el @ 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 | b5f8ef4e3358 |
children | af09d7729723 |
comparison
equal
deleted
inserted
replaced
94385:303153b94dbc | 94386:a674a09b0ac8 |
---|---|
1403 (unless byte-compile-cl-functions | 1403 (unless byte-compile-cl-functions |
1404 (dolist (elt load-history) | 1404 (dolist (elt load-history) |
1405 (when (and (stringp (car elt)) | 1405 (when (and (stringp (car elt)) |
1406 (string-match | 1406 (string-match |
1407 "^cl\\>" (file-name-nondirectory (car elt)))) | 1407 "^cl\\>" (file-name-nondirectory (car elt)))) |
1408 (setq byte-compile-cl-functions | 1408 (dolist (e (cdr elt)) |
1409 (append byte-compile-cl-functions | 1409 (when (memq (car-safe e) '(autoload defun)) |
1410 (cdr elt))))) | 1410 (push (cdr e) byte-compile-cl-functions))))))) |
1411 (let ((tail byte-compile-cl-functions)) | |
1412 (while tail | |
1413 (if (and (consp (car tail)) | |
1414 (eq (car (car tail)) 'autoload)) | |
1415 (setcar tail (cdr (car tail)))) | |
1416 (setq tail (cdr tail)))))) | |
1417 | 1411 |
1418 (defun byte-compile-cl-warn (form) | 1412 (defun byte-compile-cl-warn (form) |
1419 "Warn if FORM is a call of a function from the CL package." | 1413 "Warn if FORM is a call of a function from the CL package." |
1420 (let ((func (car-safe form))) | 1414 (let ((func (car-safe form))) |
1421 (if (and byte-compile-cl-functions | 1415 (if (and byte-compile-cl-functions |