[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Declaring a variable safe
From: |
Stefan Monnier |
Subject: |
Re: Declaring a variable safe |
Date: |
Sun, 28 Mar 2010 14:20:36 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
> The way to specify that a variable is safe for certain categories of
> values is by giving it a `safe-local-variable' property. For example:
> (put 'foobar 'safe-local-variable 'booleanp)
> But what is the recommended way of doing this with a variable that is
> defined in the C sources? One possibility is to put the above form
> somewhere in a Lisp file that is preloaded, like simple.el. Is there
> a better way?
You can also call Fput in an equivalent way from C, but it's usually
a lot more convenient to do it from Elisp. I guess we could even
retarget the cus-start.el to be used specifically for these kinds of
uses where we stash Elisp that conceptually is related to the C code,
but just happens to be a lot more convenient do in Elisp.
Stefan