all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal
@ 2014-02-21 17:12 Alex Bennée
  2014-02-21 18:05 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Bennée @ 2014-02-21 17:12 UTC (permalink / raw)
  To: 16834


When dealing with large hex numbers the default regex of num3-mode can
detect them as decimals. For example given:

V28   : 00000000000000000007fc0000000000 vs 0000000000000000000bfc000000000

the follow is high-lighted

V28   : __xxx___xxx___xxx_____x___xxx___ vs _xxx___xxx___xxx_________xxx___

which is obviously wrong.

In the end I just reset num3--number-re to:

(setq num3--number-re "\\([[:xdigit:]]+\\)\\|\\([0-9]+\\)\\|\\.\\([0-9]+\\)")

but perhaps a slightly more clever solution that maintains old behaviour
for very long decimal numbers unless there is a hex digit in there would
be better.

It wouldn't hurt to have customisable faces as well as the default can
look quite harsh depending on the theme.

Regards,

-- 
Alex Bennée






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-24  0:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 17:12 bug#16834: 24.3.50; num3-mode detects long hex numbers as decimal Alex Bennée
2014-02-21 18:05 ` Stefan Monnier
2014-02-21 19:49   ` Michal Nazarewicz
2014-02-21 20:52     ` Stefan Monnier
2014-02-24  0:31       ` Michal Nazarewicz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.