From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69387: 30.0.50; A string shouldn't be both a docstring and a return value Date: Mon, 26 Feb 2024 12:44:42 -0500 Message-ID: References: <2D08AD76-59F7-41BE-9363-96677967034A@gmail.com> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8059"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Philip Kaludercic , Eli Zaretskii , 69387@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 26 19:05:45 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1refMG-0001nP-LE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Feb 2024 19:05:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1refLQ-0005bW-Fq; Mon, 26 Feb 2024 13:04:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1refLC-0005ZA-OV for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 13:04:39 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1refLB-0003Dx-91 for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 13:04:38 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1refLa-0004DT-9M for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 13:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Feb 2024 18:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69387 X-GNU-PR-Package: emacs Original-Received: via spool by 69387-submit@debbugs.gnu.org id=B69387.170897064516060 (code B ref 69387); Mon, 26 Feb 2024 18:05:02 +0000 Original-Received: (at 69387) by debbugs.gnu.org; 26 Feb 2024 18:04:05 +0000 Original-Received: from localhost ([127.0.0.1]:53418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1refKf-0004Aw-3w for submit@debbugs.gnu.org; Mon, 26 Feb 2024 13:04:05 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:34523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1refKc-0004AG-Sq for 69387@debbugs.gnu.org; Mon, 26 Feb 2024 13:04:04 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C5B8B44221B; Mon, 26 Feb 2024 12:44:44 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1708969483; bh=W6bHL1pTsPdGUumOfQebUlqhNKtrxA/RppBSHKrdX84=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=M+InAiO+cqxP7aocwoQ82x03TSVm74m7kuic4EtRLQExoI1sRw7BoMTOQYC3gF48k XkEwc5ANwNMNV/UZkjPEb7QoKJRUBg6CdESENs8M9Ack6QElHpL9CyRuLkjbslngc1 ClzajOuGMnJNRbJ6ypOZ97eowR7Vj9utOYMafNyK5vWlqg6axLiCD0uNeWjZGz7MQu o39BE8vcaG4duavFKc002Fo+DW4+qhrsXJ/NwVTMO43n8iXDG/sK839BeA6ORrpbGb U8AbtX18aRfml0djKbnV9hhJj+DomftHKAdWEaYah90nmjJ1yTtOVZ+HpUSpPLid+u JCWNAaNcck1gw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 834F0442217; Mon, 26 Feb 2024 12:44:43 -0500 (EST) Original-Received: from pastel (unknown [45.72.205.238]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5771D120647; Mon, 26 Feb 2024 12:44:43 -0500 (EST) In-Reply-To: <2D08AD76-59F7-41BE-9363-96677967034A@gmail.com> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Mon, 26 Feb 2024 18:15:36 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:280697 Archived-At: >> (defun semantic-mrub-read-history nil >> "History of `semantic-mrub-completing-read'.") > > ... which is then not called but used as a variable by the code. Looks like a defvar-vs-defun typo. > Or this one: > >> ;; Don't alias this to `ignore', as that will cause the resulting >> ;; function to be interactive. >> (defun use-package-normalize/:disabled (_name _keyword _arg) >> "Do nothing, return nil.") > Return nil my foot. :-) > The docstring-result syndrome is particularly common in > `cl-defgeneric` because it's not seen as code that will ever be used, > so we should probably not warn in that case. I don't understand: (cl-defgeneric FUN (ARGS) "DOCSTRING") should not generate a function that returns "DOCSTRING" (it should just declare FOO to be a generic function with no methods). > We could expand > > (defun (ARGS) "string") -> (defun (ARGS) "string" "string") > > to preserve semantics (and the same for defmacro, cl-defun, etc). I still haven't seen any code that wants this behavior, so that's a definite no for me. Stefan