all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Dimech <dimech@gmx.com>
To: moasenwood@zoho.eu
Cc: help-gnu-emacs@gnu.org
Subject: Re: tex-mode.el
Date: Thu, 11 Feb 2021 04:27:52 +0100	[thread overview]
Message-ID: <trinity-08ef6b69-2a67-45df-8eea-137487393847-1613014072878@3c-app-mailcom-bs12> (raw)
In-Reply-To: <87tuqje1ot.fsf@zoho.eu>

I think that I have found a problem with my code, because when I applied
the two commands mentioned for tex-mode.el the fontifying was disabled on
the entire buffer.

(setq-local tex-fontify-script nil)
(font-lock-flush)

I am actually trying to write a minor-mode for suscript to work also
for texinfo, when one can call tex commands.  For texinfo, the
fontifying is enabled as soon as the mode is called.  However, for
my minor mode I would like that a function would set things up, and
another to disable it.

Have copied the following code parts from tex-mode.el and want to
write a function that enables the raising and lowering fontification.
And anothr that I can call to disable.  Have fount the setup in
tex-mode.el quite complicated.

--------

(defcustom tex-fontify-script t)
(defcustom tex-font-script-display '(-0.2 0.2))
(defcustom tex-suscript-height-ratio 0.8)
(defcustom tex-suscript-height-minimum 0.0)
(defun tex-suscript-height height)

(defface superscript )
(defface subscript )

(defun tex-font-lock-match-suscript limit)
(defun tex-font-lock-suscript pos)
(defun tex-font-lock-unfontify-region beg end)



> Sent: Thursday, February 11, 2021 at 3:13 PM
> From: "Emanuel Berg via Users list for the GNU Emacs text editor" <help-gnu-emacs@gnu.org>
> To: help-gnu-emacs@gnu.org
> Subject: Re: tex-mode.el
>
> Christopher Dimech wrote:
>
> > Still same problem
> >
> > (setq-local tex-fontify-script nil)
> > (font-lock-flush)
> >
> > It works in the sense that when I call it the new text is
> > not fontified. However, the text that was already fontified
> > remains fontified.
>
> Does it work for you when you start Emacs with -Q?
>
> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>



  reply	other threads:[~2021-02-11  3:27 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 17:13 tex-mode.el Christopher Dimech
2021-02-09 17:22 ` tex-mode.el Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 17:45   ` tex-mode.el Christopher Dimech
2021-02-09 18:15     ` tex-mode.el Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 18:26       ` tex-mode.el Christopher Dimech
2021-02-09 18:37         ` tex-mode.el Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 18:52           ` tex-mode.el Christopher Dimech
2021-02-09 19:05             ` tex-mode.el Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 19:39               ` tex-mode.el Christopher Dimech
2021-02-09 19:45               ` tex-mode.el Christopher Dimech
2021-02-10 20:43               ` tex-mode.el Christopher Dimech
2021-02-10 20:49                 ` tex-mode.el Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-10 21:01                   ` tex-mode.el Christopher Dimech
2021-02-10 21:21                     ` tex-mode.el Stefan Monnier
2021-02-10 21:25                       ` tex-mode.el Christopher Dimech
2021-02-10 21:30                         ` tex-mode.el Stefan Monnier
2021-02-10 21:54                           ` tex-mode.el Christopher Dimech
2021-02-11  3:13                     ` tex-mode.el Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-11  3:27                       ` Christopher Dimech [this message]
2021-02-09 20:13         ` tex-mode.el tomas
2021-02-09 20:26           ` tex-mode.el Christopher Dimech
2021-02-09 20:45             ` tex-mode.el tomas
2021-02-10  3:53               ` tex-mode.el Michael Heerdegen
2021-02-10  4:01                 ` tex-mode.el Christopher Dimech
2021-02-11  3:42                   ` tex-mode.el Michael Heerdegen
2021-02-11  4:01                     ` tex-mode.el Christopher Dimech
2021-02-11  4:11                       ` tex-mode.el Michael Heerdegen
2021-02-11  4:27                         ` tex-mode.el Christopher Dimech
2021-02-11 13:29                         ` tex-mode.el Christopher Dimech
2021-02-11 21:11                   ` tex-mode.el Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-11 23:08                     ` tex-mode.el Christopher Dimech
  -- strict thread matches above, loose matches on Subject: below --
2010-09-20 14:18 tex-mode.el Sean Sieger
2010-09-20 15:27 ` tex-mode.el Stefan Monnier
2010-09-20 15:48   ` tex-mode.el Sean Sieger
2005-02-26 15:10 tex-mode.el Eli Zaretskii
2005-02-26 15:16 ` tex-mode.el Luc Teirlinck
2005-02-27 13:43 ` tex-mode.el Richard Stallman

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=trinity-08ef6b69-2a67-45df-8eea-137487393847-1613014072878@3c-app-mailcom-bs12 \
    --to=dimech@gmx.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /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.