summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/bytecomp.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2007-03-11 21:16:09 +0000
committerRichard M. Stallman <rms@gnu.org>2007-03-11 21:16:09 +0000
commitb0aa2c6515afd7f4cd35934f411d82427eecbc7b (patch)
tree2736c3ef69e23038a48f223a4da0ae04b0fa6923 /lisp/emacs-lisp/bytecomp.el
parent9b73fa0b88684652935aae9edfadd2fd309b0ace (diff)
downloademacs-b0aa2c6515afd7f4cd35934f411d82427eecbc7b.tar.gz
emacs-b0aa2c6515afd7f4cd35934f411d82427eecbc7b.tar.bz2
emacs-b0aa2c6515afd7f4cd35934f411d82427eecbc7b.zip
(byte-compile-warning-prefix): Correctly compute line number.
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r--lisp/emacs-lisp/bytecomp.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 1d7cbfc422c..f74e48c4635 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -972,8 +972,10 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
(pos (if (and byte-compile-current-file
(integerp byte-compile-read-position))
(with-current-buffer byte-compile-current-buffer
- (format "%d:%d:" (count-lines (point-min)
- byte-compile-last-position)
+ (format "%d:%d:"
+ (save-excursion
+ (goto-char byte-compile-last-position)
+ (1+ (count-lines (point-min) (point-at-bol))))
(save-excursion
(goto-char byte-compile-last-position)
(1+ (current-column)))))