diff options
| author | Alan Mackenzie <acm@muc.de> | 2007-07-24 08:18:12 +0000 |
|---|---|---|
| committer | Alan Mackenzie <acm@muc.de> | 2007-07-24 08:18:12 +0000 |
| commit | 2a4e664059548f23aed913d42d8c82431fd24266 (patch) | |
| tree | 5e754300c62a641dfbfcb1d9924bc1e1d980b925 /lisp/emacs-lisp/bytecomp.el | |
| parent | 0455184acba1e6de25c1b9566bf1f7143bb11abb (diff) | |
| download | emacs-2a4e664059548f23aed913d42d8c82431fd24266.tar.gz | |
(byte-compile-from-buffer): initialise byte-compile-unresolved-functions
before rather than after a compilation.
(byte-compile-unresolved-functions): Amplify doc string.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 8760f36775b..cdc93cf83d7 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -480,7 +480,8 @@ and we don't know the definition.") (defvar byte-compile-unresolved-functions nil "Alist of undefined functions to which calls have been compiled. -Used for warnings when the function is not known to be defined or is later +This variable is only significant whilst compiling an entire buffer. +Used for warnings when a function is not known to be defined or is later defined with incorrect args.") (defvar byte-compile-noruntime-functions nil @@ -1849,6 +1850,11 @@ With argument, insert value in current buffer after the form." (and filename (byte-compile-insert-header filename inbuffer outbuffer)) (with-current-buffer inbuffer (goto-char (point-min)) + ;; Should we always do this? When calling multiple files, it + ;; would be useful to delay this warning until all have been + ;; compiled. A: Yes! b-c-u-f might contain dross from a + ;; previous byte-compile. + (setq byte-compile-unresolved-functions nil) ;; Compile the forms from the input buffer. (while (progn @@ -1865,11 +1871,7 @@ With argument, insert value in current buffer after the form." ;; Make warnings about unresolved functions ;; give the end of the file as their position. (setq byte-compile-last-position (point-max)) - (byte-compile-warn-about-unresolved-functions) - ;; Should we always do this? When calling multiple files, it - ;; would be useful to delay this warning until all have - ;; been compiled. - (setq byte-compile-unresolved-functions nil)) + (byte-compile-warn-about-unresolved-functions)) ;; Fix up the header at the front of the output ;; if the buffer contains multibyte characters. (and filename (byte-compile-fix-header filename inbuffer outbuffer)))) |
