branch: master commit 6392d1f3e0764414f019e4c76baf25b66101f5f6 Author: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com> Commit: Jackson Ray Hamilton <jack...@jacksonrayhamilton.com>
Bind optional parameters earlier. --- context-coloring.el | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/context-coloring.el b/context-coloring.el index 057b4d8..c7a3f08 100644 --- a/context-coloring.el +++ b/context-coloring.el @@ -172,7 +172,9 @@ the END point (exclusive) with the face corresponding to LEVEL." (when (or context-coloring-comments-and-strings context-coloring-syntactic-comments context-coloring-syntactic-strings) - (let ((font-lock-syntactic-face-function + (let ((min (or min (point-min))) + (max (or max (point-max))) + (font-lock-syntactic-face-function (cond ((and context-coloring-syntactic-comments (not context-coloring-syntactic-strings)) @@ -183,12 +185,10 @@ the END point (exclusive) with the face corresponding to LEVEL." (t font-lock-syntactic-face-function)))) (save-excursion - (font-lock-fontify-syntactically-region (or min (point-min)) - (or max (point-max))) + (font-lock-fontify-syntactically-region min max) ;; TODO: Make configurable at the dispatch level. (when (eq major-mode 'emacs-lisp-mode) - (font-lock-fontify-keywords-region (or min (point-min)) - (or max (point-max)))))))) + (font-lock-fontify-keywords-region min max)))))) ;;; js2-mode colorization