From 532f1b6530f3328d9c6313eb771767fa137bb08e Mon Sep 17 00:00:00 2001 From: Syohei YOSHIDA Date: Fri, 16 Oct 2015 00:03:14 +0900 Subject: [PATCH 1/2] Fix for highlighting string interpolation 4th element of syntax-ppss is not always character. --- elixir-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elixir-mode.el b/elixir-mode.el index 540baf17..4dafc7a8 100644 --- a/elixir-mode.el +++ b/elixir-mode.el @@ -300,7 +300,7 @@ is used to limit the scan." (when (and pos (> pos (point))) (goto-char pos) (let ((value (get-text-property pos 'elixir-interpolation))) - (if (eq (car value) ?\") + (if (car value) (progn (set-match-data (cdr value)) t) From bc907c8e6e3cb6bd65f0c343c85a16a4b015db99 Mon Sep 17 00:00:00 2001 From: Syohei YOSHIDA Date: Fri, 16 Oct 2015 00:11:47 +0900 Subject: [PATCH 2/2] Update string interpolation highlighting test --- test/elixir-mode-font-test.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/elixir-mode-font-test.el b/test/elixir-mode-font-test.el index 498760f8..6a7f8ccc 100644 --- a/test/elixir-mode-font-test.el +++ b/test/elixir-mode-font-test.el @@ -241,7 +241,7 @@ some_expr" "\"\"\"foo\"bar\"baz #{1 + 2} is 3.\"\"\"" (should (eq (elixir-test-face-at 1) 'font-lock-string-face)) (should (eq (elixir-test-face-at 5) 'font-lock-string-face)) - (should (eq (elixir-test-face-at 19) 'font-lock-string-face)) + (should (eq (elixir-test-face-at 19) 'font-lock-variable-name-face)) (should (eq (elixir-test-face-at 31) 'font-lock-string-face)))) (ert-deftest elixir-mode-syntax-table/fontify-atom-in-pattern-match ()