From 55080f6744fc11b92016c3babcf4d35c2e4995a6 Mon Sep 17 00:00:00 2001 From: Micah Chalmer Date: Mon, 2 Feb 2015 01:59:20 -0500 Subject: Fix syntax and highlighting for char literals This uses syntax properties to make it so that emacs recognizes the single quote, rather than the double quote, as the string delimiter within character literals, while leaving the syntax unchanged elsewhere. --- rust-mode-tests.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rust-mode-tests.el') diff --git a/rust-mode-tests.el b/rust-mode-tests.el index 54b4524..0df9060 100644 --- a/rust-mode-tests.el +++ b/rust-mode-tests.el @@ -893,3 +893,9 @@ list of substrings of `STR' each followed by its face." "/* #[foo] */" '("/* " font-lock-comment-delimiter-face "#[foo] */" font-lock-comment-face))) + +(ert-deftest font-lock-double-quote-character-literal () + (rust-test-font-lock + "'\"'; let" + '("'\"'" font-lock-string-face + "let" font-lock-keyword-face))) -- cgit v1.2.3