> How about `auto-fill-inhibit-regexp'? I expect > (add-hook 'LaTeX-mode-hook > (lambda () > (setq-local auto-fill-inhibit-regexp ".*% *$"))) > would do the job (but didn't test it for myself).
Excellent! Thanks very much, precisely what I was looking for, although
I am not a huge fan of lambda functions in hooks, since they are
difficult to remove, so I have
--8<---------------cut here---------------start------------->8---
(defun my-add-fill-inhibit-regexp ()
(interactive)
(setq-local auto-fill-inhibit-regexp ".*% *$"))
(add-hook 'LaTeX-mode-hook 'my-add-fill-inhibit-regexp)
--8<---------------cut here---------------end--------------->8---
BTW C-h v auto-fill-inhibit-regexp
Results in
,----
| auto-fill-inhibit-regexp is a variable defined in ‘simple.el’.
|
| Its value is ".*% *$"
| Original value was nil
| Local in buffer nordstroem-field.tex; global value is "*section{"
`----
Why was the global value set to
"*section{"
and by whom? Emacs? AuCTeX?
Regards
Uwe Brauer
--
I strongly condemn Hamas heinous atrocities on Israel, especially the
despicable pogroms.
I strongly condemn Putin's war of aggression against Ukraine.
I support to deliver weapons to Ukraine's military.
I support the EU and NATO membership of Ukraine.
smime.p7s
Description: S/MIME cryptographic signature
