* 2020-11-15 22:09:39-06, Roland Winkler wrote: > On Sat Nov 14 2020 Teemu Likonen wrote: >> This can be fixed by locally let-binding fill-prefix every time in >> the relevant filling function. Patch for that is attached. > > Your patch implies that the buffer-local value of fill-prefix is not > what it should be (say, if any other command wants to use it). Yes. Bibtex-mode's filling uses fill-prefix and that variable must be set to correct value before filling. The correct moment may not be when a bibtex-mode buffer is initialized with buffer-local values. More about this below. > How about the rather different patch attached below, partly inspired > by the related comment > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21764#15 > > which had somehow escaped my attention. The issues mentioned in > this comment should likewise be fixed by the attached patch. That patch sets buffer-local value for fill-prefix correctly. I'm quite okay with that but it is not optimal. If user later changes the related settings, like (setq-local bibtex-text-indentation 25 bibtex-contline-indentation 26) and then tries to fill the current bibtex entry (C-c C-q) then only bibtex-text-indentation actually works but bibtex-contline-indentation doesn't have any effect. The wrong result is caused by the wrong value of fill-prefix, like this: @book{pitkäjohdanto, author = {Oetiker, Tobias and Partl, Hubert and Hyna, Irene and Schlegl, Elisabeth and Hell\-gren, Timo}, title = {Pitkänpuoleinen johdanto Latex 2ε:n käyttöön}, subtitle = {Eli opi Latex 2ε 133 minuutissa}, note = {Versio 4.17fi, lokakuu 2005}, date = 2005, url = {https://www.ctan.org/pkg/lshort-finnish}, } That is why I think fill-prefix should be let-bound every time. User should be able to trust that bibtex-contline-indentation does the right thing. -- /// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/ // OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450