* Setting :inherit attribute on faces via Xresources
@ 2005-11-19 20:14 Henrik Enberg
2005-11-19 20:57 ` Henrik Enberg
0 siblings, 1 reply; 2+ messages in thread
From: Henrik Enberg @ 2005-11-19 20:14 UTC (permalink / raw)
When trying to set an :inherit value on face via Xresources, like so:
"Emacs.dired-ignored.attributeInherit: font-lock-string-face", I get the
following error.
Face dired-ignored, frame #<frame emacs@rocksteady.printf.se 0x8572cc8>: invalid attribute :inherit font-lock-string-face from X resource
This is because the code in Finternal_set_lisp_face_attribute expects
either a symbol or a list of symbols as the value for :inherit.
However, Finternal_set_lisp_face_attribute_from_resource simply passes
the value read from the xserver as a string. This patch fixes it for
me.
2005-11-19 Henrik Enberg <henrik.enberg@telia.com>
* xfaces.c (Finternal_set_lisp_face_attribute_from_resource):
Handle :inherit property as a lisp expression.
Index: src/xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.340
diff -b -r1.340 xfaces.c
4681c4681
< else if (EQ (attr, QCbox))
---
> else if (EQ (attr, QCbox) || EQ (attr, QCinherit))
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Setting :inherit attribute on faces via Xresources
2005-11-19 20:14 Setting :inherit attribute on faces via Xresources Henrik Enberg
@ 2005-11-19 20:57 ` Henrik Enberg
0 siblings, 0 replies; 2+ messages in thread
From: Henrik Enberg @ 2005-11-19 20:57 UTC (permalink / raw)
> From: Henrik Enberg <henrik.enberg@telia.com>
> Date: Sat, 19 Nov 2005 21:14:09 +0100 (CET)
>
> When trying to set an :inherit value on face via Xresources, like so:
> "Emacs.dired-ignored.attributeInherit: font-lock-string-face", I get the
> following error.
>
> Face dired-ignored, frame #<frame emacs@rocksteady.printf.se 0x8572cc8>: invalid attribute :inherit font-lock-string-face from X resource
>
> This is because the code in Finternal_set_lisp_face_attribute expects
> either a symbol or a list of symbols as the value for :inherit.
> However, Finternal_set_lisp_face_attribute_from_resource simply passes
> the value read from the xserver as a string. This patch fixes it for
> me.
>
> 2005-11-19 Henrik Enberg <henrik.enberg@telia.com>
>
> * xfaces.c (Finternal_set_lisp_face_attribute_from_resource):
> Handle :inherit property as a lisp expression.
[...]
Perhaps easier to view as a context diff...
Index: xfaces.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfaces.c,v
retrieving revision 1.340
diff -c -b -r1.340 xfaces.c
*** xfaces.c 18 Nov 2005 03:55:45 -0000 1.340
--- xfaces.c 19 Nov 2005 20:50:33 -0000
***************
*** 4678,4684 ****
if (SYMBOLP (boolean_value))
value = boolean_value;
}
! else if (EQ (attr, QCbox))
value = Fcar (Fread_from_string (value, Qnil, Qnil));
return Finternal_set_lisp_face_attribute (face, attr, value, frame);
--- 4678,4684 ----
if (SYMBOLP (boolean_value))
value = boolean_value;
}
! else if (EQ (attr, QCbox) || EQ (attr, QCinherit))
value = Fcar (Fread_from_string (value, Qnil, Qnil));
return Finternal_set_lisp_face_attribute (face, attr, value, frame);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-19 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-19 20:14 Setting :inherit attribute on faces via Xresources Henrik Enberg
2005-11-19 20:57 ` Henrik Enberg
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.