Ihor Radchenko <[email protected]> writes:
> Rather than going into recursive replacements, simply let-bind
> !citation, !prefix, and anything else we may want to provide around the
> lambda/function call.
Clever! I had to put the let inside the lambda for it to work.
(defun org-cite-basic-follow--parse-suffix-specification (specification)
(pcase specification
(`(,key ,desc (lambda . ,fn-args) . ,other)
(list key desc `(lambda ,@fn-args) ,other))
(`(,key ,desc (,fn . ,fn-args) . ,other)
`(,key ,desc
(lambda ()
(interactive)
(let ((!citation (car (transient-scope)))
(!prefix (cadr (transient-scope)))
(!citation-key (org-element-property :key (car
(transient-scope)))))
(,fn ,@fn-args)))
,other))
(other other)))
Does it make sense to keep matching the lambda separately? This just
keeps getting better=)
Thanks and cheers!
Tor-björn