[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] allow function values for `enable-local-eval'

From: Kim F. Storm
Subject: Re: [PATCH] allow function values for `enable-local-eval'
Date: 02 Jul 2002 23:49:53 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Stefan Monnier" <monnier+gnu/address@hidden> writes:

> >     Well, I still need to do
> >         (put 'c-add-style 'safe-local-eval-function t)
> >     in my .emacs, but that's easier than writing my own
> >     hook function.
> > 
> > We will do that by default for c-add-style, and various other
> > safe functions for which users request it.
> I'm sure crackers will be happy about it.
> The argument passed to `c-add-style' allows you to buffer-locally
> set any variable to any value whatsoever.  Hardly "safe" in my book.

I think it would be both simpler and safer to just provide a list
variable, e.g. safe-local-eval-list, and let the user add his
well-known eval hooks to it; the hook-code should then simply see if a
questionable eval hook is a "member" of that list.

E.g. I could add that specific 
        '(c-add-style "StyleX" '(....)))
to the list.

And Karl could add his '(load "...") to the list.

A much better approach IMHO.

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]