Hi Gustavo, Gustavo Barros <[email protected]> writes:
> On Sat, 01 May 2021 at 19:10, Arash Esbati <[email protected]> wrote: > >>>> (run-hooks 'TeX-language-br-hook)) >>> >>> I have here `TeX-language-pt-BR-hook', and I don't recall why. Why >>> did you go with just "br" there? >> >> All other styles use this pattern, this is the reason why I took it. >> Have a look over here[1]. >> > > That was not my point here. I was just concerned if this language > code was coming hardcoded from somewhere else. But, if I understand > it, this is actually a convenience hook for language style files, > which is not actually being called from or generated elsewhere. Is > that correct? This is actually a convenience hook for users. From the manual[1]: 5.4.1.2 Style Files for Different Languages Each style file may modify AUCTeX to better support the language, and will run a language specific hook that will allow you to for example change ispell dictionary, or run code to change the keyboard remapping. The following will for example choose a Danish dictionary for documents including `\usepackage[danish]{babel}'. This requires parsing to be enabled, see Parsing Files. (add-hook 'TeX-language-dk-hook (lambda () (ispell-change-dictionary "danish"))) The name of the hook is chosen by the style author. As far as I understand AUCTeX uses ISO 639-1 Code for language names. Following this logic, I agree that there is no language code "br". > If so, I think "br" is not the best choice here. I changed it to "pt-br". > Also, in that regard, perhaps using > `LaTeX-portuguese-mode-syntax-table' for all four babel variants, > including `brazilian' might make sense. Though there is a difference > in the quote marks usage, there is none on the side of the syntax > table. But I'm fine either way, this is just "fine print". I now have for styles: Main styles "brazilian.el" and "portuguese.el", and "brazil.el" and "portuges.el" which just run one of the former ones. I think with this setup things should work out. > Yes, for `portuguese.el' and `portuges.el', it is guillemots to the > best of my knowledge. Though I think a "FIXME" comment would be > appropriate, as mentioned. The styles are attached. Can you please review them one last time? Then I will push them to AUCTeX repo and also update the manual.
<<attachment: pt-br.zip>>
One note from my side: The name of the marks is `guillemets'[2]; guillemot is a bird :-) Best, Arash Footnotes: [1] https://www.gnu.org/software/auctex/manual/auctex.html#Style-Files-for-Different-Languages [2] https://en.wikipedia.org/wiki/Guillemet
