[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Silence checkdoc for symbols designating major and minor modes
From: |
Philip Kaludercic |
Subject: |
Re: Silence checkdoc for symbols designating major and minor modes |
Date: |
Wed, 28 Jul 2021 14:46:57 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Philip Kaludercic <philipk@posteo.net>
>> Date: Tue, 27 Jul 2021 21:50:43 +0000
>>
>> an issue I have been having when documenting code is that checkdoc wants
>> me to disambiguate symbols referring to major or minor modes. That
>> usually means adding "function", "command" "variable", "option" or
>> "symbol" but in my experience these usually do not fit. In fact, most of
>> the time it is obvious what is meant when referring to a major/minor
>> mode.
First of all, I have to correct myself: This only applies to minor
modes, because they are both bound and fbound.
>>
>> ... Foo when `bar-mode' is active ...
>>
>> The patch I added below silences the disambiguation request when a
>> symbol ends in "-mode". Alternatively, one could also add a "minor mode"
>> and "major mode" to the list of accepted keywords, but I think that
>> would sound to repetitive:
>>
>> ... Foo when minor mode `bar-mode' is active ...
>>
>> Opinions?
>
> First, the code, if installed, should have a comment explaining why
> these strings are being exempted.
Of course, this was just a first suggestion.
> More generally, could you please show an example of a doc string and
> the warning(s) it triggers? I'm not sure I understand the problem
> well enough to make up my mind. (Do all of our existing modes suffer
> from this problem?)
I noticed this when updating the rcirc docstrings. For example, I still
have the issue here:
(defcustom rcirc-omit-responses
'("JOIN" "PART" "QUIT" "NICK")
"Responses which will be hidden when `rcirc-omit-mode' is enabled."
:type '(repeat string))
triggering this response:
Disambiguate rcirc-omit-mode by preceding w/
function,command,variable,option or symbol.
Browsing through the repository, I also discovered the same issue in
turn-on-eldoc-mode's docstring. There are other examples in third-party
code I remember, but couldn't find right now.
> Thanks.
--
Philip Kaludercic