* [Q] text property on mode-line string
@ 2004-03-09 23:18 Daiki Ueno
0 siblings, 0 replies; 2+ messages in thread
From: Daiki Ueno @ 2004-03-09 23:18 UTC (permalink / 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Q] text property on mode-line string
@ 2004-03-09 7:33 Daiki Ueno
0 siblings, 0 replies; 2+ messages in thread
From: Daiki Ueno @ 2004-03-09 7:33 UTC (permalink / 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. 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-09 23:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-09 23:18 [Q] text property on mode-line string Daiki Ueno
-- strict thread matches above, loose matches on Subject: below --
2004-03-09 7:33 Daiki Ueno
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.