emacs-diffs
[Top][All Lists]
Advanced

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

master 25308a95f8: Improve documentation of 'scheme-indent-function' pro


From: Eli Zaretskii
Subject: master 25308a95f8: Improve documentation of 'scheme-indent-function' property
Date: Wed, 20 Apr 2022 12:37:34 -0400 (EDT)

branch: master
commit 25308a95f8869c4c0806e61f23c6463bf7ef5f62
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Improve documentation of 'scheme-indent-function' property
    
    * lisp/progmodes/scheme.el: Extend and clarify the commentary
    regarding the 'scheme-indent-function' property of special forms.
---
 lisp/progmodes/scheme.el | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index 9b98c4e6dd..cd397733d2 100644
--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -562,10 +562,20 @@ indentation."
       (lisp-indent-specform 2 state indent-point normal-indent)
     (lisp-indent-specform 1 state indent-point normal-indent)))
 
-;; (put 'begin 'scheme-indent-function 0), say, causes begin to be indented
-;; like defun if the first form is placed on the next line, otherwise
-;; it is indented like any other form (i.e. forms line up under first).
-
+;; See `scheme-indent-function' (the function) for what these do.
+;; In a nutshell:
+;;  . for forms with no `scheme-indent-function' property the 2nd
+;;    and subsequent lines will be indented with one space;
+;;  . if the value of the property is zero, then when the first form
+;;    is on a separate line, the next lines will be indented with 2
+;;    spaces instead of the default one space;
+;;  . if the value is a positive integer N, the first N lines after
+;;    the first one will be indented with 4 spaces, and the rest
+;;    will be indented with 2 spaces;
+;;  . if the value is `defun', the indentation is like for `defun';
+;;  . if the value is a function, it will be called to produce the
+;;    required indentation.
+;; See also http://community.schemewiki.org/?emacs-indentation.
 (put 'begin 'scheme-indent-function 0)
 (put 'case 'scheme-indent-function 1)
 (put 'delay 'scheme-indent-function 0)



reply via email to

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