GNU bug report logs -
#44107
set-window-dedicated-p: args should be marked as optional
Previous Next
Reported by: Boruch Baum <boruch_baum <at> gmx.com>
Date: Tue, 20 Oct 2020 22:56:01 UTC
Severity: normal
Tags: wontfix
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Boruch Baum <boruch_baum <at> gmx.com> writes:
> The definition for function `set-window-dedicated-p' indicates that its
> two arguments are required, but the docstring indicates that the
> arguments are optional.
I assume you're referring to the following sentence:
WINDOW must be a live window and defaults to the selected one.
The default case in question is when WINDOW is specified as nil.
Perhaps this could be made more explicit, but it's a pretty pervasive
idiom.
In other words, set-window-dedicated-p takes two positional arguments
and its docstring does not intentionally try to suggest otherwise.
> I haven't looked at the C source code, but my
> testing indicates that the arguments really are optional, so the
> description should mark them as such, ie.
>
> (set-window-dedicated-p &optional WINDOW FLAG)
Could you please describe your testing in more detail? Evaluating
(set-window-dedicated-p)
gives me
(wrong-number-of-arguments set-window-dedicated-p 0)
since at least as far back as Emacs 24.5, so I'm not sure how you
reached that conclusion.
Or are you suggesting that the function's arguments _be made_ optional,
since they are both allowed to be nil? (A positional argument that can
be nil is not the same as an optional argument.)
--
Basil
This bug report was last modified 4 years and 215 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.