From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc Date: Sun, 28 Mar 2021 19:56:13 +0100 Message-ID: <87r1jzds4y.fsf@gmail.com> References: <871rc35nwr.fsf@gmail.com> <87o8f53h3q.fsf@tcd.ie> <87im5dg36l.fsf@gmail.com> <87czvlraus.fsf@gmail.com> <87a6qpg02v.fsf@gmail.com> <87y2e894x6.fsf@gmail.com> <87zgynbjy4.fsf@gmail.com> <874kgvfi2p.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19038"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "Basil L. Contovounesios" , Alex Branham , 47388@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 28 20:58:35 2021 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 1lQacN-0004r3-8o for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 20:58:35 +0200 Original-Received: from localhost ([::1]:56640 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQacM-0008Hk-7n for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 14:58:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQaat-0007S7-JA for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 14:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQaat-00065s-9p for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 14:57:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQaas-0006f2-HG for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 14:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Mar 2021 18:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47388 X-GNU-PR-Package: emacs Original-Received: via spool by 47388-submit@debbugs.gnu.org id=B47388.161695778325556 (code B ref 47388); Sun, 28 Mar 2021 18:57:02 +0000 Original-Received: (at 47388) by debbugs.gnu.org; 28 Mar 2021 18:56:23 +0000 Original-Received: from localhost ([127.0.0.1]:47049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQaaE-0006e7-Nf for submit@debbugs.gnu.org; Sun, 28 Mar 2021 14:56:22 -0400 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:43540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQaaD-0006dw-HH for 47388@debbugs.gnu.org; Sun, 28 Mar 2021 14:56:22 -0400 Original-Received: by mail-wr1-f42.google.com with SMTP id x7so10640718wrw.10 for <47388@debbugs.gnu.org>; Sun, 28 Mar 2021 11:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=OhXPRlyOpLkah8CiReMcGt8wkPhf5btGCmUuzAFpM9M=; b=t5WL5YC0Wr/7i5DqbN5W3FxB0cRmdNdf0tPtnIw/lOMfMd5vroHajd14sVylnu8Hha zpmYywmDbsCjO1WopGPKRuxfuAgerqe9j0oVdDtdQWYEGDEGHAcbo6qxZqGn5AFn+uLj UzTzaAHp0bsnFTUsz2CI2wUsqM6eOeXkF0Uees0OcKb5DN4+vNNwOtGeDnx5WXszFv+l ngIXgqw4hPoNLULrUUFE1FbCcvZm0cnUYa6+Y/iXBDwPlzSmDBdFQKM0eyA97byJIQ0o ABDa4AYZskygmGjTRGqx4PihqSTprwRxnSIkt3JwhlADG29tdoLbsEhy5oFsFQGVh1vu 2cOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=OhXPRlyOpLkah8CiReMcGt8wkPhf5btGCmUuzAFpM9M=; b=A0YDEwwSPRHIe9vBMO/O0vTCLY7WCJXPO/Ht3E2NUK4Fc9XUG+p0JkWNCLKmRHXKcS EE13BTQV7hS1hBS36uNilxlFH1Wfkb6PBV3tRs/vdFwO2bb/RJUIG4TfQD0ELqhO0obS rn0NrzYvmUzIZXKNA5m0ad7dj4nWFFATWUDstnKMHVXLHaAAzTiuFv2DbHOT1uBqFgQ2 fYrN9AKvpTOJbV2UrcbPnlq4XPwT/jHxDc0XoOEcj5XF9NrrUsOJigoAUcb0cSEn6CNI N5kVJb6zCr43FM3X13RQtXvHxIZenOQ6opu+Gx6TIbWRZsH1dTlCrUrhydQNubGife5Y 4rUw== X-Gm-Message-State: AOAM531LFFNhg1JX9dZHcSdAq7/1DGV8QwLAHSbq52rKwPjsmPAvu3qB XUQpA4FanYqg71FDwXkTQyIQmXdjQz8= X-Google-Smtp-Source: ABdhPJzVsnbyXNqyT+4y9N1XZxNcrfx4FIN4OzEYDBtD6Kb35ywxgsmcW1VcURMOOTZZej6DuqtAQg== X-Received: by 2002:adf:ba87:: with SMTP id p7mr25349579wrg.298.1616957775416; Sun, 28 Mar 2021 11:56:15 -0700 (PDT) Original-Received: from krug (a94-133-179-151.cpe.netcabo.pt. [94.133.179.151]) by smtp.gmail.com with ESMTPSA id x14sm25095537wrw.13.2021.03.28.11.56.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Mar 2021 11:56:14 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sun, 28 Mar 2021 12:37:47 -0400") 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" Xref: news.gmane.io gmane.emacs.bugs:203203 Archived-At: Stefan Monnier writes: >> (when (function-equal #'ignore eldoc-documentation-function) >> (setq-local eldoc-documentation-function #'eldoc-documentation-d= efault|compose|whatever)))) > > BTW, using code like the one above is tolerable, usually for historical > reasons, but new APIs should aim not to need such things: comparing > functions is fundamentally always a hack. So is run-time version checking, the risk is mostly the same. But sure, it's way uglier. It's what needs to be done, as long as the package developer want to support these features on a "as soon as possible" basis _without_ adding the Eldoc core package as dependency. But a simple version check on (< emacs-major-version 28) with two simple branches works fine as well. (if (< emacs-major-version 28) (the-before-until-thingy) (the-modern-thingy-but-no-comparing-functions)) Anyway, have you given thought to the possibility of having Eldoc.el clobber the default value of eldoc-documentation-function if it finds it unchanged? This would just fix the case of Emacs < 28 && new eldoc for developers who don't want to write the above snippet. Not sure if it's worth it, but Alex's original request goes in this direction. Note that that all this mess has to do with the silliness that is having eldoc.el be preloaded just becuase elisp-mode.el. How would we go about fixing that? Jo=C3=A3o