unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Referencing defface faces in custom faces...
@ 2015-08-15  2:09 Stuart Hungerford
  2015-08-15  2:52 ` Emanuel Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Stuart Hungerford @ 2015-08-15  2:09 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I'm creating a custom theme with custom-theme-set-faces and I'd like
to factor out the face definitions it uses into defface macro calls
where I can make use of the :inherits option to derive a family of
related faces:

(defface light-text-face
  '((t :family     "Source Code Pro"
       :foundry    "nil"
       :height     281
       :weight     extra-light
       :width      extra-condensed
       :background "#040404"
       :foreground "#f4f4f4")) "")

(defface ;; other faces using :inherit


(custom-theme-set-faces 'pastels
  `(default ;; reference light-text-face here
   ...

What's the idiomatic way of referencing the faces created by the
defface macro in custom-set-faces or am I going about this in the
wrong way?

Thanks,

Stu



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Referencing defface faces in custom faces...
  2015-08-15  2:09 Referencing defface faces in custom faces Stuart Hungerford
@ 2015-08-15  2:52 ` Emanuel Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Emanuel Berg @ 2015-08-15  2:52 UTC (permalink / raw)
  To: help-gnu-emacs

Stuart Hungerford <stuart.hungerford@gmail.com>
writes:

> I'm creating a custom theme with
> custom-theme-set-faces and I'd like to factor out
> the face definitions it uses into defface macro
> calls where I can make use of the :inherits option
> to derive a family of related faces:
>
> (defface light-text-face '((t :family "Source Code
> Pro" :foundry "nil" :height 281 :weight extra-light
> :width extra-condensed :background "#040404"
> :foreground "#f4f4f4")) "")
>
> (defface ;; other faces using :inherit
>
> (custom-theme-set-faces 'pastels `(default ;;
> reference light-text-face here ...
>
> What's the idiomatic way of referencing the faces
> created by the defface macro in custom-set-faces or
> am I going about this in the wrong way?

I have something similar: faces, `custom-set-faces',
and a macro ("define-color-face") that simplifies
setup.

It might help you but I wouldn't down a paleo-bottle
of poison it will:

    http://user.it.uu.se/~embe8573/conf/emacs-init/faces.el

-- 
underground experts united
http://user.it.uu.se/~embe8573




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-15  2:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-15  2:09 Referencing defface faces in custom faces Stuart Hungerford
2015-08-15  2:52 ` Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).