GNU bug report logs -
#37034
26.2.90; checkdoc doesn't support cl-defgeneric, cl-defmethod and cl-defun
Previous Next
Reported by: Damien Cassou <damien <at> cassou.me>
Date: Thu, 15 Aug 2019 07:39:01 UTC
Severity: normal
Tags: fixed, patch
Found in version 26.2.90
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 37034 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
tags 37034 + patch
quit
On Thu 15 Aug 2019 at 09:38, Damien Cassou <damien <at> 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
[0001-Make-checkdoc-check-cl-lib-function-docstrings.patch (text/x-diff, inline)]
From d52d04d62c14c0c228a5d430188db5c76cac767d Mon Sep 17 00:00:00 2001
From: Alex Branham <alex.branham <at> 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
This bug report was last modified 5 years and 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.