summaryrefslogtreecommitdiff
path: root/lisp/progmodes/c-ts-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/c-ts-mode.el')
-rw-r--r--lisp/progmodes/c-ts-mode.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
index 166399f922d..6100f00e3ba 100644
--- a/lisp/progmodes/c-ts-mode.el
+++ b/lisp/progmodes/c-ts-mode.el
@@ -136,6 +136,10 @@ symbol."
(loop (append res (list buffer)) (cdr buffers))
(loop res (cdr buffers))))))))
+(defun c-ts-indent-style-safep (style)
+ "Non-nil if STYLE's value is safe for file-local variables."
+ (and (symbolp style) (not (functionp style))))
+
(defcustom c-ts-mode-indent-style 'gnu
"Style used for indentation.
@@ -150,6 +154,7 @@ follows the form of `treesit-simple-indent-rules'."
(symbol :tag "BSD" bsd)
(function :tag "A function for user customized style" ignore))
:set #'c-ts-mode--indent-style-setter
+ :safe 'c-ts-indent-style-safep
:group 'c)
(defun c-ts-mode--get-indent-style (mode)