emacs-pretest-bug
[Top][All Lists]
Advanced

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

Non-symbolic text property names


From: Johan Bockgård
Subject: Non-symbolic text property names
Date: Thu, 01 Sep 2005 04:56:53 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

The manual says in (info "(elisp)Text Properties") that

    Each property has a name and a value. Both of these can be any
    Lisp object, but the name is normally a symbol.

However, `propertize' doesn't let you create a string with property
names that are not symbols:

(propertize "foo" 0 t)  => error: (wrong-type-argument symbolp 0)

The CHECK_SYMBOL test in Fpropertize should be removed.


This code in `describe-property-list' has to be changed as well to
deal with property names that are not symbols (note that the comment
is wrong, btw) or M-x describe-char will signal an error when trying
to describe such text:

    [...]
    ;; Sort the properties by the size of their value.
    (dolist (elt (sort (let (ret)
                         (while properties
                           (push (list (pop properties) (pop properties)) ret))
                         ret)
                       (lambda (a b) (string< (nth 0 a) (nth 0 b)))))
      [...]




reply via email to

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