From: "gento" <gento_distefano@hotmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: how to define a comment syntax for files having a specific extension?
Date: 3 Apr 2007 03:51:38 -0700 [thread overview]
Message-ID: <1175597498.199053.262370@o5g2000hsb.googlegroups.com> (raw)
In-Reply-To: <878xd9ud8b.fsf@voyager.informatimago.com>
> (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
next prev parent reply other threads:[~2007-04-03 10:51 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 [this message]
2007-04-03 8:27 ` Tim X
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1175597498.199053.262370@o5g2000hsb.googlegroups.com \
--to=gento_distefano@hotmail.com \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.