[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a283883 24/79: Always colorize the remaining region.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master a283883 24/79: Always colorize the remaining region. |
Date: |
Sun, 14 Jun 2015 00:05:25 +0000 |
branch: master
commit a283883546de74d5c19749611d56cea94b752dc2
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Always colorize the remaining region.
---
context-coloring.el | 66 ++++++++++++++++++++++++++------------------------
1 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 44f63dc..b000fd2 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -536,39 +536,41 @@ generated by `js2-mode'."
(setq syntax-code (context-coloring-get-syntax-code))
;; Figure out if the sexp is a special form.
(cond
- ((or (= syntax-code context-coloring-WORD-CODE)
- (= syntax-code context-coloring-SYMBOL-CODE))
- (setq child-0-pos (point))
- (forward-sexp)
- (setq child-0-end (point))
- (setq child-0-string (buffer-substring-no-properties
- child-0-pos
- child-0-end))
- (cond
- ((string-match-p context-coloring-elisp-defun-regexp child-0-string)
- (goto-char start)
- (context-coloring-elisp-colorize-defun))
- ((string-match-p context-coloring-elisp-lambda-regexp child-0-string)
- (goto-char start)
- (context-coloring-elisp-colorize-lambda))
- ((string-match-p context-coloring-elisp-let-regexp child-0-string)
- (goto-char start)
- (context-coloring-elisp-colorize-let))
- ((string-match-p context-coloring-elisp-let*-regexp child-0-string)
- (goto-char start)
- (context-coloring-elisp-colorize-let*))
- ;; Not a special form; just colorize the remaining region.
- (t
- (context-coloring-colorize-region
- start
- end
- (context-coloring-elisp-current-scope-level))
- (context-coloring-elisp-colorize-region (point) (1- end))
- (forward-char))))
+ ((when (or (= syntax-code context-coloring-WORD-CODE)
+ (= syntax-code context-coloring-SYMBOL-CODE))
+ (setq child-0-pos (point))
+ (forward-sexp)
+ (setq child-0-end (point))
+ (setq child-0-string (buffer-substring-no-properties
+ child-0-pos
+ child-0-end))
+ (cond
+ ((string-match-p context-coloring-elisp-defun-regexp child-0-string)
+ (goto-char start)
+ (context-coloring-elisp-colorize-defun)
+ t)
+ ((string-match-p context-coloring-elisp-lambda-regexp child-0-string)
+ (goto-char start)
+ (context-coloring-elisp-colorize-lambda)
+ t)
+ ((string-match-p context-coloring-elisp-let-regexp child-0-string)
+ (goto-char start)
+ (context-coloring-elisp-colorize-let)
+ t)
+ ((string-match-p context-coloring-elisp-let*-regexp child-0-string)
+ (goto-char start)
+ (context-coloring-elisp-colorize-let*)
+ t)
+ (t
+ nil))))
+ ;; Not a special form; just colorize the remaining region.
(t
- ;; Skip it.
- (goto-char start)
- (forward-sexp)))))
+ (context-coloring-colorize-region
+ start
+ end
+ (context-coloring-elisp-current-scope-level))
+ (context-coloring-elisp-colorize-region (point) (1- end))
+ (forward-char)))))
(defun context-coloring-elisp-colorize-symbol ()
(let (symbol-pos
- [elpa] master ea6b4ef 14/79: Increase test documentation., (continued)
- [elpa] master ea6b4ef 14/79: Increase test documentation., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 7975003 18/79: Pass ignored test with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master d8b5f03 12/79: Remove before-all and after-all., Jackson Ray Hamilton, 2015/06/13
- [elpa] master bc0cb0d 16/79: Pass lambda test with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 6090eb3 17/79: Pass quote test with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master f1ed39f 21/79: Pass comment and string tests with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master d146af8 23/79: Fix string coloring., Jackson Ray Hamilton, 2015/06/13
- [elpa] master aaf4835 20/79: Remove let-varlist data structure. Cleanup., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 49265ab 25/79: Simplify comment and string parsing., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 52383b5 26/79: Handle octothorpes., Jackson Ray Hamilton, 2015/06/13
- [elpa] master a283883 24/79: Always colorize the remaining region.,
Jackson Ray Hamilton <=
- [elpa] master 3d3c693 22/79: Pass interrupt test with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 966bd20 31/79: Add test for escape characters., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 7ab01e3 30/79: Fix ignored test., Jackson Ray Hamilton, 2015/06/13
- [elpa] master f88e21c 29/79: Ignore escaped characters., Jackson Ray Hamilton, 2015/06/13
- [elpa] master e06f1a6 27/79: Color comments and strings inside quotes., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 5a8186b 34/79: Color comments and strings inside defuns., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 4b25191 28/79: Refactor benchmarks. Improve benchmark reliability., Jackson Ray Hamilton, 2015/06/13
- [elpa] master f3697c0 35/79: Strings are sexps., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 87893df 32/79: Support comma splicing., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 7167e93 19/79: Pass let and let* tests with recursive colorizer., Jackson Ray Hamilton, 2015/06/13