emacs-devel
[Top][All Lists]
Advanced

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

RE: [RFC] Editing Lisp through changing indentation


From: Drew Adams
Subject: RE: [RFC] Editing Lisp through changing indentation
Date: Fri, 19 Jul 2013 08:58:23 -0700 (PDT)

FWIW, I agree with what TTN said, including the encouragement
to continue.

For me, it's the paren/structure that takes precedence, and
the indentation that follows.  I use TAB and C-M-q, among
other things, to see whether I messed up parentheses.


FWIW2, you might also be interested in a gimmick that Franz
Lisp used to have (before it moved to Common), and perhaps
some other Lisps:

A right bracket, `]', acted as a super right paren, being
equivalent to sufficient right parens to close up the
outermost open list.  E.g.,

 (foo (bar 1 (2 3) ((a . b) (c (d (e . f]

was equivalent to

 (foo (bar 1 (2 3) ((a . b) (c (d (e . f))))))

It was mainly a typing convenience, IIRC, i.e., for
interactive use, but people did just leave the brackets in
files also (IIRC).

Another possibility (and this might have been available too;
I don't recall) would be for typing `]' to insert the right
number of right parens, instead of just inserting a `]' and
having that be interpreted as the right number of right
parens.

(I don't recall that being available, but even if it were I
suspect that most fans of `]' would have preferred to see
the `]' and be able to delete it as a single char etc.)

Such a super-paren might be considered a convenience by some,
but I never made much use of it, and I certainly don't miss it.
It is most useful, IIRC, in a REPL, i.e., interactively, where
you might not have the ability to TAB or C-M-q to fix up
indentation and see what's what wrt parens.

(Common Lisp takes a smarter view of naturally paired
delimiter chars such as `[', `]', realizing that they are
rare and that Lisp users often make use of them when defining
new languages or language constructs.  But then, Common Lisp
has reader macros...  It's poor cousin Emacs Lisp does not.)



reply via email to

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