From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Baylis Newsgroups: gmane.emacs.help Subject: Elisp: How to set multiple text properties. Date: Fri, 14 Jan 2011 11:19:41 -0800 (PST) Organization: http://groups.google.com Message-ID: <4b20c8e7-806b-427c-b814-72523c0232eb@s9g2000vby.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1295052206 5307 80.91.229.12 (15 Jan 2011 00:43:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 15 Jan 2011 00:43:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 15 01:43:23 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PduEj-0007qI-RA for geh-help-gnu-emacs@m.gmane.org; Sat, 15 Jan 2011 01:43:21 +0100 Original-Received: from localhost ([127.0.0.1]:33153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PduEj-0001pb-B8 for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Jan 2011 19:43:21 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!s9g2000vby.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 18 Original-NNTP-Posting-Host: 76.208.141.253 Original-X-Trace: posting.google.com 1295032781 22267 127.0.0.1 (14 Jan 2011 19:19:41 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Fri, 14 Jan 2011 19:19:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s9g2000vby.googlegroups.com; posting-host=76.208.141.253; posting-account=dNm1mAoAAADEStfarqbdhwZIMTNBGDT8 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.231 Safari/534.10, gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:184281 X-Mailman-Approved-At: Fri, 14 Jan 2011 19:36:25 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:78464 Archived-At: 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?