From d5d58ca19e66b232e66e1308f3a996edc8019598 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Sat, 21 Nov 2015 20:08:24 +0100 Subject: [PATCH] Add highlight-numbers-mode configuration --- emacs/.emacs.d/init.org | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 5a830f8..a256c8f 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1713,6 +1713,18 @@ (add-hook 'scheme-mode-hook 'lisp-extra-font-lock-mode) #+End_src +** Hightlight numbers mode + + I find this regular expression to work better at identifying + general numbers as the default one doesn't consider numbers + starting with a sign or a decimal point. + + #+BEGIN_SRC emacs-lisp + (stante-after highlight-numbers + (setq highlight-numbers-generic-regexp + "\\_<[-+]?[[:digit:]]+\\(?:\.[[:digit:]]+\\)?.*?\\_>")) + #+END_SRC + * Final touches These options and calls need to come last so they don't interfere