From: Sam Steingold Date: Mon, 12 Oct 2009 20:42:45 +0000 (+0000) Subject: (compilation-next-error-function): Fix the X-Git-Tag: emacs-pretest-23.1.90~828 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cd29f88b1df50279f163621cffb807c81884d8c8;p=emacs.git (compilation-next-error-function): Fix the timestamps if the buffer has been visited before --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4d231a84e0c..72b4848f595 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-10-12 Sam Steingold + + * progmodes/compile.el (compilation-next-error-function): Fix the + timestamps if the buffer has been visited before + 2009-10-12 Glenn Morris * net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat): diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index a20f14ced91..7b2d21cf310 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1944,16 +1944,13 @@ This is the value of `next-error-function' in Compilation buffers." ;; (`omake -P' polls filesystem for changes and recompiles when needed ;; in the same process and buffer). ;; So, recalculate all markers for that file. - (unless (and (nth 3 loc) (marker-buffer (nth 3 loc)) - ;; 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)))))) + (unless (and (nth 3 loc) (marker-buffer (nth 3 loc)) (nthcdr 4 loc) + ;; There may be no timestamp info if the loc is a `fake-loc', + ;; but we just checked that the file has been visited before! + (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