[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Propertizing the minor-mode-alist
From: |
James Clark |
Subject: |
Re: Propertizing the minor-mode-alist |
Date: |
Fri, 17 Sep 2004 09:32:22 +0700 |
On Thu, 2004-09-16 at 21:00, Stefan wrote:
> > Perhaps there could be a new keyword :propertize-default that changes
> > the text properties of only those characters in the string that do not
> > already have a value for any of the specified properties. Or maybe this
> > should be the behavior of :propertize.
>
> I think it makes sense to change the behavior of `:propertize' here.
It turns out that the existing code already tries to merge the existing
properties of the string with the properties specified in :propertize,
but it doesn't work in this case for two reasons:
- the code gets the existing properties just by looking at the first
character of the string; in my case the first character is a space which
doesn't have any properties, i.e. my code does
(concat " "
(propertize "Invalid"
'help-echo "mouse-1: go to first error"
'local-map (make-mode-line-mouse-map
'mouse-1
'rng-mouse-first-error)))
- the code gives the new properties priority over the existing
properties
Attached is a patch that
- when the first character has no properties, gets the properties from
the last character;
- gives priority to the existing properties over the new properties.
James
--
To send me mail, replace auth-only by public in the from address.
mode-line.patch
Description: Text Data
- Propertizing the minor-mode-alist, James Clark, 2004/09/16
- Re: Propertizing the minor-mode-alist, Stefan, 2004/09/16
- Re: Propertizing the minor-mode-alist,
James Clark <=
- Re: Propertizing the minor-mode-alist, Richard Stallman, 2004/09/17
- Re: Propertizing the minor-mode-alist, James Clark, 2004/09/17
- Re: Propertizing the minor-mode-alist, Richard Stallman, 2004/09/18
- Re: Propertizing the minor-mode-alist, David Kastrup, 2004/09/19
- Re: Propertizing the minor-mode-alist, James Clark, 2004/09/19
- Re: Propertizing the minor-mode-alist, Richard Stallman, 2004/09/19
- Re: Propertizing the minor-mode-alist, James Clark, 2004/09/19