From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20N=C4=9Bmec?= Subject: [PATCH] org-eldoc: Use eldoc-documentation-functions when available Date: Wed, 4 Mar 2020 08:24:13 +0100 Message-ID: <20200304072413.550260-1-stepnem@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36448) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j9ONw-0004Ha-Kx for emacs-orgmode@gnu.org; Wed, 04 Mar 2020 02:24:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j9ONv-0004re-Mv for emacs-orgmode@gnu.org; Wed, 04 Mar 2020 02:24:04 -0500 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]:33380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j9ONu-0004lC-Rd for emacs-orgmode@gnu.org; Wed, 04 Mar 2020 02:24:03 -0500 Received: by mail-lf1-x133.google.com with SMTP id c20so636691lfb.0 for ; Tue, 03 Mar 2020 23:24:02 -0800 (PST) Received: from localhost ([185.112.167.59]) by smtp.gmail.com with ESMTPSA id 206sm9046198ljj.73.2020.03.03.23.23.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Mar 2020 23:23:59 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org This reflects recent changes in GNU Emacs master branch: 2020-02-25T17:53:04-05:00!mvoteiza@udel.edu c0fcbd2c11 (Expose ElDoc functions in a hook (Bug#28257)) * lisp/org-eldoc.el (org-eldoc-load): Use 'eldoc-documentation-functions' when available. --- contrib/lisp/org-eldoc.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el index b4fc0c866..72b10a1fb 100644 --- a/contrib/lisp/org-eldoc.el +++ b/contrib/lisp/org-eldoc.el @@ -161,7 +161,11 @@ (defun org-eldoc-documentation-function () (defun org-eldoc-load () "Set up org-eldoc documentation function." (interactive) - (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) + (setq-local eldoc-documentation-function + #'org-eldoc-documentation-function))) ;;;###autoload (add-hook 'org-mode-hook #'org-eldoc-load) -- 2.25.1