diff --git a/.dir-locals.el b/.dir-locals.el index fc89dff87f2..0bcded4b5d1 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -21,6 +21,9 @@ (electric-quote-comment . nil) (electric-quote-string . nil) (mode . bug-reference-prog))) + (c-ts-mode . ((c-ts-mode-indent-style . gnu) + (indent-tabs-mode . t) + (mode . bug-reference-prog))) (log-edit-mode . ((log-edit-font-lock-gnu-style . t) (log-edit-setup-add-author . t) (vc-git-log-edit-summary-target-len . 50))) diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index a2b82d25633..6447ff74bc9 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -6604,10 +6604,11 @@ works. You will probably need to use @kbd{C-h f} (@code{describe-function}). The newer version uses a conditional to determine whether the buffer has been narrowed. -(Also, it uses @code{line-number-at-pos}, which among other simple -expressions, such as @code{(goto-char (point-min))}, moves point to -the beginning of the current line with @code{(forward-line 0)} rather -than @code{beginning-of-line}.) +Also, the modern version of @code{what-line} uses +@code{line-number-at-pos}, which among other simple expressions, such +as @code{(goto-char (point-min))}, moves point to the beginning of the +current line with @code{(forward-line 0)} rather than +@code{beginning-of-line}.) The @code{what-line} function as shown here has a documentation line and is interactive, as you would expect. The next two lines use the diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 2309aa00fc9..bbc7979667c 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)