aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2023-03-13 09:45:18 -0700
committerSean Whitton <spwhitton@spwhitton.name>2023-03-13 09:45:18 -0700
commit520523e7c49c89ac9f317aafefac3130ba1b6693 (patch)
tree7c2fdd909a03ccc767f8f67f2259dab7d4479667
parent255aadda192c99abdaecb0caebf59a9b5272fcac (diff)
downloadconsfigurator-520523e7c49c89ac9f317aafefac3130ba1b6693.tar.gz
consfigurator.el.in: automatically activate indentation hints
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--emacs/consfigurator.el.in15
1 files changed, 14 insertions, 1 deletions
diff --git a/emacs/consfigurator.el.in b/emacs/consfigurator.el.in
index 0555b28..c452dbb 100644
--- a/emacs/consfigurator.el.in
+++ b/emacs/consfigurator.el.in
@@ -33,6 +33,17 @@
(require 'lisp-mode)
(require 'perl-mode)
+(defgroup consfigurator nil
+ "Options for Consfigurator Emacs utilities."
+ :group 'tools)
+
+(defcustom consfigurator-auto-activate-indentation-hints t
+ "Whether `consfigurator-lisp-mode' should call
+`consfigurator-activate-indentation-hints'.
+Activation of the indentation hints is not buffer-local."
+ :type 'boolean
+ :group 'consfigurator)
+
;;;###autoload
(defun activate-consfigurator-indentation-hints ()
"Activate indentation hints for Consfigurator properties.
@@ -175,7 +186,9 @@ Modes that use this should add `syntax-propertize-multiline' to
(add-hook 'syntax-propertize-extend-region-functions
#'syntax-propertize-multiline t t)
(setq-local syntax-propertize-function
- #'consfigurator-syntax-propertize-function))
+ #'consfigurator-syntax-propertize-function)
+ (when consfigurator-auto-activate-indentation-hints
+ (activate-consfigurator-indentation-hints)))
(provide 'consfigurator)