]> code.delx.au - gnu-emacs/commitdiff
byte-compile-warning-prefix tweak
authorGlenn Morris <rgm@gnu.org>
Thu, 13 Sep 2012 02:41:46 +0000 (22:41 -0400)
committerGlenn Morris <rgm@gnu.org>
Thu, 13 Sep 2012 02:41:46 +0000 (22:41 -0400)
* lisp/emacs-lisp/bytecomp.el (byte-compile-warning-prefix): If not
compiling a file, try using load-file-name.

lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el

index 89cc2106ba06fc6a933f735680fc5b10d316ab49..41dc46021f689ef8aee021a4db8999f80002c14d 100644 (file)
@@ -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):
index 10bc37c6dcd1ea1818add11952ef0de154897875..c42ae21aae5648d9c41f1a50f6797f9cafce893d 100644 (file)
@@ -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))