unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Christopher Dimech <dimech@gmx.com>
To: Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: tex keywords and positioning
Date: Mon, 8 Feb 2021 19:24:02 +0100	[thread overview]
Message-ID: <trinity-c635c2b4-cc9a-4a96-acbc-5dffb2673225-1612808642346@3c-app-mailcom-bs12> (raw)

I have a minor-mode with the option to (1) highlight tex keywords [] and
(2) positioning superscripts and subscripts [supinf].

With the minor mode enabled I want highlight tex keywords only and when
crucible-supinf-enable do the positioning.

Perhaps people have some ideas that would make the code
simpler than what I have done below.

(defun supinf-typeface-crucible ()
  "Font-lock setup for mathematical symbols."
  (font-lock-flush (point-min) (point-max))

  (if crucible-mode
      (font-lock-add-keywords nil tex-keywords-cruc t)
    (font-lock-remove-keywords nil tex-keywords-cruc))

  (if crucible-supinf-enable
      (font-lock-add-keywords nil supinf-font-lock-cruc t)
  (supinf-disable-cruc (point-min) (point-max)))

  (font-lock-flush (point-min) (point-max)))





                 reply	other threads:[~2021-02-08 18:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=trinity-c635c2b4-cc9a-4a96-acbc-5dffb2673225-1612808642346@3c-app-mailcom-bs12 \
    --to=dimech@gmx.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.
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).