emacs-devel
[Top][All Lists]
Advanced

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

RE: Incorrect indentation after :name


From: Drew Adams
Subject: RE: Incorrect indentation after :name
Date: Thu, 7 Jul 2005 15:21:32 -0700

    >     >               (put 'if 'common-lisp-indent-function
    >     >                    '(nil nil &body))))
    >     This breaks the standard indentation of IF in lisp-mode buffers.
    By standard, I mean the accepted way of indenting IF in common
    lisp.

Do we care about breaking the common-lisp standard for indentation of Emacs
Lisp? I don't care if we break it. (But see below - I see now that you are
not talking about Emacs-Lisp code.)

    it will affect indentation of IF in all modes
    that use common-lisp-indent-function to indent.
    in common lisp:
    (if test
        then
        else)

OK, I understand. The `put' affects also the common-lisp standard
indentation for `if', and that indentation is not appropriate for
Common-Lisp `if'.

My suggestion was not to simply add the above code, but to integrate its
behavior. You're right that it would be preferable to integrate it only for
the proper modes - so that it doesn't affect editing of common-lisp code,
for instance.

Currently, it looks as if common-lisp-mode is an alias for lisp-mode.
Because there are syntax differences between Emacs Lisp and Common Lisp,
perhaps it would be better not to have this simple alias, and to allow for
behavioral differences (e.g. indentation).

Lisp-interaction-mode and emacs-lisp-mode are built on lisp-mode, and they
both should, I think, have the indentation support appropriate to
emacs-lisp. (Not sure about the status of lisp-interaction-mode - in
*scratch*, at least, it is best to have Emacs-Lisp indentation support.)

IOW, the idea is to have this indentation for Emacs Lisp, including in
*scratch* (which is in lisp-interaction-mode). Yes, it would be wrong to
impose this on Common-Lisp (or other Lisp) code also.







reply via email to

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