comparison lisp/textmodes/tex-mode.el @ 62909:86b398407446

(tex-compile-commands, tex-compile, tex-start-tex): Undo all but the last part of the 2005-05-28 change.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Mon, 30 May 2005 20:37:31 +0000
parents 93362151dd3a
children 3f08f5c8ef66 01137c1fdbe9
comparison
equal deleted inserted replaced
62908:af6dffb5d180 62909:86b398407446
1631 :group 'tex) 1631 :group 'tex)
1632 1632
1633 (defvar tex-compile-commands 1633 (defvar tex-compile-commands
1634 '(((concat "pdf" tex-command 1634 '(((concat "pdf" tex-command
1635 " " (if (< 0 (length tex-start-commands)) 1635 " " (if (< 0 (length tex-start-commands))
1636 tex-start-commands) " %f") 1636 (shell-quote-argument tex-start-commands)) " %f")
1637 t "%r.pdf") 1637 t "%r.pdf")
1638 ((concat tex-command 1638 ((concat tex-command
1639 " " (if (< 0 (length tex-start-commands)) 1639 " " (if (< 0 (length tex-start-commands))
1640 tex-start-commands) " %f") 1640 (shell-quote-argument tex-start-commands)) " %f")
1641 t "%r.dvi") 1641 t "%r.dvi")
1642 ("yap %r &" "%r.dvi") 1642 ("yap %r &" "%r.dvi")
1643 ("xdvi %r &" "%r.dvi") 1643 ("xdvi %r &" "%r.dvi")
1644 ("advi %r &" "%r.dvi") 1644 ("advi %r &" "%r.dvi")
1645 ("bibtex %r" "%r.aux" "%r.bbl") 1645 ("bibtex %r" "%r.aux" "%r.bbl")
1898 (let* ((file (tex-main-file)) 1898 (let* ((file (tex-main-file))
1899 (default-directory 1899 (default-directory
1900 (prog1 (file-name-directory (expand-file-name file)) 1900 (prog1 (file-name-directory (expand-file-name file))
1901 (setq file (file-name-nondirectory file)))) 1901 (setq file (file-name-nondirectory file))))
1902 (root (file-name-sans-extension file)) 1902 (root (file-name-sans-extension file))
1903 (fspec (list (cons ?r root) 1903 (fspec (list (cons ?r (shell-quote-argument root))
1904 (cons ?f file))) 1904 (cons ?f (shell-quote-argument file))))
1905 (default (tex-compile-default fspec))) 1905 (default (tex-compile-default fspec)))
1906 (list default-directory 1906 (list default-directory
1907 (completing-read 1907 (completing-read
1908 (format "Command [%s]: " (tex-summarize-command default)) 1908 (format "Command [%s]: " (tex-summarize-command default))
1909 (mapcar (lambda (x) 1909 (mapcar (lambda (x)
1920 "Start a TeX run, using COMMAND on FILE." 1920 "Start a TeX run, using COMMAND on FILE."
1921 (let* ((star (string-match "\\*" command)) 1921 (let* ((star (string-match "\\*" command))
1922 (compile-command 1922 (compile-command
1923 (if star 1923 (if star
1924 (concat (substring command 0 star) 1924 (concat (substring command 0 star)
1925 file 1925 (shell-quote-argument file)
1926 (substring command (1+ star))) 1926 (substring command (1+ star)))
1927 (concat command " " 1927 (concat command " "
1928 tex-start-options 1928 tex-start-options
1929 (if (< 0 (length tex-start-commands)) 1929 (if (< 0 (length tex-start-commands))
1930 (concat tex-start-commands " ")) 1930 (concat
1931 file)))) 1931 (shell-quote-argument tex-start-commands) " "))
1932 (shell-quote-argument file)))))
1932 (tex-send-tex-command compile-command dir))) 1933 (tex-send-tex-command compile-command dir)))
1933 1934
1934 (defun tex-send-tex-command (cmd &optional dir) 1935 (defun tex-send-tex-command (cmd &optional dir)
1935 (unless (or (equal dir (let ((buf (tex-shell-buf-no-error))) 1936 (unless (or (equal dir (let ((buf (tex-shell-buf-no-error)))
1936 (and buf (with-current-buffer buf 1937 (and buf (with-current-buffer buf