bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21701: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal


From: Stefan Monnier
Subject: bug#21701: Fwd: cl-typecase broken (was 25.0.50; ert explainer for equal can't handle negative numbers)
Date: Fri, 04 Dec 2015 08:30:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> I just realised that the underlying problem is a change to `cl-typecase'.
> It treats -50 as a character.
>
> (cl-typecase -50
>   (character "A character")
>   (fixnum "A fixnum")
>   (t "Something else"))
>
> Emacs 25 returns "A character" and emacs 24 "A fixnum".

I installed the patch below which should fix this.


        Stefan


diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 09d2d3f..c8aad3a 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2885,7 +2885,7 @@ cl--macroexp-fboundp
 (put 'real 'cl-deftype-satisfies #'numberp)
 (put 'fixnum 'cl-deftype-satisfies #'integerp)
 (put 'base-char 'cl-deftype-satisfies #'characterp)
-(put 'character 'cl-deftype-satisfies #'integerp)
+(put 'character 'cl-deftype-satisfies #'natnump)
 
 
 ;;;###autoload





reply via email to

[Prev in Thread] Current Thread [Next in Thread]