aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-04-19 04:18:37 +0000
committerRichard M. Stallman2003-04-19 04:18:37 +0000
commit977f31f88300ab34f22d5d1d86a10d19d64b5054 (patch)
treeca93478f70b83d76f1d07fee49820f187a43ab61
parent70bb44026241fab1802c6f59127be4d1c16f91d1 (diff)
downloademacs-977f31f88300ab34f22d5d1d86a10d19d64b5054.tar.gz
emacs-977f31f88300ab34f22d5d1d86a10d19d64b5054.zip
(byte-compile-log-file, (byte-recompile-directory): Don't use
byte-goto-log-buffer. Instead, set default-directory and then call compilation-mode. (byte-compile-from-buffer): Force byte-compile-last-position to end of buffer before issuing final warnings.
-rw-r--r--lisp/emacs-lisp/bytecomp.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 3d1df929b5c..fcac1fedd09 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -10,7 +10,7 @@
10 10
11;;; This version incorporates changes up to version 2.10 of the 11;;; This version incorporates changes up to version 2.10 of the
12;;; Zawinski-Furuseth compiler. 12;;; Zawinski-Furuseth compiler.
13(defconst byte-compile-version "$Revision: 2.124 $") 13(defconst byte-compile-version "$Revision: 2.125 $")
14 14
15;; This file is part of GNU Emacs. 15;; This file is part of GNU Emacs.
16 16
@@ -949,7 +949,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property."
949 (and (not (equal byte-compile-current-file byte-compile-last-logged-file)) 949 (and (not (equal byte-compile-current-file byte-compile-last-logged-file))
950 (not noninteractive) 950 (not noninteractive)
951 (save-excursion 951 (save-excursion
952 (byte-goto-log-buffer) 952 (set-buffer (get-buffer-create "*Compile-Log*"))
953 (goto-char (point-max)) 953 (goto-char (point-max))
954 (let* ((dir (and byte-compile-current-file 954 (let* ((dir (and byte-compile-current-file
955 (file-name-directory byte-compile-current-file))) 955 (file-name-directory byte-compile-current-file)))
@@ -973,6 +973,9 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property."
973 (unless was-same 973 (unless was-same
974 (insert (format "Entering directory `%s'\n" default-directory)))) 974 (insert (format "Entering directory `%s'\n" default-directory))))
975 (setq byte-compile-last-logged-file byte-compile-current-file) 975 (setq byte-compile-last-logged-file byte-compile-current-file)
976 ;; Do this after setting default-directory.
977 (unless (eq major-mode 'compilation-mode)
978 (compilation-mode))
976 pt)))) 979 pt))))
977 980
978;; Log a message STRING in *Compile-Log*. 981;; Log a message STRING in *Compile-Log*.
@@ -1424,8 +1427,11 @@ recompile every `.el' file that already has a `.elc' file."
1424 (save-some-buffers) 1427 (save-some-buffers)
1425 (force-mode-line-update)) 1428 (force-mode-line-update))
1426 (save-current-buffer 1429 (save-current-buffer
1427 (byte-goto-log-buffer) 1430 (set-buffer (get-buffer-create "*Compile-Log*"))
1428 (setq default-directory (expand-file-name directory)) 1431 (setq default-directory (expand-file-name directory))
1432 ;; compilation-mode copies value of default-directory.
1433 (unless (eq major-mode 'compilation-mode)
1434 (compilation-mode))
1429 (let ((directories (list (expand-file-name directory))) 1435 (let ((directories (list (expand-file-name directory)))
1430 (default-directory default-directory) 1436 (default-directory default-directory)
1431 (skip-count 0) 1437 (skip-count 0)
@@ -1727,6 +1733,9 @@ With argument, insert value in current buffer after the form."
1727 (byte-compile-file-form form))) 1733 (byte-compile-file-form form)))
1728 ;; Compile pending forms at end of file. 1734 ;; Compile pending forms at end of file.
1729 (byte-compile-flush-pending) 1735 (byte-compile-flush-pending)
1736 ;; Make warnings about unresolved functions
1737 ;; give the end of the file as their position.
1738 (setq byte-compile-last-position (point-max))
1730 (byte-compile-warn-about-unresolved-functions) 1739 (byte-compile-warn-about-unresolved-functions)
1731 ;; Should we always do this? When calling multiple files, it 1740 ;; Should we always do this? When calling multiple files, it
1732 ;; would be useful to delay this warning until all have 1741 ;; would be useful to delay this warning until all have