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

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

Re: Problems with catch and throw


From: Tassilo Horn
Subject: Re: Problems with catch and throw
Date: Fri, 05 Oct 2007 10:11:05 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

Tassilo Horn <tassilo@member.fsf.org> writes:

Hi,

> Ok, then the real question is: How can I invoke
> `execute-extended-command' with an initial input string?

For the record:  That seems to be not possible, but you can mimic its
behavior like this:

--8<---------------cut here---------------start------------->8---
(let ((command (completing-read "M-x "
                                (let (commands)
                                  (mapatoms (lambda (a)
                                              (when (commandp a)
                                                (push (symbol-name a)
                                                      commands))))
                                  commands)
                                nil t catch-val)))
  (command-execute (intern command) t nil t))
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo


reply via email to

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