From: Glenn Morris Date: Thu, 13 Sep 2012 02:41:46 +0000 (-0400) Subject: byte-compile-warning-prefix tweak X-Git-Tag: emacs-24.2.90~296 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2168fe4f2ad6ea4320a0da7976294b0cdade1a20;p=emacs.git byte-compile-warning-prefix tweak * lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): If not compiling a file, try using load-file-name. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89cc2106ba0..41dc46021f6 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 10bc37c6dcd..c42ae21aae5 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))