From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.bugs Subject: [Q] text property on mode-line string Date: Tue, 09 Mar 2004 16:33:34 +0900 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <07d950bb-255b-4422-83e1-01b418f1b010@well-done.deisui.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1079022349 25178 80.91.224.253 (11 Mar 2004 16:25:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Mar 2004 16:25:49 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 11 17:25:27 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B1Szv-0000OP-00 for ; Thu, 11 Mar 2004 17:25:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B1Szg-0001cj-Vw for geb-bug-gnu-emacs@m.gmane.org; Thu, 11 Mar 2004 11:25:12 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B0blh-0003d4-Ne for bug-gnu-emacs@gnu.org; Tue, 09 Mar 2004 02:35:13 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B0bkF-0003IP-IX for bug-gnu-emacs@gnu.org; Tue, 09 Mar 2004 02:34:14 -0500 Original-Received: from [210.231.96.69] (helo=well-done) by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1B0bkE-0003Hk-JB for bug-gnu-emacs@gnu.org; Tue, 09 Mar 2004 02:33:42 -0500 Original-Received: from [192.50.74.164] (helo=well-done.deisui.org) by well-done with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.30) id 1B0bjr-0008If-CN for bug-gnu-emacs@gnu.org; Tue, 09 Mar 2004 16:33:19 +0900 Original-To: bug-gnu-emacs@gnu.org X-Attribution: DU User-Agent: T-gnus/6.17.2 (based on No Gnus v0.2) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 MULE XEmacs/21.4 (patch 15) (Security Through Obscurity) (i686-pc-linux) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:7232 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:7232 (Sorry for this report not being sent using M-x report-emacs-bug. I haven't finished configuring email environment for GNU Emacs.) I have a question about text property on mode-line string. I wanted to decorate a part of mode-line, so I simply set 'face property for a string and placed the string at the beginning of mode-line-format: (setq test-face (make-face 'test-face)) (set-face-foreground 'test-face "red") (push (propertize "ABC" 'face 'test-face) mode-line-format) Of course it works, i.e. red "ABC" shows up on the left side of mode-line. Next, I tried to use a symbol reference to the propertized string: (setq mode-line-format (nconc (list "" 'abc) mode-line-format)) And: (setq abc (propertize "ABC" 'face 'test-face)) It also works as expected. Finally, I tried to use a list as the value of abc: (setq abc (list (propertize "ABC" 'face 'test-face))) It doesn't bring the same effect as above 2 cases. i.e. "ABC" is not displayed in red (on my environment, it displayed in black). Oddly enough, when I removed the 'face property from the first character ("A"), only "BC" is displayed in red: (remove-text-properties 0 1 '(face) (car abc)) Is this a bug? I'm using Emacs 21.3. Regards, -- Daiki Ueno