|
131 | 131 | (zero-or-more (any "a-z" "A-Z" "0-9" "_" "\"" "'" "!" "@" "?")))
|
132 | 132 | (and "\"" (one-or-more (not (any "\""))) "\"")
|
133 | 133 | (and "'" (one-or-more (not (any "'"))) "'"))))
|
134 |
| - (builtin . ,(rx (or line-start (not (any "."))) |
135 |
| - symbol-start |
| 134 | + (builtin . ,(rx symbol-start |
136 | 135 | (or "case" "cond" "for" "if" "unless" "try" "receive"
|
137 | 136 | "raise" "quote" "unquote" "unquote_splicing" "throw"
|
138 | 137 | "super" "send")
|
139 | 138 | symbol-end))
|
140 |
| - (builtin-declaration . ,(rx (or line-start (not (any "."))) |
141 |
| - symbol-start |
| 139 | + (builtin-declaration . ,(rx symbol-start |
142 | 140 | (or "def" "defp" "defmodule" "defprotocol"
|
143 | 141 | "defmacro" "defmacrop" "defdelegate"
|
144 | 142 | "defexception" "defstruct" "defimpl"
|
145 | 143 | "defcallback" "defoverridable")
|
146 | 144 | symbol-end))
|
147 |
| - (builtin-namespace . ,(rx (or line-start (not (any "."))) |
148 |
| - symbol-start |
| 145 | + (builtin-namespace . ,(rx symbol-start |
149 | 146 | (or "import" "require" "use" "alias")
|
150 | 147 | symbol-end))
|
151 | 148 | ;; Set aside code point syntax for `elixir-negation-face'.
|
|
163 | 160 | (identifiers . ,(rx (one-or-more (any "A-Z" "a-z" "_"))
|
164 | 161 | (zero-or-more (any "A-Z" "a-z" "0-9" "_"))
|
165 | 162 | (optional (or "?" "!"))))
|
166 |
| - (keyword . ,(rx (or line-start (not (any "."))) |
167 |
| - symbol-start |
| 163 | + (keyword . ,(rx symbol-start |
168 | 164 | (or "fn" "do" "end" "after" "else" "rescue" "catch")
|
169 | 165 | symbol-end))
|
170 |
| - (keyword-operator . ,(rx (or line-start (not (any "."))) |
171 |
| - symbol-start |
| 166 | + (keyword-operator . ,(rx symbol-start |
172 | 167 | (or "not" "and" "or" "when" "in")
|
173 | 168 | symbol-end))
|
174 | 169 | ;; Module and submodule names start with upper case letter. This
|
@@ -321,8 +316,9 @@ is used to limit the scan."
|
321 | 316 | 0 elixir-attribute-face)
|
322 | 317 |
|
323 | 318 | ;; Keywords
|
324 |
| - (,(elixir-rx (group (or builtin builtin-declaration builtin-namespace |
325 |
| - keyword keyword-operator))) |
| 319 | + (,(elixir-rx (and (or line-start (not (any "."))) |
| 320 | + (group (or builtin builtin-declaration builtin-namespace |
| 321 | + keyword keyword-operator)))) |
326 | 322 | 1 font-lock-keyword-face)
|
327 | 323 |
|
328 | 324 | ;; Function names, i.e. `def foo do'.
|
|
0 commit comments