From 12b5649bf65a15fdbfca186430a389ba95a5778d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 5 Jan 1995 00:23:50 +0000 Subject: (tex-print): Better check for when to print current buffer's file over last processed file. --- lisp/textmodes/tex-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 953b3d29ac7..3063d141bda 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -1062,9 +1062,11 @@ is provided, use the alternative command, `tex-alt-dvi-print-command'." (let ((print-file-name-dvi (tex-append tex-print-file ".dvi")) test-name) (if (and (not (equal (current-buffer) tex-last-buffer-texed)) + (buffer-file-name) + ;; Check that this buffer's printed file is up to date. (file-newer-than-file-p (setq test-name (tex-append (buffer-file-name) ".dvi")) - print-file-name-dvi)) + (buffer-file-name))) (setq print-file-name-dvi test-name)) (if (not (file-exists-p print-file-name-dvi)) (error "No appropriate `.dvi' file could be found") -- cgit v1.2.1