# HG changeset patch # User Uwe Brauer # Date 1671031517 -3600 # Wed Dec 14 16:25:17 2022 +0100 # Branch catch # Node ID 7fa71fe45e0f01dcf4dd2e3159d75eb2444ac8b9 # Parent 5217720ec9214b53579a563751c6b421cff4fed2 Add filename as a prefix to the counter for catchfilebetweentags * style/catchfilebetweentags.el (LaTeX-env-catchfilebetweentags): Add filename as a prefix to the counter. diff --git a/style/catchfilebetweentags.el b/style/catchfilebetweentags.el --- a/style/catchfilebetweentags.el +++ b/style/catchfilebetweentags.el @@ -65,15 +65,16 @@ ;; 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* ((myfile (file-name-sans-extension (file-name-nondirectory (buffer-file-name (current-buffer))))) + (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 - (concat myfile ":" + (concat file ":" (TeX-read-string (if fn (format "Tag (default %s): " fn) "Tag: ") - nil nil (when fn (number-to-string fn))))) - (number-to-string fn)) + nil nil (when fn (number-to-string fn)))))) (unless (bolp) (newline) (delete-horizontal-space))