# HG changeset patch # User Stefan Monnier # Date 1067552852 0 # Node ID a4241f6b64e7f6beb6c5417989be7705f0df4059 # Parent 667459455d3c99706a1614e4034a7c81ea7adab5 (tex-compile-commands): Add `yap' and `ps2pdf'. (tex-main-file): Don't add .tex if the extension is already present. (tex-uptodate-p): Don't recurse indefinitely in the presence of symlinks. diff -r 667459455d3c -r a4241f6b64e7 lisp/textmodes/tex-mode.el --- a/lisp/textmodes/tex-mode.el Thu Oct 30 22:15:20 2003 +0000 +++ b/lisp/textmodes/tex-mode.el Thu Oct 30 22:27:32 2003 +0000 @@ -1584,6 +1584,7 @@ " " (if (< 0 (length tex-start-commands)) (shell-quote-argument tex-start-commands)) " %f") t "%r.dvi") + ("yap %r &" "%r.dvi") ("xdvi %r &" "%r.dvi") ("advi %r &" "%r.dvi") ("bibtex %r" "%r.aux" "%r.bbl") @@ -1592,6 +1593,7 @@ ("dvipdfm %r" "%r.dvi" "%r.pdf") ("dvipdf %r" "%r.dvi" "%r.pdf") ("dvips %r" "%r.dvi" "%r.ps") + ("ps2pdf %r.ps" "%r.ps" "%r.pdf") ("gv %r.ps &" "%r.ps") ("gv %r.pdf &" "%r.pdf") ("xpdf %r.pdf &" "%r.pdf") @@ -1670,7 +1672,8 @@ (tex-guess-main-file 'sub) ;; (tex-guess-main-file t) buffer-file-name))))))) - (if (file-exists-p file) file (concat file ".tex")))) + (if (or (file-exists-p file) (string-match "\\.tex\\'" file)) + file (concat file ".tex")))) (defun tex-summarize-command (cmd) (if (not (stringp cmd)) "" @@ -1717,7 +1720,9 @@ (uptodate t)) (while (and files uptodate) (let ((f (pop files))) - (if (file-directory-p f) + (if (and (file-directory-p f) + ;; Avoid infinite loops. + (not (file-symlink-p f))) (unless (string-match ignored-dirs-re f) (setq files (nconc (directory-files f t tex-input-files-re)