GNU bug report logs -
#40460
26.3; Make arg of `forward-whitespace' and `forward-symbol' optional
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Mon, 6 Apr 2020 00:33:01 UTC
Severity: wishlist
Tags: wontfix
Merged with 25439
Found in versions 24.5, 26.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 40460 <at> debbugs.gnu.org (full text, mbox):
> > The numeric argument to most `forward-*' commands is optional,
> > defaulting to 1. This should be the case in general. These three
> > commands require their ARG, but they should not. It should be
> > optional and default to 1.
> >
> > `forward-button'
> > `forward-symbol'
> > `forward-whitespace'
>
> It's true that this is somewhat inconsistent -- but I also think it's a
> mistake that the other `forward-*' functions have an optional argument.
Why do you think so?
It's not just vanilla Emacs that defines
`forward-*' commands. Users are encouraged to
do so as well.
The point of thingatpt.el (as one example) is
to leverage `forward-*' functions to identify
things at point. If 3rd-party code and users
define `forward-*' functions they get free
support for identifying the `*' things from
`thingatpt.el'.
So it's important that a convention be more or
less followed in the definition of `forward-*'
commands.
And yes, defaulting to 1 is exactly what Emacs
does, for all kinds of motion (and other!)
commands. Why have `interactive' default but
not also let Elisp calls default?
For Lisp, defaulting means the arg is optional.
This is exactly what Emacs does for this kind
of thing. It always has, since Day One.
There's an inconsistency here, and instead of
fixing it - the right way (to fit the rest of
Emacs) or even the wrong way (to fit what you
apparently think is better - no defaulting),
you prefer to keep the inconsistency.
The question is why?
> So I don't think making these follow that pattern is a move in the
> right direction, and I'm closing this bug report.
The question is why you don't think following
the Emacs pattern is right.
This bug report was last modified 4 years and 135 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.