changeset 2265:daf268a98d5e

* tex-mode.el (tex-send-command): Fix the command sent so that no blank is inserted when replacing the asterisk with the file name.
author Jim Blandy <jimb@redhat.com>
date Fri, 19 Mar 1993 17:38:48 +0000
parents 87934d212841
children bfefe582a02b
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Fri Mar 19 17:28:14 1993 +0000
+++ b/lisp/textmodes/tex-mode.el	Fri Mar 19 17:38:48 1993 +0000
@@ -656,12 +656,15 @@
 in COMMAND.  COMMAND can be any expression that evaluates to a command string."
   (save-excursion
     (let* ((cmd (eval command))
-           (star (string-match "\\*" cmd)))
+           (star (string-match "\\*" cmd))
+           (front (substring cmd 0 star))
+           (back (if star (substring cmd (1+ star)) "")))
       (comint-proc-query (get-process "tex-shell")
-                         (concat (substring cmd 0 star)
-                                 (if file (concat " " file) "")
-                                 (if star (substring cmd (1+ star) nil) "")
-                                 (if background "&\n" "\n"))))))
+                         (concat
+                          (if file (if star (concat front file back)
+                                     (concat cmd " " file))
+                            cmd)
+                          (if background "&\n" "\n"))))))
 
 (defun tex-delete-last-temp-files ()
   "Delete any junk files from last temp file."