bug-gnu-emacs
[Top][All Lists]
Advanced

[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 <address@hidden>

* 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]