Mercurial > emacs
diff lisp/progmodes/compile.el @ 85366:e8f9d460bc3e
(compilation-next-error-function): Fix timestamp
handling, so compilation-fake-loc works again.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 17 Oct 2007 16:24:33 +0000 |
parents | 5039706521c9 |
children | 786d3a985758 1251cabc40b7 |
line wrap: on
line diff
--- a/lisp/progmodes/compile.el Wed Oct 17 16:22:48 2007 +0000 +++ b/lisp/progmodes/compile.el Wed Oct 17 16:24:33 2007 +0000 @@ -1658,10 +1658,15 @@ ;; in the same process and buffer). ;; So, recalculate all markers for that file. (unless (and (nth 3 loc) (marker-buffer (nth 3 loc)) - (equal (nth 4 loc) - (setq timestamp - (with-current-buffer (marker-buffer (nth 3 loc)) - (visited-file-modtime))))) + ;; There may be no timestamp info if the loc is a `fake-loc'. + ;; So we skip the time-check here, although we should maybe + ;; change `compilation-fake-loc' to add timestamp info. + (or (null (nth 4 loc)) + (equal (nth 4 loc) + (setq timestamp + (with-current-buffer + (marker-buffer (nth 3 loc)) + (visited-file-modtime)))))) (with-current-buffer (compilation-find-file marker (caar (nth 2 loc)) (cadr (car (nth 2 loc)))) (save-restriction @@ -1711,7 +1716,7 @@ (or (consp file) (setq file (list file))) (setq file (compilation-get-file-structure file)) ;; Between the current call to compilation-fake-loc and the first occurrence - ;; of an error message referring to `file', the data is only kept is the + ;; of an error message referring to `file', the data is only kept in the ;; weak hash-table compilation-locs, so we need to prevent this entry ;; in compilation-locs from being GC'd away. --Stef (push file compilation-gcpro)