[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting :inherit attribute on faces via Xresources
From: |
Henrik Enberg |
Subject: |
Re: Setting :inherit attribute on faces via Xresources |
Date: |
Sat, 19 Nov 2005 21:57:08 +0100 (CET) |
> From: Henrik Enberg <address@hidden>
> 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 address@hidden 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 <address@hidden>
>
> * 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);