From 2168fe4f2ad6ea4320a0da7976294b0cdade1a20 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 12 Sep 2012 22:41:46 -0400 Subject: [PATCH] byte-compile-warning-prefix tweak * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): If not compiling a file, try using load-file-name. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/bytecomp.el | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89cc2106ba..41dc46021f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-13 Glenn Morris + + * emacs-lisp/bytecomp.el (byte-compile-warning-prefix): + If not compiling a file, try using load-file-name. + 2012-09-13 Stefan Monnier * emacs-lisp/edebug.el (edebug-outside-unread-command-events): diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 10bc37c6dc..c42ae21aae 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1016,6 +1016,10 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." ((bufferp byte-compile-current-file) (format "Buffer %s:" (buffer-name byte-compile-current-file))) + ;; We might be simply loading a file that + ;; contains explicit calls to byte-compile functions. + ((stringp load-file-name) + (format "%s:" (file-relative-name load-file-name dir))) (t ""))) (pos (if (and byte-compile-current-file (integerp byte-compile-read-position)) -- 2.20.1