(context-coloring-elisp-colorize-comments-and-strings-in-region
start (point))))
+(defsubst context-coloring-elisp-forward-sexp ()
+ "Like `forward-sexp', but colorize comments and strings along
+the way."
+ (let ((start (point)))
+ (forward-sexp)
+ (context-coloring-elisp-colorize-comments-and-strings-in-region
+ start (point))))
+
(defsubst context-coloring-get-syntax-code ()
(syntax-class
;; Faster version of `syntax-after':
(defsubst context-coloring-elisp-parse-arg (callback)
(let* ((arg-string (buffer-substring-no-properties
(point)
- (progn (forward-sexp)
+ (progn (context-coloring-elisp-forward-sexp)
(point)))))
(when (not (string-match-p
context-coloring-ignored-word-regexp
(cond
((= syntax-code context-coloring-OPEN-PARENTHESIS-CODE)
(setq case-pos (point))
- (forward-sexp)
+ (context-coloring-elisp-forward-sexp)
(setq case-end (point))
(goto-char case-pos)
;; Enter.
(setq syntax-code (context-coloring-get-syntax-code))
(when (/= syntax-code context-coloring-CLOSE-PARENTHESIS-CODE)
;; Skip the condition name(s).
- (forward-sexp)
+ (context-coloring-elisp-forward-sexp)
;; Color the remaining portion of the handler.
(context-coloring-elisp-colorize-region
(point)
(forward-char))
(t
;; Ignore artifacts.
- (forward-sexp)))
+ (context-coloring-elisp-forward-sexp)))
(context-coloring-elisp-forward-sws))
;; Exit.
(forward-char)
1111111 111111 111 000011
(111111111-1111-111111-11111 111
+ cc c
(xxx () 222)
- (11111 (xxx () 222)))")))
+ (11111 (xxx () 222))
+ sss)")))
(defun context-coloring-test-insert-unread-space ()
"Simulate the insertion of a space as if by a user."