]> code.delx.au - gnu-emacs-elpa/blobdiff - context-coloring-emacs-lisp.el
Version 8.0.1.
[gnu-emacs-elpa] / context-coloring-emacs-lisp.el
index dbe1354bca231a64f74765d55d96e1f02db5937c..05caa5aa8e4e44663fe935eaa47181b93ecd102f 100644 (file)
   "Move forward through whitespace and comments."
   (while (forward-comment 1)))
 
+(defsubst context-coloring-elisp-colorize-comments-and-strings
+  (&optional min max)
+  "Color comments and strings from MIN to MAX."
+  (context-coloring-colorize-comments-and-strings min max t))
+
 (defsubst context-coloring-elisp-forward-sws ()
   "Move through whitespace and comments, coloring comments."
   (let ((start (point)))
     (context-coloring-forward-sws)
-    (context-coloring-colorize-comments-and-strings start (point))))
+    (context-coloring-elisp-colorize-comments-and-strings start (point))))
 
 (defsubst context-coloring-elisp-forward-sexp ()
   "Skip/ignore missing sexps, coloring comments and strings."
@@ -115,7 +120,7 @@ second.")
         (1+ context-coloring-elisp-sexp-count))
   (when (and (zerop (% context-coloring-elisp-sexp-count
                        context-coloring-elisp-sexps-per-pause))
-             context-coloring-parse-interruptable-p
+             context-coloring-interruptable-p
              (input-pending-p))
     (throw 'interrupted t)))
 
@@ -606,7 +611,7 @@ It could be a quoted or backquoted expression."
   (context-coloring-elisp-increment-sexp-count)
   (let ((start (point)))
     (forward-sexp)
-    (context-coloring-colorize-comments-and-strings start (point))))
+    (context-coloring-elisp-colorize-comments-and-strings start (point))))
 
 ;; Elisp has whitespace, words, symbols, open/close parenthesis, expression
 ;; prefix, string quote, comment starters/enders and escape syntax classes only.
@@ -692,7 +697,7 @@ It could be a quoted or backquoted expression."
      (cond
       ;; Just colorize the changed region.
       (context-coloring-changed-p
-       (let* ( ;; Prevent `beginning-of-defun' from making poor assumptions.
+       (let* (;; Prevent `beginning-of-defun' from making poor assumptions.
               (open-paren-in-column-0-is-defun-start nil)
               ;; Seek the beginning and end of the previous and next
               ;; offscreen defuns, so just enough is colored.
@@ -722,7 +727,6 @@ It could be a quoted or backquoted expression."
  'emacs-lisp
  (list :modes '(emacs-lisp-mode lisp-interaction-mode)
        :colorizer #'context-coloring-elisp-colorize
-       :delay 0.016 ;; Thanks to lazy colorization this can be 60 frames per second.
        :setup #'context-coloring-setup-idle-change-detection
        :teardown #'context-coloring-teardown-idle-change-detection)
  context-coloring-dispatch-hash-table)
@@ -760,7 +764,6 @@ It could be a quoted or backquoted expression."
  'eval-expression
  (list :predicate #'context-coloring-eval-expression-predicate
        :colorizer #'context-coloring-eval-expression-colorize
-       :delay 0.016
        :setup #'context-coloring-setup-idle-change-detection
        :teardown #'context-coloring-teardown-idle-change-detection)
  context-coloring-dispatch-hash-table)