GNU bug report logs -
#44618
26.3; bibtex.el ignores file variable bibtex-contline-indentation
Previous Next
Reported by: Francesco Potortì <pot <at> gnu.org>
Date: Fri, 13 Nov 2020 12:47:01 UTC
Severity: minor
Merged with 44647
Found in versions 26.3, 27.1.50
Done: "Roland Winkler" <winkler <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 44618 <at> debbugs.gnu.org (full text, mbox):
Francesco Potortì <pot <at> gnu.org> writes:
> Whatever the reason, bibtex-mode sets fill-prefix as a local variable
> irrespective of the file variable bibtex-contline-indentation.
>
> The fix for my case is simple: avoid setting fill-prefix as a local
> variable in the minor mode, and just set it inside the
> bibtex-fill-field-bounds function. A patch follows.
>
> However, I don't know if this is a hint of some more general problem on
> how bibtex-mode trets file variables.
[...]
> - (set (make-local-variable 'fill-prefix)
> - (make-string (+ bibtex-entry-offset bibtex-contline-indentation) ?\s))
[...]
> - (let ((end-field (copy-marker (bibtex-end-of-field bounds))))
> + (let ((fill-prefix
> + (make-string (+ bibtex-entry-offset bibtex-contline-indentation) ?\s))
> + (end-field (copy-marker (bibtex-end-of-field bounds))))
This patch would make it impossible for people to alter fill-prefix
(from the mode hook, for instance), so I don't think this is the right
solution.
Looking at hack-local-variables/normal-mode, file-local variables are
set after the mode has been set up, so you can't have your mode set up
variables based on file-local variables. (If I'm wrong here, please
somebody correct me.)
So you can't usefully set
bibtex-entry-offset/bibtex-contline-indentation as file-local variables
without also setting fill-prefix that way, I think?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 4 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.