File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,7 @@ is used to limit the scan."
256256(defun elixir-syntax-propertize-interpolation ()
257257 (let* ((beg (match-beginning 0 ))
258258 (context (save-excursion (save-match-data (syntax-ppss beg)))))
259+ (put-text-property beg (1+ beg) 'syntax-table (string-to-syntax " w" ))
259260 (put-text-property beg (1+ beg) 'elixir-interpolation
260261 (cons (nth 3 context) (match-data )))))
261262
Original file line number Diff line number Diff line change @@ -288,6 +288,17 @@ when"
288288 (should-not (eq (elixir-test-face-at 67 ) 'font-lock-keyword-face ))
289289 (should (eq (elixir-test-face-at 72 ) 'font-lock-keyword-face ))))
290290
291+ (ert-deftest elixir-mode-syntax-table/string-interpolation-in-words-list ()
292+ " https://github.com/elixir-lang/emacs-elixir/issues/263"
293+ :tags '(fontification syntax-table)
294+ (elixir-test-with-temp-buffer
295+ " ~w(SADD users #{user_id})"
296+ (should (eq (elixir-test-face-at 4 ) 'font-lock-string-face ))
297+
298+ (should-not (eq (elixir-test-face-at 15 ) 'font-lock-comment-face ))
299+ (should-not (eq (elixir-test-face-at 17 ) 'font-lock-comment-face ))
300+ (should-not (eq (elixir-test-face-at 25 ) 'font-lock-comment-face ))))
301+
291302(provide 'elixir-mode-font-test )
292303
293304; ;; elixir-mode-font-test.el ends here
You can’t perform that action at this time.
0 commit comments