From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Sean Whitton <spwhitton@spwhitton.name>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, emacs-devel@gnu.org
Subject: Re: master 8ee21db4af: Add new function `read-string-from-buffer'.
Date: Fri, 29 Apr 2022 09:52:28 -0400 [thread overview]
Message-ID: <jwv1qxgf1aj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <YmvluGU2/posHsJh@protected.localdomain> (Jean Louis's message of "Fri, 29 Apr 2022 16:18:48 +0300")
Jean Louis [2022-04-29 16:18:48] wrote:
> * Stefan Monnier <monnier@iro.umontreal.ca> [2022-04-29 15:21]:
>> Jean Louis [2022-04-29 12:44:41] wrote:
>> > (defun read-from-buffer (&optional value buffer-name mode title keymap place
>> > highlight-list minor-modes)
>>
>> I'd collapse those "mode title keymap place highlight-list minor-modes"
>> into a singe `setup-function` argument.
>
> Is there example of that to help me understand it?
>
> Do you mean `setup-function` should be a list or hash, or similar data
> type which is then parsed by function?
No, I mean a formal argument called `setup-function` which
`read-from-buffer` would call (probably with 0 arguments) in the buffer.
So instead of:
(read-from-buffer "My prompt: " "*The Buffer*"
#'foo-mode nil foo-map nil nil (list #'bar-minor-mode))
you'd write:
(read-from-buffer "My prompt: " "*The Buffer*"
(lambda ()
(foo-mode)
(use-local-map foo-map)
(bar-minor-mode 1)))
-- Stefan
next prev parent reply other threads:[~2022-04-29 13:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <165080616575.16300.17375829044466066664@vcs2.savannah.gnu.org>
[not found] ` <20220424131606.1E4FEC009A8@vcs2.savannah.gnu.org>
2022-04-24 14:03 ` master 8ee21db4af: Add new function `read-string-from-buffer' Sean Whitton
2022-04-24 14:07 ` Lars Ingebrigtsen
2022-04-29 9:44 ` Jean Louis
2022-04-29 12:20 ` Stefan Monnier
2022-04-29 13:18 ` Jean Louis
2022-04-29 13:52 ` Stefan Monnier [this message]
2022-05-18 5:17 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv1qxgf1aj.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=spwhitton@spwhitton.name \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.