[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: |
Stefan Monnier |
Subject: |
bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal |
Date: |
Fri, 21 Feb 2014 15:52:47 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> 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