all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stefan Kangas <stefan@marxist.se>
Cc: Po Lu <luangruo@yahoo.com>,  Lars Ingebrigtsen <larsi@gnus.org>,
	emacs-devel@gnu.org
Subject: Re: Indentation of def*
Date: Fri, 15 Oct 2021 09:17:47 -0400	[thread overview]
Message-ID: <jwvwnmemo3i.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CADwFkm=qnP9EW4Vi54F4A5zJDCBedtUftDtDkYtG6QOtyffA0g@mail.gmail.com> (Stefan Kangas's message of "Thu, 14 Oct 2021 17:50:18 -0700")

Stefan Kangas [2021-10-14 17:50:18] wrote:
> Po Lu <luangruo@yahoo.com> writes:
>> That would be a step backwards, at least without a grace period for all
>> the code out there to adjust.
> I don't think it's a bad idea to announce this change as planned for
> Emacs 29.1 in the Emacs 28.1 NEWS file.

You mean something like:

   ** Deprecate ad-hoc indentation rule for functions/macros named def*
   All macros and functions which expect to be indented similarly to
   `defun` should use something like (declare (indent defun)) instead.

?  We could, but I think the more important change is to make it
concrete with changes in the behavior.

In order to make the change more gradual, here are some ideas:
- Let font-lock put an ugly color on those cases that would be affected
  by the rule change.
- Emit a warning every time we use the ad-hoc def* rule during
  indentation (could even be made fancy, e.g. accompany the warning
  with a button that jumps to the definition and adds the missing
  (declare (indent defun))).
- Make the change conditional on a variable, so that users can
  easily recover the previous behavior until the missing `declare`
  is added.  Could be a boolean var, or a var containing a list
  of offenders.


        Stefan




  parent reply	other threads:[~2021-10-15 13:17 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 23:13 Indentation of def* Lars Ingebrigtsen
2021-10-14  4:22 ` Stefan Monnier
2021-10-14 11:07 ` Po Lu
2021-10-14 11:14   ` Lars Ingebrigtsen
2021-10-14 11:23     ` Lars Ingebrigtsen
2021-10-14 12:05       ` Po Lu
2021-10-14 12:09         ` Lars Ingebrigtsen
2021-10-14 12:22           ` Po Lu
2021-10-14 12:49             ` João Távora
2021-10-14 13:40               ` Lars Ingebrigtsen
2021-10-14 21:41                 ` João Távora
2021-10-15  9:57                   ` Lars Ingebrigtsen
2021-10-15 10:14                     ` João Távora
2021-10-14 13:25             ` Stefan Kangas
2021-10-14 13:30               ` Po Lu
2021-10-14 19:06                 ` Stefan Kangas
2021-10-14 23:42                   ` Po Lu
2021-10-15  0:50                     ` Stefan Kangas
2021-10-15  5:21                       ` Po Lu
2021-10-15  6:50                       ` Eli Zaretskii
2021-10-15  8:35                         ` Stefan Kangas
2021-10-15 10:42                           ` Eli Zaretskii
2021-10-15 13:07                             ` Stefan Kangas
2021-10-15 13:30                               ` Eli Zaretskii
2021-10-15 13:48                                 ` Stefan Kangas
2021-10-15 13:17                       ` Stefan Monnier [this message]
2021-10-15 12:42                     ` Lars Ingebrigtsen
2021-10-15 12:43                       ` Lars Ingebrigtsen
2021-10-14 18:35             ` Stefan Monnier
2021-10-18  8:02 ` Lars Ingebrigtsen
2021-10-20  6:47   ` Richard Stallman
2021-10-20  7:52     ` Lars Ingebrigtsen
2021-10-20  8:19       ` João Távora
2021-10-20  8:38         ` Lars Ingebrigtsen
2021-10-20  9:32           ` João Távora
2021-10-20  9:36             ` Lars Ingebrigtsen
2021-10-20 16:10               ` João Távora
2021-10-23 23:26             ` Richard Stallman
2021-10-24 13:22               ` Lars Ingebrigtsen
2021-10-24 14:27                 ` Stefan Kangas
2021-10-24 15:19                   ` João Távora
2021-10-24 16:23                     ` Stefan Monnier
2021-10-24 16:55                     ` Lars Ingebrigtsen
2021-10-24 18:36                       ` João Távora
2021-10-27 14:37                     ` Richard Stallman
2021-10-27 14:36                 ` Richard Stallman
2021-10-27 14:40                   ` Lars Ingebrigtsen
2021-10-30  6:49                     ` Richard Stallman

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=jwvwnmemo3i.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    --cc=luangruo@yahoo.com \
    --cc=stefan@marxist.se \
    /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.