From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.bugs Subject: bug#19338: [PATCH 3/3] eldoc: convert `eldoc-documentation-function' into a defcustom Date: Wed, 10 Dec 2014 18:49:45 +0100 Message-ID: <1418233785-18020-3-git-send-email-mpn@google.com> References: <1418233785-18020-1-git-send-email-mpn@google.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1418234073 6209 80.91.229.3 (10 Dec 2014 17:54:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Dec 2014 17:54:33 +0000 (UTC) To: 19338@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 10 18:54:26 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XylSx-00011h-9w for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Dec 2014 18:54:23 +0100 Original-Received: from localhost ([::1]:47122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XylSw-0003UJ-Va for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Dec 2014 12:54:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XylSj-0003Hq-H6 for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2014 12:54:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XylSd-0005Sd-IW for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2014 12:54:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XylSd-0005SZ-FA for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2014 12:54:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XylSd-0003Bp-B0 for bug-gnu-emacs@gnu.org; Wed, 10 Dec 2014 12:54:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michal Nazarewicz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Dec 2014 17:54:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19338 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19338-submit@debbugs.gnu.org id=B19338.141823401912209 (code B ref 19338); Wed, 10 Dec 2014 17:54:03 +0000 Original-Received: (at 19338) by debbugs.gnu.org; 10 Dec 2014 17:53:39 +0000 Original-Received: from localhost ([127.0.0.1]:41936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XylSE-0003Al-If for submit@debbugs.gnu.org; Wed, 10 Dec 2014 12:53:38 -0500 Original-Received: from mail-wi0-f178.google.com ([209.85.212.178]:65351) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XylOe-00033i-VM for 19338@debbugs.gnu.org; Wed, 10 Dec 2014 12:49:57 -0500 Original-Received: by mail-wi0-f178.google.com with SMTP id em10so5992597wid.17 for <19338@debbugs.gnu.org>; Wed, 10 Dec 2014 09:49:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=t2tyPFemangkMUkCA05sNk1vKhpqErXyUBJdMqGc6mM=; b=Drc8eiwIStVmYZE0tUOtboaTGDmJnW5s0sKaoBRRD/aUIrMuBXvZgo8Ou1IWJraV3u j/LicjuOfb/B3NZ9lqBmcu0VsdOsrsYI93YOBIN3tz0m2XIlZqe7rF107aV3zQJIaTdx RjXXCu/V6Yz1K4+4fL6KKZ4WUmgwxRZT/7zE9L81bVGUEprsdBqBKuOtM0f/AL0VD0Tq IeHVcDmOf9/5ZG8/Ugj4dA7noxE1ZGlUay32zncoDXDSd6QQPJhcpN+Ia+9H4UhDxC4J QIjOC7PpSocgJau/BegUFGJHOfUR75aJv1Y2b6neLHPsXxczb2WzlF98o0nOU3CqLHsd sl9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=t2tyPFemangkMUkCA05sNk1vKhpqErXyUBJdMqGc6mM=; b=NqReJoDjMpTz3n835n4ni5iz0nHvhiq41hao1S6CykieJaBIvPKNW2ykLJKpEMO7vg 760tZI4ORVXYZnJgN2YHcONPYWO4GdpTvV1h+ETQatFqMfD+R6kkWvk8Qr5ieW8BCQHc FBfkYcRG8xAO1AX212KsRkYU1xWRjlSFrC4bA6Z7tdHlddmumPlzhrMYVdOhpwyuS0QD EOv74G6WcnmJCM0eJ5HNU9rxtnOitTlmaE/fpWvqVH7mSmbcGJF8f8sCAfP78pyl/VSp Q4S0XoEOHXIDIgNxttqwAuQG6OO+bepOnp8xIhC0937vVLwOdgf78UU6CRHZlwV/MbGo 9Vlg== X-Gm-Message-State: ALoCoQlj2asQTniEz2Lu+wbpqtNA1RFpGaqidNQhnH9xhuUebEfDkHxslG8Dsr6/7tPufadzZAA+ X-Received: by 10.194.52.37 with SMTP id q5mr8589254wjo.39.1418233791300; Wed, 10 Dec 2014 09:49:51 -0800 (PST) Original-Received: from mpn-glaptop.corp.google.com ([2620:0:105f:310:381f:eb80:e0ce:71dc]) by mx.google.com with ESMTPSA id ly9sm6744297wjb.24.2014.12.10.09.49.50 for <19338@debbugs.gnu.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Dec 2014 09:49:50 -0800 (PST) X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c In-Reply-To: <1418233785-18020-1-git-send-email-mpn@google.com> X-Mailman-Approved-At: Wed, 10 Dec 2014 12:53:34 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97156 Archived-At: From: Michal Nazarewicz * lisp/emacs-lisp/eldoc.el (eldoc-documentation-function): Change from defvar to defcustom with `describe-char-eldoc' function as one of the suggested values. --- lisp/emacs-lisp/eldoc.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 06ee164..aeddf90 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -321,8 +321,8 @@ Otherwise work like `message'." ;;;###autoload -(defvar eldoc-documentation-function nil - "Function to call to return doc string. +(defcustom eldoc-documentation-function nil + "Function to call to return doc string for ElDoc mode. The function of no args should return a one-line string for displaying doc about a function etc. appropriate to the context around point. It should return nil if there's no doc appropriate for the context. @@ -334,7 +334,13 @@ the variables `eldoc-argument-case' and `eldoc-echo-area-use-multiline-p', and the face `eldoc-highlight-function-argument', if they are to have any effect. -This variable is expected to be set buffer-locally by modes that support ElDoc.") +Major modes can set this variable buffer-locally to overwrite the global +default, but if local documentation function returns no doc string, the global +one will be tried as well." + :type '(radio (function-item describe-char-eldoc) + function + (const :tag "No documentation function" nil)) + :group 'eldoc) (defun eldoc-print-current-symbol-info () ;; This is run from post-command-hook or some idle timer thing, -- 2.2.0.rc0.207.ga3a616c