help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: enable-local-variables


From: Ralf Angeli
Subject: Re: enable-local-variables
Date: Tue, 02 Jan 2007 07:56:31 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux)

* Eric Twietmeyer (2007-01-02) writes:

> Eric Twietmeyer wrote:
>> Ralf Angeli wrote:
>> >
>> > Then
>> > (put 'typedefs 'safe-local-variable 'listp)
>> > should work.
[...]
>> Ok, now I understand the confusion.  I didn't realize that my extended
>> .emacs had code I took long ago from someone that added this "feature",
>> I thought it was part of the standard font-lock stuff.  Here is the
>> relevant code:

You could propose something like that as a feature request to CC mode
maintainers.

>> So what do I need to do to make this typedef variable always safe?  Or
>> where do I look in the docs to learn how to do this?

See above.

> Well, looking through files.el where all of this stuff is used, it
> looks like perhaps this is what I needed to do:
>
> (defvar typedefs nil "Typedefs in this buffer.")
> (make-variable-buffer-local 'typedefs)
> (put 'typedefs 'safe-local-variable '(lambda (x) t))
>
> It looked like the safe-local-variable property is what controls
> things.
>
> Please let me know if this is the correct way, thanks!

See above.

-- 
Ralf


reply via email to

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