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

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

Elisp: How to set multiple text properties.


From: Neil Baylis
Subject: Elisp: How to set multiple text properties.
Date: Fri, 14 Jan 2011 11:19:41 -0800 (PST)
User-agent: G2/1.0

I want to make a pair of elisp functions that can be called
interactively, and possibly bound to function keys.

Call them foo and bar.

When foo is called, it should cause subsequent text entered into the
buffer to be colored dark blue and bold.

When bar is called, it should cause subsequent text entered into the
buffer to be colored green, and italic.

I've only been able to find out how to set a single property of the
region. E.g., if I set it to be italic, then it stops being green. I'm
using (facemenu-set-italic) to set italic mode. I'm using (facemenu-
set-face-from-menu) to set the color.

I think I'm missing something obvious. What's the correct way to set
multiple properties on text from within an elisp function?


reply via email to

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