emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Štěpán Němec" <stepnem@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] org-eldoc: Use eldoc-documentation-functions when available
Date: Wed,  4 Mar 2020 08:24:13 +0100	[thread overview]
Message-ID: <20200304072413.550260-1-stepnem@gmail.com> (raw)

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

             reply	other threads:[~2020-03-04  7:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04  7:24 Štěpán Němec [this message]
2020-03-05  3:49 ` [PATCH] org-eldoc: Use eldoc-documentation-functions when available Kyle Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200304072413.550260-1-stepnem@gmail.com \
    --to=stepnem@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).