From: Oleh <ohwoeowho@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] Change indent level of vectors in Lisp
Date: Fri, 28 Mar 2014 11:07:04 +0100 [thread overview]
Message-ID: <CAA01p3qkejsnPn6aoFZ5tAOa4KtN1=S5krV=iZRynWNYPhBsxg@mail.gmail.com> (raw)
[-- 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
reply other threads:[~2014-03-28 10:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA01p3qkejsnPn6aoFZ5tAOa4KtN1=S5krV=iZRynWNYPhBsxg@mail.gmail.com' \
--to=ohwoeowho@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.