diff options
| author | Sam Steingold | 2001-10-18 21:05:16 +0000 |
|---|---|---|
| committer | Sam Steingold | 2001-10-18 21:05:16 +0000 |
| commit | 1f006824282e3cac491dcf9d91d236a786ffc6ad (patch) | |
| tree | 019a2b915426956b59c65e93c7aecd76a6d8f1f1 | |
| parent | d2f11dda2a402698c823cca897ba3edb06f29643 (diff) | |
| download | emacs-1f006824282e3cac491dcf9d91d236a786ffc6ad.tar.gz emacs-1f006824282e3cac491dcf9d91d236a786ffc6ad.zip | |
Put the *Compile-Log* buffer in `compilation-mode'.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 38 |
2 files changed, 27 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 96fb9b32fab..6f28d910d77 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2001-10-18 Sam Steingold <sds@gnu.org> | ||
| 2 | |||
| 3 | Put the *Compile-Log* buffer in `compilation-mode'. | ||
| 4 | * emacs-lisp/bytecomp.el (byte-goto-log-buffer): New function. | ||
| 5 | (byte-compile-log-1, byte-compile-log-file) | ||
| 6 | (displaying-byte-compile-warnings): use it | ||
| 7 | |||
| 1 | 2001-10-18 Stefan Monnier <monnier@cs.yale.edu> | 8 | 2001-10-18 Stefan Monnier <monnier@cs.yale.edu> |
| 2 | 9 | ||
| 3 | * mail/smtpmail.el (smtpmail-via-smtp): Use mail-envelope-from if set. | 10 | * mail/smtpmail.el (smtpmail-via-smtp): Use mail-envelope-from if set. |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 6e3b5b923b4..a0144d5a74e 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.89 $") | 13 | (defconst byte-compile-version "$Revision: 2.90 $") |
| 14 | 14 | ||
| 15 | ;; This file is part of GNU Emacs. | 15 | ;; This file is part of GNU Emacs. |
| 16 | 16 | ||
| @@ -178,11 +178,11 @@ | |||
| 178 | ;; (progn | 178 | ;; (progn |
| 179 | ;; ;; emacs-18 compatibility. | 179 | ;; ;; emacs-18 compatibility. |
| 180 | ;; (defvar baud-rate (baud-rate)) ;Define baud-rate if it's undefined | 180 | ;; (defvar baud-rate (baud-rate)) ;Define baud-rate if it's undefined |
| 181 | ;; | 181 | ;; |
| 182 | ;; (if (byte-compile-single-version) | 182 | ;; (if (byte-compile-single-version) |
| 183 | ;; (defmacro byte-code-function-p (x) "Emacs 18 doesn't have these." nil) | 183 | ;; (defmacro byte-code-function-p (x) "Emacs 18 doesn't have these." nil) |
| 184 | ;; (defun byte-code-function-p (x) "Emacs 18 doesn't have these." nil)) | 184 | ;; (defun byte-code-function-p (x) "Emacs 18 doesn't have these." nil)) |
| 185 | ;; | 185 | ;; |
| 186 | ;; (or (and (fboundp 'member) | 186 | ;; (or (and (fboundp 'member) |
| 187 | ;; ;; avoid using someone else's possibly bogus definition of this. | 187 | ;; ;; avoid using someone else's possibly bogus definition of this. |
| 188 | ;; (subrp (symbol-function 'member))) | 188 | ;; (subrp (symbol-function 'member))) |
| @@ -826,6 +826,10 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." | |||
| 826 | (not (eq byte-compile-current-form | 826 | (not (eq byte-compile-current-form |
| 827 | byte-compile-last-warned-form)))))) | 827 | byte-compile-last-warned-form)))))) |
| 828 | 828 | ||
| 829 | (defun byte-goto-log-buffer () | ||
| 830 | (set-buffer (get-buffer-create "*Compile-Log*")) | ||
| 831 | (unless (eq major-mode 'compilation-mode) | ||
| 832 | (compilation-mode))) | ||
| 829 | 833 | ||
| 830 | ;; Log a message STRING in *Compile-Log*. | 834 | ;; Log a message STRING in *Compile-Log*. |
| 831 | ;; Also log the current function and file if not already done. | 835 | ;; Also log the current function and file if not already done. |
| @@ -833,10 +837,10 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." | |||
| 833 | (let* ((file (cond ((stringp byte-compile-current-file) | 837 | (let* ((file (cond ((stringp byte-compile-current-file) |
| 834 | (format "%s:" byte-compile-current-file)) | 838 | (format "%s:" byte-compile-current-file)) |
| 835 | ((bufferp byte-compile-current-file) | 839 | ((bufferp byte-compile-current-file) |
| 836 | (format "Buffer %s:" | 840 | (format "Buffer %s:" |
| 837 | (buffer-name byte-compile-current-file))) | 841 | (buffer-name byte-compile-current-file))) |
| 838 | (t ""))) | 842 | (t ""))) |
| 839 | (pos (if (and byte-compile-current-file | 843 | (pos (if (and byte-compile-current-file |
| 840 | (integerp byte-compile-last-line)) | 844 | (integerp byte-compile-last-line)) |
| 841 | (format "%d:" byte-compile-last-line) | 845 | (format "%d:" byte-compile-last-line) |
| 842 | "")) | 846 | "")) |
| @@ -847,7 +851,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." | |||
| 847 | (message "%s%s %s" file pos string)) | 851 | (message "%s%s %s" file pos string)) |
| 848 | (t | 852 | (t |
| 849 | (save-excursion | 853 | (save-excursion |
| 850 | (set-buffer (get-buffer-create "*Compile-Log*")) | 854 | (byte-goto-log-buffer) |
| 851 | (goto-char (point-max)) | 855 | (goto-char (point-max)) |
| 852 | (when (byte-compile-display-log-head-p) | 856 | (when (byte-compile-display-log-head-p) |
| 853 | (insert (format "\nIn %s" form))) | 857 | (insert (format "\nIn %s" form))) |
| @@ -865,7 +869,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." | |||
| 865 | (not (equal byte-compile-current-file byte-compile-last-logged-file)) | 869 | (not (equal byte-compile-current-file byte-compile-last-logged-file)) |
| 866 | (not noninteractive) | 870 | (not noninteractive) |
| 867 | (save-excursion | 871 | (save-excursion |
| 868 | (set-buffer (get-buffer-create "*Compile-Log*")) | 872 | (byte-goto-log-buffer) |
| 869 | (goto-char (point-max)) | 873 | (goto-char (point-max)) |
| 870 | (insert "\n\^L\nCompiling " | 874 | (insert "\n\^L\nCompiling " |
| 871 | (if (stringp byte-compile-current-file) | 875 | (if (stringp byte-compile-current-file) |
| @@ -1110,7 +1114,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." | |||
| 1110 | (byte-compile-arglist-signature-string sig) | 1114 | (byte-compile-arglist-signature-string sig) |
| 1111 | (if (equal sig '(1 . 1)) " arg" " args") | 1115 | (if (equal sig '(1 . 1)) " arg" " args") |
| 1112 | (byte-compile-arglist-signature-string (cons min max)))) | 1116 | (byte-compile-arglist-signature-string (cons min max)))) |
| 1113 | 1117 | ||
| 1114 | (setq byte-compile-unresolved-functions | 1118 | (setq byte-compile-unresolved-functions |
| 1115 | (delq calls byte-compile-unresolved-functions))))) | 1119 | (delq calls byte-compile-unresolved-functions))))) |
| 1116 | ))) | 1120 | ))) |
| @@ -1129,14 +1133,14 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." | |||
| 1129 | L (+ (length s) 4)))) | 1133 | L (+ (length s) 4)))) |
| 1130 | (byte-compile-warn "%s" str))) | 1134 | (byte-compile-warn "%s" str))) |
| 1131 | ((cdr syms) | 1135 | ((cdr syms) |
| 1132 | (byte-compile-warn "%s %s" | 1136 | (byte-compile-warn "%s %s" |
| 1133 | strn | 1137 | strn |
| 1134 | (mapconcat #'symbol-name syms ", "))) | 1138 | (mapconcat #'symbol-name syms ", "))) |
| 1135 | 1139 | ||
| 1136 | (syms | 1140 | (syms |
| 1137 | (byte-compile-warn str1 (car syms))))) | 1141 | (byte-compile-warn str1 (car syms))))) |
| 1138 | 1142 | ||
| 1139 | ;; If we have compiled any calls to functions which are not known to be | 1143 | ;; If we have compiled any calls to functions which are not known to be |
| 1140 | ;; defined, issue a warning enumerating them. | 1144 | ;; defined, issue a warning enumerating them. |
| 1141 | ;; `unresolved' in the list `byte-compile-warnings' disables this. | 1145 | ;; `unresolved' in the list `byte-compile-warnings' disables this. |
| 1142 | (defun byte-compile-warn-about-unresolved-functions () | 1146 | (defun byte-compile-warn-about-unresolved-functions () |
| @@ -1214,17 +1218,15 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." | |||
| 1214 | ;; before the end of BODY. | 1218 | ;; before the end of BODY. |
| 1215 | (unless byte-compile-warnings-point-max | 1219 | (unless byte-compile-warnings-point-max |
| 1216 | (save-excursion | 1220 | (save-excursion |
| 1217 | (set-buffer (get-buffer-create "*Compile-Log*")) | 1221 | (byte-goto-log-buffer) |
| 1218 | (setq byte-compile-warnings-point-max (point-max)))) | 1222 | (setq byte-compile-warnings-point-max (point-max)))) |
| 1219 | (unwind-protect | 1223 | (unwind-protect |
| 1220 | (condition-case error-info | 1224 | (condition-case error-info |
| 1221 | (progn ,@body) | 1225 | (progn ,@body) |
| 1222 | (error (byte-compile-report-error error-info))) | 1226 | (error (byte-compile-report-error error-info))) |
| 1223 | (save-excursion | 1227 | (with-current-buffer "*Compile-Log*" |
| 1224 | ;; If there were compilation warnings, display them. | 1228 | ;; If there were compilation warnings, display them. |
| 1225 | (set-buffer "*Compile-Log*") | 1229 | (unless (= byte-compile-warnings-point-max (point-max)) |
| 1226 | (if (= byte-compile-warnings-point-max (point-max)) | ||
| 1227 | nil | ||
| 1228 | (select-window | 1230 | (select-window |
| 1229 | (prog1 (selected-window) | 1231 | (prog1 (selected-window) |
| 1230 | (select-window (display-buffer (current-buffer))) | 1232 | (select-window (display-buffer (current-buffer))) |
| @@ -2138,7 +2140,7 @@ If FORM is a lambda or a macro, byte-compile it as a function." | |||
| 2138 | (let (vars) | 2140 | (let (vars) |
| 2139 | (while list | 2141 | (while list |
| 2140 | (let ((arg (car list))) | 2142 | (let ((arg (car list))) |
| 2141 | (cond ((or (not (symbolp arg)) | 2143 | (cond ((or (not (symbolp arg)) |
| 2142 | (keywordp arg) | 2144 | (keywordp arg) |
| 2143 | (memq arg '(t nil))) | 2145 | (memq arg '(t nil))) |
| 2144 | (error "Invalid lambda variable %s" arg)) | 2146 | (error "Invalid lambda variable %s" arg)) |
| @@ -2152,7 +2154,7 @@ If FORM is a lambda or a macro, byte-compile it as a function." | |||
| 2152 | (error "Variable name missing after &optional"))) | 2154 | (error "Variable name missing after &optional"))) |
| 2153 | ((memq arg vars) | 2155 | ((memq arg vars) |
| 2154 | (byte-compile-warn "repeated variable %s in lambda-list" arg)) | 2156 | (byte-compile-warn "repeated variable %s in lambda-list" arg)) |
| 2155 | (t | 2157 | (t |
| 2156 | (push arg vars)))) | 2158 | (push arg vars)))) |
| 2157 | (setq list (cdr list))))) | 2159 | (setq list (cdr list))))) |
| 2158 | 2160 | ||
| @@ -2302,7 +2304,7 @@ If FORM is a lambda or a macro, byte-compile it as a function." | |||
| 2302 | (if (memq byte-optimize '(t byte)) | 2304 | (if (memq byte-optimize '(t byte)) |
| 2303 | (setq byte-compile-output | 2305 | (setq byte-compile-output |
| 2304 | (byte-optimize-lapcode byte-compile-output for-effect))) | 2306 | (byte-optimize-lapcode byte-compile-output for-effect))) |
| 2305 | 2307 | ||
| 2306 | ;; Decompile trivial functions: | 2308 | ;; Decompile trivial functions: |
| 2307 | ;; only constants and variables, or a single funcall except in lambdas. | 2309 | ;; only constants and variables, or a single funcall except in lambdas. |
| 2308 | ;; Except for Lisp_Compiled objects, forms like (foo "hi") | 2310 | ;; Except for Lisp_Compiled objects, forms like (foo "hi") |