branch: externals/indent-bars commit 56c4e966374ec46003c301168a3088199d387c31 Author: JD Smith <93749+jdtsm...@users.noreply.github.com> Commit: JD Smith <93749+jdtsm...@users.noreply.github.com>
Check unfontify-region function before setting region-function --- indent-bars.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/indent-bars.el b/indent-bars.el index 7d714a2452..16013b97a2 100644 --- a/indent-bars.el +++ b/indent-bars.el @@ -50,11 +50,10 @@ ;; To temporarily alter the current style, it's enough to bind the ;; variable `indent-bars-current-style' dynamically. ;; -;; Note the shorthand substitutions for style related prefixes (slot -;; accessors and variable; see file-local-variables at the end): +;; Note the shorthand substitution for style related slot +;; (see file-local-variables at the end): ;; ;; ibs/ => indent-bars-style- -;; ibcs => indent-bars-current-style ;;; Code: ;;;; Requires @@ -1360,7 +1359,9 @@ Adapted from `highlight-indentation-mode'." (font-lock-flush) (font-lock-ensure) - (setq font-lock-unfontify-region-function indent-bars-orig-unfontify-region) + (when indent-bars-orig-unfontify-region + (setq font-lock-unfontify-region-function + indent-bars-orig-unfontify-region)) (setq indent-bars--gutter-rot 0 indent-bars--current-depth 0 indent-bars--styles nil)