all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Font attributes with font-lock-add-keywords()
@ 2008-07-08 17:19 Nordlöw
  2008-07-08 18:24 ` Johan Bockgård
  0 siblings, 1 reply; 2+ messages in thread
From: Nordlöw @ 2008-07-08 17:19 UTC (permalink / raw)
  To: help-gnu-emacs

How do I extend the following call to font-lock-add-keywords() with
face/font attributes such as bold, italic etc?:

    (font-lock-add-keywords
     nil `(("(\\(lambda\\>\\)"
            (0 (progn (compose-region (match-beginning 1) (match-end
1)
                                      ,(make-char 'greek-iso8859-7
107))
                      nil)))))

Do I have to first define a face or can I do this inline?

Thanks in advance,
Nordlöw


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Font attributes with font-lock-add-keywords()
  2008-07-08 17:19 Font attributes with font-lock-add-keywords() Nordlöw
@ 2008-07-08 18:24 ` Johan Bockgård
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Bockgård @ 2008-07-08 18:24 UTC (permalink / raw)
  To: help-gnu-emacs

Nordlöw <per.nordlow@gmail.com> writes:

> How do I extend the following call to font-lock-add-keywords() with
> face/font attributes such as bold, italic etc?:
>
>     (font-lock-add-keywords
>      nil `(("(\\(lambda\\>\\)"
>             (0 (progn (compose-region (match-beginning 1) (match-end
> 1)
>                                       ,(make-char 'greek-iso8859-7
> 107))
>                       nil)))))
>
> Do I have to first define a face or can I do this inline?

    (font-lock-add-keywords
     nil `(("(\\(lambda\\>\\)"
            (1 (progn (compose-region
                       (match-beginning 1) (match-end 1)
                       ,(make-char 'greek-iso8859-7 107)
                       'decompose-region)
                      '(:weight bold))))))

-- 
Johan Bockgård


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-08 18:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08 17:19 Font attributes with font-lock-add-keywords() Nordlöw
2008-07-08 18:24 ` Johan Bockgård

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.