emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Indentation of def*


From: Richard Stallman
Subject: Re: Indentation of def*
Date: Wed, 27 Oct 2021 10:36:09 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

    (let ((not-default
           'bar)
          (default
            'foo))
      )


(default 'foo) is not a call to the function `default'.
It's a list which is not an expression.
The bug here is that the indentation of that list
pays attention to something about `default'.

The same problem occurs with explicit indentation specs:

(let ((defun
          foo)
      (defmacro
          bar)
      )
  )

The fix would be to make indentation understand
the structure of a binding list.
That might be nontrivial work, but it would make a bigger
improvement in the indentation.

  > The introduction of the `with-*' macros, added three decades ago without
  > any such heuristic, shows that these heuristics aren't necessary (or
  > useful).

It does show something.  I think it shows that if we introduce a
category of macros without any special heuristic for them, the absence
won't draw much in the way of complaints.

But it doesn't show that we are better off not introducing the
heuristic, nor that it is wise to delete such a heuristic if we have
been accustomed to using one.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]