From: Paul Eggert <eggert@cs.ucla.edu>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 35869-done@debbugs.gnu.org
Subject: bug#35869: [PATCH] `cl-member' and `cl-assoc' do not work for bignums
Date: Sat, 1 Jun 2019 18:15:45 -0700 [thread overview]
Message-ID: <690e4e34-4c58-4452-9d9e-765fc2f90677@cs.ucla.edu> (raw)
In-Reply-To: <9DDA083E-C47B-42F4-96A8-BDF8FB08E5EC@acm.org>
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
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.
[-- Attachment #2: 0001-Tune-cl-assoc.patch --]
[-- Type: text/x-patch, Size: 855 bytes --]
From 1fd7d5086205852f1433e5042ca4efc1d50b1996 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
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
next prev parent reply other threads:[~2019-06-02 1:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-23 16:01 bug#35869: [PATCH] `cl-member' and `cl-assoc' do not work for bignums Mattias Engdegård
2019-06-02 1:15 ` Paul Eggert [this message]
2019-06-02 13:05 ` Mattias Engdegård
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=690e4e34-4c58-4452-9d9e-765fc2f90677@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=35869-done@debbugs.gnu.org \
--cc=mattiase@acm.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.