From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QEo2HDgiEl9JXgAA0tVLHw (envelope-from ) for ; Fri, 17 Jul 2020 22:12:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 8AAQGDgiEl8NJwAAB5/wlQ (envelope-from ) for ; Fri, 17 Jul 2020 22:12:08 +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 CDCD09403A0 for ; Fri, 17 Jul 2020 22:12:07 +0000 (UTC) Received: from localhost ([::1]:33796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jwYaM-0006YX-Eu for larch@yhetil.org; Fri, 17 Jul 2020 18:12:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwYZZ-0006YA-7u for emacs-orgmode@gnu.org; Fri, 17 Jul 2020 18:11:17 -0400 Received: from pb-smtp21.pobox.com ([173.228.157.53]:58649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jwYZW-0001MD-GK for emacs-orgmode@gnu.org; Fri, 17 Jul 2020 18:11:16 -0400 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id F2FC5D12E4; Fri, 17 Jul 2020 18:11:11 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=1kB8MlrbvX8Ilmh3x54lcKBgqxE=; b=GaY0ED ZR3cyUPB4vvhYMiqhpj2UM5+4GYMEPZY9J8R0RUpHvsbrYKd83JMlgVzABy3LKx1 kNyNO5KfGnzeGMb6qDAOFW7nPgqvvdcU5Kjnq/bxIdS3vFkMffiTnWRO/o/V2NPm VgxKaGS4cOZ5SCpSfiBDibUI7yoIDq/rSzIrA= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id EB80CD12E3; Fri, 17 Jul 2020 18:11:11 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=mesmtp; bh=Kwgjj8hNrCMk3lwkd603Ipzz7eOpRsc9mRYqxxpFHIg=; b=a57AEY5hoFqhSVsU7mfKN68lhUasJ2utCIZvyAb2o1QRRJ9u+bSnJhnyxkkfF+inb8XyFq8C8QbZmh2tp1+FkannCBfmpj808oLIkM7GdYuKZAYm6DV3KIEqB8OXu4vq7mP8+WeruxxBJ/zFzTu5XOJ/hUpWe79QLVuDZ5RmVXo= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 37222D12E2; Fri, 17 Jul 2020 18:11:09 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer To: "Basil L. Contovounesios" Subject: Re: [PATCH] org-eldoc: Fix compatibility with Emacs 28 In-Reply-To: <87h7u6v49q.fsf@tcd.ie> References: <874kq6g0le.fsf@kyleam.com> <87h7u6v49q.fsf@tcd.ie> Date: Fri, 17 Jul 2020 18:11:07 -0400 Message-ID: <87y2nheqro.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 6AD99CA4-C87A-11EA-B410-843F439F7C89-24757444!pb-smtp21.pobox.com Received-SPF: pass client-ip=173.228.157.53; envelope-from=kyle@kyleam.com; helo=pb-smtp21.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/17 18:11:12 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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=pobox.com header.s=sasl header.b=GaY0ED Z; dkim=pass header.d=kyleam.com header.s=mesmtp header.b=a57AEY5h; 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: pd+cXWszhPh4 Basil L. Contovounesios writes: >> @@ -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. I agree with your preference, though it didn't cross my mind when I was lazily copying over from python.el. Will update. Thanks.