From: martin rudalics <rudalics@gmx.at>
To: Lars Ingebrigtsen <larsi@gnus.org>, 51312@debbugs.gnu.org
Subject: bug#51312: 29.0.50; Indenting vectors with leading spaces errors out
Date: Thu, 21 Oct 2021 11:06:23 +0200 [thread overview]
Message-ID: <fd299ba0-5dda-8299-567b-cde585075b83@gmx.at> (raw)
In-Reply-To: <87tuhbhyee.fsf@gnus.org>
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
> Trying to use the newish space-after-parenthesis syntax errors out when
> you hit tab on the second line:
>
> [ :foo :zot
> :bar]
>
> forward-sexp: Scan error: "Containing expression ends prematurely", 1, 1
Can you try the attached patch?
Thanks, martin
[-- Attachment #2: lisp-mode.el.diff --]
[-- Type: text/x-patch, Size: 1078 bytes --]
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1078,10 +1078,11 @@ calculate-lisp-indent
;; Handle prefix characters and whitespace
;; following an open paren. (Bug#1012)
(backward-prefix-chars)
- (while (not (or (looking-back "^[ \t]*\\|([ \t]+"
- (line-beginning-position))
- (and containing-sexp
- (>= (1+ containing-sexp) (point)))))
+ (while (not (save-excursion
+ (skip-chars-backward " \t")
+ (or (= (point) (line-beginning-position))
+ (and containing-sexp
+ (= (point) (1+ containing-sexp))))))
(forward-sexp -1)
(backward-prefix-chars))
(setq calculate-lisp-indent-last-sexp (point)))
next prev parent reply other threads:[~2021-10-21 9:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 3:03 bug#51312: 29.0.50; Indenting vectors with leading spaces errors out Lars Ingebrigtsen
2021-10-21 4:59 ` bug#51312: [External] : " Drew Adams
2021-10-21 9:06 ` martin rudalics [this message]
2021-10-21 13:09 ` Lars Ingebrigtsen
2021-10-22 9:05 ` martin rudalics
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fd299ba0-5dda-8299-567b-cde585075b83@gmx.at \
--to=rudalics@gmx.at \
--cc=51312@debbugs.gnu.org \
--cc=larsi@gnus.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).