branch: master commit de6b5085ae2b4e056c67b8d572d8874472eeb381 Author: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com> Commit: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com>
Fix bugs where spaces messed up varlists. --- context-coloring.el | 3 +++ test/context-coloring-test.el | 12 ++++++++++++ test/fixtures/varlist-spacing.el | 8 ++++++++ 3 files changed, 23 insertions(+), 0 deletions(-) diff --git a/context-coloring.el b/context-coloring.el index 3148c2d..b90a821 100644 --- a/context-coloring.el +++ b/context-coloring.el @@ -668,6 +668,7 @@ bound immediately after its own initializer is parsed." syntax-code) ;; Enter. (forward-char) + (context-coloring-elisp-forward-sws) (while (/= (setq syntax-code (context-coloring-get-syntax-code)) context-coloring-CLOSE-PARENTHESIS-CODE) (cond @@ -707,6 +708,7 @@ bound immediately after its own initializer is parsed." (let (syntax-code) ;; Enter. (forward-char) + (context-coloring-elisp-forward-sws) (while (/= (setq syntax-code (context-coloring-get-syntax-code)) context-coloring-CLOSE-PARENTHESIS-CODE) (cond @@ -787,6 +789,7 @@ Parse the header with CALLBACK." (let (syntax-code) ;; Enter. (forward-char) + (context-coloring-elisp-forward-sws) (while (/= (setq syntax-code (context-coloring-get-syntax-code)) context-coloring-CLOSE-PARENTHESIS-CODE) (cond diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el index 0a1f88e..c57dce2 100644 --- a/test/context-coloring-test.el +++ b/test/context-coloring-test.el @@ -759,6 +759,18 @@ ssssssssssss0")) 11 1111111 111"))) +(context-coloring-test-deftest-emacs-lisp varlist-spacing + (lambda () + (context-coloring-test-assert-coloring " +(111 ( + (1 (222222 ())))) + +(111111 ( 1 1 ) + 1 1) + +(111111111 0 ( (1) ) + 1)"))) + (context-coloring-test-deftest-emacs-lisp let* (lambda () (context-coloring-test-assert-coloring " diff --git a/test/fixtures/varlist-spacing.el b/test/fixtures/varlist-spacing.el new file mode 100644 index 0000000..97ec208 --- /dev/null +++ b/test/fixtures/varlist-spacing.el @@ -0,0 +1,8 @@ +(let ( + (a (lambda ())))) + +(lambda ( a b ) + a b) + +(defadvice a ( (b) ) + b)