auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [a new patch]


From: Arash Esbati
Subject: Re: [a new patch]
Date: Mon, 29 Aug 2022 10:04:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Hi Uwe,

Uwe Brauer <oub@mat.ucm.es> writes:

> I hope it is now ok.

Thanks, we're almost there, I think.  Some comments below.

> * Makefile.in (STYLEELC): Add style/catchfilebetweentags.el.
>
> * tex-style.el (LaTeX-catchfilebetweentags-use-numeric-label): Add a
> new variable, that controls whether a numeric label gets inserted
> automatically. Default is t.
>
> * style/catchfilebetweentags.el: Almost complete rewrite of all
>   functions.

Just 'New file.' is enough I think.  No need to describe what happened
until the file was completed.

> +diff --git a/Makefile.in b/Makefile.in
> +--- a/Makefile.in
> ++++ b/Makefile.in
> +@@ -183,7 +183,7 @@
> +        style/ifpdf.el     style/iftex.el     style/ifvtex.el \
> +        style/ifxetex.el   style/multibib.el  style/ltcaption.el \
> +        style/keyval.el    style/kvoptions.el style/kvsetkeys.el \
> +-       style/proc.el      style/microtype.el
> ++       style/proc.el      style/microtype.el style/catchfilebetweentags.el 
 
This part doesn't apply cleanly.  Can you please update your local repo
and add this part on top of it?

> +(TeX-add-style-hook
> + "catchfilebetweentags"
> + (lambda ()
> +   (TeX-add-symbols

> +   '("CatchFileBetweenTags"
> +     "cs-name" (TeX-arg-input-file  "File-name" t) "Tag")
> +   '("CatchFileBetweenTags*"
> +     "cs-name" (TeX-arg-input-file  "File-name" t) "Tag")

Not tested, but you can use the function `TeX-arg-define-macro' for
cs-name, i.e.:

   '("CatchFileBetweenTags"
     TeX-arg-define-macro (TeX-arg-input-file  "File-name" t) "Tag")
   '("CatchFileBetweenTags*"
     TeX-arg-define-macro (TeX-arg-input-file  "File-name" t) "Tag")

> +   '("CatchFileBetweenDelims"
> +     "cs-name" (TeX-arg-input-file  "File-name" t) "start-delimiter" 
> "stop-delimiter" ["setup"]))

Same here, also start the prompt text uppercased, so something like this:

   '("CatchFileBetweenDelims"
     TeX-arg-define-macro (TeX-arg-input-file  "File-name" t)
     "Start delimiter" "Stop delimiter" ["Setup"]))

> +   (LaTeX-add-environments
> +    '("catchfilebetweenfiletags" LaTeX-env-catchfilebetweentags))
> +
> +   ;; Add `LaTeX-catchfilebetweentags-counter' to
> +   ;; `TeX-normal-mode-reset-list' in case the variable gets out of
> +   ;; sync:
> +   (add-to-list 'TeX-normal-mode-reset-list
> +                'LaTeX-catchfilebetweentags-counter)
> +   ;; Fontification
> +   (when (and (featurep 'font-latex)
> +              (eq TeX-install-font-lock 'font-latex-setup))
> +     (font-latex-add-keywords '(("ExecuteMetaData" "*[{"))

Fontification for the new macros is missing:

                                   ("CatchFileBetweenTags"   "*|{\\{{"))
                                   ("CatchFileBetweenDelims" "|{\\{{{["))
> +                              'function)))
> + TeX-dialect)
> +
> +;;; catchfilebetweentags.el ends here
> diff --git a/tex-style.el b/tex-style.el
> --- a/tex-style.el
> +++ b/tex-style.el
> @@ -408,6 +408,12 @@
>  ;; example in the docstring of `LaTeX-shortvrb-chars' isn't picked up.
>  
>  
> +(defcustom LaTeX-catchfilebetweentags-use-numeric-label t
> +  "Insert automatic numerical labels if non-nil, otherwise the
> +prompts asks you for a label name."
> +  :type 'boolean)

tex-style.el is sorted alphabetically; can you please add this before

;; style/comment.el

Best, Arash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]