GNU bug report logs -
#51340
27.2; Bad indentation and fontification of advice functions
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 22 Oct 2021 21:54:01 UTC
Severity: wishlist
Tags: notabug
Found in version 27.2
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> > 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).
This bug report was last modified 3 years and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.