changeset 65154:3c80217a6363

(flymake-highlight-err-lines): Use save-excursion around flymake-highlight-line to preserve point.
author Eli Zaretskii <eliz@gnu.org>
date Fri, 26 Aug 2005 13:48:33 +0000
parents a82972e21f7f
children 0c6ee4545901
files lisp/progmodes/flymake.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/flymake.el	Fri Aug 26 13:42:43 2005 +0000
+++ b/lisp/progmodes/flymake.el	Fri Aug 26 13:48:33 2005 +0000
@@ -806,11 +806,13 @@
 (defun flymake-highlight-err-lines (buffer err-info-list)
   "Highlight error lines in BUFFER using info from ERR-INFO-LIST."
   (with-current-buffer buffer
+   (save-excursion
     (let* ((idx    0)
 	   (count  (length err-info-list)))
       (while (< idx count)
-	(flymake-highlight-line (car (nth idx err-info-list)) (nth 1 (nth idx err-info-list)))
-	(setq idx (1+ idx))))))
+	(flymake-highlight-line (car (nth idx err-info-list))
+				(nth 1 (nth idx err-info-list)))
+	(setq idx (1+ idx)))))))
 
 (defun flymake-overlay-p (ov)
   "Determine whether overlay OV was created by flymake."