From: Jean Abou Samra Date: Tue, 19 Apr 2022 21:40:29 +0000 (+0200) Subject: Define indentation behavior for a few more special Scheme forms X-Git-Tag: emacs-29.0.90~1931^2~386 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6713b07e088f21ee9ca277794d8093c8158a9ed5;p=emacs.git Define indentation behavior for a few more special Scheme forms * lisp/progmodes/scheme.el: Define 'scheme-indent-function' property for 'and-let*', 'with-syntax', 'eval-when;, and pattern matching macros. (Bug#55033) Copyright-paperwork-exempt: yes --- diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index 592e2d50570..9b98c4e6ddd 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el @@ -576,12 +576,16 @@ indentation." (put 'letrec 'scheme-indent-function 1) (put 'let-values 'scheme-indent-function 1) ; SRFI 11 (put 'let*-values 'scheme-indent-function 1) ; SRFI 11 +(put 'and-let* 'scheme-indent-function 1) ; SRFI 2 (put 'sequence 'scheme-indent-function 0) ; SICP, not r4rs (put 'let-syntax 'scheme-indent-function 1) (put 'letrec-syntax 'scheme-indent-function 1) (put 'syntax-rules 'scheme-indent-function 1) (put 'syntax-case 'scheme-indent-function 2) ; not r5rs +(put 'with-syntax 'scheme-indent-function 1) (put 'library 'scheme-indent-function 1) ; R6RS +;; Part of at least Guile, Chez Scheme, Chicken +(put 'eval-when 'scheme-indent-function 1) (put 'call-with-input-file 'scheme-indent-function 1) (put 'call-with-port 'scheme-indent-function 1) @@ -605,6 +609,14 @@ indentation." ;; SRFI-8 (put 'receive 'scheme-indent-function 2) +;; SRFI-204 (withdrawn, but provided in many implementations, see the SRFI text) +(put 'match 'scheme-indent-function 1) +(put 'match-lambda 'scheme-indent-function 0) +(put 'match-lambda* 'scheme-indent-function 0) +(put 'match-let 'scheme-indent-function 'scheme-let-indent) +(put 'match-let* 'scheme-indent-function 1) +(put 'match-letrec 'scheme-indent-function 1) + ;;;; MIT Scheme specific indentation. (if scheme-mit-dialect