[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with text properties whose names aren't symbols
From: |
Joe Corneli |
Subject: |
Re: problem with text properties whose names aren't symbols |
Date: |
Mon, 12 Dec 2005 11:48:20 -0500 (EST) |
This is not a bug, because '(example name) and '(example name) are
distinct objects:
ELISP> (eq '(example name) '(example name))
nil
OK, thanks for the tip.
I guess this could be filed under "feature request"; compare my
request of Aug. 8 for property search with user-defined predicates.
http://lists.gnu.org/archive/html/emacs-pretest-bug/2005-08/msg00068.html
In the current case the request becomes "enable the use of a
user-defined :test for comparing names stored by `put-text-property'."
On the other hand, there is (again) a work-around, following along the
lines of Andreas's suggestion:
(progn
(put-text-property (point) (1+ (point)) '(example name) t)
(let ((props (text-properties-at (point))))
(put-text-property (point) (1+ (point))
(car (member '(example name) props)) nil))
(text-properties-at (point)))