[Top][All Lists]

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

Re: `add-face'

From: Chong Yidong
Subject: Re: `add-face'
Date: Mon, 10 Sep 2012 11:07:37 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Lars Ingebrigtsen <address@hidden> writes:

>   DEFUN ("add-text-properties", Fadd_text_properties,
> !        Sadd_text_properties, 3, 5, 0,
>          doc: /* Add properties to the text from START to END.
>   The third argument PROPERTIES is a property list
>   specifying the property values to add.  If the optional fourth argument
>   OBJECT is a buffer (or nil, which means the current buffer),
>   START and END are buffer positions (integers or markers).
>   If OBJECT is a string, START and END are 0-based indices into it.
> + If NOREPLACE, add the text properties instead of replacing any
> + existing ones.  This is mainly useful for faces.
>   Return t if any property value actually changed, nil otherwise.  */)
> !   (Lisp_Object start, Lisp_Object end, Lisp_Object properties,
> !    Lisp_Object object, Lisp_Object noreplace)

This is too vague.  What does "add the text properties" mean?  If the
current value of a property is nil, and the argument to
add-text-properties specifies a value `foo', does the new value become
`foo' or `(foo)'?  If the current value is `1', does the new value
become `(foo 1)' or something else?

And, specifically for face properties, what if the current value is a
list specifying an anonymous face, like `(:foreground "black")'?

reply via email to

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