Transient inifx/suffix class for lisp variable options #162
Replies: 2 comments 1 reply
-
To try this out one has to add: (defvar sketch-object nil)
(transient-define-prefix sketch-prefix ()
[("x" sketch-object)])
;; (sketch-prefix)
That wouldn't change anything and if it did, then yes just setting A lot of this code was lifted from the So yes at this point you have no choice but to copy-paste. In the future I might provide a suitable class or teach an existing class about this style of selecting a value and add a new slot that controls whether it is used or not. |
Beta Was this translation helpful? Give feedback.
-
#160, #162 and #165 are related, and concern https://github.com/dalanicolai/sketch-mode. |
Beta Was this translation helpful? Give feedback.
-
While 'investigating' how to make sketch-mode 'compatible' with canvas-mode, I created a
sketch-lisp-variable:choices
infix(suffix) class. The intended purpose for this class was to configure/set some buffer local variable. Probably this will not be used insketch-mode
eventually, but it might be useful anyway so I'll share/document it here.Here is the code (incl. declaration of an infix):
the sketch-mode code contains some more nice examples for how to use transients.
@tarsius It might be handy to remove the
reader
slot from thetransient-lisp-variable
because then this code just have inherited most methods from that class (I probably could have set the reader to nil also, but I am not very famliar with EIEIO/CLOS yet).Beta Was this translation helpful? Give feedback.
All reactions