unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: how to define a comment syntax for files having a specific extension?
Date: Tue, 03 Apr 2007 18:27:04 +1000	[thread overview]
Message-ID: <87y7l9oobr.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: 1175527400.955307.302630@b75g2000hsg.googlegroups.com

"gento" <gento_distefano@hotmail.com> writes:

>> You need to create a major mode for those types of files.
>> Check out sample-mode.el
>
> Thank you Stefan.
>
> Is there a simplest way for reaching this scope,
> for example by modifying the ~/.emacs file only?
>

If the only issue is defining what emacs things is a comment, couldn't youjust
modify the syntax table and set the appropriate value to mark the comment
character? 

If not, its *really* easy to define a derived mode. You could derive a specific
mode for these files from text or fundamental mode. There is an example of a
derived mode on the meacs wiki I think (http://www.emacswiki.org).

tim

-- 
tcross (at) rapttech dot com dot au

      parent reply	other threads:[~2007-04-03  8:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-02  8:53 how to define a comment syntax for files having a specific extension? gento
2007-04-02 14:01 ` Stefan Monnier
2007-04-02 15:23   ` gento
2007-04-03  7:30     ` Pascal Bourguignon
2007-04-03 10:51       ` gento
2007-04-03  8:27     ` Tim X [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y7l9oobr.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).