branch: externals/auctex
commit 69004bc2c8ca61be94312269457966f84885a098
Author: Tassilo Horn <[email protected]>
Commit: Tassilo Horn <[email protected]>
Fix wrong TeX-command-default guess for region files
* tex-buf.el (TeX-command-default): Fix bug where wrong command
was guessed for region files.
---
ChangeLog | 5 +++++
tex-buf.el | 10 ++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e1fa98a..af8d4e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-08 Tassilo Horn <[email protected]>
+
+ * tex-buf.el (TeX-command-default): Fix bug where wrong command
+ was guessed for region files.
+
2015-09-07 Mos� Giordano <[email protected]>
* tex-buf.el (LaTeX-idx-md5-alist, LaTeX-idx-changed-alist): New
diff --git a/tex-buf.el b/tex-buf.el
index 07e54ef..6a05207 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -700,9 +700,15 @@ omitted) and `TeX-region-file'."
(defun TeX-command-default (name)
"Guess the next command to be run on NAME."
(let ((command-next nil))
- (cond ((if (string-equal name TeX-region)
+ (cond (;; name might be absolute or relative, so expand it for
+ ;; comparison.
+ (if (string-equal (expand-file-name name)
+ (expand-file-name TeX-region))
(TeX-check-files (concat name "." (TeX-output-extension))
- (list name)
+ ;; Each original will be checked for all dirs
+ ;; in `TeX-check-path' so this needs to be just
+ ;; a filename without directory.
+ (list (file-name-nondirectory name))
TeX-file-extensions)
(TeX-save-document (TeX-master-file)))
TeX-command-default)