help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: font-lock as a single command


From: Christopher Dimech
Subject: Re: font-lock as a single command
Date: Sat, 13 Feb 2021 00:58:01 +0100

> Sent: Saturday, February 13, 2021 at 11:44 AM
> 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: font-lock as a single command
>
> Christopher Dimech wrote:
>
> > I want to construct the font-lock as a single command
> >
> > (font-lock-add-keywords nil ...)
> >
> > But I am unsure how to do it.
>
> I believe you :)

Have not understood how to use very well.  I find it one serious
approach with tremendous functionality.

> > (defconst supinf-font-lock-cruc
> >   (append
> >      '((supinf-match
> >           (1 (supinf-raise-cruc (match-beginning 0))) )))
> >   "Experimental expressions to highlight in TeX modes.")
>
> ?
>
> Here is how to add a single word to Elisp mode:
>
> (font-lock-add-keywords 'emacs-lisp-mode
>  '(
>    ("lamersRus" . font-lock-builtin-face)
>    )
>  t)
>
> > (defun supinf-enable ()
> >   "Enables a typeface for displaying tex commands."
> >   (setq supinf-signal t)
> >   (font-lock-add-keywords nil supinf-font-lock-cruc t))
>
> M-x font-lock-mode RET
>
> or (font-lock-mode 'toggle)

How would this help me?  Hoh should I use font-lock-mode?

> --
> underground experts united
> http://user.it.uu.se/~embe8573
> https://dataswamp.org/~incal
>
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]