emacs-devel
[Top][All Lists]
Advanced

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

Re: Can we not introduce frivolous indentation change to define-minor-mo


From: Jonas Bernoulli
Subject: Re: Can we not introduce frivolous indentation change to define-minor-mode?
Date: Wed, 06 Jan 2016 16:37:57 +0100
User-agent: mu4e 0.9.15; emacs 25.0.50.1

Oleh Krehel <address@hidden> writes:

> Artur Malabarba <address@hidden> writes:
>
>> What if you set the indent spec to defun? Does that work?
>
> What do you mean here? The indent spec of `defun' is (indent 2), it's
> not justified for `define-minor-mode',

The `defun' indent variant should be used, not the indent variant used
by `defun'.  (I assume the `defun' indent value was originally used by
`defun' and got its name that way.  But this is (no longer) the case,0
which makes this a bit confusing.)

With

  (defmacro define-minor-mode (...)
    "..."
    (declare ... (indent defun))
    ...)

we get

  (define-minor-mode foo-mode
    "doc-string"
    :global t)

and

  (define-minor-mode foo-mode nil
    :global t)

So everyone can be happy again.



reply via email to

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