]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-internal-error-properties):
authorRichard M. Stallman <rms@gnu.org>
Mon, 7 Nov 2005 00:49:17 +0000 (00:49 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 7 Nov 2005 00:49:17 +0000 (00:49 +0000)
save-excursion around the computation of MARKER.

lisp/progmodes/compile.el

index d041fa366c89b54828e4abf735bfa89db799d867..a158ad3f4e03d8537f378e3b24fc52f8a9100972 100644 (file)
@@ -707,24 +707,25 @@ FMTS is a list of format specs for transforming the file name.
       (setq marker (nth 3 (cadr marker-line))
            marker-line (or (car marker-line) 1))
       (with-current-buffer (marker-buffer marker)
-       (save-restriction
-         (widen)
-         (goto-char (marker-position marker))
-         (when (or end-col end-line)
-           (beginning-of-line (- (or end-line line) marker-line -1))
-           (if (or (null end-col) (< end-col 0))
-               (end-of-line)
-             (compilation-move-to-column
-              end-col compilation-error-screen-columns))
-           (setq end-marker (list (point-marker))))
-         (beginning-of-line (if end-line
-                                (- line end-line -1)
-                              (- loc marker-line -1)))
-         (if col
-             (compilation-move-to-column
-              col compilation-error-screen-columns)
-           (forward-to-indentation 0))
-         (setq marker (list (point-marker))))))
+       (save-excursion
+         (save-restriction
+           (widen)
+           (goto-char (marker-position marker))
+           (when (or end-col end-line)
+             (beginning-of-line (- (or end-line line) marker-line -1))
+             (if (or (null end-col) (< end-col 0))
+                 (end-of-line)
+               (compilation-move-to-column
+                end-col compilation-error-screen-columns))
+             (setq end-marker (list (point-marker))))
+           (beginning-of-line (if end-line
+                                  (- line end-line -1)
+                                (- loc marker-line -1)))
+           (if col
+               (compilation-move-to-column
+                col compilation-error-screen-columns)
+             (forward-to-indentation 0))
+           (setq marker (list (point-marker)))))))
 
     (setq loc (compilation-assq line (cdr file-struct)))
     (if end-line