Invoke CALLBACK when complete; see `context-coloring-dispatch'."
(interactive)
- (context-coloring-dispatch
- (lambda ()
- (when callback (funcall callback)))))
+ (context-coloring-dispatch callback))
(defvar-local context-coloring-changed nil
"Indication that the buffer has changed recently, which implies
produces (1 0 0), \"19700101\" produces (19700101), etc."
(let (version)
(while (string-match "[0-9]+" string)
- (setq version (append version (list (string-to-number (match-string 0 string)))))
+ (setq version (append version
+ (list (string-to-number (match-string 0 string)))))
(setq string (substring string (match-end 0))))
version))
(when colorize-initially-p
(context-coloring-colorize))))
(when (null dispatch)
- (message "%s" "Context coloring is not available for this major mode"))))))
+ (message "Context coloring is not available for this major mode"))))))
(provide 'context-coloring)
(function-name (intern-soft
(format "context-coloring-test-js-%s" name)))
(setup-function-name (intern-soft
- (format "context-coloring-test-js-%s-setup" name))))
+ (format
+ "context-coloring-test-js-%s-setup" name))))
`(ert-deftest-async ,test-name (done)
(context-coloring-test-js-mode
,fixture
(function-name (intern-soft
(format "context-coloring-test-js-%s" name)))
(setup-function-name (intern-soft
- (format "context-coloring-test-js-%s-setup" name))))
+ (format
+ "context-coloring-test-js-%s-setup" name))))
`(ert-deftest ,test-name ()
(context-coloring-test-js2-mode
,fixture
"but it %s.")
level
(if negate "not " "") foreground
- (if negate "did" (format "was `%s'" actual-foreground)))))))
+ (if negate
+ "did" (format "was `%s'" actual-foreground)))))))
(defun context-coloring-test-assert-not-face (&rest arguments)
"Assert that LEVEL does not have a face with `:foreground'