[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode ee375b9 172/217: idiomatic emacs lisp cleanups
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode ee375b9 172/217: idiomatic emacs lisp cleanups |
Date: |
Sun, 29 Aug 2021 11:31:06 -0400 (EDT) |
branch: elpa/scala-mode
commit ee375b9357a71d77763e219dac15850ed60530b3
Author: Sam Halliday <sam.halliday@gmail.com>
Commit: Sam Halliday <sam.halliday@gmail.com>
idiomatic emacs lisp cleanups
---
scala-mode2-prettify-symbols.el | 141 +++++++++++++++++++++-------------------
1 file changed, 75 insertions(+), 66 deletions(-)
diff --git a/scala-mode2-prettify-symbols.el b/scala-mode2-prettify-symbols.el
index fe4d8fa..ca43431 100644
--- a/scala-mode2-prettify-symbols.el
+++ b/scala-mode2-prettify-symbols.el
@@ -1,74 +1,83 @@
-;;; scala-mode2-prettify-symbols.el - Extension of scala-mode for prettifying
scala symbols/code
-;;; Copyright (c) 2016 Merlin Göttlinger
-;;; For information on the License, see the LICENSE file
-;; -*- coding: UTF-8 -*-
+;;; scala-mode2-prettify-symbols.el --- Prettifying scala symbols -*- coding:
utf-8; -*-
-(defcustom scala-mode-pretty-bool-alist '(
- ("<=" . ?≤)
- (">=" . ?≥)
- ("==" . ?≡)
- ("===" . ?≣)
- ("!" . ?¬)
- ("!=" . ?≢)
- ("&&" . ?∧)
- ("||" . ?∨)
- ("true" . ?⊤)
- ("false" . ?⊥)
- ("Boolean" . ?𝔹))
- "Prettify rules for boolean related operations."
- :type 'alist)
+;; Copyright (c) 2016 Merlin Göttlinger
+;; License: http://www.gnu.org/licenses/gpl.html
-(defcustom scala-mode-pretty-collection-alist '(
- ("empty" . ?∅)
- ("sum" . ?∑)
- ("product" . ?∏)
- ("contains" . ?∍)
- ("forall" . ?∀)
- ("any" . ?∃)
- ("intersect" . ?∩)
- ("union" . ?∪)
- ("diff" . ?≏)
- ("subsetOf" . ?⊆)
- ("++" . ?⧺)
- ("::" . ?⸬)
- ("--" . ?╌))
- "Prettify rules for collections related operations."
- :type 'alist)
+;;; Commentary:
+;;
+;; Suggested `prettify-symbols' for Scala editing, enable
+;; `prettify-symbols-mode' and `setq' an alist of your choice
+;; for `prettify-symbols-alist'.
-(defcustom scala-mode-pretty-arrows-alist'(
- ("->" . ?→)
- ("<-" . ?←)
- ("=>" . ?⇒)
- ;("<=" . ?⇐)
- ("<=>" . ?⇔)
- ("-->" . ?⟶)
- ("<->" . ?↔)
- ("<--" . ?⟵)
- ("<-->" . ?⟷)
- ("==>" . ?⟹)
- ("<==" . ?⟸)
- ("<==>" . ?⟺)
- ("~>" . ?⇝)
- ("<~" . ?⇜))
- "Prettify rules for arrow related code pieces."
- :type 'alist)
+;;; Code:
-(defcustom scala-mode-pretty-misc-alist '(
- ;("null" . ?∅)
- ;("Nothing" . ?∅)
- ("Unit" . ?∅)
- ("Int" . ?ℤ)
- ("assert" . ?⊦)
- (":=" . ?≔))
- "Prettify rules for other mixed code pieces."
- :type 'alist)
+(defconst
+ scala-mode-pretty-bool-alist
+ '(("<=" . ?≤)
+ (">=" . ?≥)
+ ("==" . ?≡)
+ ("===" . ?≣)
+ ("!" . ?¬)
+ ("!=" . ?≢)
+ ("&&" . ?∧)
+ ("||" . ?∨)
+ ("true" . ?⊤)
+ ("false" . ?⊥)
+ ("Boolean" . ?𝔹))
+ "Prettify rules for boolean related operations.")
-(defcustom scala--prettify-symbols-alist (append
- scala-mode-pretty-bool-alist
- scala-mode-pretty-collection-alist
- scala-mode-pretty-arrows-alist
- scala-mode-pretty-misc-alist)
+(defconst
+ scala-mode-pretty-collection-alist
+ '(("empty" . ?∅)
+ ("sum" . ?∑)
+ ("product" . ?∏)
+ ("contains" . ?∍)
+ ("forall" . ?∀)
+ ("any" . ?∃)
+ ("intersect" . ?∩)
+ ("union" . ?∪)
+ ("diff" . ?≏)
+ ("subsetOf" . ?⊆)
+ ("++" . ?⧺)
+ ("::" . ?⸬)
+ ("--" . ?╌))
+ "Prettify rules for collections related operations.")
+
+(defconst
+ scala-mode-pretty-arrows-alist
+ '(("->" . ?→)
+ ("<-" . ?←)
+ ("=>" . ?⇒)
+ ("<=>" . ?⇔)
+ ("-->" . ?⟶)
+ ("<->" . ?↔)
+ ("<--" . ?⟵)
+ ("<-->" . ?⟷)
+ ("==>" . ?⟹)
+ ("<==" . ?⟸)
+ ("<==>" . ?⟺)
+ ("~>" . ?⇝)
+ ("<~" . ?⇜))
+ "Prettify rules for arrow related code pieces.")
+
+(defconst
+ scala-mode-pretty-misc-alist
+ '(("Unit" . ?∅)
+ ("Int" . ?ℤ)
+ ("assert" . ?⊦)
+ (":=" . ?≔))
+ "Prettify rules for other mixed code pieces.")
+
+(defcustom
+ scala-prettify-symbols-alist
+ (append
+ scala-mode-pretty-bool-alist
+ scala-mode-pretty-collection-alist
+ scala-mode-pretty-arrows-alist
+ scala-mode-pretty-misc-alist)
"All prettify rules to be applied in scala code."
- :type 'alist)
+ :type 'alist
+ :group 'scala)
(provide 'scala-mode2-prettify-symbols)
+;;; scala-mode2-prettify-symbols.el ends here
- [nongnu] elpa/scala-mode 1954eaa 146/217: move all stuff related to moving between defintions to bottom of scala-mode-syntax.el, (continued)
- [nongnu] elpa/scala-mode 1954eaa 146/217: move all stuff related to moving between defintions to bottom of scala-mode-syntax.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e6a2755 147/217: Add stuff to readme. Small fixes. got rid fo whitespace changes., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 13c0f39 150/217: README changes., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode aaf1ed8 149/217: Readme update., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b6f1300 152/217: undo some of the random changes., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e18c50e 158/217: add cleanup hooks., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c20d6e6 164/217: Merge pull request #101 from fommil/remove-post-insert-hook, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b4da977 165/217: emacs-lisp code is GPL by definition, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 4b6ee77 166/217: point to new documentation website, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 84850e7 167/217: remove CI badge, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ee375b9 172/217: idiomatic emacs lisp cleanups,
ELPA Syncer <=
- [nongnu] elpa/scala-mode c90bbde 176/217: Added a few prettify rules for cats/scalaz operators (#112), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 9b8db62 181/217: upgrade CI (#127), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b67029a 184/217: fix #120, align according to forms, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 970d88e 187/217: make keywords match case sensitive (#133), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5209142 189/217: Support for identifiers consisting from operator characters (#138), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6f49104 193/217: scala-syntax:propertize-dollar, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 2a7b0fd 195/217: Moved ensime/emacs-scala-mode back to hvesalai/emacs-scala-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 5d28cb3 210/217: feat: support trailing commas (>= Scala 2.12.2), ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b21befd 211/217: Fix README.md indenting, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d837c96 203/217: doc: supports both Scala 2 and 3 (to some extent), not just 2.9, ELPA Syncer, 2021/08/29