[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 097ec6c 25/26: Avoid superfluous
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 097ec6c 25/26: Avoid superfluous output directories |
Date: |
Thu, 12 Aug 2021 11:18:24 -0400 (EDT) |
branch: externals/auctex
commit 097ec6cb85b16479e8e4512142cec1fdb3cd5f36
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Avoid superfluous output directories
* tex.el (TeX--master-output-dir): Add new optional argument ENSURE so
that it doesn't make output dir when `TeX-region-file' is called from
`TeX-set-mode-name', which can be called from
`TeX-source-correlate-mode' in major mode function.
(TeX--output-dir-arg): Feed t for the above new argument ENSURE.
---
tex.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/tex.el b/tex.el
index df467de..46d6bbc 100644
--- a/tex.el
+++ b/tex.el
@@ -2545,13 +2545,14 @@ is assumed to be the same as the directory of
`TeX-master'."
(string :tag "Custom" "build")))
(make-variable-buffer-local 'TeX-output-dir)
-(defun TeX--master-output-dir (master-dir relative-to-master)
+(defun TeX--master-output-dir (master-dir relative-to-master &optional ensure)
"Return the directory path where output files should be placed.
If `TeX-output-dir' is nil, then return nil.
MASTER-DIR is the directory path where the master file is
located. If RELATIVE-TO-MASTER is non-nil, make the returned
-path relative to the directory in MASTER-DIR."
+path relative to the directory in MASTER-DIR. If ENSURE is
+non-nil, the output directory is created if it does not exist."
(when TeX-output-dir
(let* ((master-dir (expand-file-name (or master-dir "")))
(out-dir (file-name-as-directory
@@ -2561,7 +2562,7 @@ path relative to the directory in MASTER-DIR."
TeX-output-dir
master-dir))))))
;; Make sure the directory exists
- (unless (file-exists-p out-dir)
+ (unless (or (not ensure) (file-exists-p out-dir))
(make-directory (file-name-as-directory out-dir) t))
(if relative-to-master
(file-relative-name out-dir master-dir)
@@ -2571,7 +2572,7 @@ path relative to the directory in MASTER-DIR."
"Format the output directory as a command argument.
ARGNAME is prepended to the quoted output directory. If
`TeX-output-dir' is nil then return an empty string."
- (let ((out-dir (TeX--master-output-dir (TeX-master-directory) t)))
+ (let ((out-dir (TeX--master-output-dir (TeX-master-directory) t t)))
(if out-dir
(concat argname "\"" out-dir "\"")
"")))
- [AUCTeX-diffs] [elpa] externals/auctex 30a7d81 11/26: Update document, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 30a7d81 11/26: Update document, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex 32e93a0 04/26: Fix bug#36651, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex d813213 12/26: Improve tool bar appearance, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex 21a725b 14/26: Fix order of arguments, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex ac9405b 13/26: * doc/auctex.texi (Modes and Hooks): Fix hook name., Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex b940950 05/26: Define `TeX-parse-all-errors' in tex.el, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex 98a059a 10/26: ; * doc/changes.texi: Fix markups., Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex f200e28 18/26: * tex-fold.el (TeX-fold-macro-spec-list): Add entry for "footref"., Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex 14e485c 20/26: ; Suppress spurious space in info output, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex a589542 15/26: Add defensive `save-match-data', Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex 097ec6c 25/26: Avoid superfluous output directories,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 5d33c2a 19/26: Be more precise about the first element in `LaTeX-math-list', Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex 0152938 22/26: Update style/ulem.el, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex 5aef4bb 16/26: Add support for LaTeX hook macros, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex f16fc13 23/26: Add entries for Texinfo mode in `TeX-command-list', Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex 2ca3d18 21/26: Fix slowdown of font lock in doctex mode, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex ceb169a 26/26: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2021/08/12
- [AUCTeX-diffs] [elpa] externals/auctex 41610c7 24/26: Add index files as clean target in Texinfo mode, Tassilo Horn, 2021/08/12