From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#47388: 27.1; eldoc-documentation-function is ignore in updated eldoc Date: Sun, 28 Mar 2021 12:05:46 -0400 Message-ID: <87v99buuud.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="40515"; 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" , Stefan Monnier , 47388-done@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 28 18:06:30 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 1lQXvq-000ASn-Rf for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 18:06:30 +0200 Original-Received: from localhost ([::1]:59650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQXvp-0004OW-TA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 28 Mar 2021 12:06:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQXvO-0004Ml-UC for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 12:06:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35295) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQXvO-0006oC-9o for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 12:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQXvO-0000Nv-4K for bug-gnu-emacs@gnu.org; Sun, 28 Mar 2021 12:06:02 -0400 Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Mar 2021 16:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 47388 X-GNU-PR-Package: emacs Mail-Followup-To: 47388@debbugs.gnu.org, alex.branham@gmail.com, alex.branham@gmail.com Original-Received: via spool by 47388-done@debbugs.gnu.org id=D47388.16169475551460 (code D ref 47388); Sun, 28 Mar 2021 16:06:01 +0000 Original-Received: (at 47388-done) by debbugs.gnu.org; 28 Mar 2021 16:05:55 +0000 Original-Received: from localhost ([127.0.0.1]:46839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQXvH-0000NU-8j for submit@debbugs.gnu.org; Sun, 28 Mar 2021 12:05:55 -0400 Original-Received: from mail-qk1-f170.google.com ([209.85.222.170]:41966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQXvF-0000NH-E5 for 47388-done@debbugs.gnu.org; Sun, 28 Mar 2021 12:05:53 -0400 Original-Received: by mail-qk1-f170.google.com with SMTP id v70so10204237qkb.8 for <47388-done@debbugs.gnu.org>; Sun, 28 Mar 2021 09:05:53 -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=Db1NS6iQ4D18/eiy8ILvviqjScRpZOyIzuSHkq3hkBU=; b=KUmLjwSjbhppU6OAM9+aur4RoeBspxyUt2BA4OvJ6jiip5ugg0iKarIOBbOcd/3+44 /wtx2sSJ2+SHNSjiyZk7HOyO7JEyFREYUYSkHYvYj0/OoiIxpawKZpe4cbfQjCrzrugo a+8+rc3BP2R73Vkv3GzJ6vyG5MpjIJ8jz0bJIcGyE5JvDOaKHgOJbl18lVTrtEwpzZyH +mQAsd1h+5NdYwRKdaPqFWccQkWIRAGg33qwxbzbDvpuzr5ENCHvaU0uKL8iop2aEAB8 AeWXDkXK0Ex/toErcet99vL+BsbnTxCO0E/teDdQLnF2EvtY6rR0YV9XLAP8WodkDTh9 QzlA== 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=Db1NS6iQ4D18/eiy8ILvviqjScRpZOyIzuSHkq3hkBU=; b=cLoIutTY+Y/f1X53HBfLDnkDmPZpTiVjOLU9L93FhRyg9LWl1yUWAVPMfOwc/q/FF7 R6AUviiRwkTpjn/IqtnEkk2zcJnX92YG9dlbSs0BmqbxOGVahM9hIr+KRsC6glTvbAzp v2PtTiDkcr8XdXh8eGC+ZAjhxzZ7ws8XMbWy/7TM79C7yIUpjNWcIBoZDu5uKI4BE2P7 CdLPR72Glr7dmCg2TSO5liBhxCnXOnnNhiat6DmDjlzvozTxsqWdoigAAW4BRLnPwFmN GagiaszIA+bRM6D5wZhhkSM41AqulydAa7/kzfidPOMZsm/5O/eftR3Xg7V3gDkniHMh 4JbA== X-Gm-Message-State: AOAM532bamAlKlS5D44B16L6JYSt3rgChBE4Bp1us5KNTN07KfGTbeXo /1YrPHal1VMrxW//wO9H51y6BW7tmqs= X-Google-Smtp-Source: ABdhPJyP/d+ELE5uuDG3U/uqH6mpE3iXWcVQZchcnjj6qNPFs7FIVJGusnQfqI96mssU4WL2Ue/gQA== X-Received: by 2002:a05:620a:31c:: with SMTP id s28mr21424541qkm.342.1616947547667; Sun, 28 Mar 2021 09:05:47 -0700 (PDT) Original-Received: from earth (c-73-163-194-78.hsd1.dc.comcast.net. [73.163.194.78]) by smtp.gmail.com with ESMTPSA id b15sm9441704qtr.58.2021.03.28.09.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Mar 2021 09:05:47 -0700 (PDT) In-Reply-To: <874kgvfi2p.fsf@gmail.com> ("=?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?="'s message of "Sun, 28 Mar 2021 15:50:38 +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" Xref: news.gmane.io gmane.emacs.bugs:203186 Archived-At: On Sun 28 Mar 2021 at 15:50, Jo=C3=A3o T=C3=A1vora w= rote: > Alex Branham writes: > >> On Sat 27 Mar 2021 at 12:53, Jo=C3=A3o T=C3=A1vora wrote: >> >> Thanks! It sounds like the below is what you're suggesting modes do in >> order to support all the possible eldoc+Emacs versions, let me know if >> I've misunderstood. >> >> (if (not (boundp 'eldoc-documentation-functions)) >> ;; old eldoc >> (add-function :before-until (local 'eldoc-documentation-function) >> #'ess-r-eldoc-function) >> ;; new eldoc >> (add-hook 'eldoc-documentation-functions #'ess-r-eldoc-function nil t) >> ;; new eldoc + Emacs 27.1 >> (when (and (fboundp 'eldoc-documentation-default)=20 >> (function-equal #'ignore eldoc-documentation-function)) >> (setq-local eldoc-documentation-function >> #'eldoc-documentation-default))) > > You don't need to be as complex as this: > > (if (not (boundp 'eldoc-documentation-strategy)) > (add-function :before-until (local 'eldoc-documentation-function) > #'ess-r-eldoc-function) > (add-hook 'eldoc-documentation-functions #'ess-r-eldoc-function nil t) > (when (function-equal #'ignore eldoc-documentation-function) > (setq-local eldoc-documentation-function #'eldoc-documentation-de= fault|compose|whatever)))) The fboundp check will avoid a byte compiler warning on Emacs<28. >> If that's right, it seems like a step backwards, ease-of-setup-wise at >> least, from the simple >> >> (add-function :before-until (local 'eldoc-documentation-function) >> #'ess-r-eldoc-function) > > You can still just that and call it a day. Just that, because the new > eldoc in the yet-unreleased Emacs 28 is backward compatible. I've tried > to explain this three times already in this exchange. Thanks. I'd like to support the new way (so users can customize eldoc-documentation-function) and the old way, which I thought I had said previously. It seems like the above is the officially blessed way to do both so I suppose that's what we'll go with. Thanks again, closing this bug report.