* Is it possible to ignore all variable except 'tab-width' in dir-locals-file or local-variables?
@ 2019-10-23 0:54 Zhang Haijun
2019-10-23 6:42 ` Michael Heerdegen
0 siblings, 1 reply; 4+ messages in thread
From: Zhang Haijun @ 2019-10-23 0:54 UTC (permalink / raw)
To: help-gnu-emacs@gnu.org
Is there a custom variable like ‘user-safe-local-variables’ which can be set to ‘(tab-width) to control this?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is it possible to ignore all variable except 'tab-width' in dir-locals-file or local-variables?
2019-10-23 0:54 Is it possible to ignore all variable except 'tab-width' in dir-locals-file or local-variables? Zhang Haijun
@ 2019-10-23 6:42 ` Michael Heerdegen
2019-10-25 13:19 ` Robert Pluim
0 siblings, 1 reply; 4+ messages in thread
From: Michael Heerdegen @ 2019-10-23 6:42 UTC (permalink / raw)
To: Zhang Haijun; +Cc: help-gnu-emacs@gnu.org
Zhang Haijun <ccsmile2008@outlook.com> writes:
> Is there a custom variable like ‘user-safe-local-variables’ which can
> be set to ‘(tab-width) to control this?
Looks there is only an `ignored-local-variables' user option. The
filtering is done in `hack-local-variables-filter' if you want to look
at the code. So it seems what you want is not possible by only
configuring an option, you would have to advice
`hack-local-variables-filter'.
Michael.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is it possible to ignore all variable except 'tab-width' in dir-locals-file or local-variables?
2019-10-23 6:42 ` Michael Heerdegen
@ 2019-10-25 13:19 ` Robert Pluim
2019-10-26 0:56 ` Zhang Haijun
0 siblings, 1 reply; 4+ messages in thread
From: Robert Pluim @ 2019-10-25 13:19 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: help-gnu-emacs@gnu.org, Zhang Haijun
>>>>> On Wed, 23 Oct 2019 08:42:24 +0200, Michael Heerdegen <michael_heerdegen@web.de> said:
Michael> Zhang Haijun <ccsmile2008@outlook.com> writes:
>> Is there a custom variable like ‘user-safe-local-variables’ which can
>> be set to ‘(tab-width) to control this?
Michael> Looks there is only an `ignored-local-variables' user option. The
Michael> filtering is done in `hack-local-variables-filter' if you want to look
Michael> at the code. So it seems what you want is not possible by only
Michael> configuring an option, you would have to advice
Michael> `hack-local-variables-filter'.
Thereʼs also 'before-hack-local-variables-hook', which you could use
to munge 'file-local-variables-alist' before it gets applied.
Robert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is it possible to ignore all variable except 'tab-width' in dir-locals-file or local-variables?
2019-10-25 13:19 ` Robert Pluim
@ 2019-10-26 0:56 ` Zhang Haijun
0 siblings, 0 replies; 4+ messages in thread
From: Zhang Haijun @ 2019-10-26 0:56 UTC (permalink / raw)
To: Robert Pluim; +Cc: Michael Heerdegen, help-gnu-emacs@gnu.org
> 在 2019年10月25日,下午9:19,Robert Pluim <rpluim@gmail.com> 写道:
>
> Thereʼs also 'before-hack-local-variables-hook', which you could use
> to munge 'file-local-variables-alist' before it gets applied.
>
> Robert
Finally I used this. It works. Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-26 0:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 0:54 Is it possible to ignore all variable except 'tab-width' in dir-locals-file or local-variables? Zhang Haijun
2019-10-23 6:42 ` Michael Heerdegen
2019-10-25 13:19 ` Robert Pluim
2019-10-26 0:56 ` Zhang Haijun
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.