From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Eric Twietmeyer" Newsgroups: gmane.emacs.help Subject: Re: enable-local-variables Date: 1 Jan 2007 14:27:12 -0800 Organization: http://groups.google.com Message-ID: <1167690432.813314.179450@i12g2000cwa.googlegroups.com> References: <1167681848.399172.255500@h40g2000cwb.googlegroups.com> <45998113$0$5712$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: sea.gmane.org 1167691301 17357 80.91.229.12 (1 Jan 2007 22:41:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Jan 2007 22:41:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 01 23:41:40 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 1H1Vqd-0000bR-Fe for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Jan 2007 23:41:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H1Vqc-00008j-UB for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Jan 2007 17:41:38 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!i12g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 55 Original-NNTP-Posting-Host: 69.254.192.192 Original-X-Trace: posting.google.com 1167690438 31543 127.0.0.1 (1 Jan 2007 22:27:18 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 1 Jan 2007 22:27:18 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: i12g2000cwa.googlegroups.com; posting-host=69.254.192.192; posting-account=X4mNGgwAAABKvPB38ntAu46e-VHbLqgS Original-Xref: shelby.stanford.edu gnu.emacs.help:144484 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:40087 Archived-At: Ralf Angeli wrote: > * Eric Twietmeyer (2007-01-01) writes: > > > I just upgraded to emacs 22.0.92.1. I write C++ code and there is a > > local variable "typedefs" that is used for syntax highlighting. Now > > that I have upgraded I find that every buffer I open that has this > > local variable "typedefs" in it I am presented with a dialog asking > > that I confirm that the local variable is "safe". > [...] > > However, there doesn't appear to be any way to specify that the local > > variable "typedefs" should always be accepted as safe, regardless of > > its values. Each C++ file I visit will have a different value of > > "typedefs", so I can't in any reasonable way create a var, val cons > > list of safe values. It would be thousands of entries long. > > You can specify a function as a symbol property for the variable. The > function is supposed to check if the values given to the variable have > the correct type. Since you didn't write which kind of values are > supposed to be assigned to the variable, it is not possible to give a > specific advice. > > I'd also be interested in knowing which package or code uses the > variable before giving you a means to shoot yourself in the foot. > > -- > Ralf Here is what the text looks like at the bottom of a typical C++ file I edit: /* Local Variables: typedefs:("boost" "noncopyable" "shared_ptr" "size_t" "std" "string" "tCursorIPtr" "tDestroyI" "tEndian" "tStreamI" "tStreamIPtr" "wchar_t" "wstring") End: */ So the value of "typedefs" is just a list of quoted symbols. This list changes from file to file. It is used by the syntax highlighting code in C/C++ mode. The question therefore remains, what can I do so that all such values of typedefs are always considered "safe". I'm not certain why this is being flagged in the first place, as the documentation I saw about ricky variables indicates that their name should end in some special characters, and my typedefs do not end in such characters. So I have been confused from the start why this is marked as risky in the first place and therefore why I am being queried about it each time I open the file. Thanks again, -Eric Twietmeyer