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

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

Re: Elisp: How to set multiple text properties.


From: Mirko
Subject: Re: Elisp: How to set multiple text properties.
Date: Sat, 15 Jan 2011 11:45:10 -0800 (PST)
User-agent: G2/1.0

On Saturday, January 15, 2011 1:53:52 PM UTC-5, Neil Baylis wrote:
> 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

Thank you for the examples

Mirko


reply via email to

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