Subject: Re: bug#16524: 24.3.50; read-string executes minibuffer-exit-hook *before* exiting minibuffer

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 30 May 2021 07:08:39 +0200

Keith David Bershatsky <[email-masked]> writes:

> The documentation for the minibuffer-exit-hook says it runs *after*
> exiting the minibuffer.

Simpler test case for the problem:

(push (lambda ()
	(message "exiting %s" (minibufferp)))
      minibuffer-exit-hook)

(read-string "foo")

It turns out that `minibuffer-exit-hook' is usually (always?) run in the
minibuffer, so "Normal hook run just after exit from minibuffer." is
misleading.  I've instead copied the text from the manual, which says
"Normal hook run whenever a minibuffer is exited." in Emacs 28.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no