From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alastair Houghton Newsgroups: gmane.emacs.devel Subject: Re: asm-mode patch to allow per-file comment character setting from file locals Date: Mon, 12 Jun 2006 10:46:06 +0100 Message-ID: <19321565-3F93-4299-996F-8A2081C462AF@alastairs-place.net> References: <2E2BAEFF-FEAD-4616-87CD-3B77D2734256@alastairs-place.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1150105592 21599 80.91.229.2 (12 Jun 2006 09:46:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Jun 2006 09:46:32 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 12 11:46:30 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Fpj05-0005tY-72 for ged-emacs-devel@m.gmane.org; Mon, 12 Jun 2006 11:46:25 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fpj04-0004gL-PR for ged-emacs-devel@m.gmane.org; Mon, 12 Jun 2006 05:46:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fpizs-0004g6-V8 for emacs-devel@gnu.org; Mon, 12 Jun 2006 05:46:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fpizr-0004ex-86 for emacs-devel@gnu.org; Mon, 12 Jun 2006 05:46:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fpizr-0004eu-2G for emacs-devel@gnu.org; Mon, 12 Jun 2006 05:46:11 -0400 Original-Received: from [212.159.14.131] (helo=pih-relay04.plus.net) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Fpj8X-0005Gx-ST for emacs-devel@gnu.org; Mon, 12 Jun 2006 05:55:10 -0400 Original-Received: from [213.162.110.205] (helo=[10.0.1.5]) by pih-relay04.plus.net with esmtp (Exim) id 1Fpizo-0004CL-3x; Mon, 12 Jun 2006 10:46:08 +0100 In-Reply-To: Original-To: Stefan Monnier X-Mailer: Apple Mail (2.750) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:55844 Archived-At: On 11 Jun 2006, at 22:20, Stefan Monnier wrote: > I don't have time to look in detail at the patch, but here are some > comments: > >> +(make-variable-buffer-local 'asm-comment-char) > > Please don't do that. USe make-local-variable where necessary > instead. The reason I chose to use make-variable-buffer-local is that I want to be able to set it from a file local variables block (either the - *- version at the top, or the version at the bottom of my assembler files). Is there a way to ensure that it's buffer local before that point without using make-variable-buffer-local? >> +(put 'asm-comment-char 'safe-local-variable t) > > Use an actual function instead rather than just t. I'm guessing you think it should check the type for int or (in XEmacs case) char. Fair comment. Kind regards, Alastair. -- http://www.alastairs-place.net