[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44107: set-window-dedicated-p: args should be marked as optional
From: |
Basil L. Contovounesios |
Subject: |
bug#44107: set-window-dedicated-p: args should be marked as optional |
Date: |
Wed, 21 Oct 2020 01:13:08 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Boruch Baum <boruch_baum@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