chiark / gitweb /
el/dot-emacs.el (mdw-fontify-pythonic): Recognize `0o...' and `0b...'.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 25 Nov 2018 13:53:03 +0000 (13:53 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 25 Nov 2018 13:56:34 +0000 (13:56 +0000)
I must have missed these being introduced.

el/dot-emacs.el

index 945333260ce7efc6e1f9bc5f519b32b7851d19b6..0af3c56b0fdea981c645678328c3bec1829786d9 100644 (file)
@@ -2865,7 +2865,7 @@ (defun mdw-fontify-pythonic (keywords)
               '(0 font-lock-keyword-face))
 
         ;; At least numbers are simpler than C.
-        (list (concat "\\_<0\\([xX][0-9a-fA-F]+\\|[0-7]+\\)\\|"
+        (list (concat "\\_<0\\([xX][0-9a-fA-F]+\\|[oO]?[0-7]+\\|[bB][01]+\\)\\|"
                       "\\_<[0-9][0-9]*\\(\\.[0-9]*\\|\\)"
                       "\\([eE]\\([-+]\\|\\)[0-9]+\\|[lL]\\|\\)")
               '(0 mdw-number-face))