branch: master commit 171883fa4f044bc5c4acf0042531f1b160a8e7d6 Author: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com> Commit: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com>
Add let coloring. --- context-coloring.el | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/context-coloring.el b/context-coloring.el index a84a1b4..9c31314 100644 --- a/context-coloring.el +++ b/context-coloring.el @@ -375,6 +375,7 @@ generated by `js2-mode'." one-word-found-p in-defun-p in-lambda-p + in-let-p in-let*-p defun-arglist defun-arg @@ -472,10 +473,13 @@ generated by `js2-mode'." (setq in-defun-p t)) ((string-match-p "\\`lambda\\'" child-0-string) (setq in-lambda-p t)) + ((string-match-p "\\`let\\'" child-0-string) + (setq in-let-p t)) ((string-match-p "\\`let\\*\\'" child-0-string) (setq in-let*-p t))))) (when (or in-defun-p in-lambda-p + in-let-p in-let*-p) (setq scope-stack (cons (context-coloring-make-scope (nth 0 ppss) @@ -524,7 +528,8 @@ generated by `js2-mode'." ;; Cleanup (setq in-defun-p nil) (setq in-lambda-p nil)) - (in-let*-p + ((or in-let-p + in-let*-p) (goto-char child-0-end) ;; Lookahead for bindings (context-coloring-forward-sws) @@ -552,6 +557,7 @@ generated by `js2-mode'." (setq let-varlist (cdr let-varlist))) (goto-char child-1-end)) ;; Cleanup + (setq in-let-p nil) (setq in-let*-p nil)) (t (goto-char (cond