Subject: Re: bug#59559: 28.1; `minibuffer-with-setup-hook' with :append

From: Michael Heerdegen <[email-masked]>
Date: Tue, 10 Jan 2023 18:37:50 +0100

Drew Adams <[email-masked]> writes:

> Note that the macroexpansion is different in different
> Emacs releases.  But none of them look right to me.  They
> essentially produce some variant of (funcall (:append FUN)).

In master I get

#+begin_src emacs-lisp
(macroexpand-1
  '(minibuffer-with-setup-hook (:append test1) (test2)))
==>
 (let
    ((#2=#:fun test1)
     (#1=#:setup-hook
      (make-symbol "minibuffer-setup")))
  (fset #1#
        (lambda nil
          (remove-hook 'minibuffer-setup-hook #1#)
          (funcall #2#)))
  (unwind-protect
      (progn
        (add-hook 'minibuffer-setup-hook #1# t)
        (test2))
    (remove-hook 'minibuffer-setup-hook #1#)))
#+end_src

At the first look that does not look wrong.

Michael.