]> git.eshelyaron.com Git - emacs.git/commitdiff
(texinfo-tex-region): Use tex-send-command to do commands.
authorRichard M. Stallman <rms@gnu.org>
Sat, 20 Nov 1993 22:21:58 +0000 (22:21 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 20 Nov 1993 22:21:58 +0000 (22:21 +0000)
(texinfo-tex-buffer, texinfo-texindex, texinfo-tex-print): Likewise.
(texinfo-delete-from-print-queue, texinfo-quit-job): Likewise.

lisp/textmodes/texinfo.el

index 1ea2832845bf7eec1bf01d62537deab037741181..a3cc2defdf340f31fad35a22aeb81ffaebbf5d71 100644 (file)
@@ -673,10 +673,8 @@ The value of `texinfo-tex-trailer' is appended to the temporary file after the r
        ))
     
     (tex-set-buffer-directory "*tex-shell*" zap-directory)
-    (send-string "tex-shell" (concat tex-shell-cd-command " "
-                                     zap-directory "\n"))
-    (send-string "tex-shell" (concat texinfo-tex-command " "
-                                     tex-out-file "\n")))
+    (tex-send-command tex-shell-cd-command zap-directory)
+    (tex-send-command texinfo-tex-command tex-out-file))
   (tex-recenter-output-buffer 0))
 
 (defun texinfo-tex-buffer ()
@@ -696,12 +694,9 @@ The value of `texinfo-tex-trailer' is appended to the temporary file after the r
 
   (setq tex-zap-file buffer-file-name)
 
-  (send-string "tex-shell"
-              (concat tex-shell-cd-command 
-                      " " (file-name-directory tex-zap-file) "\n"))
+  (tex-send-command tex-shell-cd-command (file-name-directory tex-zap-file))
 
-  (send-string "tex-shell"
-              (concat texinfo-texi2dvi-command " " tex-zap-file "\n"))
+  (tex-send-command texinfo-texi2dvi-command tex-zap-file)
 
   (tex-recenter-output-buffer 0))
 
@@ -711,9 +706,7 @@ The index files are made by \\[texinfo-tex-region] or \\[texinfo-tex-buffer].
 This runs the shell command defined by `texinfo-texindex-command'."
   (interactive)
   (require 'tex-mode)
-  (send-string "tex-shell"
-              (concat texinfo-texindex-command
-                       " " tex-zap-file ".??" "\n"))
+  (tex-send-command texinfo-texindex-command (concat tex-zap-file ".??"))
   (tex-recenter-output-buffer nil))
 
 (defun texinfo-tex-print ()
@@ -721,9 +714,7 @@ This runs the shell command defined by `texinfo-texindex-command'."
 This runs the shell command defined by `tex-dvi-print-command'."
   (interactive)
   (require 'tex-mode)
-  (send-string "tex-shell"
-              (concat tex-dvi-print-command
-                       " " tex-zap-file ".dvi" "\n"))
+  (tex-send-command tex-dvi-print-command (concat tex-zap-file ".dvi"))
   (tex-recenter-output-buffer nil))
 
 (defun texinfo-quit-job ()
@@ -731,11 +722,7 @@ This runs the shell command defined by `tex-dvi-print-command'."
   (interactive)
   (if (not (get-process "tex-shell"))
       (error "No TeX shell running"))
-  (save-excursion
-    (set-buffer (get-buffer "*tex-shell*"))
-    (goto-char (point-max))
-    (insert "x")
-    (comint-send-input)))
+  (tex-send-command "x"))
 
 (defun texinfo-delete-from-print-queue (job-number)
   "Delete job from the line printer spooling queue.
@@ -746,11 +733,7 @@ You are prompted for the job number (use a number shown by a previous
   (if (tex-shell-running)
       (tex-kill-job)
     (tex-start-shell))
-  (send-string "tex-shell"
-               (concat 
-                texinfo-delete-from-print-queue-command
-                " "
-                job-number"\n"))
+  (tex-send-command texinfo-delete-from-print-queue-command job-number)
   (tex-recenter-output-buffer nil))
 
 (provide 'texinfo)