[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45392: 28.0.50; read-from-minibuffer sets `this-command` variable to
From: |
Juri Linkov |
Subject: |
bug#45392: 28.0.50; read-from-minibuffer sets `this-command` variable to `exit-minibuffer` |
Date: |
Mon, 25 Jan 2021 19:05:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
>> Thanks for your bug report. I think it is expected that 'this-command'
>> is 'exit-minibuffer' in this case, because 'this-command' is usually set
>> only once *at the beginning* of the execution of a command. It keeps
>> its value until a *new* command is executed by Emacs. This is not
>> explicitly said in the docstring, but it is mentioned in the Elisp Info
>> manual.
>>
>> I don't know if the docstring could be expressed more clearly; I prefer
>> to leave those command loop details to the Info manuals.
>
> I think so, too, so there doesn't seem to be anything further to do in
> this bug report, and I'm closing it. If there's more to be done here,
> please respond to the debbugs address and we'll reopen.
Is it what the recently added varible 'current-minibuffer-command'
intended to do? Then OP could use it like
(defun test ()
(interactive)
(print current-minibuffer-command)
(read-from-minibuffer "test")
(print current-minibuffer-command))