[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
New tex-bibtex-file in tex-mode.el to take into account TeX-master
From: |
Francois Fleuret |
Subject: |
New tex-bibtex-file in tex-mode.el to take into account TeX-master |
Date: |
Mon, 22 Dec 2008 01:53:33 +0100 |
Dear Emacs developers,
I slightly modified tex-bibtex-file so that it takes into account the
variable TeX-master. I guess it was a bug not to do so.
Here it is:
---------------------------- snip snip -------------------------------
(defun tex-bibtex-file ()
"Run BibTeX on the current buffer's file."
(interactive)
(if (tex-shell-running)
(tex-kill-job)
(tex-start-shell))
(let (shell-dirtrack-verbose
(tex-out-file
(tex-append
(or (and (boundp 'TeX-master)
(file-name-nondirectory TeX-master))
(file-name-nondirectory (buffer-file-name))) ""))
(file-dir (or (and (boundp 'TeX-master)
(file-name-directory TeX-master))
(file-name-directory (buffer-file-name)))))
(tex-send-command tex-shell-cd-command file-dir)
(tex-send-command tex-bibtex-command tex-out-file))
(tex-display-shell))
---------------------------- snip snip -------------------------------
Best,
--
Francois Fleuret http://www.idiap.ch/~fleuret
- New tex-bibtex-file in tex-mode.el to take into account TeX-master,
Francois Fleuret <=