From: Richard M. Stallman Date: Thu, 5 Jan 1995 00:23:50 +0000 (+0000) Subject: (tex-print): Better check for when to print current X-Git-Tag: emacs-19.34~5515 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=45c3304d43324cfcddea085820ed8a1b78784496;p=emacs.git (tex-print): Better check for when to print current buffer's file over last processed file. --- 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")