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

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

Re: font faces across a copy and paste


From: Jambunathan K
Subject: Re: font faces across a copy and paste
Date: Tue, 30 Jul 2013 16:57:46 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Luca Ferrari <fluca1978@infinito.it> writes:

> Hi,
> this is just a curiosity: I noted that if I'm editing a text buffer
> and a code buffer, let's say C/Java, and I copy and paste the code
> from the code buffer into the text one than the pasted text maintains
> the faces (e.g., colors). I was thinking that faces were applied at a
> buffer level, and therefore the code should become faced as a text
> chunk, but apparently Emacs stores faces somewhere in memory related
> to the text chunk itself. Is this correct? There is something I'm
> missing?

When you move the text, the text properties (face is one of the
properties) also move with it.

    1. Put your cursor on a piece of text.
    2. C-u C-x =
    3. Go to the end of the resulting buffer.
    4. You will see text properties (usually fontified t, and a
       font-lock-face-*), overlay etc.

But when you copy the pasted text in to buffer that has font-lock-mode
on, the copied text will usually change colors.  This "changing of
colors", (I believe) happens very fast that it is barely noticeable.

>
> Thanks,
> Luca



reply via email to

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