[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59559: 28.1; `minibuffer-with-setup-hook' with :append
From: |
Michael Heerdegen |
Subject: |
bug#59559: 28.1; `minibuffer-with-setup-hook' with :append |
Date: |
Sat, 21 Jan 2023 15:36:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Drew Adams <drew.adams@oracle.com> writes:
> > I think clarifying that a bit would make sense.
>
> Yes.
I tried to do that:
From 18a09740e4ee354954803011a7e7ded003987f77 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen@web.de>
Date: Sat, 21 Jan 2023 14:45:39 +0100
Subject: [PATCH] * lisp/files.el (minibuffer-with-setup-hook): Clarify
docstring
This fixes Bug#59559: Try to make clearer what kinds of s-exps are
expected as FUN argument and how they are interpreted.
---
lisp/files.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index d308e99804d..1da77159217 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1746,9 +1746,11 @@ confirm-nonexistent-file-or-buffer
(defmacro minibuffer-with-setup-hook (fun &rest body)
"Temporarily add FUN to `minibuffer-setup-hook' while executing BODY.
-By default, FUN is prepended to `minibuffer-setup-hook'. But if FUN is of
-the form `(:append FUN1)', FUN1 will be appended to `minibuffer-setup-hook'
-instead of prepending it.
+In the default case, FUN is an expression that should evaluate to
+a function, and the result will be prepended to
+`minibuffer-setup-hook'. If FUN is an unquoted list of the
+form `(:append FUN1)', the result of evaluating FUN1 will be
+appended to `minibuffer-setup-hook' instead of prepending it.
BODY should use the minibuffer at most once.
Recursive uses of the minibuffer are unaffected (FUN is not
--
2.30.2
I think this could go to emacs-29.
Thanks,
Michael.
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Michael Heerdegen, 2023/01/10
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Drew Adams, 2023/01/10
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Michael Heerdegen, 2023/01/10
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Drew Adams, 2023/01/10
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append,
Michael Heerdegen <=
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Eli Zaretskii, 2023/01/21
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Michael Heerdegen, 2023/01/21
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Eli Zaretskii, 2023/01/21
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Drew Adams, 2023/01/21
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Eli Zaretskii, 2023/01/21
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Drew Adams, 2023/01/21
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Eli Zaretskii, 2023/01/21
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Drew Adams, 2023/01/21
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Drew Adams, 2023/01/21
- bug#59559: 28.1; `minibuffer-with-setup-hook' with :append, Eli Zaretskii, 2023/01/21