all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "A.Politz" <politza@googlemail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to enable the syntax highlighting for comments within files having a specific extension?
Date: Thu, 27 Aug 2009 15:22:27 -0700 (PDT)	[thread overview]
Message-ID: <bd96a5cd-6008-40fb-bb0f-b65abe6f1c28@k6g2000yqn.googlegroups.com> (raw)
In-Reply-To: b289a95f-d391-44e8-93ea-5065c8227067@24g2000yqm.googlegroups.com

On Jul 16, 3:13 pm, bj <gento_distef...@hotmail.com> wrote:

>
> Here is the jou-mode.el file which I built on the basis of your
> tutorials:
[...]
>
> 2) I don't need the keywords, but if I remove the relevant entries in
> the jou-mode.el file
>    (i.e. lines 9-12, 17), the commented lines are no longer in red.
>
> 3) if the comment string "/" is in the middle of a line, like the
> division sign in an expression,
>    then the characters to the right of it are turned into red. Do you
> know how to avoid this?
>
> Thanks for your help
>
> gento


Use define-generic-mode, dude.

(define-generic-mode bj-journal-mode
  '("//") ;; use double backslash
  '("your" "keywords")
  nil
  '("\\.jou\\'")
  nil)

The comment/uncomment functions come for free, usually on M-; .

I doubt, that the comment starter really is a single backslash,
because that would be silly.

-ap





  parent reply	other threads:[~2009-08-27 22:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 11:37 How to enable the syntax highlighting for comments within files having a specific extension? gento
2009-07-15 23:51 ` Xah Lee
2009-07-16 13:13   ` bj
2009-07-17  1:14     ` Xah Lee
2009-08-27 22:22     ` A.Politz [this message]
2009-08-27 20:57 ` pjb

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=bd96a5cd-6008-40fb-bb0f-b65abe6f1c28@k6g2000yqn.googlegroups.com \
    --to=politza@googlemail.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.