Subject: bug#35869: closed (Re: [PATCH] `cl-member' and `cl-assoc' do not work for bignums)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 02 Jun 2019 01:16:02 +0000

Your bug report

#35869: [PATCH] `cl-member' and `cl-assoc' do not work for bignums

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
35869: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35869
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [PATCH] `cl-member' and `cl-assoc' do not work for bignums
From: Paul Eggert <[email-masked]>
To: Mattias Engdegård <[email-masked]>
Cc: [email-masked]
Date: Sat, 1 Jun 2019 18:15:45 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks, I installed that into the master branch, along with the attached minor 
tuneup to restore some of the optimization that was in the original code.
>From 1fd7d5086205852f1433e5042ca4efc1d50b1996 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Sat, 1 Jun 2019 18:12:31 -0700
Subject: [PATCH] Tune cl-assoc

* lisp/emacs-lisp/cl-seq.el (cl-assoc):	Use assq for fixnums.
---
 lisp/emacs-lisp/cl-seq.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index 86a73e1997..87c02a6b54 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -742,7 +742,7 @@ cl-assoc
 			(not (cl--check-test cl-item (car (car cl-alist))))))
 	  (setq cl-alist (cdr cl-alist)))
 	(and cl-alist (car cl-alist)))
-    (if (numberp cl-item)
+    (if (and (numberp cl-item) (not (fixnump cl-item)))
 	(assoc cl-item cl-alist)
       (assq cl-item cl-alist))))
 (autoload 'cl--compiler-macro-assoc "cl-macs")
-- 
2.17.1

Subject: [PATCH] `cl-member' and `cl-assoc' do not work for bignums
From: Mattias Engdegård <[email-masked]>
To: [email-masked]
Date: Thu, 23 May 2019 18:01:05 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

(cl-member (ash 1 100) (list (ash 1 100))) => nil
(cl-assoc (ash 1 100) (list (cons (ash 1 100) t))) => nil

Suggested patch attached.