From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: eldoc error in Emacs 27 Date: Mon, 27 Jul 2020 21:29:55 +0100 Message-ID: <87ft9csnuk.fsf@gmail.com> References: <33D61A89-7C41-4160-8C79-C756635B205C@gmail.com> <87k0yosp1x.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="15185"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 27 22:30:41 2020 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 1k09lg-0003rB-P0 for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Jul 2020 22:30:40 +0200 Original-Received: from localhost ([::1]:57946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k09lf-0007Qp-HC for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Jul 2020 16:30:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k09l2-0006zd-71 for emacs-devel@gnu.org; Mon, 27 Jul 2020 16:30:00 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:44687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k09l0-0001YZ-HJ for emacs-devel@gnu.org; Mon, 27 Jul 2020 16:29:59 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id b6so16138146wrs.11 for ; Mon, 27 Jul 2020 13:29:58 -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=ihrNMLxSOU/C459j9euQL2ujWfQar5bBntYWizopbs0=; b=BYJz4IEH1u0ZPSrsvVJMvUaJjL1K6V/XopSDoC4Mj2pEE+2Dv/SUWp1o4sc83W1iy/ RZ79b9fiQGqDxxdXT2+rlzjppLp5HaIs4bfZYnlfrza6s92PDYm9GlnoMVFlGgKUR7nA 0RgTSn/t/7BLYmE/k3JoP4K5qM6LGk9D3mS4UPxfxsZALMDyt4pWZ7zpaEKwrFY/FipY Di2uqK8fEYiAloQwl0feRnEWLmWB7gxOmxthFGK0qCkHn4lYPqOMRjCR/ONX+dYWubTM 7tKMIKsGMaIAOQp3Ro1lZim7CF/aER/VFpYlfBJ4+Y+hN+OEJUQx4sb89YhsROEpo7SA AxJA== 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=ihrNMLxSOU/C459j9euQL2ujWfQar5bBntYWizopbs0=; b=uIE/MGN7mnNmGvjJP6oH4rpx1b81sZ6kf3+5G2Iq5RoxjLMiCd4U1rT/HGsybFI3u9 0vNLO78BOFq6V2oX/XUl6izOSRo+fVTfKIMxPmpnaM0FLMCY46L2YLKZ+vZ6vuEGle6a NPL0qbJZrIvEikTkIlDiPunKl0oI++KK1qSqihB80IsH/eLRRFd5JpDRo5pB0Y5BeTxJ aijc/Vx5uY06Fn6JFELJFmT2I+MZiNnm7zd1haUzFZxNtnBMmAFDnOMlSWqyRpd2qdJb cP6PKodKoUlxhbmwSCCxPF30QprsUMIh8FLX7F5aLWtEVq8jEVW0RUU8o1upUKhE3yzf S5TA== X-Gm-Message-State: AOAM530NqiZjOwR0uD/yoUdhW8gaD1eWDM5fgTmcswD4E026+64lNCLW Hl2H/T/z2HfKigkE0dDA9YJ8swyqgR0= X-Google-Smtp-Source: ABdhPJwWVQic3aGTDLFuoDAtBYrlacP699r8FllrR6RX+0sjdJDqbXpSEpID2xRabeqd0WFpaKXrmg== X-Received: by 2002:a5d:4710:: with SMTP id y16mr22533447wrq.189.1595881796541; Mon, 27 Jul 2020 13:29:56 -0700 (PDT) Original-Received: from krug (89-180-159-6.net.novis.pt. [89.180.159.6]) by smtp.gmail.com with ESMTPSA id w16sm15557294wrg.95.2020.07.27.13.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 13:29:56 -0700 (PDT) In-Reply-To: <87k0yosp1x.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Mon, 27 Jul 2020 21:03:54 +0100") Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x434.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:253293 Archived-At: Jo=C3=A3o T=C3=A1vora writes: > Yuan Fu writes: > >> 1.5. I looked around in that file and didn=E2=80=99t see elisp-eldoc-fun= call >> defined anywhere (neither can I in the old eldoc.el that comes with >> Emacs 27). > > Thanks for reporting this. I introduced this bug. The function you get > the error for is not defined in eldoc.el ? 1.5.0 but referenced there: Actually, a similar bug was lurking before I touched the function, I just exposed it by making ElDoc available on GNU Elpa. I think the patch below is the easiest way to fix it, along with bumping the ElDoc version to 1.8. Works in my tests of Emacs 27 and Emacs 26. Can you try it out? diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index b30836cc0b..aa1acabaa3 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -5,7 +5,7 @@ ;; Author: Noah Friedman ;; Keywords: extensions ;; Created: 1995-10-06 -;; Version: 1.7.0 +;; Version: 1.8.0 ;; Package-Requires: ((emacs "26.3")) =20 ;; This is a GNU ELPA :core package. Avoid functionality that is not @@ -229,11 +229,14 @@ global-eldoc-mode (defun eldoc--eval-expression-setup () ;; Setup `eldoc', similar to `emacs-lisp-mode'. FIXME: Call ;; `emacs-lisp-mode' itself? - (add-hook 'eldoc-documentation-functions - #'elisp-eldoc-var-docstring nil t) - (add-hook 'eldoc-documentation-functions - #'elisp-eldoc-funcall nil t) - (setq eldoc-documentation-strategy 'eldoc-documentation-default) + (if (<=3D emacs-major-version 27) + (add-function :before-until (local 'eldoc-documentation-function) + #'elisp-eldoc-documentation-function) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-var-docstring nil t) + (add-hook 'eldoc-documentation-functions + #'elisp-eldoc-funcall nil t) + (setq eldoc-documentation-strategy 'eldoc-documentation-default)) (eldoc-mode +1)) =20 ;;;###autoload