From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AJBeFsp5EV9FbAAA0tVLHw (envelope-from ) for ; Fri, 17 Jul 2020 10:13:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uBYkEsp5EV/NTgAAbx9fmQ (envelope-from ) for ; Fri, 17 Jul 2020 10:13:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B7BDD9402D1 for ; Fri, 17 Jul 2020 10:13:28 +0000 (UTC) Received: from localhost ([::1]:33242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwNMs-0005YY-8Q for larch@yhetil.org; Fri, 17 Jul 2020 06:13:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwNMQ-0005W0-47 for emacs-orgmode@gnu.org; Fri, 17 Jul 2020 06:12:58 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:38800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jwNMN-0004fA-Vh for emacs-orgmode@gnu.org; Fri, 17 Jul 2020 06:12:57 -0400 Received: by mail-wr1-x441.google.com with SMTP id z13so10395993wrw.5 for ; Fri, 17 Jul 2020 03:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Jm26d2XFiez/BeUhsQx9Q8itlBQr85a27whISnv/52o=; b=p/DooReKC0S8sLhretwKnKXoH2MnwiQMIeCnZrIiJoCp/+NuRDCAAkoT8PVLXoF8MQ d7zPAkoUyRcvNYnOtl+ImcuU4Jd4VnhSWvNBxxoCwAHds0AlbHZLr5SFRWdiA39u7lFr jLIEa1ooPmh+GdWARghKQnoojGXTG0XDooYsTEvY6fBK5EjK6Et7D8LxQjhy6mOjvhxv LuHr+1i3h6TA2eBhY2eEy8hWShBP0rely/0kLX2AdInUlf7VjvkutSq8FdrxjhfxBLw9 3kW9tWLG1SUZKKgC83WwsZjk0H8gISTfRSIXurItKDNJMFm7jTEtPCCxmmZhHy435OXx Jvgw== 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; bh=Jm26d2XFiez/BeUhsQx9Q8itlBQr85a27whISnv/52o=; b=CHyOWy4v+Ql7jWlxGfZxwgqjYvyecT/H74SaWLzNpNEvr8ikLXrtYPQRA2weavA6Y4 Xu4VgtSeISpj278rMfaNNy7wxY2KXReJD15nFk0D+x0KOPd4hVmaBlV+b/4v6vKKaXb8 /wSzmea7H35A4xH0R4F01Js2XNYwc194L+/ItdjEaq0viIU8b5pVUoEFi8/nsjFZR1xb Epu+vEoeG/Zp24t90JvptuD5+/6dcl1alpG4tJvR+K9Wugh3aZKuWXjhuqxaoS/5UYgl t/54xMSqqdTXNEBNP1EE6Ywn0phMvqLjCSqe+2dzm3Y6fku1GFvWiFAI6YHtsqhWl2KF Nyyg== X-Gm-Message-State: AOAM532qyEuD4ZozxFGYsxIEuxngjqppG/Zk9lbVPkiulOyFM2tQ4lR2 bYrFhy0M9Yc+9MlJswFBIYvDyQ== X-Google-Smtp-Source: ABdhPJwciKIV/P3biniZ93qpF2Oj3tWi/6VduN0eJ0yZXK+wuE2K9DR41FQ/4XWjEMBlmpyVYTOpDw== X-Received: by 2002:adf:e3c5:: with SMTP id k5mr9681998wrm.121.1594980771944; Fri, 17 Jul 2020 03:12:51 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id c3sm1047390wrx.5.2020.07.17.03.12.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2020 03:12:51 -0700 (PDT) From: "Basil L. Contovounesios" To: Kyle Meyer Subject: Re: [PATCH] org-eldoc: Fix compatibility with Emacs 28 References: <874kq6g0le.fsf@kyleam.com> Date: Fri, 17 Jul 2020 11:12:49 +0100 In-Reply-To: <874kq6g0le.fsf@kyleam.com> (Kyle Meyer's message of "Fri, 17 Jul 2020 01:41:17 -0400") Message-ID: <87h7u6v49q.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=2a00:1450:4864:20::441; envelope-from=contovob@tcd.ie; helo=mail-wr1-x441.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: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "James N. V. Cash" , emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=tcd-ie.20150623.gappssmtp.com header.s=20150623 header.b=p/DooReK; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.21 X-TUID: 8J0Zu50FMUHS Kyle Meyer writes: > All right, thanks. Here's that in patch form. I briefly tested with > Emacs 26, 27, and 28, and things seemed to work fine (though I'm not an > org-eldoc user). I'm not either, but it seems to get pulled in automatically when org-plus-contrib is installed - that's how I noticed the errors in Org buffers. [...] > @@ -161,11 +161,17 @@ (defun org-eldoc-documentation-function () > (defun org-eldoc-load () > "Set up org-eldoc documentation function." > (interactive) > - (if (boundp 'eldoc-documentation-functions) > - (add-hook 'eldoc-documentation-functions > - #'org-eldoc-documentation-function nil t) > - (setq-local eldoc-documentation-function > - #'org-eldoc-documentation-function))) > + ;; This approach is taken from python.el. > + (with-no-warnings > + (if (null eldoc-documentation-function) > + ;; Emacs<25 > + (setq-local eldoc-documentation-function > + #'org-eldoc-documentation-function) > + (if (boundp 'eldoc-documentation-functions) > + (add-hook 'eldoc-documentation-functions > + #'org-eldoc-documentation-function nil t) > + (add-function :before-until (local 'eldoc-documentation-function) > + #'org-eldoc-documentation-function))))) LGTM. My only aesthetic nit would be to replace the nested if with a flat cond, but that's entirely up to you. Thanks, -- Basil