[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 eb7b8d4de4 44/76: * style/listings.el ("listings"): Replace `TeX-arg-eval'., (continued)
- [elpa] externals/auctex eb7b8d4de4 44/76: * style/listings.el ("listings"): Replace `TeX-arg-eval'., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex ba70baec6c 27/76: Fix doc strings regarding to section commands, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 83622003aa 46/76: * style/enumitem.el ("enumitem"): Replace `TeX-arg-eval'., 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 8984821716 74/76: ; * style/natbib.el ("natbib"): Fontify \citetext., Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 54c82bd093 67/76: New style file physics.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex 8941bd640f 33/76: * style/fontspec.el ("fontspec"): Replace `TeX-arg-eval'., 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 a57e627284 59/76: Improve consistency between similar functions, 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 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 1a72c0f884 32/76: Simplify implementation of style/floatrow.el, Tassilo Horn, 2023/01/13
- [elpa] externals/auctex b7b498baad 40/76: Simplify implementation of style/graphicx.el, Tassilo Horn, 2023/01/13