From: "Eli Zaretskii" <eliz@gnu.org>
Subject: Re: GNU Emacs 21.2.1 - problem with .emacs file and facement-set-face keybinding command.
Date: Sat, 22 May 2004 15:40:25 +0200 [thread overview]
Message-ID: <1659-Sat22May2004154024+0300-eliz@gnu.org> (raw)
In-Reply-To: <743a4358.0405220156.622f27bd@posting.google.com> (yasheshb@yahoo.com)
> From: yasheshb@yahoo.com (Crazy Coder)
> Newsgroups: gnu.emacs.help
> Date: 22 May 2004 02:56:17 -0700
>
> (global-set-key "\M-gx" (lambda ()
> (interactive)
> (facemenu-set-foreground "LightSalmon")))
>
> (global-set-key "\M-gy" (lambda ()
> (interactive)
> (facemenu-set-face "highlight")))
>
> (global-set-key "\M-gz" (lambda ()
> (interactive)
> (facemenu-set-face "secondary-selection")))
> ---------------------------------------------------------------------------
>
> Now I have some questions regarding using the above keybindings -
> M-g[xyz]
> in my .emacs file.
>
> ---------------------------------------------------------------------------
> The first keybinding \M-gx works fine. It marks the selected region
> with
> LightSalmon foreground. The other two giving problems.
>
> when i mark a region and press
>
> \M-gy
>
> it gives the following error (i got these from the messages buffer)
> facemenu-add-new-face: Wrong type argument: symbolp, "highlight"
That's because facemenu-set-face's argument should be a symbol, not a
string:
(facemenu-set-face 'highlight)
> so why is the key sequence \M-gy bound to facemenu-add-new-face
It's not; it's just that facemenu-set-face called
facemenu-add-new-face, and the latter barfed because its argument was
not a symbol.
> When i set a face of a region using \M-gx it changes the text color to
> LightSalmon. However, if i exit emacs, restart emacs and open the file
> the faceproperties of the text is lost.
>
> Why is this the behaviour ?
Because the face information isn't written to the file.
> Does facemenu-set-face only make changes in the file during that
> session only ?
It changes the buffer, not the file.
> If I want to make the marking permanent what do i need to do ?
Use Enriched Text mode ("M-x enriched-text-mode RET").
prev parent reply other threads:[~2004-05-22 13:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-22 9:56 GNU Emacs 21.2.1 - problem with .emacs file and facement-set-face keybinding command Crazy Coder
2004-05-22 13:40 ` Eli Zaretskii [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=1659-Sat22May2004154024+0300-eliz@gnu.org \
--to=eliz@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.