[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: change textheight and set position
From: |
Jesper Harder |
Subject: |
Re: change textheight and set position |
Date: |
Mon, 28 Jun 2004 23:24:18 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Fabian Braennstroem <f.braennstroem@gmx.de> 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)))
--
Jesper Harder <http://purl.org/harder/>