From unknown Thu Jun 19 13:58:41 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#15889 <15889@debbugs.gnu.org> To: bug#15889 <15889@debbugs.gnu.org> Subject: Status: 24.3; mysterious (cons nil features) in read-feature Reply-To: bug#15889 <15889@debbugs.gnu.org> Date: Thu, 19 Jun 2025 20:58:41 +0000 retitle 15889 24.3; mysterious (cons nil features) in read-feature reassign 15889 emacs submitter 15889 Leo Liu severity 15889 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 00:31:53 2013 Received: (at submit) by debbugs.gnu.org; 14 Nov 2013 05:31:53 +0000 Received: from localhost ([127.0.0.1]:51205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VgpWy-0006YO-LR for submit@debbugs.gnu.org; Thu, 14 Nov 2013 00:31:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38087) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VgpWw-0006Y3-Am for submit@debbugs.gnu.org; Thu, 14 Nov 2013 00:31:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgpWl-0000Tn-Oe for submit@debbugs.gnu.org; Thu, 14 Nov 2013 00:31:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:47733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgpWl-0000Tj-M7 for submit@debbugs.gnu.org; Thu, 14 Nov 2013 00:31:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgpWg-0007dr-6w for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2013 00:31:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgpWa-0000I8-Rq for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2013 00:31:34 -0500 Received: from mail-pd0-x22f.google.com ([2607:f8b0:400e:c02::22f]:56851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgpWa-0000Hx-FH for bug-gnu-emacs@gnu.org; Thu, 14 Nov 2013 00:31:28 -0500 Received: by mail-pd0-f175.google.com with SMTP id r10so1477450pdi.20 for ; Wed, 13 Nov 2013 21:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=mF1foafTyXkr9xpQUHWUJuwX7iDDbtD6GC80Eo8p01g=; b=J004vJ68lz8IEAdGyQDncVHUwQzW5lBTtROLyaM9ET+P1eSoaqPVWq0/480pxzrWqJ v+U8kRQTXI/ahdGrMmxmq8K+eQ6wIwBsBe2GAzcgS1OnG3ulwcPm9Wu8oKsLPE1zavbL q1p8CZsnHuJWdfT0S3OwaAjwCG0hf6ZpAU97jlZ4N1E9YTRrVpMKC4xpfcxtSlMs0mc1 Ojmpy8UzCvVvOsyIU02srp7T0WdyXeffeUd00JsVido8BTgZgTxyX+S7PXzlT4GNR2E+ GJAl9RjFENx6pguBZ0f+9WudXv+5xbtr3VW7i2Q71LYtEeYFwwminaCzfSETrs4v7wNm PICg== X-Received: by 10.68.197.234 with SMTP id ix10mr1398385pbc.185.1384407086649; Wed, 13 Nov 2013 21:31:26 -0800 (PST) Received: from localhost ([123.115.246.236]) by mx.google.com with ESMTPSA id qw8sm48588668pbb.27.2013.11.13.21.31.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Nov 2013 21:31:25 -0800 (PST) From: Leo Liu To: bug-gnu-emacs@gnu.org Subject: 24.3; mysterious (cons nil features) in read-feature X-Debbugs-CC: Stefan Monnier , Johan =?iso-8859-1?Q?Bockg=E5rd?= Date: Thu, 14 Nov 2013 13:31:21 +0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain So apparently try-/all-/test-completion(s) functions test if COLLECTION is a function imprecisely. I propose we fix these functions. Objections? === modified file 'src/minibuf.c' --- src/minibuf.c 2013-11-06 04:11:04 +0000 +++ src/minibuf.c 2013-11-14 05:23:53 +0000 @@ -1199,9 +1199,7 @@ type = (HASH_TABLE_P (collection) ? hash_table : VECTORP (collection) ? obarray_table : ((NILP (collection) - || (CONSP (collection) - && (!SYMBOLP (XCAR (collection)) - || NILP (XCAR (collection))))) + || (CONSP (collection) && !FUNCTIONP (collection))) ? list_table : function_table)); ptrdiff_t idx = 0, obsize = 0; int matchcount = 0; @@ -1460,9 +1458,7 @@ Lisp_Object allmatches; int type = HASH_TABLE_P (collection) ? 3 : VECTORP (collection) ? 2 - : NILP (collection) || (CONSP (collection) - && (!SYMBOLP (XCAR (collection)) - || NILP (XCAR (collection)))); + : NILP (collection) || (CONSP (collection) && !FUNCTIONP (collection)); ptrdiff_t idx = 0, obsize = 0; ptrdiff_t bindcount = -1; Lisp_Object bucket, tem, zero; @@ -1691,9 +1687,7 @@ CHECK_STRING (string); - if ((CONSP (collection) - && (!SYMBOLP (XCAR (collection)) || NILP (XCAR (collection)))) - || NILP (collection)) + if ((CONSP (collection) && !FUNCTIONP (collection)) || NILP (collection)) { tem = Fassoc_string (string, collection, completion_ignore_case ? Qt : Qnil); if (NILP (tem)) --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Path: news.gmane.org!not-for-mail From: Johan =?iso-8859-1?Q?Bockg=E5rd?= Newsgroups: gmane.emacs.devel Subject: Re: mysterious (cons nil features) in read-feature Date: Wed, 13 Nov 2013 23:30:06 +0100 Lines: 40 Approved: news@gmane.org Message-ID: <87ppq4ylxt.fsf@gnu.org> References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1384381833 15870 80.91.229.3 (13 Nov 2013 22:30:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Nov 2013 22:30:33 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 13 23:30:38 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VgixC-00027H-To for ged-emacs-devel@m.gmane.org; Wed, 13 Nov 2013 23:30:31 +0100 Original-Received: from localhost ([::1]:51138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgixC-0005c9-7O for ged-emacs-devel@m.gmane.org; Wed, 13 Nov 2013 17:30:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgiwz-0005Z9-3l for emacs-devel@gnu.org; Wed, 13 Nov 2013 17:30:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vgiws-0002vN-H6 for emacs-devel@gnu.org; Wed, 13 Nov 2013 17:30:17 -0500 Original-Received: from smtprelay-b12.telenor.se ([62.127.194.21]:55338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vgiws-0002ua-6y for emacs-devel@gnu.org; Wed, 13 Nov 2013 17:30:10 -0500 Original-Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id E3CCAEA950 for ; Wed, 13 Nov 2013 23:30:08 +0100 (CET) X-SMTPAUTH-B2: [bocjoh] X-SENDER-IP: [85.229.5.208] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApJAAEv8g1JV5QXQPGdsb2JhbABZgwc4R4ItvQuBJxcDAQEBATg1giUBAQEBAgEBAlMoCwshJQ8BBA0HBAEMCi2HbwMJCgEIti0NiWuMbYJ5FoQbA5VBZIMaiySIYTs X-IronPort-AV: E=Sophos;i="4.93,695,1378850400"; d="scan'208";a="651254470" Original-Received: from c-d005e555.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.229.5.208]) by ipb2.telenor.se with ESMTP; 13 Nov 2013 23:30:08 +0100 Original-Received: by muon.localdomain (Postfix, from userid 1000) id 4A1A94842B7; Wed, 13 Nov 2013 23:30:07 +0100 (CET) Mail-Copies-To: never In-Reply-To: (Leo Liu's message of "Tue, 12 Nov 2013 10:24:14 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 62.127.194.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165240 Archived-At: MIME-Version: 1.0 Content-Type: text/plain Leo Liu writes: > I have asked Stefan and Kim and neither has a definite answer. Kim > pointed me to > http://lists.gnu.org/archive/html/emacs-devel/2007-04/msg00251.html. I > have read that and checked the commit logs but I have no answer either. > > Anyone else know why (cons nil features)? If not, I plan to remove nil > and its checking in read-feature. If you remove it, you will get an error when you try to complete. The documentation (info "(elisp) Basic Completion") used to allow a list of symbols as a completion table, If COLLECTION is an alist (*note Association Lists::), the permissible completions are the elements of the alist that are either strings, symbols, or conses whose CAR is a string or symbol. Symbols are converted to strings using `symbol-name'. Other elements of the alist are ignored. (Remember that in Emacs Lisp, the elements of alists do not _have_ to be conses.) In particular, a list of strings or symbols is allowed, even though we usually do not think of such lists as alists. However this did (and still does) in fact only work if the first symbol in the list is `nil' (or is not a symbol at all). Later the documentation was "fixed" to say, If COLLECTION is an list [sic], the permissible completions are specified by the elements of the list, each of which should be either a string, or a cons cell whose CAR is either a string or a symbol (a symbol is converted to a string using `symbol-name'). If the list contains elements of any other type, those are ignored. But this is not true either, since symbols are not ignored. (If the first symbol is `nil', completion works. With any other symbol (except `lambda'), it gives an invalid-function error.) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 14 14:43:02 2013 Received: (at 15889) by debbugs.gnu.org; 14 Nov 2013 19:43:02 +0000 Received: from localhost ([127.0.0.1]:52599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh2of-00014W-PR for submit@debbugs.gnu.org; Thu, 14 Nov 2013 14:43:02 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:34724) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Vh2od-00014H-FD for 15889@debbugs.gnu.org; Thu, 14 Nov 2013 14:43:00 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFsr+bb/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IPAS-Result: Av4EABK/CFFsr+bb/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="37913173" Received: from 108-175-230-219.dsl.teksavvy.com (HELO pastel.home) ([108.175.230.219]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 14 Nov 2013 14:42:51 -0500 Received: by pastel.home (Postfix, from userid 20848) id 1AFF360CE2; Thu, 14 Nov 2013 14:42:49 -0500 (EST) From: Stefan Monnier To: Leo Liu Subject: Re: bug#15889: 24.3; mysterious (cons nil features) in read-feature Message-ID: References: Date: Thu, 14 Nov 2013 14:42:49 -0500 In-Reply-To: (Leo Liu's message of "Thu, 14 Nov 2013 13:31:21 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 15889 Cc: 15889@debbugs.gnu.org, Johan =?windows-1252?Q?Bockg=E5rd?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > So apparently try-/all-/test-completion(s) functions test if COLLECTION > is a function imprecisely. I propose we fix these functions. Objections? None here, Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 15 01:56:30 2013 Received: (at 15889-done) by debbugs.gnu.org; 15 Nov 2013 06:56:30 +0000 Received: from localhost ([127.0.0.1]:53821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VhDKP-0005CX-3j for submit@debbugs.gnu.org; Fri, 15 Nov 2013 01:56:29 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:40989) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VhDKM-0005CH-GT for 15889-done@debbugs.gnu.org; Fri, 15 Nov 2013 01:56:27 -0500 Received: by mail-pa0-f41.google.com with SMTP id rd3so3234679pab.14 for <15889-done@debbugs.gnu.org>; Thu, 14 Nov 2013 22:56:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=7+AfBHfA+rCP2CUJy5hkauLT8USxzJsCKWRDydWE4pg=; b=kvv302rLsGCpeUszhtmEOp6hR63WoAlRrvP13jwKTKNGYdHD5nbzCQun3Yo+iCIQPs 4f6o8F9NdNF7wMdURP7T4HOTdrwXZ5KM6Sv4PfGShR1Jg52rL93QxFqCGGotWTJXNXF9 fIW6S6feE51GKmqvumqUgJGSEYq4PMLmTqz3QEcbm5EIySrR7aT7xowOrhtab0JgiG0o REGAGs40IO/xaig5s6QvqNnb2VoQX8Cqd62o3Qp/Rfvnilh/TcdIdiuPEn36L8kbaQZO 3CqENRRRWkt0ZiTPeyN89N++t9Bn5Na9G8tsNJoTr6z0s+iY4Sw73yL62YrnqWgZ+gh1 LvGA== X-Received: by 10.66.162.167 with SMTP id yb7mr5507905pab.16.1384498580626; Thu, 14 Nov 2013 22:56:20 -0800 (PST) Received: from localhost ([123.115.246.236]) by mx.google.com with ESMTPSA id pu5sm2551431pac.21.2013.11.14.22.56.18 for <15889-done@debbugs.gnu.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2013 22:56:19 -0800 (PST) From: Leo Liu To: 15889-done@debbugs.gnu.org Subject: Re: bug#15889: 24.3; mysterious (cons nil features) in read-feature References: Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAMFBMVEUaFRZLMy1dTENxVzKQ WiCrXQ97cmO/dSqSh3akjGTApXy5sJ7Sxo/Sz8Xo6eP9//xJbkruAAAAAWJLR0QAiAUdSAAAAAlw SFlzAAACxQAAAsUBidZ/7wAAAAd0SU1FB9cBBwMJOwHXewoAAAIBSURBVCjPVdNBiNNAFADQ6J4F x3hThHZBBC+WCFI8SS0iezRDcMHLHkLAg6gJH/fgYQ9xYlj2sLK4KHgqCgXFhda2Idmr4kkQPZQ0 nkQMbTypbMmMM2m7ZgYSmMef/5OZPwo7HFnx3uKPcmj0Dht1LWZJ+Hvr7dIFZXRUwl9VRTuuKDJ+ U44gjscknK4hhJaCkYRsWjmBtLqXlJAG2wipNe18OZJu1BBq1E8xafl4s6Jq2mUZGftU1y7CCxnp FVUDWJXx4C66BKBnErbuoaYNtoRTu6EZBsCbMn7W+5qOAR6WvxNOby9jHWC9hAf3n304CdiAByXs 3Nh9roLDkyb/sWV712vYwaLSAn8CPMHIAAzOPDKP2COAFm4Y4ODVWc6xG7KXsN7UeUJjjimx2uwd gCgNhr0i8C/xyCD5CiCKAMY3Bf5oDzx//w/fimscdcAZU2jv9sedx6+nYPPFIoWI/GK6QZ+EFGOR ErAjCnV3vPZ7XqlTIMbOLY7fLcvvmT7rXNWaGDexIY44N12TG2PDp7vqyl57dnCeuWwyNpnEURxk fTbDYeBnKRn4oejPYI4sH6WviBumEZ/GxX4X/x6EcURFZ7E071bjQGAxpcOAEOJuTiroDEea5Szv rVWLYfl7ZiQwSUToxrkux7OLixAWGz22+HIyWTRYcVfomOwvzusfjtVIGgLHf3MAAAAASUVORK5C YII= Date: Fri, 15 Nov 2013 14:56:14 +0800 In-Reply-To: (Leo Liu's message of "Thu, 14 Nov 2013 13:31:21 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15889-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Fixed in 24.4 From unknown Thu Jun 19 13:58:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 13 Dec 2013 12:24:30 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator