From: npostavs@users.sourceforge.net
To: Mark Oteiza <mvoteiza@udel.edu>
Cc: 24966@debbugs.gnu.org
Subject: bug#24966: 26.0.50;
Date: Sun, 20 Nov 2016 23:24:19 -0500 [thread overview]
Message-ID: <87fumljw98.fsf@users.sourceforge.net> (raw)
In-Reply-To: <87shqnpxym.fsf@udel.edu> (Mark Oteiza's message of "Sat, 19 Nov 2016 05:26:25 -0500")
unarchive 23533
# It was marked for 25.2 before master was renumbered to 26
notfixed 23533 25.2
fixed 23533 26.0.50
retitle 24966 26.0.50; test-completion with alist COLLECTION calls PREDICATE incorrectly
tags 24966 confirmed
quit
Mark Oteiza <mvoteiza@udel.edu> writes:
> Hi,
>
> dd98ee8992c3246861e44 appears to be the culprit for breaking the
> following from -Q:
Yup, I didn't fix test-completion correctly.
>
> 1. C-x C-f /tmp/foo.tex
> 2. M-x reftex-mode
> 3. Insert the following: \label{foobar}
> 4. M-x reftex-goto-label
>
> and, when attempting to complete, a wrong-type-argument error occurs.
>
> Debugger entered--Lisp error: (wrong-type-argument listp "argh")
> #[(x) "\b@;\207" [x] 1]("argh")
> test-completion("argh" ((xr nil "\\\\\\\\\\\\") (index-tags) (is-multi nil) (bibview-cache) (master-dir . "/tmp/") (label-numbers) (bof "/tmp/lol.tex") ("argh" "s" " " "/tmp/lol.tex" nil) (eof "/tmp/lol.tex")) #[(x) "\b@;\207" [x] 1])
I tentatively suggest the patch below, but I want to add some tests
before commiting anything.
diff --git i/src/minibuf.c w/src/minibuf.c
index 57eea05..fe187b3 100644
--- i/src/minibuf.c
+++ w/src/minibuf.c
@@ -1686,8 +1686,6 @@ DEFUN ("test-completion", Ftest_completion, Stest_completion, 2, 3, 0,
tem = Fassoc_string (string, collection, completion_ignore_case ? Qt : Qnil);
if (NILP (tem))
return Qnil;
- else if (CONSP (tem))
- tem = XCAR (tem);
}
else if (VECTORP (collection))
{
@@ -1765,14 +1763,16 @@ DEFUN ("test-completion", Ftest_completion, Stest_completion, 2, 3, 0,
/* Reject this element if it fails to match all the regexps. */
if (CONSP (Vcompletion_regexp_list))
{
+ Lisp_Object temstr = (CONSP (tem)) ? XCAR (tem) : tem;
+ if (SYMBOLP (temstr))
+ temstr = string;
+
ptrdiff_t count = SPECPDL_INDEX ();
specbind (Qcase_fold_search, completion_ignore_case ? Qt : Qnil);
for (regexps = Vcompletion_regexp_list; CONSP (regexps);
regexps = XCDR (regexps))
{
- if (NILP (Fstring_match (XCAR (regexps),
- SYMBOLP (tem) ? string : tem,
- Qnil)))
+ if (NILP (Fstring_match (XCAR (regexps), temstr, Qnil)))
return unbind_to (count, Qnil);
}
unbind_to (count, Qnil);
next prev parent reply other threads:[~2016-11-21 4:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-19 10:26 bug#24966: 26.0.50; Mark Oteiza
2016-11-21 4:24 ` npostavs [this message]
2016-11-21 19:42 ` Mark Oteiza
2016-11-27 20:24 ` bug#24966: 26.0.50; test-completion with alist COLLECTION calls PREDICATE incorrectly npostavs
2016-11-28 20:59 ` Mark Oteiza
2016-11-28 21:03 ` Noam Postavsky
2016-11-29 3:31 ` npostavs
2016-11-30 2:04 ` Mark Oteiza
2016-12-06 1:50 ` Mark Oteiza
2016-12-07 3:31 ` npostavs
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=87fumljw98.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=24966@debbugs.gnu.org \
--cc=mvoteiza@udel.edu \
/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.