emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text property searching


From: Lars Ingebrigtsen
Subject: Re: Text property searching
Date: Mon, 16 Apr 2018 17:11:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Dmitry Gutov <address@hidden> writes:

>>> "Equals or includes" should be another popular predicate (think faces).
>>
>> Yes, that's true...  We could have a special symbol for that<...>
> I'd like that.

On the other hand, perhaps we should just have a general predicate for
this not-uncommon thing?  `equal-or-member'?  It would literally be

(defun equal-or-member (thing collection)
  (or (equal thing collection)
      (and (consp collection)
           (member thing collection))))

We have a lot of data structures that can be lists or atoms, so I think
it might be generally useful...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]