[Top][All Lists]

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

Re: change textheight and set position

From: Fabian Braennstroem
Subject: Re: change textheight and set position
Date: Tue, 29 Jun 2004 07:54:42 +0200
User-agent: Gnus/5.110001 (No Gnus v0.1) Emacs/21.3 (gnu/linux)


Jesper Harder <address@hidden> writes:

> Fabian Braennstroem <address@hidden> writes:
>> I'm looking for a way to copy some text and yank it with a different
>> font-size in the middle of the line.  I tried using 'set-face-font',
>> but that changes the font for some existing faces. It would be the
>> best, if I would be able to choose just a different font style
>> before I yank the text, e.g. Info-title-1-face. Does anybody have an
>> idea?
> You could do something like this:
> (defun my-yank (face)
>   (interactive (list (read-face-name "Use face")))
>   (save-restriction
>     (narrow-to-region (point) (point))
>     (yank)
>     (put-text-property (point-min) (point-max) 'face face)))

Thanks! I think this is exactly what I want, but when I choose some face,
e.g. 'italic' or 'Info-title-2-face', there is no change in my
text-property. It does not change compared to the old one.

One question to this function. Shouldn't I be able to call the function
'put-text-property' with 'M-x'? I can't find it... Ah, I see, probably just
because it is a build-in function!?

Fabian Braennstroem

reply via email to

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