From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Francesco Potortì" <pot@gnu.org>
Cc: 44618@debbugs.gnu.org
Subject: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation
Date: Sat, 14 Nov 2020 17:20:34 +0100 [thread overview]
Message-ID: <877dqnzz8t.fsf@gnus.org> (raw)
In-Reply-To: <E1kdYSk-00EHxr-5C@tucano.isti.cnr.it> ("Francesco Potortì"'s message of "Fri, 13 Nov 2020 13:45:58 +0100")
Francesco Potortì <pot@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
next prev parent reply other threads:[~2020-11-14 16:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 12:45 bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation Francesco Potortì
2020-11-14 16:20 ` Lars Ingebrigtsen [this message]
2020-11-16 23:31 ` Roland Winkler
2020-11-16 23:36 ` Lars Ingebrigtsen
2020-12-02 18:38 ` Roland Winkler
2020-12-03 19:39 ` Francesco Potortì
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dqnzz8t.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=44618@debbugs.gnu.org \
--cc=pot@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.