[Top][All Lists]

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

Re: M-w, then C-y. C-y inserts text properties that aren't on original.

From: Eli Zaretskii
Subject: Re: M-w, then C-y. C-y inserts text properties that aren't on original.
Date: Sat, 20 Feb 2010 11:02:39 +0200

> Date: Fri, 19 Feb 2010 14:35:13 +0000
> Cc: address@hidden
> From: Alan Mackenzie <address@hidden>
> `insert-for-yank' carries on, and calls `remove-yank-excluded-properties'
> which deliberately changes 'category properties into other properties.
> Presumably there was some special case in the distant past which required
> this transformation.  It is surely wrong in the general case - yanking
> into a buffer shouldn't add text properties which weren't in the
> original - surely?
> I'm going to try and track down that special case.  It looks like I'll
> have to fix the inserted string in CC Mode by hand.

The reason for this behavior is this change:

    2002-04-27  Richard M. Stallman  <address@hidden>

            * subr.el (insert-for-yank): Replace `category' property
            with whatever properties it stands for.

The discussion that led to this change starts here:


You will find there the reason for the change (buttons in *Help*
buffers, and the way we put the mouse-face property on them).

I wonder if we could make the code which replaces `category' with what
it stands for, with a slightly less general code that replaces only
those values of `category' that are used for buttons.  Or some similar
change which will make that feature more focused on the problem it
needs to solve.

I added a comment in `remove-yank-excluded-properties' explaining what
do we do that for and pointing to the above URL for details.

reply via email to

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