On Thu, Nov 6, 2025 at 7:49 PM Arash Esbati <[email protected]> wrote: > > Hongyi Zhao <[email protected]> writes: > > > Firstly, this is a function defined by Emacs itself, as you mentioned, > > it does not come from AUCTeX. > > AUCTeX does this in order to adjust M-q in LaTeX-mode: > > fill-paragraph-function is a variable defined in ‘fill.el’. > > Its value is ‘LaTeX-fill-paragraph’ > Local in buffer foo.tex; global value is nil > > Mode-specific function to fill a paragraph, or nil if there is none.
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] ``` > > Furthermore, I really can't understand why you say this function has > > such great charm and can be called a killer feature. > > That's Ok, I think, and as I said, that's only my preference. I've had > many ill-formated .tex or other files in my life and hitting M-q was > usually the savior. I think this feature should be available in many other LaTeX editors, but it's just a guess which I haven't verified. > Best, Arash Regards, Zhao
