emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/lua-mode 9d75878 159/468: lua-font-lock-keywords: highligh


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode 9d75878 159/468: lua-font-lock-keywords: highlight numbers as constants (issue #15)
Date: Thu, 5 Aug 2021 04:58:27 -0400 (EDT)

branch: elpa/lua-mode
commit 9d758785dcad9771d4f87f73798b418111f235f4
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>

    lua-font-lock-keywords: highlight numbers as constants (issue #15)
---
 lua-mode.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lua-mode.el b/lua-mode.el
index 8c499af..2e9bb4b 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -348,6 +348,13 @@ index of respective Lua reference manuals.")
      '("\\(\\(\\sw:\\|\\sw\\.\\|\\sw_\\|\\sw\\)+\\)[ \t]*=[ 
\t]*\\(function\\)\\_>"
        (1 font-lock-function-name-face nil t) (3 font-lock-keyword-face))
 
+     ;; octal numbers
+     '("\\_<0x[[:xdigit:]]+\\_>" . font-lock-constant-face)
+
+     ;; regular numbers
+     
'("\\_<\\(?1:\\(?:\\(?:[0-9]+\\.?[0-9]*\\|[0-9]*\\.?[0-9]+\\)\\(?:[eE][+-]?[0-9]+\\)?\\)\\)\\_>"
+       . font-lock-constant-face)
+
      ;; Keywords.
      (concat "\\_<"
              (regexp-opt '("and" "break" "do" "else" "elseif" "end" "false"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]