diff options
| author | Simen Heggestøyl | 2015-09-27 10:04:09 +0200 |
|---|---|---|
| committer | Simen Heggestøyl | 2015-09-27 10:04:09 +0200 |
| commit | 1ac5a9c20cb22efb398fa18781c6b932dd4e54df (patch) | |
| tree | c1437123ec3644e4a5bdb5aab4aa55b08f9f32a1 | |
| parent | 3fb5fcb1860453826cd97832ed66c01a6b951bfd (diff) | |
| download | emacs-1ac5a9c20cb22efb398fa18781c6b932dd4e54df.tar.gz emacs-1ac5a9c20cb22efb398fa18781c6b932dd4e54df.zip | |
Add prettify-symbols-alist for js-mode
* lisp/progmodes/js.el (js--prettify-symbols-alist): New defconst.
(js-mode): Use it.
| -rw-r--r-- | 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 6a800f8abe5..ab994f38252 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -1724,6 +1724,12 @@ This performs fontification according to `js--class-styles'." | |||
| 1724 | (js-syntax-propertize-regexp end)))))) | 1724 | (js-syntax-propertize-regexp end)))))) |
| 1725 | (point) end)) | 1725 | (point) end)) |
| 1726 | 1726 | ||
| 1727 | (defconst js--prettify-symbols-alist | ||
| 1728 | '(("=>" . ?⇒) | ||
| 1729 | (">=" . ?≥) | ||
| 1730 | ("<=" . ?≤)) | ||
| 1731 | "Alist of symbol prettifications for JavaScript.") | ||
| 1732 | |||
| 1727 | ;;; Indentation | 1733 | ;;; Indentation |
| 1728 | 1734 | ||
| 1729 | (defconst js--possibly-braceless-keyword-re | 1735 | (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." | |||
| 3495 | (setq-local open-paren-in-column-0-is-defun-start nil) | 3501 | (setq-local open-paren-in-column-0-is-defun-start nil) |
| 3496 | (setq-local font-lock-defaults (list js--font-lock-keywords)) | 3502 | (setq-local font-lock-defaults (list js--font-lock-keywords)) |
| 3497 | (setq-local syntax-propertize-function #'js-syntax-propertize) | 3503 | (setq-local syntax-propertize-function #'js-syntax-propertize) |
| 3504 | (setq-local prettify-symbols-alist js--prettify-symbols-alist) | ||
| 3498 | 3505 | ||
| 3499 | (setq-local parse-sexp-ignore-comments t) | 3506 | (setq-local parse-sexp-ignore-comments t) |
| 3500 | (setq-local parse-sexp-lookup-properties t) | 3507 | (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." | |||
| 3564 | 3571 | ||
| 3565 | (provide 'js) | 3572 | (provide 'js) |
| 3566 | 3573 | ||
| 3574 | ;; Local Variables: | ||
| 3575 | ;; coding: utf-8 | ||
| 3576 | ;; End: | ||
| 3577 | |||
| 3567 | ;; js.el ends here | 3578 | ;; js.el ends here |