From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: how to define a comment syntax for files having a specific extension? Date: Mon, 02 Apr 2007 10:01:16 -0400 Message-ID: References: <1175504010.137805.217560@o5g2000hsb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175524686 19125 80.91.229.12 (2 Apr 2007 14:38:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2007 14:38:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 02 16:37:59 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 1HYNfS-0003BJ-QM for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Apr 2007 16:37:59 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYNiU-0002Se-SF for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Apr 2007 10:41:06 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.umontreal.ca!news.umontreal.ca.POSTED!not-for-mail Original-NNTP-Posting-Date: Mon, 02 Apr 2007 09:01:17 -0500 Original-Newsgroups: gnu.emacs.help,comp.emacs User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) Cancel-Lock: sha1:P90Ruii726yq2j6tR/PnYmwxLfk= Original-Lines: 18 Original-NNTP-Posting-Host: 132.204.27.213 Original-X-Trace: sv3-gyAqo96r0LE7wiq2adL5nzcC8Io6GhX2Wc/iUJp6upuGhaxuIEq8yd7+LOA/24agd+Cj+UCugPK2Hi5!Ngu2xYPp5hGGTB2xJT78Xl1m9wndCxhEjWcfPxCRsoiTvdaChpphQS/vV0S+HAOuJXgALMxxCS1N!+TD5d2iSmTaeOvNOnA== Original-X-Complaints-To: abuse@umontreal.ca X-DMCA-Complaints-To: abuse@umontreal.ca X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.34 Original-Xref: shelby.stanford.edu gnu.emacs.help:146754 comp.emacs:94048 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:42358 Archived-At: > and working on journal text files *.jou for which the commented lines > must start with the character "/". > While editing one of such files I need to run > M-: (setq comment-start "/") > in order to comment regions with the sequence C-c; > I'd like to have emacs recognize the "*.jou" files and > apply the corresponding comment syntax automatically, > sparing me from having to type > M-: (setq comment-start "/") > each time I start working on a *.jou file. You need to create a major mode for those types of files. Check out sample-mode.el Stefan