[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode c3d4e70 031/385: don't reinvent standard
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode c3d4e70 031/385: don't reinvent standard tools |
Date: |
Tue, 5 Oct 2021 23:58:55 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit c3d4e70fb4ff8342823ca0ce946826450b88376a
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
don't reinvent standard tools
---
haskell-tng-font-lock.el | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/haskell-tng-font-lock.el b/haskell-tng-font-lock.el
index c110e17..10831d4 100644
--- a/haskell-tng-font-lock.el
+++ b/haskell-tng-font-lock.el
@@ -14,7 +14,15 @@
;; parsing, but until that day, we do it the idiomatic Emacs way (with hacks
;; and more hacks).
;;
+;; Some very useful tools to assist with keywords and extend-region:
+;;
+;; - https://github.com/Lindydancer/highlight-refontification
+;; - https://github.com/Lindydancer/font-lock-profiler
+;; - https://github.com/Lindydancer/font-lock-studio
+;;
+;; The Emacs Lisp manual should be consulted
;;
https://www.gnu.org/software/emacs/manual/html_mono/elisp.html#Font-Lock-Mode
+;; in addition to `C-h f font-lock-keywords'
;;
;;; Code:
@@ -173,10 +181,6 @@
(defvar font-lock-beg)
(defvar font-lock-end))
-(defcustom haskell-tng:font:debug-extend nil
- "Print debugging when the font-lock region is extended."
- :type 'boolean)
-
(defconst haskell-tng:extend-region-functions
'(font-lock-extend-region-wholelines)
"Used in `font-lock-extend-region-functions'.
@@ -223,8 +227,6 @@ succeeds and may further restrict the FIND search limit."
(when (re-search-backward ,regexp-1 font-lock-beg t)
,(finder '(point-max))
(when (< font-lock-end (point))
- (when haskell-tng:font:debug-extend
- (haskell-tng:font:debug-extend (point)))
(setq font-lock-end (point))
nil)))
(defun ,keyword (limit)
@@ -273,17 +275,5 @@ succeeds and may further restrict the FIND search limit."
(rx line-start "module" word-end (group (+ anything)))
haskell-tng:indent-close)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Helpers
-
-(defun haskell-tng:font:debug-extend (to)
- (message "extending `%s' to include `%s'!"
- (buffer-substring-no-properties font-lock-beg font-lock-end)
- (if (<= to font-lock-beg)
- (buffer-substring-no-properties to font-lock-beg)
- (if (<= font-lock-end to)
- (buffer-substring-no-properties font-lock-end to)
- "BADNESS! Reduced the region"))))
-
(provide 'haskell-tng-font-lock)
;;; haskell-tng-font-lock.el ends here
- [nongnu] elpa/haskell-tng-mode 85272cb 029/385: fixup! fixup! improve the multiline font macro, (continued)
- [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, 2021/10/05
- [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 <=
- [nongnu] elpa/haskell-tng-mode 7c2dedb 043/385: use pyenv when running cask, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 2f04c01 051/385: starting work on semicolon inference, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode a4a664b 056/385: layout inference, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode d33d146 060/385: [ci skip] start to refactor layout out of lexer, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 12c7148 040/385: leave fontification in comments and strings, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 61f4c09 062/385: [ci skip] unify the testing approach, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 138aca0 089/385: typelevel lists are harder than I thought..., ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode f5961e6 099/385: indentation cycles are really complicated..., ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode 6e4849c 112/385: some compilation test cases, ELPA Syncer, 2021/10/05
- [nongnu] elpa/haskell-tng-mode cb1d2db 106/385: newline shouldn't trigger indent cycling, ELPA Syncer, 2021/10/06