summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-09-12 22:41:46 -0400
committerGlenn Morris <rgm@gnu.org>2012-09-12 22:41:46 -0400
commit2168fe4f2ad6ea4320a0da7976294b0cdade1a20 (patch)
tree0e39b523637e3b7e350142ea9f1f9d21701beff4
parentc0c54fbddf0784b84b04f38aabee47067a920863 (diff)
downloademacs-2168fe4f2ad6ea4320a0da7976294b0cdade1a20.tar.gz
byte-compile-warning-prefix tweak
* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): If not compiling a file, try using load-file-name.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
2 files changed, 9 insertions, 0 deletions
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 <rgm@gnu.org>
+
+ * emacs-lisp/bytecomp.el (byte-compile-warning-prefix):
+ If not compiling a file, try using load-file-name.
+
2012-09-13 Stefan Monnier <monnier@iro.umontreal.ca>
* 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))