From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#66615: 30.0.50; Inconsistent 'number-or-marker' type definition in the cl- machinery Date: Wed, 18 Oct 2023 13:59:21 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier To: 66615@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 18 20:06:56 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qtAwY-00005b-NQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Oct 2023 20:06:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtAwH-0002YR-Qw; Wed, 18 Oct 2023 14:06:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtAwG-0002Y4-SF for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 14:06:36 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtAwG-0007LR-Ez for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 14:06:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qtAwg-0006WW-Br for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 14:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Oct 2023 18:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66615 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.169765240825052 (code B ref -1); Wed, 18 Oct 2023 18:07:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Oct 2023 18:06:48 +0000 Original-Received: from localhost ([127.0.0.1]:34636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtAwR-0006Vz-WB for submit@debbugs.gnu.org; Wed, 18 Oct 2023 14:06:48 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:54450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtAwP-0006Vk-5l for submit@debbugs.gnu.org; Wed, 18 Oct 2023 14:06:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtAvt-0002NZ-Ks for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 14:06:13 -0400 Original-Received: from mail-vi1eur05on20619.outbound.protection.outlook.com ([2a01:111:f400:7d00::619] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtAvq-0007JI-S1 for bug-gnu-emacs@gnu.org; Wed, 18 Oct 2023 14:06:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jZTD4W0TqtXG1cGqqQQTd0+7awcA2mNXAMtxsVxJwVbg/38Up5K5l2fn17o2VA3ayL5zNlOvtdEnTTse+V6dxpkh6yEyWbxO8azjsLoVrUPITXmV5U+n5O/Ih1+dKtrYgfL0y1bMrX5stssqHlcmNo4uvB0w6Di/RHeX81xcZ80Ny4Ywp/3jPekBDatAPD5EXf410gn9yZSbHyQWcpHSvh5oocLxueR2Q26aieCJbSolDSFsiEzRG8QxMJ7z8nlJVfbOmkLDhbMnZ4Nz/lJff4OHLE/IbAdxB1WCKNEo/MSWiaYdsOmG1GKwOJPSzcnYAIzIxSWIigjWitbipQaX6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IAohIgSzDgEVrKyNBAdg0CF6jkrV/Sb7/lPH77DiBl4=; b=JoqtCN5cpszFKw3YQIttHCXwHWAoNx9RIgJO2RRIU7ppmLp7bmJdUWzhpGTM5KvBf1ICvbVGpMJ/2pH2np61P7XjS8GZrZ/T4qYx6mJheMdWxXte+SasYQlojiYQWmmIWPs20QCCj+M9tcTmNp48FJP3eiBhMuWlZshG198A/FNHuVt5RYICHH3+2uFtVSBQOb/UnWNWKQyQk6RS5kJmie6iv4J+ha/O2ajdSs2tn+xW3TiGdskhMj3+DlUHGClzGe8J0nUtR+z8n0Kz+Ejg2bVJVNJwJF3F8X4XrHCH8bENAgkYTlrF6OEwyfSf7us55Y01eac8fgp9h/m2HbDwLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 40.67.248.234) smtp.rcpttodomain=iro.umontreal.ca smtp.mailfrom=gnu.org; dmarc=fail (p=none sp=none pct=100) action=none header.from=gnu.org; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IAohIgSzDgEVrKyNBAdg0CF6jkrV/Sb7/lPH77DiBl4=; b=llSO+8J2vcX0ePQR/drG6gyDgb1Zlg8gSoA4DjL+y5ip4wRwT7eIPm02hVVVLiQGMQpnuIun+aUOFk0zOhrYyRSYTuOiwgWeLIi73RfY/CYOko3RA25jcFgzLnyz7t9htOvMD+HgLofLmJpthWOiuZGQFONfGmXZlSPcmh7OqD4= Original-Received: from AS8P251CA0014.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::13) by DU0PR08MB8905.eurprd08.prod.outlook.com (2603:10a6:10:47d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.36; Wed, 18 Oct 2023 18:01:04 +0000 Original-Received: from AM7EUR03FT028.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2f2:cafe::c0) by AS8P251CA0014.outlook.office365.com (2603:10a6:20b:2f2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.24 via Frontend Transport; Wed, 18 Oct 2023 18:01:04 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 40.67.248.234) smtp.mailfrom=gnu.org; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=gnu.org; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gnu.org discourages use of 40.67.248.234 as permitted sender) Original-Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT028.mail.protection.outlook.com (100.127.140.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6907.24 via Frontend Transport; Wed, 18 Oct 2023 18:01:03 +0000 Original-Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 18 Oct 2023 18:01:02 +0000 Original-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Wed, 18 Oct 2023 18:01:02 +0000 Original-Received: from e124257 (10.34.101.64) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Wed, 18 Oct 2023 18:01:02 +0000 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7EUR03FT028:EE_|DU0PR08MB8905:EE_ X-MS-Office365-Filtering-Correlation-Id: ff4063f8-1a33-42ff-7456-08dbd0043186 NoDisclaimer: true X-MS-Exchange-SenderADCheck: 2 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OvpXi4dkTRy5bVheRInUqF2g/GigErL/VxI5AF7kcaByyWq3rmRI2HBLAmZN4nJb82OVCj+CagfJX3UO9tNssXF6xc8xIrfA2DLZM6hyLC9kT/mVsTdlWSXHLpY34tbsz9dQ0QS79nYWTMB1XbbQuc6N5w7PssKOBmix5IFfsPthOLxj/KylEkhqVQobvgqRj9QgdFA8LkIahGObT1eUrUAFVR7+tAtWtHiWK4ncw54nl1AeIzxyGmoOgS+0J4ek1JLBN1Wg9BvL//3wqfc2brSTq0PVC/osEcEy7bBP1QH7q7ap+u6ClUgHdr6X3QzjLD/GKv02C760NSYVx7GGB9owVB1ioXKbMDfVCnzMbTBnNA3AcR37kLJfs9fwNSfGnd7/tYWv5GCNDjprJnJPT566EEl7vOqqZixUHCwXJXKMzaVbs4lbTDBCIwqfziQ2cIpgveA//wmOkOKuzdBoYkOd76BdbdamqPyIDyytuYpCmnLVnK43CesFrMN6Gp1pIFLVddIC8b+Kgu/O6XNaD02Hg6oLzcFWAo8umMjEFdpr2SuK6HIoXxMWQC+lQiZd4syWut2c0sAdTdmGDtDzitg4laUPybif6l3kB6MCYqE5CZfE0GkveRh1UrLMCn1QT7qSVeRqb9j+XzrckZVFjnBgw7bA0qtjMnHmejfJvsfX69jzzR6UJIxA9r5ZjDpoXWZhNLtGucguufvIvbpar2OEITPPFFnK9XQ3x0RsbXxPhtGUSocAATyT3/AiG iFpvmAYHWWYtyFK5tPuwLc3aQ== X-Forefront-Antispam-Report: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(39860400002)(346002)(136003)(396003)(230922051799003)(64100799003)(61400799006)(451199024)(82310400011)(48200799006)(40470700004)(46966006)(40460700003)(70206006)(316002)(70586007)(6636002)(47076005)(54906003)(4326008)(35950700001)(8676002)(8936002)(82740400003)(498600001)(53546011)(356005)(83380400001)(336012)(6666004)(26005)(40480700001)(2906002)(86362001)(5660300002)(41300700001)(81166007)(296002)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2023 18:01:03.1773 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff4063f8-1a33-42ff-7456-08dbd0043186 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[40.67.248.234]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT028.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8905 Received-SPF: pass client-ip=2a01:111:f400:7d00::619; envelope-from=bounces+SRS=splFO=GA@arm.com; helo=EUR05-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272672 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello all, while performing some development I noticed that 'number-or-marker' is mentioned as a type in 'cl--typeof-types'. Unfortunatelly its entry is missing in 'cl-deftype-satisfies' (see cl-macs.el:3469). My question is, why do we consider 'number-or-marker' in the first place a type if we support the or syntax in `cl-typep' like (cl-typep 3 '(or marker number)) ? I'd like to fix this inconsistency in order to progress with my development, originally I worked out the attached patch but I now suspect that (unless there's a specific reason) we should just remove 'number-or-marker' as a type entirely instead. WDYT? Thanks Andrea PS also I think we have a similar issue/question with 'integer-or-marker'. IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-Add-two-missing-number-or-marker-entries-to-the-cl-m.patch" >From 05d85f19e51c15df8824df8e8608784ec79b37cf Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Wed, 18 Oct 2023 16:10:08 +0200 Subject: [PATCH] Add two missing 'number-or-marker' entries to the cl machinery. Assuming 'number-or-marker' is a type (as present multiple times in cl--typeof-types) adding some missing entries for coherency. * lisp/emacs-lisp/cl-preloaded.el (cl--typeof-types): Add 'number-or-marker' as supertype of 'number' in the 'float' branch. * lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Add 'number-or-marker'. * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-cstr-typespec-tests-alist): Update test. * test/src/comp-tests.el (comp-tests-type-spec-tests): Update two testes. --- lisp/emacs-lisp/cl-macs.el | 3 ++- lisp/emacs-lisp/cl-preloaded.el | 4 ++-- test/lisp/emacs-lisp/comp-cstr-tests.el | 2 +- test/src/comp-tests.el | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 8025a64f1bf..722d561b9f4 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -3502,7 +3502,8 @@ cl--macroexp-fboundp (symbol . symbolp) (vector . vectorp) (window . windowp) - ;; FIXME: Do we really want to consider this a type? + ;; FIXME: Do we really want to consider these types? + (number-or-marker . number-or-marker-p) (integer-or-marker . integer-or-marker-p) )) (put type 'cl-deftype-satisfies pred)) diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el index 676326980aa..96e288db7d5 100644 --- a/lisp/emacs-lisp/cl-preloaded.el +++ b/lisp/emacs-lisp/cl-preloaded.el @@ -58,8 +58,8 @@ cl--typeof-types ;; Markers aren't `numberp', yet they are accepted wherever integers are ;; accepted, pretty much. (marker number-or-marker atom) - (overlay atom) (float number atom) (window-configuration atom) - (process atom) (window atom) + (overlay atom) (float number number-or-marker atom) + (window-configuration atom) (process atom) (window atom) ;; FIXME: We'd want to put `function' here, but that's only true ;; for those `subr's which aren't special forms! (subr atom) diff --git a/test/lisp/emacs-lisp/comp-cstr-tests.el b/test/lisp/emacs-lisp/comp-cstr-tests.el index a4f282fcfef..d2f552af6fa 100644 --- a/test/lisp/emacs-lisp/comp-cstr-tests.el +++ b/test/lisp/emacs-lisp/comp-cstr-tests.el @@ -191,7 +191,7 @@ ;; 74 ((and boolean (or number marker)) . nil) ;; 75 - ((and atom (or number marker)) . (or marker number)) + ((and atom (or number marker)) . number-or-marker) ;; 76 ((and symbol (or number marker)) . nil) ;; 77 diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 4444ab61219..31871bb2eec 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -977,7 +977,7 @@ comp-tests-check-ret-type-spec (if (= x y) x 'foo)) - '(or (member foo) marker number)) + '(or (member foo) marker-or-number)) ;; 14 ((defun comp-tests-ret-type-spec-f (x) @@ -1117,7 +1117,7 @@ comp-tests-check-ret-type-spec ((defun comp-tests-ret-type-spec-f (x) (when (> x 1.0) x)) - '(or null marker number)) + '(or null number-or-marker)) ;; 36 ((defun comp-tests-ret-type-spec-f (x y) -- 2.25.1 --=-=-=--