all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#55033: [PATCH] Define indentation behavior for a few more special Scheme forms
@ 2022-04-20  7:20 Jean Abou Samra
  2022-04-20  7:47 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Jean Abou Samra @ 2022-04-20  7:20 UTC (permalink / raw)
  To: 55033

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]

Hi,

The attached patch defines special indentation for a few more special Scheme
forms: and-let*, with-syntax, eval-when, and the pattern matching family
(match, match-lambda, match-let, etc.).

I didn't do copyright assignment, assuming that the patch is trivial enough,
but let me know if this would be desirable.

Best regards,
Jean

[-- Attachment #2: 0001-Define-indentation-behavior-for-a-few-more-special-S.patch --]
[-- Type: text/x-patch, Size: 1941 bytes --]

From 1c6f0aca088896b7e07f7251bc860daeda0916fe Mon Sep 17 00:00:00 2001
From: Jean Abou Samra <jean@abou-samra.fr>
Date: Tue, 19 Apr 2022 23:40:29 +0200
Subject: [PATCH] Define indentation behavior for a few more special Scheme
 forms

* lisp/progmodes/scheme.el: define 'scheme-indent-function for
  and-let*, with-syntax, eval-when, and pattern matching macros.
---
 lisp/progmodes/scheme.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el
index 592e2d5057..9b98c4e6dd 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)
 \f
+;; 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)
+\f
 ;;;; MIT Scheme specific indentation.
 
 (if scheme-mit-dialect
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-20 16:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-20  7:20 bug#55033: [PATCH] Define indentation behavior for a few more special Scheme forms Jean Abou Samra
2022-04-20  7:47 ` Eli Zaretskii
2022-04-20  9:31   ` Jean Abou Samra
2022-04-20  9:59     ` Eli Zaretskii
2022-04-20 16:38     ` Eli Zaretskii
2022-04-20 16:47       ` Jean Abou Samra

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.