--- Begin Message ---
Subject: |
27.0.50; integer in pcase sometimes compared by eq |
Date: |
Thu, 07 Mar 2019 16:13:27 +0100 |
User-agent: |
Evolution 3.30.5 (3.30.5-1.fc29) |
(defun f (x)
(pcase x
((or 'a #x10000000000000000) t)))
(f #x10000000000000000) => nil
Just replacing integerp with fixnump fixes this, but I'm not sure if
more of the same lurks somewhere.
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -792,7 +792,7 @@ pcase--u1
(let ((upat (cddr alt)))
(eq (car-safe upat) 'quote)))
(let ((val (cadr (cddr alt))))
- (unless (or (integerp val) (symbolp val))
+ (unless (or (fixnump val) (symbolp val))
(setq memq-ok nil))
(push (cadr (cddr alt)) simples))
(push alt others))))
--- End Message ---
--- Begin Message ---
Subject: |
Re: 27.0.50; integer in pcase sometimes compared by eq |
Date: |
Fri, 29 Mar 2019 00:03:01 +0100 |
User-agent: |
Evolution 3.30.5 (3.30.5-1.fc29) |
tor 2019-03-28 klockan 15:38 -0700 skrev Paul Eggert:
> On 3/28/19 3:20 PM, Mattias EngdegÄrd wrote:
> > I'll do the obvious (unless you beat me to it).
>
> When you do that, please also change the name of the local from memq-
> ok
> to memql-ok, for clarity. Thanks.
Done. Thanks for your help! I'm attaching the mostly cleaned-up patch
(minus the necessary doc changes), in case someone will see some use
for it.
0001-Add-bounds-for-portable-fixnums-and-portable-fixnum-.patch
Description: Text Data
--- End Message ---