Mercurial > emacs
changeset 105573:e7f57b24c0a2
(compilation-next-error-function): Fix the
timestamps if the buffer has been visited before
author | Sam Steingold <sds@gnu.org> |
---|---|
date | Mon, 12 Oct 2009 20:42:45 +0000 |
parents | be1e297cc4d5 |
children | 5d7b16939e28 |
files | lisp/ChangeLog lisp/progmodes/compile.el |
diffstat | 2 files changed, 12 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Mon Oct 12 07:02:59 2009 +0000 +++ b/lisp/ChangeLog Mon Oct 12 20:42:45 2009 +0000 @@ -1,3 +1,8 @@ +2009-10-12 Sam Steingold <sds@gnu.org> + + * progmodes/compile.el (compilation-next-error-function): Fix the + timestamps if the buffer has been visited before + 2009-10-12 Glenn Morris <rgm@gnu.org> * net/tramp-smb.el (tramp-smb-do-file-attributes-with-stat):
--- a/lisp/progmodes/compile.el Mon Oct 12 07:02:59 2009 +0000 +++ b/lisp/progmodes/compile.el Mon Oct 12 20:42:45 2009 +0000 @@ -1944,16 +1944,13 @@ ;; (`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