[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 46c1a5a592 63/76: Add filename as a prefix to ca
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 46c1a5a592 63/76: Add filename as a prefix to catchfilebetweentags counter |
Date: |
Fri, 13 Jan 2023 14:31:06 -0500 (EST) |
branch: externals/auctex
commit 46c1a5a592e702babfc7f32458dc5cc8f802f3ae
Author: Uwe Brauer <oub@mat.ucm.es>
Commit: Arash Esbati <arash@gnu.org>
Add filename as a prefix to catchfilebetweentags counter
* style/catchfilebetweentags.el (LaTeX-env-catchfilebetweentags):
Add filename as a prefix to the counter.
---
style/catchfilebetweentags.el | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/style/catchfilebetweentags.el b/style/catchfilebetweentags.el
index 27c67e23d6..6354f15f19 100644
--- a/style/catchfilebetweentags.el
+++ b/style/catchfilebetweentags.el
@@ -51,7 +51,7 @@
(setq LaTeX-catchfilebetweentags-counter 0)
(save-excursion
(goto-char (point-min))
- (while (re-search-forward (concat "^%<\\*\\([^>]+\\)>$")
+ (while (re-search-forward "^%<\\*[^:]*:\\([^>]+\\)>$"
(point-max) t)
(let ((fn (string-to-number (match-string 1))))
(when (> fn LaTeX-catchfilebetweentags-counter)
@@ -62,11 +62,18 @@
(defun LaTeX-env-catchfilebetweentags (_environment)
"Insert a tag-skeleton defined by `LaTeX-catchfilebetweentags'.
ENVIRONMENT is ignored."
- (let* ((fn (when LaTeX-catchfilebetweentags-use-numeric-label
+ ;; The following code, adds the file name as a prefix to the tag, in
+ ;; a similar way reftex does this, which is useful for combining
+ ;; several external files to a singular one.
+ (let* ((file (file-name-sans-extension
+ (file-name-nondirectory
+ (buffer-file-name (current-buffer)))))
+ (fn (when LaTeX-catchfilebetweentags-use-numeric-label
(LaTeX-catchfilebetweentags-counter-inc)))
- (tag (TeX-read-string
- (if fn (format "Tag (default %s): " fn) "Tag: ")
- nil nil (when fn (number-to-string fn)))))
+ (tag (concat file ":"
+ (TeX-read-string
+ (if fn (format "Tag (default %s): " fn) "Tag: ")
+ nil nil (when fn (number-to-string fn))))))
(unless (bolp)
(newline)
(delete-horizontal-space))
@@ -85,7 +92,6 @@ ENVIRONMENT is ignored."
[TeX-arg-input-file "File" t] "Tag")
'("ExecuteMetaData*"
[TeX-arg-input-file "File" t] "Tag")
-
'("CatchFileBetweenTags"
TeX-arg-define-macro (TeX-arg-input-file "File-name" t) "Tag")
'("CatchFileBetweenTags*"
- [elpa] externals/auctex bf66b302a4 61/76: Improve the previous commit slightly, (continued)
- [elpa] externals/auctex bf66b302a4 61/76: Improve the previous commit slightly, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex b7b498baad 40/76: Simplify implementation of style/graphicx.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 7f9e7ec8a1 05/76: * style/array.el ("array"): Replace `TeX-arg-eval' with a closure., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 1a72c0f884 32/76: Simplify implementation of style/floatrow.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex ac7ad4fff4 36/76: Simplify implementation of style/footmisc.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 33bb54bb9e 38/76: Simplify implementation of style/geometry.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex dc6e8c44c9 72/76: Turn `y-or-n-p' into `always' for in-buffer completion, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex e4ceb88bb7 14/76: Bind a value to `LaTeX-current-environment' locally, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 4b9dafad86 29/76: Simplify implementation of style/fancyvrb.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 982b20571c 48/76: * style/ltxdoc.el ("ltxdoc"): Replace `TeX-arg-eval'., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 46c1a5a592 63/76: Add filename as a prefix to catchfilebetweentags counter,
Tassilo Horn <=
- [elpa] externals/auctex 2d0fdebac0 69/76: Preserve braces after @TeX and similar macros., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 30bca31f77 71/76: ; * style/xcolor.el ("xcolor"): Replace `TeX-arg-eval'., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 643d39a10c 75/76: Update Pygments style names, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 3806176ba2 56/76: Fix argument description in doc strings, Tassilo Horn, 2023/01/13