[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C equivalent for: (face-attribute 'region :background (selected-fram
From: |
Keith David Bershatsky |
Subject: |
Re: C equivalent for: (face-attribute 'region :background (selected-frame) 'default) |
Date: |
Tue, 26 Sep 2017 15:06:52 -0700 |
Thank you, Philipp, for reading this thread and for teaching me how to call a
Lisp function from C.
Converting those functions form Lisp to C has been something that I have wanted
to do for quite some time, but have admittedly been intimidated because they
both use recursion. I have created a working draft in C that has everything (I
think) except for `condition_case`, because I haven't learned how to do that in
C yet. I'll carbon copy you with the rough draft.
Keith
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DATE: [09-26-2017 11:46:05] <26 Sep 2017 18:46:05 +0000>
FROM: Philipp Stephani <address@hidden>
>
> * * *
>
> You can easily call Lisp functions from C.
>
> // In syms_of_...
> DEFSYM (Qface_attribute, "face-attribyte");
> DEFSYM (Qregion, "region");
> DEFSYM (QCbackground, ":background");
> DEFSYM (Qdefault, "default");
>
> // Calling
> Lisp_Object o = CALLN (Ffuncall, Qface_attribute, Qregion, QCbackground,
> Fselected_frame (), Qdefault);