emacs-devel
[Top][All Lists]
Advanced

[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: 01 Jul 2002 23:26:12 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

>     I edited out the details but here it is:
> 
>      eval: (c-add-style "StyleX" (quote ((c-basic-offset . 4) 
> (c-offsets-alist (label . *) ...))) t)
> 
> This suggests we add a feature where a function can be marked
> as "ok to call", provided its arguments are all constant.
> That way, this would work with no user customization required.
> Similar cases with other functions could be enabled globally,
> and local customization would be easy too.

This sounds like a good feature.

> 
> We can add something more completely general if desired,
> but I suspect this will handle all actual needs.  Its advantage
> is that we can make it DTRT for most of the cases, straight out
> of the box.

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.

> 
> Please try this code.  It seemed to work for me.

Works for me too.  Thanks.

The following comment seems corrupted; "expues" should be "values".
I guess one too many replacement of "val" by "exp" :-)

        ;; Only allow safe expues of lisp-indent-hook;
        ;; not functions.
        (or (numberp (nth 3 exp))
            (equal (nth 3 exp) ''defun)))

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




reply via email to

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