]> git.eshelyaron.com Git - emacs.git/commitdiff
(flymake-highlight-err-lines): Use save-excursion around
authorEli Zaretskii <eliz@gnu.org>
Fri, 26 Aug 2005 13:49:07 +0000 (13:49 +0000)
committerEli Zaretskii <eliz@gnu.org>
Fri, 26 Aug 2005 13:49:07 +0000 (13:49 +0000)
flymake-highlight-line to preserve point.

lisp/ChangeLog
lisp/progmodes/flymake.el

index 14d59aa3fc89911f7fe0f80cc1ebcbab25a76825..85e5dfabc0096310f3a30e8b34d632c3256c7226 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-26  Pavel Kobiakov  <pk_at_work@yahoo.com>
+
+       * progmodes/flymake.el (flymake-highlight-err-lines): Use
+       save-excursion around flymake-highlight-line to preserve point.
+
 2005-08-26  Eli Zaretskii  <eliz@gnu.org>
 
        * progmodes/octave-mod.el: Change Author and Maintainer address.
index 8854d57915cbd66c6405e4e0667e01ac99715a2d..d137284f795055c5b4a1fb3765b3139b6bc0f113 100644 (file)
@@ -806,11 +806,13 @@ line number outside the file being compiled."
 (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."