[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45864: 27.1; hack-local-variables-hook is not documented in Emacs Ma
From: |
Howard Melman |
Subject: |
bug#45864: 27.1; hack-local-variables-hook is not documented in Emacs Manual |
Date: |
Tue, 19 Jan 2021 08:19:58 -0500 |
> On Jan 19, 2021, at 8:18 AM, Howard Melman <hmelman@gmail.com> wrote:
>
> On Jan 19, 2021, at 1:22 AM, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>>
>> Howard Melman <hmelman@gmail.com> writes:
>>
>>> Today I learned about the hack-local-variables-hook which
>>> allows me to correct these. I'm surprised that it and
>>> before-hack-local-variables-hook are not documented in the
>>> Emacs Manual but are only mentioned in the Elisp Reference
>>> Manual. Unless I'm misunderstanding something they're meant
>>> for users and not just for elisp programmers so they should
>>> be in the Emacs Manual.
>>
>> The doc string of the former variable says:
>>
>> ----
>> Major modes can use this to examine user-specified local variables
>> in order to initialize other data structure based on them.
>> ----
>>
>> So they are meant for people implementing major modes, which is why
>> they're in the lispref manual, and not the Emacs manual. (Users can use
>> them, too, but that's not really their purpose.)
>
> Ok, so is there another way to address my issue. Some packages set
> outline-regexp as a file local variable in their elisp source and I'd
> prefer a different value. Since file local variables are set after
> the major mode hooks are run I didn't think there was a way for me to
> override the. I know about enable-local-variables but that's about
> safety and not really granular enough for me to override an otherwise
> safe variable without having to get asked about them every time I
> visit the file. I found out about this hook and it seems to be
> exactly what I want, it lets me override the file local variables set
> in the file. Is there another way to do this? If not, can this hook
> be exposed to users for this purpose?
>
> Howard