help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Running an extended command with default input?


From: egarrulo
Subject: Running an extended command with default input?
Date: Mon, 7 Mar 2016 16:09:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

How can you run an extended command with a default input? For example: `eval-expression` with `(+ 1 1)` as default input (in other words: what you would accomplish by typing `M-: (+ 1 1)` without RET). This code works, but it seems to add an implicit RET:

(execute-kbd-macro (vconcat (kbd (substitute-command-keys "\\[eval-expression] "))
                            "(+ 1 1)"))

Thanks.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]