all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mirko <mvukovic@nycap.rr.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Elisp: How to set multiple text properties.
Date: Sat, 15 Jan 2011 11:45:10 -0800 (PST)	[thread overview]
Message-ID: <ce26a687-f211-4b24-90fd-c98dec228826@glegroupsg2000goo.googlegroups.com> (raw)
In-Reply-To: <c56c41d9-1034-43c6-893b-76aae95b5654@y31g2000vbt.googlegroups.com>

On Saturday, January 15, 2011 1:53:52 PM UTC-5, Neil Baylis wrote:
> Thanks, Stefan. I seem to have it figured out now.
> 
> For those interested, here are some calls that work (Emacs 23.2.1):
> 
> (These calls set properties on the entire line containing point.)
> 
> Set the text to italic only:
>    (put-text-property (line-beginning-position) (line-end-position)
> 'face 'italic)
> 
> Set the text to blue only:
>    (put-text-property (line-beginning-position) (line-end-position)
> 'face '(:foreground "blue"))
> 
> Set the text to blue and bold:
>    (put-text-property (line-beginning-position) (line-end-position)
> 'face '((:foreground "blue") bold))
> 
> Set the text to blue and italic:
>    (put-text-property (line-beginning-position) (line-end-position)
> 'face '((:foreground "blue") italic))
> 
> Set the text to bold, italic, and red:
>    (put-text-property (line-beginning-position) (line-end-position)
> 'face '(bold italic (:foreground "red")))
> 
> Neil

Thank you for the examples

Mirko


      reply	other threads:[~2011-01-15 19:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14 19:19 Elisp: How to set multiple text properties Neil Baylis
2011-01-14 22:49 ` Stefan Monnier
2011-01-15 16:19   ` Neil Baylis
2011-01-15 18:53     ` Neil Baylis
2011-01-15 19:45       ` Mirko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ce26a687-f211-4b24-90fd-c98dec228826@glegroupsg2000goo.googlegroups.com \
    --to=mvukovic@nycap.rr.com \
    --cc=gnu.emacs.help@googlegroups.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.