all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Branham <alex.branham@gmail.com>
To: Damien Cassou <damien@cassou.me>
Cc: 37034@debbugs.gnu.org
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	[thread overview]
Message-ID: <871rxmxyvc.fsf@gmail.com> (raw)
In-Reply-To: <877e7e280t.fsf@cassou.me> (Damien Cassou's message of "Thu, 15 Aug 2019 09:38:10 +0200")

[-- Attachment #1: Type: text/plain, Size: 390 bytes --]

tags 37034 + patch
quit

On Thu 15 Aug 2019 at 09:38, Damien Cassou <damien@cassou.me> 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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1617 bytes --]

From d52d04d62c14c0c228a5d430188db5c76cac767d Mon Sep 17 00:00:00 2001
From: Alex Branham <alex.branham@gmail.com>
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: <TOKEN> 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


  reply	other threads:[~2019-08-15 14:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15  7:38 bug#37034: 26.2.90; checkdoc doesn't support cl-defgeneric, cl-defmethod and cl-defun Damien Cassou
2019-08-15 14:54 ` Alex Branham [this message]
2019-08-16 12:28   ` Damien Cassou
2019-08-16 17:26     ` Alex Branham
2019-08-16 21:00       ` Lars Ingebrigtsen
2019-08-17 11:45         ` Damien Cassou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871rxmxyvc.fsf@gmail.com \
    --to=alex.branham@gmail.com \
    --cc=37034@debbugs.gnu.org \
    --cc=damien@cassou.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.