From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Glenn Morris <rgm@gnu.org>
Cc: 34776@debbugs.gnu.org
Subject: bug#34776: Acknowledgement (27.0.50; Some questions about choose-completion-string-functions)
Date: Wed, 13 Mar 2019 09:51:11 -0700 [thread overview]
Message-ID: <871s3a90qo.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <t0sgvwls0r.fsf@fencepost.gnu.org> (Glenn Morris's message of "Fri, 08 Mar 2019 21:07:32 -0500")
[-- Attachment #1: Type: text/plain, Size: 862 bytes --]
On 03/08/19 21:07 PM, Glenn Morris wrote:
> Eric Abrahamsen wrote:
>
>> Actually it looks like I was wrong about using add-function with
>> choose-completion-string-functions, it's just a plain list you stick
>> functions into. I think it has to be an error not to declare it
>> buffer-local... I've worked around this with `make-local-variable', but
>> I'm halfway sure this should be a defvar-local...?
>
> The two uses in the Emacs code-base use add-hook without LOCAL.
> completing-read-multiple and ido-common-initialization.
You're right, I was misinterpreting the code and comments as saying the
functions should be buffer local, when it just meant they *could* be
buffer local. I'll use add-hook with LOCAL.
So never mind! But I'd still like to add something like the attached, as
functions following the current docstring will raise an error.
Eric
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 589 bytes --]
diff --git a/lisp/simple.el b/lisp/simple.el
index d4ae5ebb1f..0274bdb459 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8188,6 +8188,9 @@ choose-completion-string-functions
BUFFER - the buffer in which the choice should be inserted,
BASE-POSITION - where to insert the completion.
+Functions should also accept and ignore a potential fourth
+argument, passed for backwards compatibility.
+
If a function in the list returns non-nil, that function is supposed
to have inserted the CHOICE in the BUFFER, and possibly exited
the minibuffer; no further functions will be called.
next prev parent reply other threads:[~2019-03-13 16:51 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-06 23:05 bug#34776: 27.0.50; Some questions about choose-completion-string-functions Eric Abrahamsen
[not found] ` <handler.34776.B.155191354931988.ack@debbugs.gnu.org>
2019-03-09 0:05 ` bug#34776: Acknowledgement (27.0.50; Some questions about choose-completion-string-functions) Eric Abrahamsen
2019-03-09 2:07 ` Glenn Morris
2019-03-13 16:51 ` Eric Abrahamsen [this message]
2019-04-10 0:03 ` Noam Postavsky
2019-04-10 3:16 ` Eric Abrahamsen
2019-04-10 3:29 ` Glenn Morris
2019-04-10 4:33 ` Eli Zaretskii
2019-04-10 6:35 ` Eric Abrahamsen
2019-04-10 7:01 ` Eli Zaretskii
2019-04-10 7:22 ` Eric Abrahamsen
2019-04-10 7:29 ` Eric Abrahamsen
2019-04-10 8:24 ` Eli Zaretskii
2019-04-10 8:57 ` Branch freezing for release (WAS: bug#34776) Noam Postavsky
2019-04-10 9:21 ` Eli Zaretskii
2019-04-10 16:16 ` Noam Postavsky
2019-04-10 16:40 ` Eli Zaretskii
2019-04-10 16:59 ` Branch freezing for release Basil L. Contovounesios
2019-04-10 17:12 ` Eli Zaretskii
2019-04-10 17:39 ` Basil L. Contovounesios
2019-04-10 18:31 ` Eli Zaretskii
2019-04-11 14:02 ` Basil L. Contovounesios
2019-04-22 13:03 ` Basil L. Contovounesios
2019-04-22 13:14 ` Eli Zaretskii
2019-04-22 15:18 ` Basil L. Contovounesios
2019-04-10 17:56 ` Stefan Monnier
2019-04-10 18:26 ` Eli Zaretskii
2019-04-10 18:54 ` Stefan Monnier
2019-04-10 19:19 ` Eli Zaretskii
2019-04-10 20:16 ` Dmitry Gutov
2019-04-11 0:12 ` Noam Postavsky
2019-04-11 13:52 ` Eli Zaretskii
2019-04-12 1:03 ` Noam Postavsky
2019-04-12 7:04 ` Eli Zaretskii
2019-04-12 10:18 ` Noam Postavsky
2019-04-12 12:23 ` Stefan Monnier
2019-04-12 12:24 ` Eli Zaretskii
2019-04-12 14:14 ` Dmitry Gutov
2019-04-10 13:14 ` Stefan Monnier
2019-04-10 13:47 ` Andreas Schwab
2019-04-10 15:03 ` Eli Zaretskii
2019-04-10 8:05 ` bug#34776: Acknowledgement (27.0.50; Some questions about choose-completion-string-functions) Andreas Schwab
2019-04-10 8:22 ` Eli Zaretskii
2019-04-10 8:39 ` Andreas Schwab
2019-04-10 8:48 ` Eli Zaretskii
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=871s3a90qo.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=34776@debbugs.gnu.org \
--cc=rgm@gnu.org \
/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.