emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Trevor Murphy <trevormurphy@google.com>
To: emacs-orgmode@gnu.org
Cc: Trevor Murphy <trevormurphy@google.com>
Subject: [PATCH] org-eldoc: Fix compatibility with eldoc 1.11 and Emacs 27
Date: Tue, 13 Apr 2021 12:40:14 -0700	[thread overview]
Message-ID: <20210413194014.2150076-1-trevormurphy@google.com> (raw)

* contrib/lisp/org-eldoc.el (org-eldoc-documentation-function): Check
  before invoking elisp eldoc functions from Emacs 28.

The previous check assumed that the presence of eldoc 1.11 bindings
implied elisp-mode bindings that come with Emacs>=28, but eldoc 1.11
is available on GNU Elpa so the assumption doesn't always hold.

TINYCHANGE
---
 contrib/lisp/org-eldoc.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/contrib/lisp/org-eldoc.el b/contrib/lisp/org-eldoc.el
index 7a6885160..550f857be 100644
--- a/contrib/lisp/org-eldoc.el
+++ b/contrib/lisp/org-eldoc.el
@@ -144,7 +144,9 @@
      (cond ((or
              (string= lang "emacs-lisp")
              (string= lang "elisp"))
-	    (cond ((boundp 'eldoc-documentation-functions) ; Emacs>=28
+	    (cond ((and (boundp 'eldoc-documentation-functions) ; Emacs>=28
+			(fboundp 'elisp-eldoc-var-docstring)
+			(fboundp 'elisp-eldoc-funcall))
 		   (let ((eldoc-documentation-functions
 			  '(elisp-eldoc-var-docstring elisp-eldoc-funcall)))
 		     (eldoc-print-current-symbol-info)))
-- 
2.31.1.295.g9ea45b61b8-goog



             reply	other threads:[~2021-04-13 20:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 19:40 Trevor Murphy [this message]
2021-04-17 19:16 ` [PATCH] org-eldoc: Fix compatibility with eldoc 1.11 and Emacs 27 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=20210413194014.2150076-1-trevormurphy@google.com \
    --to=trevormurphy@google.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).