summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaushal Modi <kaushal.modi@gmail.com>2022-04-23 22:46:40 -0400
committerIhor Radchenko <yantar92@gmail.com>2022-04-24 15:49:36 +0800
commitf237d6720ebdb5d5db634fb984ed875e02785a7c (patch)
treee173f5070cca22e07573072de5ccc0e4881191d8
parenta33dd6f11756e5755dfd1b3a2ded6098ae8bf872 (diff)
lisp/org-eldoc.el: Whitespace change
(org-eldoc-documentation-function): Re-indent, clean up tabs
-rw-r--r--lisp/org-eldoc.el72
1 files changed, 38 insertions, 34 deletions
diff --git a/lisp/org-eldoc.el b/lisp/org-eldoc.el
index eb949f9..4febac1 100644
--- a/lisp/org-eldoc.el
+++ b/lisp/org-eldoc.el
@@ -141,40 +141,44 @@
(org-eldoc-get-breadcrumb)
(org-eldoc-get-src-header)
(let ((lang (org-eldoc-get-src-lang)))
- (cond ((or
- (string= lang "emacs-lisp")
- (string= lang "elisp"))
- (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)))
- ((fboundp 'elisp-eldoc-documentation-function)
- (elisp-eldoc-documentation-function))
- (t ; Emacs<25
- (let (eldoc-documentation-function)
- (eldoc-print-current-symbol-info)))))
- ((or
- (string= lang "c") ;; https://github.com/nflath/c-eldoc
- (string= lang "C")) (when (require 'c-eldoc nil t)
- (c-eldoc-print-current-symbol-info)))
- ;; https://github.com/zenozeng/css-eldoc
- ((string= lang "css") (when (require 'css-eldoc nil t)
- (css-eldoc-function)))
- ;; https://github.com/zenozeng/php-eldoc
- ((string= lang "php") (when (require 'php-eldoc nil t)
- (php-eldoc-function)))
- ((or
- (string= lang "go")
- (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))
- (callback (car args)))
- (when (functionp doc-fun)
- (if (functionp callback)
- (funcall doc-fun callback)
- (funcall doc-fun)))))))))
+ (cond
+ ((or
+ (string= lang "emacs-lisp")
+ (string= lang "elisp"))
+ (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)))
+ ((fboundp 'elisp-eldoc-documentation-function)
+ (elisp-eldoc-documentation-function))
+ (t ; Emacs<25
+ (let (eldoc-documentation-function)
+ (eldoc-print-current-symbol-info)))))
+ ((or
+ (string= lang "c") ;; https://github.com/nflath/c-eldoc
+ (string= lang "C"))
+ (when (require 'c-eldoc nil t)
+ (c-eldoc-print-current-symbol-info)))
+ ;; https://github.com/zenozeng/css-eldoc
+ ((string= lang "css") (when (require 'css-eldoc nil t)
+ (css-eldoc-function)))
+ ;; https://github.com/zenozeng/php-eldoc
+ ((string= lang "php") (when (require 'php-eldoc nil t)
+ (php-eldoc-function)))
+ ((or
+ (string= lang "go")
+ (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))
+ (callback (car args)))
+ (when (functionp doc-fun)
+ (if (functionp callback)
+ (funcall doc-fun callback)
+ (funcall doc-fun)))))))))
;;;###autoload
(defun org-eldoc-load ()