all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Elisp: How to set multiple text properties.
@ 2011-01-14 19:19 Neil Baylis
  2011-01-14 22:49 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Neil Baylis @ 2011-01-14 19:19 UTC (permalink / raw)
  To: help-gnu-emacs

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?


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

end of thread, other threads:[~2011-01-15 19:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 19:19 Elisp: How to set multiple text properties Neil Baylis
2011-01-14 22:49 ` Stefan Monnier
2011-01-15 16:19   ` Neil Baylis
2011-01-15 18:53     ` Neil Baylis
2011-01-15 19:45       ` Mirko

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.