File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -385,14 +385,6 @@ is used to limit the scan."
385
385
(optional " =" ))
386
386
1 elixir-atom-face)
387
387
388
- ; ; Variable definitions
389
- (,(elixir-rx (group identifiers)
390
- (zero-or-more space)
391
- (repeat 1 " =" )
392
- (or (or sigils identifiers space)
393
- (one-or-more " \n " )))
394
- 1 font-lock-variable-name-face )
395
-
396
388
; ; Gray out variables starting with "_"
397
389
(,(elixir-rx symbol-start
398
390
(group (and " _"
@@ -401,6 +393,14 @@ is used to limit the scan."
401
393
(optional (or " ?" " !" ))))
402
394
1 font-lock-comment-face )
403
395
396
+ ; ; Variable definitions
397
+ (,(elixir-rx (group identifiers)
398
+ (zero-or-more space)
399
+ (repeat 1 " =" )
400
+ (or (or sigils identifiers space)
401
+ (one-or-more " \n " )))
402
+ 1 font-lock-variable-name-face )
403
+
404
404
; ; Map keys
405
405
(,(elixir-rx (group (and (one-or-more identifiers) " :" )) space)
406
406
1 elixir-atom-face)
Original file line number Diff line number Diff line change 527
527
528
528
(ert-deftest elixir-mode-syntax-table/question-quote ()
529
529
" https://github.com/elixir-lang/emacs-elixir/issues/185"
530
- :tags '(fontification syntax-table hoge )
530
+ :tags '(fontification syntax-table)
531
531
(elixir-test-with-temp-buffer
532
532
" \" \\ \" foo\\ \"\" |> String.strip(?\" )"
533
533
(should-not (eq (elixir-test-face-at 28 ) 'font-lock-string-face )))
536
536
" \" \\ \" foo\\ \"\" |> String.strip(?')"
537
537
(should-not (eq (elixir-test-face-at 28 ) 'font-lock-string-face ))))
538
538
539
+ (ert-deftest elixir-mode-syntax-table/ignored-variables-in-pattern-match ()
540
+ " https://github.com/elixir-lang/emacs-elixir/issues/361"
541
+ :tags '(fontification syntax-table)
542
+ (elixir-test-with-temp-buffer
543
+ " (_1_day = 86_400)
544
+ _1_day"
545
+ (should (eq (elixir-test-face-at 2 ) 'font-lock-comment-face ))
546
+ (should (eq (elixir-test-face-at 19 ) 'font-lock-comment-face ))))
547
+
539
548
(provide 'elixir-mode-font-test )
540
549
541
550
; ;; elixir-mode-font-test.el ends here
You can’t perform that action at this time.
0 commit comments