GNU bug report logs - #16834
24.3.50; num3-mode detects long hex numbers as decimal

Previous Next

Package: emacs;

Reported by: Alex Bennée <kernel-hacker <at> bennee.com>

Date: Fri, 21 Feb 2014 17:13:02 UTC

Severity: minor

Found in version 24.3.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michal Nazarewicz <mina86 <at> mina86.com>
Cc: 16834 <at> debbugs.gnu.org, Alex Bennée <kernel-hacker <at> bennee.com>
Subject: bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal
Date: Fri, 21 Feb 2014 15:52:47 -0500
> Perhaps this would be better:

> (defconst num3--number-re
>   (concat "[0#][xX]\\([[:xdigit:]]+\\)"      ; 1 = hexadecimal
>        "\\|\\(?1:\\b\\(?:[0-9]+[a-fA-F]\\|"  ; 1 = hexadecimal
>                 "[a-fA-F]+[0-9]\\)[[:xdigit:]]*\\b\\)"  
>        "\\|\\([0-9]+\\)"                         ; 2 = decimal
>        "\\|\\.\\([0-9]+\\)"))                    ; 3 = fraction

> So there would have to be at least one decimal digit and the whole
> sequence would have to be a complete word (i.e. 1000Ah, which would be
> a pretty big battery, won't be highlighted as a hexadecimal number).

Sounds good.  Can you install that?


        Stefan




This bug report was last modified 11 years and 151 days ago.

Previous Next


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