[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU Emacs 21.2.1 - problem with .emacs file and facement-set-face keybin
From: |
Crazy Coder |
Subject: |
GNU Emacs 21.2.1 - problem with .emacs file and facement-set-face keybinding command. |
Date: |
22 May 2004 02:56:17 -0700 |
Hi,
I'm using
GNU Emacs 21.2.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2002-08-29 on astest
and have ~/.emacs file as follows.
---------------------------------------------------------------------------
(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or
cut/paste it!
;; Your init file should contain only one such instance.
'(case-fold-search t)
'(current-language-environment "English")
'(global-font-lock-mode t nil (font-lock))
'(show-paren-mode t nil (paren))
'(tab-width 4)
'(transient-mark-mode t)
'(uniquify-buffer-name-style (quote forward) nil (uniquify)))
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste
it!
;; Your init file should contain only one such instance.
'(bold ((t (:weight extra-bold)))))
;; my customizations.
(global-set-key "\C-xg" 'goto-line)
(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"
so why is the key sequence \M-gy bound to facemenu-add-new-face
instead of
facemenu-set-face.
---------------------------------------------------------------------------
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 ? Does facemenu-set-face only make changes
in the
file during that session only ? If I want to make the marking
permanent
what do i need to do ?
---------------------------------------------------------------------------
Appreciate any help, feedback.
Thanks.
Yashesh
- GNU Emacs 21.2.1 - problem with .emacs file and facement-set-face keybinding command.,
Crazy Coder <=