commit 039345ef60b4722d050c94ab1978540137df35f9 parent d37d32e01183143b62d51fb7967883959f48bbeb Author: Nick Drozd <nicholasdrozd@gmail.com> Date: Tue, 30 Oct 2018 11:15:03 -0500 Use Rust syntax highlighting for Rust This is another change stemming from Remacs. Diffstat:
| M | helpful.el | | | 6 | +++++- |
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/helpful.el b/helpful.el @@ -2076,7 +2076,11 @@ state of the current symbol." (insert (cond ((stringp source) - (helpful--syntax-highlight source (if primitive-p 'c-mode))) + (let ((mode (when primitive-p + (pcase (file-name-extension source-path) + ("c" 'c-mode) + ("rs" (when (fboundp 'rust-mode) 'rust-mode)))))) + (helpful--syntax-highlight source mode))) ((and (consp source) (eq (car source) 'closure)) (helpful--syntax-highlight (concat ";; Closure converted to defun by helpful.\n"