emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99732: Fix bug#5620: recalculate all


From: Sam Steingold
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99732: Fix bug#5620: recalculate all markers on compilation buffer
Date: Tue, 23 Mar 2010 14:22:46 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99732
committer: Sam Steingold <address@hidden>
branch nick: trunk
timestamp: Tue 2010-03-23 14:22:46 -0400
message:
  Fix bug#5620: recalculate all markers on compilation buffer
  modifications, not on file modifications.
  (buffer-modtime): New buffer-local variable:
  the buffer modification time, for buffers not associated with files.
  (compilation-mode): Create it.
  (compilation-filter): Update it.
  (compilation-next-error-function): Use it instead of
  `visited-file-modtime' for timestamp.
modified:
  lisp/ChangeLog
  lisp/progmodes/compile.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-03-23 16:09:45 +0000
+++ b/lisp/ChangeLog    2010-03-23 18:22:46 +0000
@@ -1,3 +1,14 @@
+2010-03-23  Sam Steingold  <address@hidden>
+
+       Fix bug#5620: recalculate all markers on compilation buffer
+       modifications, not on file modifications.
+       * progmodes/compile.el (buffer-modtime): New buffer-local variable:
+       the buffer modification time, for buffers not associated with files.
+       (compilation-mode): Create it.
+       (compilation-filter): Update it.
+       (compilation-next-error-function): Use it instead of
+       `visited-file-modtime' for timestamp.
+
 2010-03-23  Juri Linkov  <address@hidden>
 
        Implement Occur multi-line matches.

=== modified file 'lisp/progmodes/compile.el'
--- a/lisp/progmodes/compile.el 2010-02-20 13:53:06 +0000
+++ b/lisp/progmodes/compile.el 2010-03-23 18:22:46 +0000
@@ -733,6 +733,9 @@
   "If non-nil, automatically jump to the next error encountered.")
 (make-variable-buffer-local 'compilation-auto-jump-to-next)
 
+(defvar buffer-modtime nil
+  "The buffer modification time, for buffers not associated with files.")
+(make-variable-buffer-local 'buffer-modtime)
 
 (defvar compilation-skip-to-next-location t
   "*If non-nil, skip multiple error messages for the same source location.")
@@ -1566,6 +1569,7 @@
        mode-name (or name-of-mode "Compilation"))
   (set (make-local-variable 'page-delimiter)
        compilation-page-delimiter)
+  (set (make-local-variable 'buffer-modtime) nil)
   (compilation-setup)
   (setq buffer-read-only t)
   (run-mode-hooks 'compilation-mode-hook))
@@ -1781,6 +1785,7 @@
               (unless comint-inhibit-carriage-motion
                 (comint-carriage-motion (process-mark proc) (point)))
               (set-marker (process-mark proc) (point))
+              (set (make-local-variable buffer-modtime) (current-time))
               (run-hooks 'compilation-filter-hook))
          (goto-char pos)
           (narrow-to-region min max)
@@ -1954,9 +1959,7 @@
                  ;; 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)))))
+                        (setq timestamp buffer-modtime)))
       (with-current-buffer (compilation-find-file marker (caar (nth 2 loc))
                                                  (cadr (car (nth 2 loc))))
        (save-restriction


reply via email to

[Prev in Thread] Current Thread [Next in Thread]