all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: 9825@debbugs.gnu.org
Subject: bug#9825: 24.0.90; doc of `propertize' is misleading
Date: Fri, 21 Oct 2011 09:06:04 -0700	[thread overview]
Message-ID: <9E7F1C308C024D1DABB8B840BD77316B@us.oracle.com> (raw)

In (elisp) Changing Properties:
 
 This function returns a copy of STRING which has the text
 properties PROPERTIES.
 
The text is ambiguous and vague, but the impression from just saying
"has" is that the new string has ONLY properties PROPERTIES.  it gives
the impression that `propertize' SETS the properties of the string copy,
rather than just adding the given properties (setting any that are the
same).
 
E.g.:
 
(setq foo (propertize "abcd" 'face 'bold))
(setq foo (propertize foo    'mouse-face 'highlight)
 
foo =>
#("abcd" 0 4 (face bold mouse-face highlight))
 
and NOT #("abcd" 0 4 (mouse-face highlight)).
 
Note that the doc string is clear in this regard.  It says:
 
 Return a copy of STRING with text properties added.
                                              ^^^^^
 ... text properties to add to the result.
                        ^^^^^^^^^^^^^^^^^
 
In GNU Emacs 24.0.90.1 (i386-mingw-nt5.1.2600) of 2011-10-18 on MARVIN
 Windowing system distributor `Microsoft Corp.', version 5.1.2600
 configured using `configure --with-gcc (4.6) --no-opt --cflags
 -I"C:/Program Files (x86)/GnuWin32/include"
 -ID:/devel/emacs/libXpm-3.5.8/include -ID:/devel/emacs/libXpm-3.5.8/src
 -ID:/devel/emacs/gnutls-2.10.5-x86/include --ldflags
 -LD:/devel/emacs/gnutls-2.10.5-x86/lib'
 






             reply	other threads:[~2011-10-21 16:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21 16:06 Drew Adams [this message]
2012-09-17  0:27 ` bug#9825: 24.0.90; doc of `propertize' is misleading Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9E7F1C308C024D1DABB8B840BD77316B@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=9825@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.