From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master fd92023: Make checkdoc work with qualified methods Date: Fri, 05 Mar 2021 10:21:42 -0500 Message-ID: References: <604215ec.1c69fb81.44011.3522@mx.google.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10717"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Mauro Aranda Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 05 16:41:32 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 1lICa2-0002fd-Gv for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Mar 2021 16:41:30 +0100 Original-Received: from localhost ([::1]:55056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lICa1-0007Wx-DX for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Mar 2021 10:41:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICGx-0004zh-CP for emacs-devel@gnu.org; Fri, 05 Mar 2021 10:21:47 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:29627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lICGv-0004sQ-QJ for emacs-devel@gnu.org; Fri, 05 Mar 2021 10:21:47 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 024B6100250; Fri, 5 Mar 2021 10:21:45 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 64337100225; Fri, 5 Mar 2021 10:21:43 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1614957703; bh=/Fpf8jCtd7iNVEPxivOeUHk6LPUWkE3JKG0E3jVezWY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=hvrUlqhdKijBKrCHCxj55etPUilUu6y0g72+byLJYUbRuoodFbU+wBD+OPRZSJb8X J+YL7b9AXHM1GRqZ8yuDWtdLgSLUsSiCWrx+vFBN6vUlsuNW1jh5PgCImUVr6L+3qF f/G5dW6bktavM29oLjcYTW+MStrc1ln3j1+RxxwRMH2WKhVRRcp5YSfplpdSQzAinY SZ/BTXDYZOdWZgsQbuKPiVHfvaxlEYNzt1FTz1j4zdqe776tNaii51RPohvChDQ9tt rhff+HMYP6uPuJBRYrhHDZwpC6mwovJp62p+DAnbC4ZlLbCbe6Deftiq2LcVSdBsnk FNgEUiFK1/mBQ== Original-Received: from alfajor (unknown [216.154.43.249]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 361191202A4; Fri, 5 Mar 2021 10:21:43 -0500 (EST) In-Reply-To: <604215ec.1c69fb81.44011.3522@mx.google.com> (Mauro Aranda's message of "Fri, 05 Mar 2021 08:28:41 -0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:266026 Archived-At: > (`(,(and > (or 'defun 'defvar 'defcustom 'defmacro 'defconst 'defsubst > 'defadvice 'cl-defun 'cl-defgeneric 'cl-defmacro 'cl-defmethod) > def) > ,(pred symbolp) > ;; Require an initializer, i.e. ignore single-argument `defvar' > ;; forms, which never have a doc string. > ,_ . ,_) I think you can reduce that to (pred symbolp) and then check that (function-get def 'doc-string-elt) is non-nil. > Note that I need to do (forward-sexp 1) so the requirements of > cl--defmethod-doc-pos are fulfilled. It may get messy if other defining > forms declare a doc-string-elt function that assumes a different point > position. The starting position of `doc-string-elt` is currently defined de-facto by the code in `lisp-string-in-doc-position-p`, so `cl--defmethod-doc-pos` had no choice in the matter ;-) > BTW, I've noticed that I forgot to add the Bug tag to my commit, I'm > sorry. This commit was part of Bug#46918. I think this deserves a harsh punishment. Stefan