conao3 / leaf-keywords.el

Additional leaf.el keywords for external packages
GNU General Public License v3.0
31 stars 10 forks source link

add :init/el-patch and :config/el-patch keywords #130

Closed ijah4 closed 2 years ago

ijah4 commented 3 years ago

Add :init/el-patch and :config/el-patch keywords.

The :el-patch/feature keyword is only to add (el-patch-feature NAME) to leaf block, when :init/el-patch and :config/el-patch exist in leaf block. So i append it to leaf-defaults

conao3 commented 3 years ago

Sorry, CI failure is my fault. Soon I fixit.

conao3 commented 3 years ago

As I merged #132, please rebase onto HEAD?

conao3 commented 3 years ago

Please solve testcase? or any questions?

ijah4 commented 3 years ago

The el-patch-deftype-alist is defined in the package el-patch. Yet i have not understood the test mechanism.

conao3 commented 3 years ago

it seems el-patch-deftype-alist is not defined. your leaf expansion needed el-patch-deftype-alist value?

ijah4 commented 3 years ago

Yes, it comes from el-patch package.

conao3 commented 3 years ago

No, I point that do you really need the value of that variable in order to expand your leaf? This means that expanding that variable into an expansion form is fine, but you must not access that variable to determine the expansion form.

ijah4 commented 3 years ago

It is needed to use the value of that variable to expand leaf form when expanding. so in testcase, it is needed that variable is defined.

ijah4 commented 3 years ago

No, I point that do you really need the value of that variable in order to expand your leaf? This means that expanding that variable into an expansion form is fine, but you must not access that variable to determine the expansion form.

Do you mean that don't use the value of that variable to expand leaf, instead just expand the variable literally?

conao3 commented 3 years ago

I don't know if I'm conveying it correctly, but yes, it is. To be more specific, you shouldn't use variables when the leaf is extracted to the compiler, but it's OK for them to be used at runtime. The el-patch should be required at runtime.

ijah4 commented 3 years ago

OK, let me think how to decouple the el-patch, when expanding.

ijah4 commented 3 years ago

Because i need the value of el-patch-deftype-alist to determine whether some S-form is converted or not, i use the value of that variable when leaf is expanding. Isn't this permitted?

conao3 commented 3 years ago

Unexpected-error: (void-function alist-get)

Sorry, leaf supports Emacs-24, we cannot use alist-get.

ijah4 commented 2 years ago

Now, have got ride of alist-get.