From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Problem with eldoc and Python Date: Wed, 06 Jul 2016 23:27:15 +0200 Message-ID: <87shvmfoek.fsf@saiph.selenimh> References: <8760sih53f.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKuLw-0002lV-64 for emacs-orgmode@gnu.org; Wed, 06 Jul 2016 17:27:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bKuLq-0003Pb-3Q for emacs-orgmode@gnu.org; Wed, 06 Jul 2016 17:27:27 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:35540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bKuLp-0003Op-Si for emacs-orgmode@gnu.org; Wed, 06 Jul 2016 17:27:22 -0400 In-Reply-To: (Fabrice Popineau's message of "Wed, 6 Jul 2016 23:04:11 +0200") 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.org@gnu.org Sender: "Emacs-orgmode" To: Fabrice Popineau Cc: "emacs-orgmode@gnu.org" Fabrice Popineau writes: > The problem is that the byte code comes from Python mode. > I solved the problem with this: > > $ diff -uw contrib/lisp/org-eldoc.el contrib/lisp/org-eldoc.el > --- contrib/lisp/org-eldoc.el 2016-02-29 11:13:22.330099500 +0100 > +++ contrib/lisp/org-eldoc.el 2016-07-04 07:11:10.466144400 +0200 > @@ -155,7 +155,8 @@ > (string= lang "golang")) (when (require 'go-eldoc nil t) > > (go-eldoc--documentation-function))) > (t (let ((doc-fun > (org-eldoc-get-mode-local-documentation-function lang))) > - (when (fboundp doc-fun) (funcall doc-fun)))))))) > + (when (or (and (symbolp doc-fun) (fboundp doc-fun)) > + (functionp doc-fun)) (funcall doc-fun)))))))) Wouldn't (when (functionp doc-fun) (funcall doc-fun)) be enough? Also, would you provide a patch for this? Thank you. Regards,