* text-property-any
@ 2008-01-25 15:12 Stephen Berman
2008-01-25 15:51 ` text-property-any Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Berman @ 2008-01-25 15:12 UTC (permalink / raw)
To: emacs-devel
The value of (text-property-any start end 'foo "bar") is always nil,
because text-property-any in effect uses `eq' to check property values.
Would there be bad consequences if it used `equal' instead? If this is
not a viable option, is there a recommended way to find out if some
character has a property with a particular string value? I suppose
looping on next-single-property-change and testing for `equal'ity will
work; is that the best way? (My use case is a display property with a
string value.) Thanks,
Steve Berman
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: text-property-any
2008-01-25 15:12 text-property-any Stephen Berman
@ 2008-01-25 15:51 ` Stefan Monnier
2008-01-25 22:51 ` text-property-any Stephen Berman
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2008-01-25 15:51 UTC (permalink / raw)
To: Stephen Berman; +Cc: emacs-devel
> The value of (text-property-any start end 'foo "bar") is always nil,
> because text-property-any in effect uses `eq' to check property values.
> Would there be bad consequences if it used `equal' instead?
There are places where code expects properties to be compared with
`eq', yes. So we could add what you're requesting, but only as
an option. E.g. add a "compare-function" option that can default to
`eq' but can be set to anything else you fancy.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: text-property-any
2008-01-25 15:51 ` text-property-any Stefan Monnier
@ 2008-01-25 22:51 ` Stephen Berman
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Berman @ 2008-01-25 22:51 UTC (permalink / raw)
To: emacs-devel
On Fri, 25 Jan 2008 10:51:56 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> The value of (text-property-any start end 'foo "bar") is always nil,
>> because text-property-any in effect uses `eq' to check property values.
>> Would there be bad consequences if it used `equal' instead?
>
> There are places where code expects properties to be compared with
> `eq', yes. So we could add what you're requesting, but only as
> an option. E.g. add a "compare-function" option that can default to
> `eq' but can be set to anything else you fancy.
Sounds like a good idea.
Steve Berman
^ permalink raw reply [flat|nested] 5+ messages in thread
* text-property-any
@ 2014-06-20 7:02 Bois Francois-Xavier
2014-06-20 12:58 ` text-property-any Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Bois Francois-Xavier @ 2014-06-20 7:02 UTC (permalink / raw)
To: emacs-devel
Hi
would it possible to change text-property-any this way :
text-property-any start end prop value &optional object
becomes
text-property-any start end prop &optional value object
If the "value" param is not passed, Emacs only checked if prop is not nil ?
It would be useful for web-mode.el
Cheers
fx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: text-property-any
2014-06-20 7:02 text-property-any Bois Francois-Xavier
@ 2014-06-20 12:58 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2014-06-20 12:58 UTC (permalink / raw)
To: Bois Francois-Xavier; +Cc: emacs-devel
> If the "value" param is not passed, Emacs only checked if prop is not nil ?
This is called text-property-not-all.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-20 12:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-20 7:02 text-property-any Bois Francois-Xavier
2014-06-20 12:58 ` text-property-any Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2008-01-25 15:12 text-property-any Stephen Berman
2008-01-25 15:51 ` text-property-any Stefan Monnier
2008-01-25 22:51 ` text-property-any Stephen Berman
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.