From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.help Subject: Re: enable-local-variables Date: Tue, 02 Jan 2007 07:56:31 +0100 Organization: nil Message-ID: <459a021e$0$30318$9b4e6d93@newsspool1.arcor-online.net> References: <1167681848.399172.255500@h40g2000cwb.googlegroups.com> <45998113$0$5712$9b4e6d93@newsspool3.arcor-online.net> <1167690432.813314.179450@i12g2000cwa.googlegroups.com> <45999042$0$30319$9b4e6d93@newsspool1.arcor-online.net> <1167697316.065889.189060@i12g2000cwa.googlegroups.com> <1167704472.683295.83360@v33g2000cwv.googlegroups.com> Reply-To: angeli@caeruleus.net NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1167723659 13277 80.91.229.12 (2 Jan 2007 07:40:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Jan 2007 07:40:59 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 02 08:40:57 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H1eGW-0005c4-Db for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Jan 2007 08:40:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1eGV-000157-TM for geh-help-gnu-emacs@m.gmane.org; Tue, 02 Jan 2007 02:40:55 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Mail-Copies-To: nobody User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux) Cancel-Lock: sha1:eS+w8DfBxMgPviUnmEfpebWsUwM= Original-Lines: 38 Original-NNTP-Posting-Date: 02 Jan 2007 07:56:31 CET Original-NNTP-Posting-Host: 86ed0287.newsspool1.arcor-online.net Original-X-Trace: DXC=koDJQh1J^hofF8a^:6>b7eic==]BZ:afn4Fo<]lROoRa^YC2XCjHcbiPUY\_l8 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40095 Archived-At: * 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