From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: Re: text properties in tex mode Date: Sat, 04 Oct 2008 19:44:46 +0200 Organization: erewhon Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223145641 4115 80.91.229.12 (4 Oct 2008 18:40:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2008 18:40:41 +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 Oct 04 20:41:38 2008 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.50) id 1KmC4I-0003tV-83 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Oct 2008 20:41:30 +0200 Original-Received: from localhost ([127.0.0.1]:53213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KmC3E-0000oN-Vg for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Oct 2008 14:40:25 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp12-2.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Cancel-Lock: sha1:Y89Fnta69YFFM4Az+xzWsOFJ6j8= Original-Lines: 29 Original-NNTP-Posting-Date: 04 Oct 2008 19:44:46 MEST Original-NNTP-Posting-Host: 82.240.200.149 Original-X-Trace: 1223142286 news-2.free.fr 1047 82.240.200.149:49953 Original-X-Complaints-To: abuse@proxad.net Original-Xref: news.stanford.edu gnu.emacs.help:163017 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:58359 Archived-At: Kostas Oikonomou writes: > Hello, > > I use Emacs's plain TeX mode (i.e. not AucTeX), with font-lock > deactivated. (And Emacs 22.3.) > > I'd like to be able to change the background color of a piece of text > to, say, yellow, by selecting it with the mouse, and then doing Edit > -> Text Properties -> Background Color. > > However this fails with a message "Face ((:background yellow)) not > configured for latex mode". > How do I get around this? This is probably because font-lock-mode is enabled by default in latex-mode. Thus any face you set is overwritten by the font-lock processing. Disabling font-lock-mode (M-x font-lock-mode) brings back the menu you are interested in, but you will lose the coloring provided by latex-mode. Another solution would be to use overlays instead of faces for region highlighting. That's what use the highlight-regexp command; this command highlight words matching a regexp. I think there is an extension called highlight.el, by Drew Adams, which provides easy access to overlays. Have a look at the wiki http://www.emacswiki.org/cgi-bin/wiki/HighLight Hope that helps