drym-org / symex.el

An intuitive way to edit Lisp symbolic expressions ("symexes") structurally in Emacs
Other
271 stars 22 forks source link

Macros for defining symex commands #69

Closed countvajhula closed 1 year ago

countvajhula commented 1 year ago

Summary of Changes

This adds a couple of macros for defining symex commands. These macros handle the boilerplate of reindenting after execution, etc. and minimize the use of advice for such things, and could also implicitly include other common functionality like evil-repeat (dot .) support which currently requires a separate registration step. In general these macros represent a better abstraction of a command than using functions with ad hoc and inconsistently used set up and tear down code, and should allow us to integrate more easily with other tools like tree-edit. See #73 for a full description.

Bugs remaining:

Public Domain Dedication

(Why: The freely released, copyright-free work in this repository represents an investment in a better way of doing things called attribution-based economics. Attribution-based economics is based on the simple idea that we gain more by giving more, not by holding on to things that, truly, we could only create because we, in our turn, received from others. As it turns out, an economic system based on attribution -- where those who give more are more empowered -- is significantly more efficient than capitalism while also being stable and fair (unlike capitalism, on both counts), giving it transformative power to elevate the human condition and address the problems that face us today along with a host of others that have been intractable since the beginning. You can help make this a reality by releasing your work in the same way -- freely into the public domain in the simple hope of providing value. Learn more about attribution-based economics at drym.org, tell your friends, do your part.)

countvajhula commented 1 year ago

This PR was accumulating improvements beyond its scope, so I'm breaking this up into separate PRs. This one just introduces the new macros and rewrites existing commands using them. Although I'm going to go ahead and merge this, it will be reviewed as part of final review on the integration branch before being merged into the main branch. Of course, feedback is welcome at any time for anyone who has time to give this a look.