mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
Merge from origin/emacs-29
44145bf07e
Add indentation style setting for c-ts-mode in .dir-local...e7db6c59cc
; * .dir-locals.el (c-ts-mode): Add settings.d041f01b02
; Minor fix in Emacs Lisp Intro manual
This commit is contained in:
commit
2f013c46f7
@ -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)))
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user