GNU bug report logs - #36167
[PATCH] Replace manually crafted hex regexes with [[:xdigit:]]

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>

Date: Tue, 11 Jun 2019 12:00:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Konstantin Kharlamov <hi-angel <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Replace manually crafted hex regexes with [[:xdigit:]]
Date: Tue, 11 Jun 2019 14:59:46 +0300
Hopefully, this is more readable compared to older "[0-9a-fA-F]", 
because the intention is immediately obvious.

Fun fact: initially I started it because on my older Emacs this 
resulted in better performance; the difference was about 10x times. But 
I can't reproduce this on the current master anymore, i.e. the 
performance matches. Oh, well. I'm thus not sending the patch replacing 
[0-9] with [[:digit:]] because in terms of readability the intention is 
clear there, however replacing the hex regexes should still make code 
more readable.

P.S.: I'm not sure if the commit message looks okay, comments are 
welcome.






This bug report was last modified 6 years and 9 days ago.

Previous Next


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