Commit 77041513 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(compilation-next-error-function): Fix timestamp

handling, so compilation-fake-loc works again.
parent 1a4a884c
2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca> 2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/compile.el (compilation-next-error-function): Fix timestamp
handling, so compilation-fake-loc works again.
* server.el (server-select-display): Nop if we do not support m-f-o-d. * server.el (server-select-display): Nop if we do not support m-f-o-d.
(server-process-filter): Revert last change. (server-process-filter): Revert last change.
......
...@@ -1658,10 +1658,15 @@ This is the value of `next-error-function' in Compilation buffers." ...@@ -1658,10 +1658,15 @@ This is the value of `next-error-function' in Compilation buffers."
;; in the same process and buffer). ;; in the same process and buffer).
;; So, recalculate all markers for that file. ;; So, recalculate all markers for that file.
(unless (and (nth 3 loc) (marker-buffer (nth 3 loc)) (unless (and (nth 3 loc) (marker-buffer (nth 3 loc))
(equal (nth 4 loc) ;; There may be no timestamp info if the loc is a `fake-loc'.
(setq timestamp ;; So we skip the time-check here, although we should maybe
(with-current-buffer (marker-buffer (nth 3 loc)) ;; change `compilation-fake-loc' to add timestamp info.
(visited-file-modtime))))) (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)) (with-current-buffer (compilation-find-file marker (caar (nth 2 loc))
(cadr (car (nth 2 loc)))) (cadr (car (nth 2 loc))))
(save-restriction (save-restriction
...@@ -1711,7 +1716,7 @@ region and the first line of the next region." ...@@ -1711,7 +1716,7 @@ region and the first line of the next region."
(or (consp file) (setq file (list file))) (or (consp file) (setq file (list file)))
(setq file (compilation-get-file-structure file)) (setq file (compilation-get-file-structure file))
;; Between the current call to compilation-fake-loc and the first occurrence ;; 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 ;; weak hash-table compilation-locs, so we need to prevent this entry
;; in compilation-locs from being GC'd away. --Stef ;; in compilation-locs from being GC'd away. --Stef
(push file compilation-gcpro) (push file compilation-gcpro)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment