diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-08-25 01:25:07 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-08-25 01:25:07 +0000 |
commit | fdd2a89bd6e07b4c0e77a96414b6a138a78ea609 (patch) | |
tree | f6754a593b3f9805c6312c81896a2769df3c8ecb /lisp/textmodes | |
parent | 064706ffd56cc410a3bfefd5ff8469347ffe1018 (diff) | |
download | emacs-fdd2a89bd6e07b4c0e77a96414b6a138a78ea609.tar.gz |
(tex-main-file): New variable.
(tex-file): Use that. Rename local var to source-file
so it is obviously local.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/tex-mode.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 6990c80f2d6..9b5065d0b1a 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -36,12 +36,17 @@ ;;;###autoload (defvar tex-directory "." - "*Directory in which temporary files are left. + "*Directory in which temporary files are written. You can make this `/tmp' if your TEXINPUTS has no relative directories in it and you don't try to apply \\[tex-region] or \\[tex-buffer] when there are `\\input' commands with relative directories.") ;;;###autoload +(defvar tex-main-file + "*The main TeX source file which includes this buffer's file. +The command `tex-buffer' runs TeX on `tex-main-file'if that is non-nil.") + +;;;###autoload (defvar tex-offer-save t "*If non-nil, ask about saving modified buffers before \\[tex-file] is run.") @@ -1046,10 +1051,11 @@ See \\[tex-file] for an alternative." This function is more useful than \\[tex-buffer] when you need the `.aux' file of LaTeX to have the correct name." (interactive) - (let ((tex-out-file - (if (buffer-file-name) - (file-name-nondirectory (buffer-file-name)) - (error "Buffer does not seem to be associated with any file"))) + (let ((source-file + (or tex-main-file + (if (buffer-file-name) + (file-name-nondirectory (buffer-file-name)) + (error "Buffer does not seem to be associated with any file")))) (file-dir (file-name-directory (buffer-file-name)))) (if tex-offer-save (save-some-buffers)) @@ -1057,7 +1063,7 @@ This function is more useful than \\[tex-buffer] when you need the (tex-kill-job) (tex-start-shell)) (tex-send-command tex-shell-cd-command file-dir) - (tex-send-command tex-command tex-out-file)) + (tex-send-command tex-command source-file)) (tex-display-shell) (setq tex-last-buffer-texed (current-buffer)) (setq tex-print-file (buffer-file-name))) |