mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
gnu: emacs: Fix indentation of scheme keyword lists.
* gnu/packages/patches/emacs-fix-scheme-indent-function.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/emacs.scm (emacs)[source]: Use it.
This commit is contained in:
parent
5f1ba08953
commit
4509ec72a4
3 changed files with 31 additions and 0 deletions
|
@ -472,6 +472,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/elfutils-tests-ptrace.patch \
|
||||
%D%/packages/patches/einstein-build.patch \
|
||||
%D%/packages/patches/emacs-exec-path.patch \
|
||||
%D%/packages/patches/emacs-fix-scheme-indent-function.patch \
|
||||
%D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \
|
||||
%D%/packages/patches/emacs-source-date-epoch.patch \
|
||||
%D%/packages/patches/eudev-rules-directory.patch \
|
||||
|
|
|
@ -80,6 +80,7 @@ (define-public emacs
|
|||
(base32
|
||||
"0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))
|
||||
(patches (search-patches "emacs-exec-path.patch"
|
||||
"emacs-fix-scheme-indent-function.patch"
|
||||
"emacs-source-date-epoch.patch"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
|
|
29
gnu/packages/patches/emacs-fix-scheme-indent-function.patch
Normal file
29
gnu/packages/patches/emacs-fix-scheme-indent-function.patch
Normal file
|
@ -0,0 +1,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))
|
Loading…
Reference in a new issue