From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: exits funnel Newsgroups: gmane.emacs.help Subject: Re: comment / uncomment region Date: Mon, 2 Aug 2004 20:12:30 -0700 (PDT) Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <20040803031230.19350.qmail@web52907.mail.yahoo.com> References: <87isc339ir.fsf@thalassa.informatimago.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1091502794 4438 80.91.224.253 (3 Aug 2004 03:13:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Aug 2004 03:13:14 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 03 05:13:08 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Brpjg-0003Af-00 for ; Tue, 03 Aug 2004 05:13:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Brpn6-0004F3-C8 for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Aug 2004 23:16:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Brpmn-0004BK-RO for help-gnu-emacs@gnu.org; Mon, 02 Aug 2004 23:16:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Brpmm-0004Ay-6F for help-gnu-emacs@gnu.org; Mon, 02 Aug 2004 23:16:21 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Brpmm-0004Ao-1d for help-gnu-emacs@gnu.org; Mon, 02 Aug 2004 23:16:20 -0400 Original-Received: from [206.190.39.184] (helo=web52907.mail.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1Brpj4-000096-LD for help-gnu-emacs@gnu.org; Mon, 02 Aug 2004 23:12:30 -0400 Original-Received: from [67.86.87.9] by web52907.mail.yahoo.com via HTTP; Mon, 02 Aug 2004 20:12:30 PDT Original-To: Pascal Bourguignon , help-gnu-emacs@gnu.org In-Reply-To: <87isc339ir.fsf@thalassa.informatimago.com> 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19952 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19952 > Or, if you don't want to program a mode for your > grammar files you > could have a find-file-hook that would check the > file type (or file > name extension) and would initialize the buffer > environment when it > finds that a grammar is being opened. Something > like: > > (add-hook 'find-file-hook > (lambda () > (when (string-match "\\.grammar$" > (buffer-file-name)) > (setf comment-start "//") > ;; ... > ))) Actually, I was surprised to find that adding this to my .emacs file didn't have any affect. If I replaced the setf with a call to message( ) it similarly was not being exectued when I visited a .grammar file. I'm running emacs 21.3.1 on Redhat Linux. This seems simple enough. Any thoughts? Thanks. -exits __________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail