Hongyi Zhao <[email protected]> writes:
> But in my case, when I'm in a LaTeX mode buffer defined by AUCTeX,
> `C-h v fill-paragraph-function RET` gives the following:
>
> ```
> fill-paragraph-function is a variable defined in ‘fill.el’.
>
> Its value is nil
>
> Mode-specific function to fill a paragraph, or nil if there is none.
> If the function returns nil, then ‘fill-paragraph’ does its normal work.
> A value of t means explicitly "do nothing special".
> Note: This only affects ‘fill-paragraph’ and not ‘fill-region’
> nor ‘auto-fill-mode’, so it is often better to use some other hook,
> such as ‘fill-forward-paragraph-function’.
>
> This variable may be risky if used as a file-local variable.
> Probably introduced at or before Emacs version 19.29.
>
> [back]
This is what AUCTeX has in latex.el:
(defun LaTeX-common-initialization ()
"Common initialization for LaTeX derived modes."
(setq-local indent-line-function #'LaTeX-indent-line)
;; Filling
(setq-local paragraph-ignore-fill-prefix t)
(setq-local fill-paragraph-function #'LaTeX-fill-paragraph)
(setq-local adaptive-fill-mode nil)
...)
Again, I can't tell why you get something else. You should investigate
with a recipe starting with "emacs -Q" and activate only AUCTeX. But
you know by now 👍
Best, Arash