unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#59559: 28.1; `minibuffer-with-setup-hook' with :append
@ 2022-11-25  2:55 Drew Adams
  2022-11-25  3:07 ` Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2022-11-25  2:55 UTC (permalink / raw)
  To: 59559

Starting from `emacs -Q', try to use `minibuffer-with-setup-hook' with a
list as its arg FUN, where the car is :append and the cadr is a function.
I get an error no matter how I try to interpret the description of the
FUN arg with :append.

The code for the macro does seem to try to handle :append, to construct
code that calls `add-hook' with a non-nil APPEND arg.  But `macroexpand'
with any such list arg to `minibuffer-with-setup-hook' (:append FUNCTION)
doesn't seem to construct an `add-hook' sexp with an APPEND arg.

I see this in every Emacs version that has `minibuffer-with-setup-hook'.
Maybe I'm just not understanding the doc string.  What's an example of
using `minibuffer-with-setup-hook' with (:append FUNCTION), that results
in FUNCTION being appended to `minibuffer-setup-hook', instead of
raising an error?

In GNU Emacs 28.1 (build 2, x86_64-w64-mingw32)
 of 2022-04-21 built on AVALON
Windowing system distributor 'Microsoft Corp.', version 10.0.19044
System Description: Microsoft Windows 10 Pro (v10.0.2009.19044.2251)

Configured using:
 'configure --with-modules --without-dbus --with-native-compilation
 --without-compress-install CFLAGS=-O2'






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#59559: 28.1; `minibuffer-with-setup-hook' with :append
  2022-11-25  2:55 bug#59559: 28.1; `minibuffer-with-setup-hook' with :append Drew Adams
@ 2022-11-25  3:07 ` Drew Adams
  0 siblings, 0 replies; 2+ messages in thread
From: Drew Adams @ 2022-11-25  3:07 UTC (permalink / raw)
  To: Drew Adams, 59559

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)).






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-25  3:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25  2:55 bug#59559: 28.1; `minibuffer-with-setup-hook' with :append Drew Adams
2022-11-25  3:07 ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).