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

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

bug#8376: 23.3; font-lock-face doesn't get yanked


From: Uday S Reddy
Subject: bug#8376: 23.3; font-lock-face doesn't get yanked
Date: Tue, 29 Mar 2011 21:24:07 +0100

Glenn Morris writes:

> Well yes, people used to complain that copying text would copy unwanted
> font-locking along with it. Eg
> 
> http://lists.gnu.org/archive/html/emacs-devel/2006-09/msg00981.html
> 
> Why do you think it should be preserved?

My context was in writing email messages in mail-mode/message-mode,
both of which use font-lock to fontify the headers and the cited text.

VM has functions that put "attachment buttons" into the mail-mode
buffers, which are have data stored in text properties.  I wanted to
put a face on them to make them look like "buttons".  It works fine
normally but it is not preserved under killing and yanking.

I find the above thread a bit confused, or perhaps I am hopelessly
confused.  It appears that the 'font-lock-face property has been
installed so that font-lock-mode doesn't mess with it.  I don't see
any "unwanted font-locking" in the 'font-lock-face property.  So, why
should it be erased by yanking?  It should work the same way as the
'face property works in a non-font-lock-mode buffer.

Certainly, when you want to move text around within a single buffer,
you don't want to lose faces by killing and yanking.  If it gives
undesirable results when people want to move text from one buffer to
another, then they might need to use a separate function to erase the
fontification or they might use the yank-excluded-properties variable
to exclude font-lock-face.

Perhaps, I should reopen the discussion in the emacs-dev list?

Cheers,
Uday






reply via email to

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