Skip to content

Commit

Permalink
Improve attribute regexp for multiple on one row
Browse files Browse the repository at this point in the history
  • Loading branch information
RaimoNiskanen committed Sep 16, 2024
1 parent f45d691 commit 539299e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/tools/emacs/erlang.el
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,8 @@ behaviour.")

(defvar erlang-font-lock-keywords-attr
(list
(list (concat "^\\(-" erlang-atom-regexp "\\)\\(\\s-\\|\\.\\|(\\|#\\)")
(list (concat "\\(?:^\\s-*\\|\\.\\s-+\\)"
"\\(-" erlang-atom-regexp "\\)\\(\\s-\\|\\.\\|(\\|#\\)")
1 (if (boundp 'font-lock-preprocessor-face)
'font-lock-preprocessor-face
'font-lock-constant-face)))
Expand Down Expand Up @@ -1251,8 +1252,9 @@ This must be placed in front of `erlang-font-lock-keywords-vars'.")
"\\_<\\([0-9]+\\(_[0-9]+\\)*#[0-9a-zA-Z]+\\(_[0-9a-zA-Z]+\\)*\\)"
"\\<\\([0-9]+\\(_[0-9]+\\)*#[0-9a-zA-Z]+\\(_[0-9a-zA-Z]+\\)*\\)")
1 nil t)
(list (concat "^-record\\s-*\\(?:(\\|\\s-+\\)\\s-*" erlang-atom-regexp)
1 'font-lock-type-face))
(list (concat "\\(?:^\\s-*\\|\\.\\s-*\\)"
"-record\\s-*\\(?:(\\|\\s-+\\)\\s-*" erlang-atom-regexp)
1 'font-lock-type-face))
"Font lock keyword highlighting Erlang records.
This must be placed in front of `erlang-font-lock-keywords-vars'.")

Expand Down

0 comments on commit 539299e

Please sign in to comment.