From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#37034: 26.2.90; checkdoc doesn't support cl-defgeneric, cl-defmethod and cl-defun Date: Thu, 15 Aug 2019 09:54:47 -0500 Message-ID: <871rxmxyvc.fsf@gmail.com> References: <877e7e280t.fsf@cassou.me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="183732"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 37034@debbugs.gnu.org To: Damien Cassou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 15 16:55:36 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hyH9w-000lG5-Ci for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Aug 2019 16:55:24 +0200 Original-Received: from localhost ([::1]:42722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyH9v-0003K0-6f for geb-bug-gnu-emacs@m.gmane.org; Thu, 15 Aug 2019 10:55:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60791) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hyH9i-0003FE-Bd for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 10:55:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hyH9c-0005NQ-KE for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 10:55:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43367) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hyH9c-0005N6-Cx for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 10:55:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hyH9a-0004WJ-I4 for bug-gnu-emacs@gnu.org; Thu, 15 Aug 2019 10:55:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Aug 2019 14:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37034 X-GNU-PR-Package: emacs Original-Received: via spool by 37034-submit@debbugs.gnu.org id=B37034.156588089917361 (code B ref 37034); Thu, 15 Aug 2019 14:55:02 +0000 Original-Received: (at 37034) by debbugs.gnu.org; 15 Aug 2019 14:54:59 +0000 Original-Received: from localhost ([127.0.0.1]:52188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyH9W-0004Vs-PR for submit@debbugs.gnu.org; Thu, 15 Aug 2019 10:54:59 -0400 Original-Received: from mail-oi1-f177.google.com ([209.85.167.177]:46658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hyH9U-0004VW-4j; Thu, 15 Aug 2019 10:54:56 -0400 Original-Received: by mail-oi1-f177.google.com with SMTP id t24so2276843oij.13; Thu, 15 Aug 2019 07:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=y4KB3IisrTbYQj+uHG6AFSZ68V1VjcnJLn4WKeDDqCs=; b=m7Da903L0dvadyvZ9lughbTd0WapxAyqezsIcVyxNrx3gwouR1aCpDBEGxa6Cliwxu n21UA10Pn43si9qwz1eo7cMHhpH6shccq7vcR0h4YqX2j1SxqkEmgJdYeqROOayT22Ds Fz2gip2dbMYokHUyt4BsyMojAJ5qsbtfr67TTDyeg1fvuVBGirtg5D35V3qmexlAkB+d eabyV5N1ahkY999VoIueZx5r3CQFBDt5Ki3+14kharLrZcSmj3uueUX+EX+s3VGxWkfm l+b+hlNSUbxJ7RmfOPs7qW/8maYRDAU0Y9Q76l2IjJtTvTHmsWQbwjVreOdG0qpmrr4S wcbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=y4KB3IisrTbYQj+uHG6AFSZ68V1VjcnJLn4WKeDDqCs=; b=fiGjSDinX521OrqfgU4X8AITgl/v58xXfiFf7+eYLMY0WYr5JhLuqBRAuwqiU3TD1R tfcN8mt2GY3vLCnHQzpYq52XGy9aItxQKDE5B1VJtWKoDyEIjF6b8azHfF23ZCi4VrKe pNUPUZyrRUePKMEU171/oCUJu+d7ShzvIGW3nRXASwfQvuTWx4EdHB0E0Ok1ctM24pH1 aEy3mnz8r/QBk5pG6Y0hVw9s0jucV4Av06kqh3rSjoIKW2t3vbe9LjTd+TJV2+coEHWv 6NPaH7FMWGqdZ9LX0iUOa+CmA0vV3iOhTHraMQffiIxq9P1Z566aY+5eYwGGH9HEQogi +6qw== X-Gm-Message-State: APjAAAXb9YXMeVCPHKhnhbHaOeCMFpJ9YpfDF3WS8QnFmDjTNsiz/CVK tVvMPyLeLozQGRgZe4QrYeemw1FHZuM= X-Google-Smtp-Source: APXvYqwtSBLJcr75BXyutseMCZf991+G0swCU6iSH1aLow2YWeJzu9CCV8RpwV6OT6/jnu81IMUpug== X-Received: by 2002:aca:5941:: with SMTP id n62mr1726928oib.76.1565880889681; Thu, 15 Aug 2019 07:54:49 -0700 (PDT) Original-Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id s5sm1040955otk.11.2019.08.15.07.54.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2019 07:54:48 -0700 (PDT) In-Reply-To: <877e7e280t.fsf@cassou.me> (Damien Cassou's message of "Thu, 15 Aug 2019 09:38:10 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:165105 Archived-At: --=-=-= Content-Type: text/plain tags 37034 + patch quit On Thu 15 Aug 2019 at 09:38, Damien Cassou wrote: > I rely on checkdoc to write clean docstrings. I rely on CL when writing > libraries to facilitate writing extensions through > specialization. Nevertheless, checkdoc won't check the docstrings of > cl-defgeneric, cl-defmethod and cl-defun. Patch attached should fix the issue. Thanks, Alex --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Make-checkdoc-check-cl-lib-function-docstrings.patch Content-Description: patch >From d52d04d62c14c0c228a5d430188db5c76cac767d Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Thu, 15 Aug 2019 09:51:23 -0500 Subject: [PATCH] Make checkdoc check cl-lib function docstrings * lisp/emacs-lisp/checkdoc.el (checkdoc--next-docstring) (checkdoc-defun-info): Include cl-defun, cl-defgeneric, cl-defmethod. bug#37034 --- lisp/emacs-lisp/checkdoc.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 830743f5f8..ce36596423 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -933,7 +933,7 @@ don't move point." ;; Don't bug out if the file is empty (or a ;; definition ends prematurely. (end-of-file))) - (`(,(or 'defun 'defvar 'defcustom 'defmacro 'defconst 'defsubst 'defadvice) + (`(,(or 'defun 'defvar 'defcustom 'defmacro 'defconst 'defsubst 'defadvice 'cl-defun 'cl-defgeneric 'cl-defmethod) ,(pred symbolp) ;; Require an initializer, i.e. ignore single-argument `defvar' ;; forms, which never have a doc string. @@ -1885,7 +1885,8 @@ the token checkdoc-order: exists, and TOKEN is a symbol read from the comment." (save-excursion (beginning-of-defun) - (let ((defun (looking-at "(def\\(un\\|macro\\|subst\\|advice\\)")) + (let ((defun (looking-at + "(\\(?:cl-\\)?def\\(un\\|macro\\|subst\\|advice\\|generic\\|method\\)")) (is-advice (looking-at "(defadvice")) (lst nil) (ret nil) -- 2.22.0 --=-=-=--