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

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

bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal


From: Michal Nazarewicz
Subject: bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal
Date: Mon, 24 Feb 2014 01:31:16 +0100
User-agent: Notmuch/0.17+15~gb65ca8e (http://notmuchmail.org) Emacs/24.3.50.1 (x86_64-unknown-linux-gnu)

On Fri, Feb 21 2014, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> 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?

Pushed.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--

Attachment: signature.asc
Description: PGP signature


reply via email to

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