From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Silence checkdoc for symbols designating major and minor modes Date: Wed, 28 Jul 2021 14:33:18 +0300 Message-ID: <83tukeu0zl.fsf@gnu.org> References: <87k0lbfmto.fsf@posteo.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15023"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 28 13:34:11 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m8hpC-0003hF-QW for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Jul 2021 13:34:10 +0200 Original-Received: from localhost ([::1]:54004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8hpB-0003MU-PO for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Jul 2021 07:34:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8hoQ-0002Qr-4o for emacs-devel@gnu.org; Wed, 28 Jul 2021 07:33:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51540) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8hoP-0006vp-Fw; Wed, 28 Jul 2021 07:33:21 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1472 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8hoO-0000Re-UR; Wed, 28 Jul 2021 07:33:21 -0400 In-Reply-To: <87k0lbfmto.fsf@posteo.net> (message from Philip Kaludercic on Tue, 27 Jul 2021 21:50:43 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:271726 Archived-At: > From: Philip Kaludercic > 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. > > ... 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. 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?) Thanks.