aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-11-20 22:00:55 +0000
committerRichard M. Stallman1993-11-20 22:00:55 +0000
commit4cdc1d4b2d56076be98b797b3fa10afed817bcec (patch)
treefb065b5d5138c4faa6754c1049d05533ceb8f5f8
parent111b637db62231033258dc3aefed6c1418b7f067 (diff)
downloademacs-4cdc1d4b2d56076be98b797b3fa10afed817bcec.tar.gz
emacs-4cdc1d4b2d56076be98b797b3fa10afed817bcec.zip
(tex-start-shell): Don't use -v option.
(tex-send-command): Insert text in the buffer, then use comint-send-input to send it.
-rw-r--r--lisp/textmodes/tex-mode.el25
1 files changed, 15 insertions, 10 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index f91245c81d6..eddf642468f 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -763,7 +763,7 @@ line numbers for the errors."
763 (make-comint 763 (make-comint
764 "tex-shell" 764 "tex-shell"
765 (or tex-shell-file-name (getenv "ESHELL") (getenv "SHELL") "/bin/sh") 765 (or tex-shell-file-name (getenv "ESHELL") (getenv "SHELL") "/bin/sh")
766 nil "-v")) 766 nil))
767 (let ((proc (get-process "tex-shell"))) 767 (let ((proc (get-process "tex-shell")))
768 (set-process-sentinel proc 'tex-shell-sentinel) 768 (set-process-sentinel proc 'tex-shell-sentinel)
769 (process-kill-without-query proc) 769 (process-kill-without-query proc)
@@ -792,22 +792,27 @@ line numbers for the errors."
792 (setq default-directory directory)))) 792 (setq default-directory directory))))
793 793
794(defun tex-send-command (command &optional file background) 794(defun tex-send-command (command &optional file background)
795 "Send COMMAND to tex-shell, substituting optional FILE for *. 795 "Send COMMAND to TeX shell process, substituting optional FILE for *.
796Do this in background if optional BACKGROUND is t. If COMMAND has no *, 796Do this in background if optional BACKGROUND is t. If COMMAND has no *,
797FILE will be appended, preceded by a blank, to COMMAND. If FILE is nil, no 797FILE will be appended, preceded by a blank, to COMMAND. If FILE is nil, no
798substitution will be made in COMMAND. COMMAND can be any expression that 798substitution will be made in COMMAND. COMMAND can be any expression that
799evaluates to a command string." 799evaluates to a command string."
800 (save-excursion 800 (save-excursion
801 (let* ((cmd (eval command)) 801 (let* ((cmd (eval command))
802 (proc (get-process "tex-shell"))
802 (star (string-match "\\*" cmd)) 803 (star (string-match "\\*" cmd))
803 (front (substring cmd 0 star)) 804 (string
804 (back (if star (substring cmd (1+ star)) ""))) 805 (concat
805 (comint-proc-query (get-process "tex-shell") 806 (if file
806 (concat 807 (if star (concat (substring cmd 0 star)
807 (if file (if star (concat front file back) 808 file (substring cmd (1+ star)))
808 (concat cmd " " file)) 809 (concat cmd " " file))
809 cmd) 810 cmd)
810 (if background "&\n" "\n")))))) 811 (if background "&" ""))))
812 (set-buffer (process-buffer proc))
813 (goto-char (process-mark proc))
814 (insert string)
815 (comint-send-input))))
811 816
812(defun tex-delete-last-temp-files () 817(defun tex-delete-last-temp-files ()
813 "Delete any junk files from last temp file." 818 "Delete any junk files from last temp file."