# HG changeset patch # User Richard M. Stallman # Date 1173647769 0 # Node ID 63e4cb93803ae0f98c4ba0b20b9c05e0a20be7d1 # Parent deede4f7067d04640c6eb770e1579784546e6825 (byte-compile-warning-prefix): Correctly compute line number. diff -r deede4f7067d -r 63e4cb93803a lisp/emacs-lisp/bytecomp.el --- a/lisp/emacs-lisp/bytecomp.el Sun Mar 11 21:08:45 2007 +0000 +++ b/lisp/emacs-lisp/bytecomp.el Sun Mar 11 21:16:09 2007 +0000 @@ -972,8 +972,10 @@ (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)))))