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

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

Re: font-lock with functions


From: wael-zwaiter
Subject: Re: font-lock with functions
Date: Thu, 11 Feb 2021 20:38:08 +0100

The following works well, but I am concerned that "my-font-lock"
is a bit of a hack and could do with improvement

(defconst my-font-lock
  (append
      nil
      '( (my-match
          (1 (my-bigfont (match-beginning 0)) append))) )
  "Description.")

(defun bigfont-enable ()
  "Enables a typeface for displaying tex commands."
  (setq supinf-signal t)
  (font-lock-add-keywords nil my-font-lock t))

(add-hook 'my-mode-hook #'bigfont-enable)


> Sent: Friday, February 12, 2021 at 1:02 AM
> From: wael-zwaiter@gmx.com
> To: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: font-lock with functions
>
> I have a function called fkeyword-match and want to call font-lock on it.
> Can anyone explain to me how font-lock works and what to do?
>
>
>
>
>



reply via email to

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