Mercurial > emacs
comparison lisp/textmodes/tex-mode.el @ 61154:81b738b4c729
shell-quote-argument, not comint-quote-filename
author | Karl Berry <karl@gnu.org> |
---|---|
date | Thu, 31 Mar 2005 00:24:57 +0000 |
parents | e5a07aa840d9 |
children | c277eb06ba34 4da4a09e8b1b |
comparison
equal
deleted
inserted
replaced
61153:f01b811afc3c | 61154:81b738b4c729 |
---|---|
1885 (let* ((file (tex-main-file)) | 1885 (let* ((file (tex-main-file)) |
1886 (default-directory | 1886 (default-directory |
1887 (prog1 (file-name-directory (expand-file-name file)) | 1887 (prog1 (file-name-directory (expand-file-name file)) |
1888 (setq file (file-name-nondirectory file)))) | 1888 (setq file (file-name-nondirectory file)))) |
1889 (root (file-name-sans-extension file)) | 1889 (root (file-name-sans-extension file)) |
1890 (fspec (list (cons ?r (comint-quote-filename root)) | 1890 (fspec (list (cons ?r (shell-quote-argument root)) |
1891 (cons ?f (comint-quote-filename file)))) | 1891 (cons ?f (shell-quote-argument file)))) |
1892 (default (tex-compile-default fspec))) | 1892 (default (tex-compile-default fspec))) |
1893 (list default-directory | 1893 (list default-directory |
1894 (completing-read | 1894 (completing-read |
1895 (format "Command [%s]: " (tex-summarize-command default)) | 1895 (format "Command [%s]: " (tex-summarize-command default)) |
1896 (mapcar (lambda (x) | 1896 (mapcar (lambda (x) |
1907 "Start a TeX run, using COMMAND on FILE." | 1907 "Start a TeX run, using COMMAND on FILE." |
1908 (let* ((star (string-match "\\*" command)) | 1908 (let* ((star (string-match "\\*" command)) |
1909 (compile-command | 1909 (compile-command |
1910 (if star | 1910 (if star |
1911 (concat (substring command 0 star) | 1911 (concat (substring command 0 star) |
1912 (comint-quote-filename file) | 1912 (shell-quote-argument file) |
1913 (substring command (1+ star))) | 1913 (substring command (1+ star))) |
1914 (concat command " " | 1914 (concat command " " |
1915 tex-start-options | 1915 tex-start-options |
1916 (if (< 0 (length tex-start-commands)) | 1916 (if (< 0 (length tex-start-commands)) |
1917 (concat | 1917 (concat |
1918 (shell-quote-argument tex-start-commands) " ")) | 1918 (shell-quote-argument tex-start-commands) " ")) |
1919 (comint-quote-filename file))))) | 1919 (shell-quote-argument file))))) |
1920 (tex-send-tex-command compile-command dir))) | 1920 (tex-send-tex-command compile-command dir))) |
1921 | 1921 |
1922 (defun tex-send-tex-command (cmd &optional dir) | 1922 (defun tex-send-tex-command (cmd &optional dir) |
1923 (unless (or (equal dir (let ((buf (tex-shell-buf-no-error))) | 1923 (unless (or (equal dir (let ((buf (tex-shell-buf-no-error))) |
1924 (and buf (with-current-buffer buf | 1924 (and buf (with-current-buffer buf |