From: Daiki Ueno <ueno@unixuser.org>
Subject: [Q] text property on mode-line string
Date: Wed, 10 Mar 2004 08:18:24 +0900 [thread overview]
Message-ID: <61c77e89-0554-4935-b353-31998e172882@well-done.deisui.org> (raw)
(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. Since I
wanted to decorate a part of mode-line 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
next reply other threads:[~2004-03-09 23:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-09 23:18 Daiki Ueno [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-03-09 7:33 [Q] text property on mode-line string Daiki Ueno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=61c77e89-0554-4935-b353-31998e172882@well-done.deisui.org \
--to=ueno@unixuser.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.