[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19338: [PATCH 3/3] eldoc: convert `eldoc-documentation-function' int
From: |
Michal Nazarewicz |
Subject: |
bug#19338: [PATCH 3/3] eldoc: convert `eldoc-documentation-function' into a defcustom |
Date: |
Wed, 10 Dec 2014 18:49:45 +0100 |
From: Michal Nazarewicz <mina86@mina86.com>
* 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
- bug#19338: [PATCH 0/3] Implement an ElDoc function which describes char at point, Michal Nazarewicz, 2014/12/10
- bug#19338: [PATCH 1/3] eldoc: use default eldoc function if local one gives no results, Michal Nazarewicz, 2014/12/10
- bug#19338: [PATCH 2/3] descr-text: add `describe-char-eldoc' describing character at point, Michal Nazarewicz, 2014/12/10
- bug#19338: [PATCH 3/3] eldoc: convert `eldoc-documentation-function' into a defcustom,
Michal Nazarewicz <=
- bug#19338: [PATCH 1/3] eldoc: use default eldoc function if local one gives no results, Stefan Monnier, 2014/12/10
- bug#19338: [PATCH 1/3] eldoc: use default eldoc function if local one gives no results, Michal Nazarewicz, 2014/12/10
- bug#19338: [PATCH 1/3] eldoc: use default eldoc function if local one gives no results, Stefan Monnier, 2014/12/10
- bug#19338: [PATCHv2 1/2] descr-text: add `describe-char-eldoc' describing character at point, Michal Nazarewicz, 2014/12/11
- bug#19338: [PATCHv2 2/2] eldoc: convert `eldoc-documentation-function' into a defcustom, Michal Nazarewicz, 2014/12/11
- bug#19338: [PATCHv2 1/2] descr-text: add `describe-char-eldoc' describing character at point, Leo Liu, 2014/12/11
- bug#19338: [PATCHv2 1/2] descr-text: add `describe-char-eldoc' describing character at point, Michal Nazarewicz, 2014/12/11
- bug#19338: [PATCHv2 1/2] descr-text: add `describe-char-eldoc' describing character at point, Eli Zaretskii, 2014/12/14
- bug#19338: [PATCHv3 1/2] descr-text: add `describe-char-eldoc' describing character at point, Michal Nazarewicz, 2014/12/14