[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 00f7d84 002/385: simplify names
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 00f7d84 002/385: simplify names |
Date: |
Tue, 5 Oct 2021 23:58:49 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 00f7d848b70cb1df54ddbdb905d5a76dd143b9b5
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
simplify names
---
haskell-tng-font-lock.el | 40 ++++++++++++++++++++--------------------
haskell-tng-mode.el | 7 +++----
haskell-tng-syntax.el | 12 ++++++------
3 files changed, 29 insertions(+), 30 deletions(-)
diff --git a/haskell-tng-font-lock.el b/haskell-tng-font-lock.el
index 308da8c..0d73d0f 100644
--- a/haskell-tng-font-lock.el
+++ b/haskell-tng-font-lock.el
@@ -18,29 +18,29 @@
;;
;;; Code:
-(defgroup haskell-tng-font-lock:faces nil
+(defgroup haskell-tng:faces nil
"Haskell font faces."
:group 'haskell-tng)
-(defface haskell-tng-font-lock:keyword
+(defface haskell-tng:keyword
'((t :inherit font-lock-keyword-face))
"Haskell reserved names and operators."
- :group 'haskell-tng-font-lock:faces)
+ :group 'haskell-tng:faces)
-(defface haskell-tng-font-lock:package
+(defface haskell-tng:package
'((t :inherit font-lock-variable-name-face :weight bold))
"Haskell packages."
- :group 'haskell-tng-font-lock:faces)
+ :group 'haskell-tng:faces)
-(defface haskell-tng-font-lock:type
+(defface haskell-tng:type
'((t :inherit font-lock-type-face))
"Haskell types."
- :group 'haskell-tng-font-lock:faces)
+ :group 'haskell-tng:faces)
-(defface haskell-tng-font-lock:constructor
+(defface haskell-tng:constructor
'((t :inherit font-lock-constant-face))
"Haskell constructors."
- :group 'haskell-tng-font-lock:faces)
+ :group 'haskell-tng:faces)
;; TODO: types (signatures, classes and imports)
;;
@@ -52,33 +52,33 @@
;; that obfuscate the meaning, plus we could use DRY.
(setq
- haskell-tng-font-lock:keywords
+ haskell-tng:keywords
`((,(regexp-opt '("case" "class" "data" "default" "deriving" "do" "else"
"foreign" "if" "import" "in" "infix" "infixl"
"infixr" "instance" "let" "module" "newtype" "of"
"then" "type" "where" "_")
'words)
- . 'haskell-tng-font-lock:keyword) ;; reservedid
+ . 'haskell-tng:keyword) ;; reservedid
(,(regexp-opt '(".." ":" "::" "=" "|" "<-" ">" "->" "@" "~" "=>")
'symbols)
- . 'haskell-tng-font-lock:keyword) ;; reservedop
+ . 'haskell-tng:keyword) ;; reservedop
;; lambda syntax may be followed by a trailing symbol
- ("\\_<\\(\\\\\\)" . 'haskell-tng-font-lock:keyword)
+ ("\\_<\\(\\\\\\)" . 'haskell-tng:keyword)
;; TODO: contextual / multiline support for the import region.
;; qualified/hiding/as are keywords when used in imports
- ("\\_<import\\_>[[:space:]]+\\_<\\(qualified\\)\\_>" 1
'haskell-tng-font-lock:keyword)
- ("\\_<import\\_>[^(]+?\\_<\\(hiding\\|as\\)\\_>" 1
'haskell-tng-font-lock:keyword)
+ ("\\_<import\\_>[[:space:]]+\\_<\\(qualified\\)\\_>" 1 'haskell-tng:keyword)
+ ("\\_<import\\_>[^(]+?\\_<\\(hiding\\|as\\)\\_>" 1 'haskell-tng:keyword)
("\\_<import\\_>\\(?:[[:space:]]\\|qualified\\)+\\_<\\([[:upper:]]\\(?:\\.\\|\\w\\)*\\)\\_>"
- 1 'haskell-tng-font-lock:package)
+ 1 'haskell-tng:package)
("\\_<import\\_>[^(]+?\\_<as[[:space:]]+\\([[:upper:]]\\w+\\)"
- 1 'haskell-tng-font-lock:package)
+ 1 'haskell-tng:package)
("\\_<\\(\\(?:[[:upper:]]\\w*\\.\\)+\\)"
- . 'haskell-tng-font-lock:package) ;; uses of F.Q.N.s
+ . 'haskell-tng:package) ;; uses of F.Q.N.s
- ("\\_<\\([[:upper:]]\\w*\\)\\_>" 0 'haskell-tng-font-lock:constructor) ;;
conid
- ("\\_<\\(:\\s_+\\)\\_>" 0 'haskell-tng-font-lock:constructor) ;; consym
+ ("\\_<\\([[:upper:]]\\w*\\)\\_>" 0 'haskell-tng:constructor) ;; conid
+ ("\\_<\\(:\\s_+\\)\\_>" 0 'haskell-tng:constructor) ;; consym
))
(provide 'haskell-tng-font-lock)
diff --git a/haskell-tng-mode.el b/haskell-tng-mode.el
index cf9bdee..4cd0798 100644
--- a/haskell-tng-mode.el
+++ b/haskell-tng-mode.el
@@ -22,7 +22,7 @@
(define-derived-mode haskell-tng-mode prog-mode "Hask"
"Major mode for editing Haskell programs."
:group 'haskell-tng
- :syntax-table haskell-tng-syntax:table
+ :syntax-table haskell-tng:syntax-table
;; TODO paragraph-start, paragraph-separate, fill-paragraph-function
;;
@@ -41,11 +41,10 @@
dabbrev-case-replace nil
words-include-escapes t
- syntax-propertize-function #'haskell-tng-syntax:propertize
+ syntax-propertize-function #'haskell-tng:syntax-propertize
parse-sexp-lookup-properties t
- font-lock-defaults '(haskell-tng-font-lock:keywords
- nil nil nil)
+ font-lock-defaults '(haskell-tng:keywords nil nil nil)
;; whitespace is meaningful, no electric indentation
electric-indent-inhibit t))
diff --git a/haskell-tng-syntax.el b/haskell-tng-syntax.el
index fbb9d17..015e804 100644
--- a/haskell-tng-syntax.el
+++ b/haskell-tng-syntax.el
@@ -15,7 +15,7 @@
(require 'dash)
-(defvar haskell-tng-syntax:table
+(defvar haskell-tng:syntax-table
(let ((table (make-syntax-table)))
(map-char-table
#'(lambda (k v)
@@ -68,12 +68,12 @@
table)
"Haskell syntax table.")
-(defun haskell-tng-syntax:propertize (start end)
+(defun haskell-tng:syntax-propertize (start end)
"For some context-sensitive syntax entries."
- (haskell-tng-syntax:propertize-char-delims start end)
- (haskell-tng-syntax:propertize-escapes start end))
+ (haskell-tng:propertize-char-delims start end)
+ (haskell-tng:propertize-escapes start end))
-(defun haskell-tng-syntax:propertize-char-delims (start end)
+(defun haskell-tng:propertize-char-delims (start end)
"Matching apostrophes are string delimiters (literal chars)."
(save-excursion
(goto-char start)
@@ -83,7 +83,7 @@
(put-text-property open (1+ open) 'syntax-table '(7 . ?\'))
(put-text-property close (1+ close) 'syntax-table '(7 . ?\'))))))
-(defun haskell-tng-syntax:propertize-escapes (start end)
+(defun haskell-tng:propertize-escapes (start end)
"Backslash inside String is an escape character."
(save-excursion
(goto-char start)
- [nongnu] elpa/haskell-tng-mode bd8f905 016/385: almost there, regions not being expanded, (continued)
- [nongnu] elpa/haskell-tng-mode bd8f905 016/385: almost there, regions not being expanded, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode db064be 024/385: dank macro for font-lock extends/keyword, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 639fc6c 018/385: multiline types and font-lock-multiline, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode cc739ad 020/385: multiline topdecl type sections, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 595bd44 034/385: type families, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 77d6ec5 019/385: cleaned up multiline explicit types, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode fa32b46 037/385: finally caught the bug in anchor pre/post resetting, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode f2ce737 038/385: neutral, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 95ab59c 014/385: multiline type matching seems to work, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 85272cb 029/385: fixup! fixup! improve the multiline font macro, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 00f7d84 002/385: simplify names,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 111396f 004/385: converted many font-face rules to the rx DSL, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 6f8258c 009/385: thinking about multiline, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 5536d23 025/385: all font locks use the new macro, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode a7a90ea 028/385: fixup! improve the multiline font macro, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode b9bc414 027/385: improve the multiline font macro, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode ea77bb2 017/385: fixup! almost there, regions not being expanded, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 2b82b2f 022/385: fixup! fixup! multiline topdecl type sections, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 46abfc4 035/385: getting closer to good types in imports, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode c3d4e70 031/385: don't reinvent standard tools, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 7c2dedb 043/385: use pyenv when running cask, ELPA Syncer, 2021/10/05