Subject: bug#63396: \foreignlanguage in babel style file

From: Gustavo Barros <[email-masked]>
Date: Wed, 10 May 2023 06:23:57 -0300

Hi Arash,

On Wed, 10 May 2023 at 04:46, Arash Esbati <[email-masked]> wrote:

> Thanks for the report.  You were thinking about a change like this?
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/style/babel.el b/style/babel.el
> index 2483b73b..2110289b 100644
> --- a/style/babel.el
> +++ b/style/babel.el
> @@ -256,6 +256,7 @@
>        (TeX-arg-completing-read (LaTeX-babel-active-languages)
>                                 "Language"))
>      '("foreignlanguage"
> +      [TeX-arg-completing-read-multiple ("date" "captions")]
>        (TeX-arg-completing-read (LaTeX-babel-active-languages)
>                                 "Language")
>        t)
> @@ -374,7 +375,6 @@
>     (when (and (featurep 'font-latex)
>                (eq TeX-install-font-lock 'font-latex-setup))
>       (font-latex-add-keywords '(("selectlanguage"     "{")
> -                                ("foreignlanguage"    "{{")
>                                  ("babeltags"          "{")
>                                  ("babelensure"        "{{")
>                                  ("shorthandon"        "{")
> @@ -394,7 +394,9 @@
>       (font-latex-add-keywords '(("defineshorthand"    "[{{")
>                                  ("aliasshorthand"     "{{")
>                                  ("languageattribute"  "{{"))
> -                              'variable)))
> +                              'variable)
> +     (font-latex-add-keywords '(("foreignlanguage"    "[{{"))
> +                              'textual)))
>   TeX-dialect)
>
>  (defvar LaTeX-babel-package-options-list
> --8<---------------cut here---------------end--------------->8---

Yes, very much so. Thank you!

Best,
Gustavo.