[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Elisp: How to set multiple text properties.
From: |
Neil Baylis |
Subject: |
Re: Elisp: How to set multiple text properties. |
Date: |
Sat, 15 Jan 2011 10:53:52 -0800 (PST) |
User-agent: |
G2/1.0 |
Thanks, Stefan. I seem to have it figured out now.
For those interested, here are some calls that work (Emacs 23.2.1):
(These calls set properties on the entire line containing point.)
Set the text to italic only:
(put-text-property (line-beginning-position) (line-end-position)
'face 'italic)
Set the text to blue only:
(put-text-property (line-beginning-position) (line-end-position)
'face '(:foreground "blue"))
Set the text to blue and bold:
(put-text-property (line-beginning-position) (line-end-position)
'face '((:foreground "blue") bold))
Set the text to blue and italic:
(put-text-property (line-beginning-position) (line-end-position)
'face '((:foreground "blue") italic))
Set the text to bold, italic, and red:
(put-text-property (line-beginning-position) (line-end-position)
'face '(bold italic (:foreground "red")))
Neil