From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "gento" Newsgroups: gmane.emacs.help Subject: Re: how to define a comment syntax for files having a specific extension? Date: 3 Apr 2007 03:51:38 -0700 Organization: http://groups.google.com Message-ID: <1175597498.199053.262370@o5g2000hsb.googlegroups.com> References: <1175504010.137805.217560@o5g2000hsb.googlegroups.com> <1175527400.955307.302630@b75g2000hsg.googlegroups.com> <878xd9ud8b.fsf@voyager.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1175600279 13245 80.91.229.12 (3 Apr 2007 11:37:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Apr 2007 11:37:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 03 13:37:55 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 1HYhKY-0003LV-Gg for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Apr 2007 13:37:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYhNg-0003Zs-Tr for geh-help-gnu-emacs@m.gmane.org; Tue, 03 Apr 2007 07:40:56 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!postnews.google.com!o5g2000hsb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 25 Original-NNTP-Posting-Host: 194.244.23.251 Original-X-Trace: posting.google.com 1175597499 28886 127.0.0.1 (3 Apr 2007 10:51:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 3 Apr 2007 10:51:39 +0000 (UTC) In-Reply-To: <878xd9ud8b.fsf@voyager.informatimago.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AlcatelAleniaSpaceTurin),gzip(gfe),gzip(gfe) X-HTTP-Via: 1.0 ALTOPX01 Complaints-To: groups-abuse@google.com Injection-Info: o5g2000hsb.googlegroups.com; posting-host=194.244.23.251; posting-account=5cIYqQ0AAABojVAsiWYh-UxkA450jK-W Original-Xref: shelby.stanford.edu gnu.emacs.help:146790 comp.emacs:94051 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:42394 Archived-At: > (require 'cl) > (push `(\\.jou$" . ,(lambda () > (text-mode) > (setf comment-start "/"))) > auto-mode-alist) It has worked ! > Also you could do it with a find-file-hook, etc. I've actually preferred this solution (add-hook 'find-file-hooks (lambda () (when (string-match "\\.jou$" (buffer-file-name)) (setq comment-start "/") ) ) ) that I have adapted on the basis of your post http://groups.google.it/group/gnu.emacs.help/msg/83d7d3c1217a98b2 thank you