summary refs log tree commit diff
path: root/gnu/packages/patches/emacs-fix-scheme-indent-function.patch
blob: c5a426802c163fd693cbe216ba0e4de3f1c12922 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Fix 'scheme-indent-function' to indent s-expressions starting with a keyword
properly, like this:

(#:foo 1
 #:bar 2)

instead of like this:

(#:foo 1
       #:bar 2)

The fix is made by Mark H Weaver <mhw@netris.org>:
<http://www.netris.org/~mhw/scheme-indent-function.el>

--- a/lisp/progmodes/scheme.el
+++ b/lisp/progmodes/scheme.el
@@ -482,6 +482,12 @@
 			(> (length function) 3)
 			(string-match "\\`def" function)))
 	       (lisp-indent-defform state indent-point))
+              ((and (null method)
+                    (> (length function) 1)
+                    ;; The '#' in '#:' seems to get lost, not sure why
+                    (string-match "\\`:" function))
+               (let ((lisp-body-indent 1))
+                 (lisp-indent-defform state indent-point)))
 	      ((integerp method)
 	       (lisp-indent-specform method state
 				     indent-point normal-indent))