diff options
| author | Stefan Monnier | 2007-10-17 16:24:33 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-10-17 16:24:33 +0000 |
| commit | 77041513480f398d4490b291cbdc554efbdc7985 (patch) | |
| tree | b16a34b79b355975259b517ba4304d82ca509d30 | |
| parent | 1a4a884cc5ffc9f2c523562444b8a37e58ee8fcf (diff) | |
| download | emacs-77041513480f398d4490b291cbdc554efbdc7985.tar.gz emacs-77041513480f398d4490b291cbdc554efbdc7985.zip | |
(compilation-next-error-function): Fix timestamp
handling, so compilation-fake-loc works again.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 15 |
2 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 555aa3ec85d..eaf88bbd6ee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-10-17 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * progmodes/compile.el (compilation-next-error-function): Fix timestamp | ||
| 4 | handling, so compilation-fake-loc works again. | ||
| 5 | |||
| 3 | * server.el (server-select-display): Nop if we do not support m-f-o-d. | 6 | * server.el (server-select-display): Nop if we do not support m-f-o-d. |
| 4 | (server-process-filter): Revert last change. | 7 | (server-process-filter): Revert last change. |
| 5 | 8 | ||
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 9ed7ba09de9..482cfee1b9b 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1658,10 +1658,15 @@ This is the value of `next-error-function' in Compilation buffers." | |||
| 1658 | ;; in the same process and buffer). | 1658 | ;; in the same process and buffer). |
| 1659 | ;; So, recalculate all markers for that file. | 1659 | ;; So, recalculate all markers for that file. |
| 1660 | (unless (and (nth 3 loc) (marker-buffer (nth 3 loc)) | 1660 | (unless (and (nth 3 loc) (marker-buffer (nth 3 loc)) |
| 1661 | (equal (nth 4 loc) | 1661 | ;; There may be no timestamp info if the loc is a `fake-loc'. |
| 1662 | (setq timestamp | 1662 | ;; So we skip the time-check here, although we should maybe |
| 1663 | (with-current-buffer (marker-buffer (nth 3 loc)) | 1663 | ;; change `compilation-fake-loc' to add timestamp info. |
| 1664 | (visited-file-modtime))))) | 1664 | (or (null (nth 4 loc)) |
| 1665 | (equal (nth 4 loc) | ||
| 1666 | (setq timestamp | ||
| 1667 | (with-current-buffer | ||
| 1668 | (marker-buffer (nth 3 loc)) | ||
| 1669 | (visited-file-modtime)))))) | ||
| 1665 | (with-current-buffer (compilation-find-file marker (caar (nth 2 loc)) | 1670 | (with-current-buffer (compilation-find-file marker (caar (nth 2 loc)) |
| 1666 | (cadr (car (nth 2 loc)))) | 1671 | (cadr (car (nth 2 loc)))) |
| 1667 | (save-restriction | 1672 | (save-restriction |
| @@ -1711,7 +1716,7 @@ region and the first line of the next region." | |||
| 1711 | (or (consp file) (setq file (list file))) | 1716 | (or (consp file) (setq file (list file))) |
| 1712 | (setq file (compilation-get-file-structure file)) | 1717 | (setq file (compilation-get-file-structure file)) |
| 1713 | ;; Between the current call to compilation-fake-loc and the first occurrence | 1718 | ;; Between the current call to compilation-fake-loc and the first occurrence |
| 1714 | ;; of an error message referring to `file', the data is only kept is the | 1719 | ;; of an error message referring to `file', the data is only kept in the |
| 1715 | ;; weak hash-table compilation-locs, so we need to prevent this entry | 1720 | ;; weak hash-table compilation-locs, so we need to prevent this entry |
| 1716 | ;; in compilation-locs from being GC'd away. --Stef | 1721 | ;; in compilation-locs from being GC'd away. --Stef |
| 1717 | (push file compilation-gcpro) | 1722 | (push file compilation-gcpro) |