* [PATCH] Change indent level of vectors in Lisp
@ 2014-03-28 10:07 Oleh
0 siblings, 0 replies; only message in thread
From: Oleh @ 2014-03-28 10:07 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 65 bytes --]
Hi,
Please consider applying the attached patch.
regards,
Oleh
[-- Attachment #2: 0001-Change-indent-level-of-vectors-in-Lisp.patch --]
[-- Type: text/x-patch, Size: 1143 bytes --]
From 9a4841c0f4e72ba7e3f933c3fad87f10cbe7ffbe Mon Sep 17 00:00:00 2001
From: Oleh Krehel <ohwoeowho@gmail.com>
Date: Fri, 28 Mar 2014 10:44:52 +0100
Subject: [PATCH] Change indent level of vectors in Lisp.
lisp/emacs-lisp/lisp-mode.el (calculate-lisp-indent): Vector elements
should all be aligned under the open bracket.
Before:
(list [:prop1 foo
:prop2 bar])
After:
(list [:prop1 foo
:prop2 bar])
---
lisp/emacs-lisp/lisp-mode.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 437bf74..a9eac6a 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1332,7 +1332,7 @@ is the buffer position of the start of the containing expression."
(setq desired-indent (current-column))
;; Find the start of first element of containing sexp.
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
- (cond ((looking-at "\\s(")
+ (cond ((or (looking-at "\\s(") (looking-back "\\["))
;; First element of containing sexp is a list.
;; Indent under that list.
)
--
1.8.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-28 10:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28 10:07 [PATCH] Change indent level of vectors in Lisp Oleh
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.