1 line
1.3 KiB
Plaintext
1 line
1.3 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>According to Transient documentation:</p> <p>"The command can also be a closure or lambda expression, but that should only be used for dynamic transients whose suffixes are defined when the prefix command is invoked. See information about the :setup-children function"</p> <p>So according to that I tried the following:</p> <pre><code>(defun set-children (children) '((1 transient-suffix (:key "o" :command normal-func)) ;; OK (1 transient-suffix (:key "k" :description (lambda () "All ok") :command (lambda (message "hey")))))) (transient-define-prefix my-transient () ["Description" :setup-children set-children]) </code></pre> <p>I'm getting <code>(wrong-type-argument (command symbol) (lambda nil "hey"))</code></p> <p>So it seems that it only accepts symbols</p> <p>Any ideas? thanks in advance</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/artema666"> /u/artema666 </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/rfxm47/transient_lambda_expression_for_suffix_command/">[link]</a></span>   <span><a href="https://www.reddit.com/r/emacs/comments/rfxm47/transient_lambda_expression_for_suffix_command/">[comments]</a></span> |