ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Jan-Erik Hägglöf" <skrantajanneman@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Custom highlight ConTeXt syntax in AUCTEX
Date: Wed, 19 Jul 2023 15:38:25 +0200	[thread overview]
Message-ID: <CAGoFJiviPT+qDDMu6CiVeB3PLUmfNXhUQvOTwL3txE05xwqWcA@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 975 bytes --]

Dear All!
I've been using emacs AUCTEX for quite a while and found it very convenient
to work with.

One issue is the lack of syntax highlighting.

I've tried some elisp code and added the following hook when I'm in
ConTeXt-mode:

(add-hook 'ConTeXt-mode-hook
          (lambda ()
            (font-lock-add-keywords nil
                                    '(("\\(\\\\starttext\\)\\>" 1
font-lock-warning-face t)
                                      ("\\(\\\\stoptext\\)\\>" 1
font-lock-warning-face t)))))

and it seems to highlight the start-stop text keyword.

So my question is:
Is there a way to accomplish a similar way of highlighting all other
keywords that belongs to the ConTeXt typesetting syntax?

Maybe a REGEXP (I'm not good at writing those) can do this in some way
without manually write every start-stop sequence that exists.

Have anyone, using AUCTEX, already did some customizing already who wants
to share it with me.

Many thanks in advance

/Jan-Erik

[-- Attachment #1.2: Type: text/html, Size: 1367 bytes --]

[-- Attachment #2: Type: text/plain, Size: 495 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2023-07-19 13:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 13:38 Jan-Erik Hägglöf [this message]
2023-07-19 15:18 ` [NTG-context] " Henning Hraban Ramm
2023-07-19 20:48   ` skrantajanneman

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=CAGoFJiviPT+qDDMu6CiVeB3PLUmfNXhUQvOTwL3txE05xwqWcA@mail.gmail.com \
    --to=skrantajanneman@gmail.com \
    --cc=ntg-context@ntg.nl \
    /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 NNTP newsgroup(s).