emacs-devel
[Top][All Lists]
Advanced

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

Re: Copying preserves font-lock-face


From: Richard Stallman
Subject: Re: Copying preserves font-lock-face
Date: Tue, 26 Sep 2006 11:41:41 -0400

    On the topic of yanking fontified text into non-font-lock buffers,
    I became annoyed when any following keyed text would inherit those
    properties, so I put this in my .emacs file:

    (defadvice yank (after rear-nonsticky activate)
       "Make all yanked text properties rear-nonsticky, unless Font Lock is on."
       (unless font-lock-mode
         (put-text-property (region-beginning) (region-end) 'rear-nonsticky t)))

That code can't be entirely right, since the treatment of properties
not related to faces shouldn't depend on font-lock-mode.  Nonetheless,
you might be getting at a good point.  Perhaps insert-for-yank should
do this unconditionally for face properties only.

Does anyone disagree?




reply via email to

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