[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f2138e9a: New option for saving auto parsed information (bug#5551
From: |
Ikumi Keita |
Subject: |
master f2138e9a: New option for saving auto parsed information (bug#55511) |
Date: |
Fri, 27 May 2022 05:02:13 -0400 (EDT) |
branch: master
commit f2138e9a748dd1a227c7b7290c7725508f65486c
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
New option for saving auto parsed information (bug#55511)
* tex.el (TeX-auto-save-aggregate): New option. When non-nil, save
parsed information in "auto" subdirectory of master
directory. (Traditional behavior)
When nil, save in each @file{auto} subdirectory of the parsed file.
---
doc/auctex.texi | 20 ++++++++++++++------
tex.el | 15 ++++++++++++++-
2 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/doc/auctex.texi b/doc/auctex.texi
index 89527853..a2a04525 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -4305,7 +4305,7 @@ all files in the document. This means that you will get
from each file,
for example, completion for all labels defined anywhere in the document.
@AUCTeX{} will create the @file{auto} directory automatically if
-@code{TeX-auto-save} is non-nil. Without it, the files in the document
+@code{TeX-auto-save} is non-@code{nil}. Without it, the files in the document
will not know anything about each other, except for the name of the
master file. @xref{Automatic Local}.
@@ -5080,15 +5080,14 @@ These correspond to the personal @TeX{} macros.
@cindex Local style directory
@AUCTeX{} can update the style information about a file each time you
-save it, and it will do this if the directory @code{TeX-auto-local}
-exists. @code{TeX-auto-local} is by default set to @samp{"auto"}, so
-simply creating an @file{auto} directory will enable automatic saving of
-style information.
+save it if @code{TeX-auto-save} option is enabled. Saved information will
+be stored in the directory @code{TeX-auto-local}, set to @samp{"auto"} by
+default.
The advantage of doing this is that macros, labels, etc.@: defined in any
file in a multifile document will be known in all the files in the
document. The disadvantage is that saving will be slower. To disable,
-set @code{TeX-auto-local} to nil.
+set @code{TeX-auto-local} to @code{nil}.
@defopt TeX-style-local
Directory containing hand generated @TeX{} information.
@@ -5102,6 +5101,15 @@ Directory containing automatically generated @TeX{}
information.
These correspond to @TeX{} macros found in the current directory.
@end defopt
+@defopt TeX-auto-save-aggregate
+When non-@code{nil}, save parsed information in @file{auto} subdirectory
+of master directory.
+
+Otherwise, save in each @file{auto} subdirectory of the parsed file.
+
+Subdirectory name is actually taken from @code{TeX-auto-local}.
+@end defopt
+
@node Style Files
@section Writing Your Own Style Support
@cindex Style files
diff --git a/tex.el b/tex.el
index 46a23abd..bd1454f6 100644
--- a/tex.el
+++ b/tex.el
@@ -3963,6 +3963,17 @@ Generated by `TeX-auto-add-type'.")
:group 'TeX-parse
:type 'boolean)
+(defcustom TeX-auto-save-aggregate t
+ "When non-nil, save parsed information in one directory.
+Each style file of automatically parsed information is saved in
+\"auto\" subdirectory of master file.
+
+When nil, saves in each \"auto\" subdirectory.
+
+Subdirectory name is actually taken from `TeX-auto-local'."
+ :group 'TeX-parse
+ :type 'boolean)
+
(defun TeX-auto-write ()
"Save all relevant TeX information from the current buffer."
(if TeX-auto-untabify
@@ -3973,7 +3984,9 @@ Generated by `TeX-auto-add-type'.")
(file-name-as-directory TeX-auto-local)
(TeX-strip-extension nil TeX-all-extensions t)
".el")
- (TeX-master-directory)))
+ (if TeX-auto-save-aggregate
+ (TeX-master-directory)
+ default-directory)))
(dir (file-name-directory file)))
;; Create auto directory if possible.
(if (not (file-exists-p dir))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f2138e9a: New option for saving auto parsed information (bug#55511),
Ikumi Keita <=