GNU bug report logs - #48678
[PATCH] lex floats with trailing dot and exponent correctly

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Wed, 26 May 2021 16:57:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 48678 <at> debbugs.gnu.org
Subject: bug#48678: [PATCH] lex floats with trailing dot and exponent correctly
Date: Wed, 26 May 2021 20:27:17 +0300
> From: Mattias Engdegård <mattiase <at> acm.org>
> Date: Wed, 26 May 2021 18:56:43 +0200
> 
> Now Emacs has always treated numbers like 123. as integers rather than floats, but
> (1) it's documented,
> (2) it's what Common Lisp does, and
> (3) it actually doesn't affect the numeric value most of the time.
> 
> (Common Lisp probably got this from Maclisp, the rationale being that a trailing dot can be used to write integers in base 10 even when the current input radix is set to something else, something that Emacs Lisp doesn't need.)
> 
> Obviously this doesn't apply to 1.e6 which any sane person agrees is the float 1.0e+6 (including Common Lisp).
> 
> The attached patch fixes this bug.

Brace for massive breakage.




This bug report was last modified 3 years and 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.