emacs-diffs
[Top][All Lists]
Advanced

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

master c2b8058: Document the new paren-space indentation rule


From: Lars Ingebrigtsen
Subject: master c2b8058: Document the new paren-space indentation rule
Date: Sat, 25 Sep 2021 06:11:34 -0400 (EDT)

branch: master
commit c2b8058c07dfa2aa142c11d9240e7b1fa4f520ff
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Document the new paren-space indentation rule
    
    * doc/emacs/programs.texi (Lisp Indent): Mention the new
    paren-space indentation rule.
---
 doc/emacs/programs.texi | 17 +++++++++++++++++
 etc/NEWS                |  2 ++
 2 files changed, 19 insertions(+)

diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index ec11b0c..51a48df 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -471,6 +471,23 @@ the function name.  This is normally done for macro 
definitions, using
 the @code{declare} construct.  @xref{Defining Macros,,, elisp, The
 Emacs Lisp Reference Manual}.
 
+  In Emacs Lisp, lists are usually indented as if they are
+function-like forms:
+
+@lisp
+(setq foo '(bar zot
+                gazonk))
+@end lisp
+
+  However, if you add a space after the opening parenthesis, this tells
+Emacs that it's a data list instead of a piece of code, and Emacs will
+then indent it like this:
+
+@lisp
+(setq foo '( bar zot
+             gazonk))
+@end lisp
+
 @node C Indent
 @subsection Commands for C Indentation
 
diff --git a/etc/NEWS b/etc/NEWS
index 56fdbec..f211a98 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1703,8 +1703,10 @@ work as before.
 
 ** Emacs Lisp mode
 
+---
 *** The mode-line now indicates whether we're using lexical or dynamic scoping.
 
++++
 *** A space between an open paren and a symbol changes the indentation rule.
 The presence of a space between an open paren and a symbol now is
 taken as a statement by the programmer that this should be indented



reply via email to

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