[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1ac5a9c: Add prettify-symbols-alist for js-mode
From: |
Simen Heggestøyl |
Subject: |
[Emacs-diffs] master 1ac5a9c: Add prettify-symbols-alist for js-mode |
Date: |
Sun, 27 Sep 2015 08:06:01 +0000 |
branch: master
commit 1ac5a9c20cb22efb398fa18781c6b932dd4e54df
Author: Simen Heggestøyl <address@hidden>
Commit: Simen Heggestøyl <address@hidden>
Add prettify-symbols-alist for js-mode
* lisp/progmodes/js.el (js--prettify-symbols-alist): New defconst.
(js-mode): Use it.
---
lisp/progmodes/js.el | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 6a800f8..ab994f3 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1724,6 +1724,12 @@ This performs fontification according to
`js--class-styles'."
(js-syntax-propertize-regexp end))))))
(point) end))
+(defconst js--prettify-symbols-alist
+ '(("=>" . ?⇒)
+ (">=" . ?≥)
+ ("<=" . ?≤))
+ "Alist of symbol prettifications for JavaScript.")
+
;;; Indentation
(defconst js--possibly-braceless-keyword-re
@@ -3495,6 +3501,7 @@ If one hasn't been set, or if it's stale, prompt for a
new one."
(setq-local open-paren-in-column-0-is-defun-start nil)
(setq-local font-lock-defaults (list js--font-lock-keywords))
(setq-local syntax-propertize-function #'js-syntax-propertize)
+ (setq-local prettify-symbols-alist js--prettify-symbols-alist)
(setq-local parse-sexp-ignore-comments t)
(setq-local parse-sexp-lookup-properties t)
@@ -3564,4 +3571,8 @@ If one hasn't been set, or if it's stale, prompt for a
new one."
(provide 'js)
+;; Local Variables:
+;; coding: utf-8
+;; End:
+
;; js.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 1ac5a9c: Add prettify-symbols-alist for js-mode,
Simen Heggestøyl <=