[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-devel] pdfsync.el patch
From: |
Johan Bockgård |
Subject: |
[AUCTeX-devel] pdfsync.el patch |
Date: |
Mon, 10 Mar 2008 14:42:26 +0100 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) |
This avoids the "File foo.pdfsync changed on disk. Reread from disk?
(yes or no)" question.
--- pdfsync.el.~1.5~ 2008-03-10 14:26:19.000000000 +0100
+++ pdfsync.el 2008-03-10 14:37:46.000000000 +0100
@@ -40,9 +40,18 @@
(sync-record "0")
(sync-line "-1")
(sync-page "1")
- last-match)
- (when (file-exists-p pdfsync-file)
- (with-current-buffer (find-file-noselect pdfsync-file)
+ last-match
+ (found t))
+ (save-current-buffer
+ (cond ((get-file-buffer pdfsync-file)
+ ;; Reuse buffer without query
+ (set-buffer (get-file-buffer pdfsync-file))
+ (or (verify-visited-file-modtime (current-buffer))
+ (revert-buffer t t)))
+ ((file-exists-p pdfsync-file)
+ (set-buffer (find-file-noselect pdfsync-file)))
+ (t (setq found nil)))
+ (when found
(save-restriction
(goto-char (point-min))
;; Narrow region to file in question.
--
Johan Bockgård
- [AUCTeX-devel] pdfsync.el patch,
Johan Bockgård <=