[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51340: [External] : Re: bug#51340: 27.2; Bad indentation and fontifi
From: |
Drew Adams |
Subject: |
bug#51340: [External] : Re: bug#51340: 27.2; Bad indentation and fontification of advice functions |
Date: |
Sat, 23 Oct 2021 16:08:35 +0000 |
> > 1. Please consider indenting functions such as `advice-add' and
> > `add-function' properly. They should probably be indented the way
> > function definitions (defuns) are. So far, they're indented with
> > no attention to what they're for or what their content is (e.g.
> > use of keywords).
>
> Do you have an example of the current indentation, and the one you
> would like to see? Thanks.
I don't really care much. Mainly wanted to draw some
attention to the (minor) "problem", which could use
some love.
(advice-add
'foobar-mode :around 'my-foobar-around-advice)
(advice-add 'foobar-mode
:around 'my-foobar-around-advice)
(advice-add 'foobar-mode :around
'my-foobar-around-advice)
(add-function :before-until (local 'something)
#'some-function)
(add-function where isearch-filter-predicate pred
(append (and (or name ...)
`((name . ...)))
(and ...
(or ...)
(let ((foo ...))
(unless (or ...)
(setq foo ))
(and ...)))))
Maybe just indent as we do for `defun'. Regardless
of where the first line is ended, just indent 1 char.
(defun foo
() "jjj" (xyz))
(defun foo ()
"jjj" (xyz))
(defun foo () "jjj"
(xyz))
But as I say, I don't have any particular idea about
what the indentation should be, other than that what
we have now seems a bit odd, and wastes horizontal
space when you have a bunch of code (e.g. the last
add-function example above).