summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-03-19 17:38:48 +0000
committerJim Blandy <jimb@redhat.com>1993-03-19 17:38:48 +0000
commit4f45adda3618c8934f4dce94f930b4fc190b225f (patch)
tree6af1f9c8d54e10700585d6827cb48459bdc55657 /lisp
parent210b2b4f058671a18e3f087fd696766ea8a23025 (diff)
downloademacs-4f45adda3618c8934f4dce94f930b4fc190b225f.tar.gz
* tex-mode.el (tex-send-command): Fix the command sent so that no
blank is inserted when replacing the asterisk with the file name.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/tex-mode.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 4df59532607..cee97ffa407 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -656,12 +656,15 @@ preceded by a blank, to COMMAND. If FILE is nil, no substitution will be made
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."