From: "João Távora" <joaotavora@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 33301@debbugs.gnu.org, Noam Postavsky <npostavs@gmail.com>
Subject: bug#33301: 27.0.50; broken elisp indentation for non-definition symbols starting with "def.."
Date: Thu, 08 Nov 2018 09:52:51 +0000 [thread overview]
Message-ID: <87efbvrj4c.fsf@gmail.com> (raw)
In-Reply-To: <87tvksv21u.fsf@web.de> (Michael Heerdegen's message of "Thu, 08 Nov 2018 01:35:41 +0100")
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Noam Postavsky <npostavs@gmail.com> writes:
>
>> > (cond (bla
>> > ok)
>> > (defan
>> > strange))
>
> That's explicitly done in 'lisp-indent-function':
> (and (null method)
> (> (length function) 3)
> (string-match "\\`def" function))) ;; <==
Ah, that's unfortunate. Still, coundn't we improve the heuristic by
asking if the "function" has a macro definition? Isn't that closer to
the intended behaviour?
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index afb7cbd1dd..e7373ece85 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1104,7 +1104,8 @@ lisp-indent-function
(cond ((or (eq method 'defun)
(and (null method)
(> (length function) 3)
- (string-match "\\`def" function)))
+ (string-match "\\`def" function)
+ (macrop (intern function))))
(lisp-indent-defform state indent-point))
((integerp method)
(lisp-indent-specform method state
João
next prev parent reply other threads:[~2018-11-08 9:52 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 13:21 bug#33301: 27.0.50; broken elisp indentation for non-definition symbols starting with "def.." João Távora
2018-11-08 0:05 ` Noam Postavsky
2018-11-08 0:35 ` Michael Heerdegen
2018-11-08 9:52 ` João Távora [this message]
2018-11-09 0:13 ` Michael Heerdegen
2018-11-09 0:41 ` João Távora
2018-11-09 1:45 ` Michael Heerdegen
2018-11-09 9:04 ` João Távora
2018-11-09 9:51 ` Michael Heerdegen
2018-11-09 12:28 ` Noam Postavsky
2018-11-09 19:39 ` João Távora
2018-11-10 4:48 ` Michael Heerdegen
2018-11-10 10:28 ` João Távora
2018-11-10 10:54 ` Andreas Schwab
2018-11-10 12:46 ` João Távora
2018-11-10 12:53 ` Andreas Schwab
2018-11-10 16:05 ` João Távora
2018-11-10 16:18 ` João Távora
2020-08-22 14:58 ` Lars Ingebrigtsen
2020-08-22 16:19 ` João Távora
2020-08-23 12:26 ` Lars Ingebrigtsen
2020-08-23 13:39 ` João Távora
2020-08-24 13:12 ` Lars Ingebrigtsen
2020-08-25 19:59 ` João Távora
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=87efbvrj4c.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=33301@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
--cc=npostavs@gmail.com \
/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.