[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex e8528e0 56/62: Update style/subfi
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex e8528e0 56/62: Update style/subfiles.el to package version 2.1 |
Date: |
Sun, 20 Dec 2020 10:40:06 -0500 (EST) |
branch: externals/auctex
commit e8528e03aaad55a7720f7d7506088917962283c9
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>
Update style/subfiles.el to package version 2.1
* style/subfiles.el (LaTeX-subfiles-class-options): Use \' to
match the empty string at the end of the file extension.
("subfiles"): Add support for \subfileinclude macro.
---
style/subfiles.el | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/style/subfiles.el b/style/subfiles.el
index f23cc9f..5434f99 100644
--- a/style/subfiles.el
+++ b/style/subfiles.el
@@ -54,7 +54,7 @@
(read-file-name
"Main file: " nil nil nil nil
(lambda (texfiles)
- (string-match "\\.tex$" texfiles)))
+ (string-match "\\.tex\\'" texfiles)))
(TeX-master-directory)))
(TeX-add-style-hook
@@ -70,30 +70,37 @@
(file-name-sans-extension master-file))))
(TeX-add-symbols
- '("subfile" TeX-arg-file))
+ '("subfile" TeX-arg-file)
+ '("subfileinclude" TeX-arg-file))
- ;; Ensure that \subfile stays in one line
- (LaTeX-paragraph-commands-add-locally "subfile")
+ ;; Ensure that \subfile and \subfileinclude stay in one line
+ (LaTeX-paragraph-commands-add-locally '("subfile" "subfileinclude"))
;; Tell AUCTeX that \subfile loads a file. regexp is the same as
;; for \input or \include. This will run `TeX-run-style-hooks' on
;; subfile(s) when master file is loaded.
(TeX-auto-add-regexp
`(,(concat
- "\\\\subfile"
+ "\\\\subfile\\(?:include\\)?"
"{\\(\\.*[^#}%\\\\\\.\n\r]+\\)\\(\\.[^#}%\\\\\\.\n\r]+\\)?}")
1 TeX-auto-file))
;; Tell RefTeX the same thing.
(when (and (boundp 'reftex-include-file-commands)
- (not (member "subfile" reftex-include-file-commands)))
- (add-to-list 'reftex-include-file-commands "subfile" t)
+ (not (string-match "subfile"
+ (mapconcat #'identity
+ reftex-include-file-commands
+ "|"))))
+ (make-local-variable 'reftex-include-file-commands)
+ (add-to-list 'reftex-include-file-commands "subfile\\(?:include\\)?" t)
(reftex-compile-variables))
- ;; The following code will fontify `\subfile{}' like \input.
+ ;; The following code will fontify \subfile{} and
+ ;; \subfileinclude{} like \input.
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
- (font-latex-add-keywords '(("subfile" "{"))
+ (font-latex-add-keywords '(("subfile" "{")
+ ("subfileinclude" "{"))
'reference)))
TeX-dialect)
- [AUCTeX-diffs] [elpa] externals/auctex 8afd11e 03/62: ; Silence the compiler, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 8afd11e 03/62: ; Silence the compiler, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex e9af4f1 14/62: * style/fancyvrb.el: Replace dynamically bound `optional'., Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex cebf8cc 16/62: Enable lexical-binding for texmathp.el, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 4c1430a 20/62: Add new style/appendix.el, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex bf30c11 05/62: Make "%o" compatible again with file name with spaces, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex b41e063 62/62: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex fc037de 44/62: ; Fix byte-compiler warnings in styles, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex 6f232c3 52/62: ; Fix byte-compile warnings in styles, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex ced4b1a 10/62: Adapt styles to lexical-binding, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex bacae01 45/62: ; Fix byte-compiler warnings in styles, Tassilo Horn, 2020/12/20
- [AUCTeX-diffs] [elpa] externals/auctex e8528e0 56/62: Update style/subfiles.el to package version 2.1,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex a5c2dd9 61/62: Document lexical binding changes., Tassilo Horn, 2020/12/20