all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Contradiction in Elisp page "File Local Variables"
@ 2008-06-13 12:34 Alan Mackenzie
  2008-06-13 14:32 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Mackenzie @ 2008-06-13 12:34 UTC (permalink / raw)
  To: emacs-devel

Hi, Emacs!

On the Elisp page "File Local Variables", it says this about the setting
`:all' for `enable-local-variables':

    `:all'
          Set all the variables and do not query.
 
Lower down on the page, it defines `ignored-local-variables':

     This variable holds a list of variables that should not be given
     local values by files.  Any value specified for one of these
     variables is completely ignored.

The two compete with eachother.  The fine source code shows that
ignored-local-variables wins.  Here's a patch to fix it:



2008-06-13  Alan Mackenzie  <acm@muc.de>

	* variables.texi (File Local Variables): State that
	`ignored-local-variables' has a higher priority than `:all'.



*** variables.texi~	2008-06-13 11:14:38.347148200 +0000
--- variables.texi	2008-06-13 12:30:31.316991576 +0000
***************
*** 1553,1559 ****
  @item @code{:safe}
  Set only the safe variables and do not query.
  @item @code{:all}
! Set all the variables and do not query.
  @item @code{nil}
  Don't set any variables.
  @item anything else
--- 1553,1560 ----
  @item @code{:safe}
  Set only the safe variables and do not query.
  @item @code{:all}
! Set all the variables (except those in @code{ignored-local-variables})
! and do not query.
  @item @code{nil}
  Don't set any variables.
  @item anything else


Any objections to this patch?

-- 
Alan Mackenzie (Nuremberg, Germany).




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Contradiction in Elisp page "File Local Variables"
  2008-06-13 12:34 Contradiction in Elisp page "File Local Variables" Alan Mackenzie
@ 2008-06-13 14:32 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2008-06-13 14:32 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: emacs-devel

> On the Elisp page "File Local Variables", it says this about the setting
> `:all' for `enable-local-variables':

>     `:all'
>           Set all the variables and do not query.
 
> Lower down on the page, it defines `ignored-local-variables':

>      This variable holds a list of variables that should not be given
>      local values by files.  Any value specified for one of these
>      variables is completely ignored.

> The two compete with eachother.  The fine source code shows that
> ignored-local-variables wins.  Here's a patch to fix it:

I guess your patch is OK, although I'd prefer a new wording that makes
it unnecessary to refer from one variable/value to the other.
E.g. if :all only said something along the lines of "Pretend the user
replies yes to all queries" [obviously that wording is bad, don't
bother shooting it down].


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-13 14:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-13 12:34 Contradiction in Elisp page "File Local Variables" Alan Mackenzie
2008-06-13 14:32 ` Stefan Monnier

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.