all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Henrik Enberg <henrik.enberg@telia.com>
Subject: Re: Setting :inherit attribute on faces via Xresources
Date: Sat, 19 Nov 2005 21:57:08 +0100 (CET)	[thread overview]
Message-ID: <20051119205708.D7C1C3F32@rocksteady.printf.se> (raw)
In-Reply-To: <20051119201409.EAC4F3F32@rocksteady.printf.se> (message from Henrik Enberg on Sat, 19 Nov 2005 21:14:09 +0100 (CET))

> 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);

      reply	other threads:[~2005-11-19 20:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-19 20:14 Setting :inherit attribute on faces via Xresources Henrik Enberg
2005-11-19 20:57 ` Henrik Enberg [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=20051119205708.D7C1C3F32@rocksteady.printf.se \
    --to=henrik.enberg@telia.com \
    /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.