diff options
| author | Alan Mackenzie | 2007-07-24 07:12:18 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2007-07-24 07:12:18 +0000 |
| commit | 65e1b2a10541694b8f6f4f9f378a45c8b9184ef2 (patch) | |
| tree | dd5a4f10c667925b0c91aab4afe17240a3983060 | |
| parent | 662d2954663a6d550b8633b23cc4670ea984b493 (diff) | |
| download | emacs-65e1b2a10541694b8f6f4f9f378a45c8b9184ef2.tar.gz emacs-65e1b2a10541694b8f6f4f9f378a45c8b9184ef2.zip | |
(byte-compile-from-buffer): initialise byte-compile-unresolved-functions before
rather than after a compilation.
(byte-compile-unresolved-functions): Amplify doc string.
| -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 f1761c125ac..37a9098c03d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -476,7 +476,8 @@ and we don't know the definition.") | |||
| 476 | 476 | ||
| 477 | (defvar byte-compile-unresolved-functions nil | 477 | (defvar byte-compile-unresolved-functions nil |
| 478 | "Alist of undefined functions to which calls have been compiled. | 478 | "Alist of undefined functions to which calls have been compiled. |
| 479 | Used for warnings when the function is not known to be defined or is later | 479 | This variable is only significant whilst compiling an entire buffer. |
| 480 | Used for warnings when a function is not known to be defined or is later | ||
| 480 | defined with incorrect args.") | 481 | defined with incorrect args.") |
| 481 | 482 | ||
| 482 | (defvar byte-compile-noruntime-functions nil | 483 | (defvar byte-compile-noruntime-functions nil |
| @@ -1848,6 +1849,11 @@ With argument, insert value in current buffer after the form." | |||
| 1848 | (save-excursion | 1849 | (save-excursion |
| 1849 | (set-buffer inbuffer) | 1850 | (set-buffer inbuffer) |
| 1850 | (goto-char 1) | 1851 | (goto-char 1) |
| 1852 | ;; Should we always do this? When calling multiple files, it | ||
| 1853 | ;; would be useful to delay this warning until all have been | ||
| 1854 | ;; compiled. A: Yes! b-c-u-f might contain dross from a | ||
| 1855 | ;; previous byte-compile. | ||
| 1856 | (setq byte-compile-unresolved-functions nil) | ||
| 1851 | 1857 | ||
| 1852 | ;; Compile the forms from the input buffer. | 1858 | ;; Compile the forms from the input buffer. |
| 1853 | (while (progn | 1859 | (while (progn |
| @@ -1864,11 +1870,7 @@ With argument, insert value in current buffer after the form." | |||
| 1864 | ;; Make warnings about unresolved functions | 1870 | ;; Make warnings about unresolved functions |
| 1865 | ;; give the end of the file as their position. | 1871 | ;; give the end of the file as their position. |
| 1866 | (setq byte-compile-last-position (point-max)) | 1872 | (setq byte-compile-last-position (point-max)) |
| 1867 | (byte-compile-warn-about-unresolved-functions) | 1873 | (byte-compile-warn-about-unresolved-functions)) |
| 1868 | ;; Should we always do this? When calling multiple files, it | ||
| 1869 | ;; would be useful to delay this warning until all have | ||
| 1870 | ;; been compiled. | ||
| 1871 | (setq byte-compile-unresolved-functions nil)) | ||
| 1872 | ;; Fix up the header at the front of the output | 1874 | ;; Fix up the header at the front of the output |
| 1873 | ;; if the buffer contains multibyte characters. | 1875 | ;; if the buffer contains multibyte characters. |
| 1874 | (and filename (byte-compile-fix-header filename inbuffer outbuffer)))) | 1876 | (and filename (byte-compile-fix-header filename inbuffer outbuffer)))) |