unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Indentation of def*
@ 2021-10-13 23:13 Lars Ingebrigtsen
  2021-10-14  4:22 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 48+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-13 23:13 UTC (permalink / raw)
  To: emacs-devel

A longstanding issue is whether to do anything about this heuristic in
our indentation code:

(defun definitely-regular (a b))
(defun still-regular (a b))

(progn
  (definitely-regular a
    b)
  (still-regular a
                 b))

That is, any function or macro that has a name that starts with "def" is
indented similarly to a `defun' (etc).

This is discussed in bug#43329, and all two of us discussing this have
landed on "let's fix this".  So today I've tagged all in-tree def*
function/macros with correct indentation (ahem), so if we remove the
heuristic from the indentation function, in-tree code won't change how
it's indented.  (By and large -- there's a handful of functions that
will change, but the affected call sites should be less than a dozen, if
I got it right.)

But code that uses out-of-tree functions named def* will see indentation
changes until everybody tags up their functions with

(defun define-whatever ()
  (declare (indent defun))

And people going back and forth between Emacs 29 and earlier versions
will see the indentation change (for untagged functions), which is why
we rarely change how Emacs Lisp is indented.

So this is the thread where you can say "yay" or "eek".

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




^ permalink raw reply	[flat|nested] 48+ messages in thread

end of thread, other threads:[~2021-10-30  6:49 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).