From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= 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 19:04:25 +0100 Message-ID: <4FCE8B7D-17D7-44E8-A764-A6047209CBE1@gmail.com> References: <2D08AD76-59F7-41BE-9363-96677967034A@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17151"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philip Kaludercic , Eli Zaretskii , 69387@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 26 19:07:27 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 1refNv-0004I0-LD for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Feb 2024 19:07:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1refNS-0007Mw-SZ; Mon, 26 Feb 2024 13:07:04 -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 1refN6-00076n-Lt for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 13:06: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 1refN6-0003k2-DB for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 13:06:36 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1refNV-0004IP-RU for bug-gnu-emacs@gnu.org; Mon, 26 Feb 2024 13:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Feb 2024 18:07:01 +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.170897078816430 (code B ref 69387); Mon, 26 Feb 2024 18:07:01 +0000 Original-Received: (at 69387) by debbugs.gnu.org; 26 Feb 2024 18:06:28 +0000 Original-Received: from localhost ([127.0.0.1]:53539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1refMk-0004Gd-Kj for submit@debbugs.gnu.org; Mon, 26 Feb 2024 13:06:28 -0500 Original-Received: from mail-lf1-f47.google.com ([209.85.167.47]:60816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1refMU-0004FV-Bx for 69387@debbugs.gnu.org; Mon, 26 Feb 2024 13:06:13 -0500 Original-Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-512b29f82d1so4644297e87.1 for <69387@debbugs.gnu.org>; Mon, 26 Feb 2024 10:05:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708970666; x=1709575466; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=gYjciY+H21HxCE8DawcGE1xW4HxD7Y/IAbivgH/onyc=; b=bGpMm/FLt0DDGUYCrBoZpzj6fH6yjkQCCv3vSCAXmuKiLNIH6ajOZeeBUKY5qpqC5Q mdur/krrSRyfUG/sqs3mdJfSl4/d3g1pW9raHlmSesbl4Tho8L9fC/4iaUyW7XG+DNDM 2N6WyG4yHmX7sTEd+AOWwXB+4yOsIqfuLVhCoLJjcGXK10MpcDsS/V0l0n8UyJ+w29zD ofldqa0MuMeIMeC87YwCHJ2R8hAvenW0H52EPOlzuEWFaAd5zadTwyEJufOLYSMrXix/ aTjLLQ6RvCC8Vph1vEYmKRA64hl12u4soTAn+gWA3a5kz3OEa1E8qmJsWESAIYn4Alzx Xi+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708970666; x=1709575466; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gYjciY+H21HxCE8DawcGE1xW4HxD7Y/IAbivgH/onyc=; b=ra3IB9i2LF3u9JiEWCZDeMJbvZa0yaDSIY6oHIBn5WpBy/DNSAEGa6NQ0pAQ7SIWCs DO11OfZ94TeD+m7wUOY2KA8IaGHqOhOqtrcf5RHyyGZ1efKMFiQrBt56pZJxvGkyglHr DixzU45wECofZJh22zfMqX9ICVAIBD1r3aSOim8DCdfOfMKaVOTs4OmqLC2uVjonE6iK 93Y2P9ugZXTib9VRVpJt+KFOVlrlYF548+QsPP4o5UOEjxTFOJ9yeaRsikgqNyLDacoQ MGeOkl/JvalOrZq6CL55CU3KpKTilsxT0OSrO+AWxphs+75zbwcB2WbcEU5QOE7ItqrI 2CXQ== X-Forwarded-Encrypted: i=1; AJvYcCVy530ETPTqOCmbCVoH9Gkp1k0fFlLFkUaOvxz3JJ4RpjsWPtRjsgv1p5xK9fYsMzc6NPHaS8Hna2AwMMieqb8BB5A0g/o= X-Gm-Message-State: AOJu0Yy0N8X9njPyfhDDren35JEo1bpNykL5gOf21o8Yv3OfHxERPMTG dKZ7i++S/ZDia1rBPS+9YPxmckzkgRJ59++KfganVSAgMzDEv7ny X-Google-Smtp-Source: AGHT+IFYpuDQE3/VEa1RG/LAtEUXF747Fgv5EcXgImyOkBD2mVxsP4TWFKpKIEU17e7pDvCLZ0+QzA== X-Received: by 2002:ac2:4434:0:b0:513:31e:ac91 with SMTP id w20-20020ac24434000000b00513031eac91mr183813lfl.21.1708970666345; Mon, 26 Feb 2024 10:04:26 -0800 (PST) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id g18-20020a19ee12000000b00512f5063632sm821320lfb.250.2024.02.26.10.04.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Feb 2024 10:04:26 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) 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:280698 Archived-At: 26 feb. 2024 kl. 18.44 skrev Stefan Monnier : > 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). Sorry, you are quite right; there is no function generated there. >> (defun (ARGS) "string") -> (defun (ARGS) "string" "string") >>=20 >> to preserve semantics (and the same for defmacro, cl-defun, etc). >=20 > I still haven't seen any code that wants this behavior, so that's > a definite no for me. I presume you mean that `defun`s with a single string always want it to = be their doc string? That indeed seems to be the dominant use. These are = the few counter-examples that I could find: > (cl-defmethod gnus-search-transform ((_ gnus-search-imap) > (_query null)) > "ALL") > (cl-defmethod gnus-search-transform ((_engine gnus-search-notmuch) > (_query null)) > "*") > (cl-defmethod xref-location-group ((_ xref-bogus-location)) "(No = location)") > (defun xselect-convert-xm-special (_selection _type _value) > "") There is also the concern that an otherwise empty function with only a = doc string could be important for returning a non-nil value. It would = take quite some digging to find out whether that occurs so I didn't do = it now.