Commit 977f31f8 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(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.
parent 70bb4402
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
;;; This version incorporates changes up to version 2.10 of the ;;; This version incorporates changes up to version 2.10 of the
;;; Zawinski-Furuseth compiler. ;;; Zawinski-Furuseth compiler.
(defconst byte-compile-version "$Revision: 2.124 $") (defconst byte-compile-version "$Revision: 2.125 $")
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
...@@ -949,7 +949,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." ...@@ -949,7 +949,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property."
(and (not (equal byte-compile-current-file byte-compile-last-logged-file)) (and (not (equal byte-compile-current-file byte-compile-last-logged-file))
(not noninteractive) (not noninteractive)
(save-excursion (save-excursion
(byte-goto-log-buffer) (set-buffer (get-buffer-create "*Compile-Log*"))
(goto-char (point-max)) (goto-char (point-max))
(let* ((dir (and byte-compile-current-file (let* ((dir (and byte-compile-current-file
(file-name-directory byte-compile-current-file))) (file-name-directory byte-compile-current-file)))
...@@ -973,6 +973,9 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." ...@@ -973,6 +973,9 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property."
(unless was-same (unless was-same
(insert (format "Entering directory `%s'\n" default-directory)))) (insert (format "Entering directory `%s'\n" default-directory))))
(setq byte-compile-last-logged-file byte-compile-current-file) (setq byte-compile-last-logged-file byte-compile-current-file)
;; Do this after setting default-directory.
(unless (eq major-mode 'compilation-mode)
(compilation-mode))
pt)))) pt))))
;; Log a message STRING in *Compile-Log*. ;; Log a message STRING in *Compile-Log*.
...@@ -1424,8 +1427,11 @@ recompile every `.el' file that already has a `.elc' file." ...@@ -1424,8 +1427,11 @@ recompile every `.el' file that already has a `.elc' file."
(save-some-buffers) (save-some-buffers)
(force-mode-line-update)) (force-mode-line-update))
(save-current-buffer (save-current-buffer
(byte-goto-log-buffer) (set-buffer (get-buffer-create "*Compile-Log*"))
(setq default-directory (expand-file-name directory)) (setq default-directory (expand-file-name directory))
;; compilation-mode copies value of default-directory.
(unless (eq major-mode 'compilation-mode)
(compilation-mode))
(let ((directories (list (expand-file-name directory))) (let ((directories (list (expand-file-name directory)))
(default-directory default-directory) (default-directory default-directory)
(skip-count 0) (skip-count 0)
...@@ -1727,6 +1733,9 @@ With argument, insert value in current buffer after the form." ...@@ -1727,6 +1733,9 @@ With argument, insert value in current buffer after the form."
(byte-compile-file-form form))) (byte-compile-file-form form)))
;; Compile pending forms at end of file. ;; Compile pending forms at end of file.
(byte-compile-flush-pending) (byte-compile-flush-pending)
;; 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) (byte-compile-warn-about-unresolved-functions)
;; Should we always do this? When calling multiple files, it ;; Should we always do this? When calling multiple files, it
;; would be useful to delay this warning until all have ;; would be useful to delay this warning until all have
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment