emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2f013c46f71: Merge from origin/emacs-29


From: Eli Zaretskii
Subject: master 2f013c46f71: Merge from origin/emacs-29
Date: Sat, 22 Apr 2023 04:57:14 -0400 (EDT)

branch: master
commit 2f013c46f7116d53468de78c00903c87d100bbd9
Merge: e6ca5834a6e 44145bf07e2
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge from origin/emacs-29
    
    44145bf07e2 Add indentation style setting for c-ts-mode in .dir-local...
    e7db6c59cc6 ; * .dir-locals.el (c-ts-mode): Add settings.
    d041f01b02f ; Minor fix in Emacs Lisp Intro manual
---
 .dir-locals.el                      | 3 +++
 doc/lispintro/emacs-lisp-intro.texi | 9 +++++----
 lisp/progmodes/c-ts-mode.el         | 5 +++++
 3 files changed, 13 insertions(+), 4 deletions(-)

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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]