diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-04-23 21:26:12 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-04-23 21:26:12 +0200 |
commit | 94213c51394e6d30d33cf7ea0798766e7689d742 (patch) | |
tree | 71f0e43fb46e9a35d0e1cdc4d2216d5965a7e4cc /helm-eval.el | |
parent | 9e6bfb96302a8677fe3380b75a741f2df6c2a643 (diff) |
Fix eldoc compatibility with emacs-25 (#998).
* helm-eval.el: Do it.
Diffstat (limited to 'helm-eval.el')
-rw-r--r-- | helm-eval.el | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/helm-eval.el b/helm-eval.el index 20e33346..205916e4 100644 --- a/helm-eval.el +++ b/helm-eval.el @@ -38,10 +38,26 @@ Should take one arg: the string to display." :group 'helm-eval) -(declare-function eldoc-current-symbol "eldoc") -(declare-function eldoc-get-fnsym-args-string "eldoc" (sym &optional index)) -(declare-function eldoc-get-var-docstring "eldoc" (sym)) -(declare-function eldoc-fnsym-in-current-sexp "eldoc") +;;; Eldoc compatibility between emacs-24 and emacs-25 +;; +(if (require 'elisp-mode nil t) ; emacs-25 + ;; Maybe the eldoc functions have been + ;; already aliased by eldoc-eval. + (cl-loop for f in '(eldoc-current-symbol + eldoc-fnsym-in-current-sexp + eldoc-get-fnsym-args-string + eldoc-get-var-docstring) + for a in '(elisp--current-symbol + elisp--fnsym-in-current-sexp + elisp--get-fnsym-args-string + elisp--get-var-docstring) + unless (fboundp f) + do (defalias f a)) + ;; Emacs-24. + (declare-function eldoc-current-symbol "eldoc") + (declare-function eldoc-get-fnsym-args-string "eldoc" (sym &optional index)) + (declare-function eldoc-get-var-docstring "eldoc" (sym)) + (declare-function eldoc-fnsym-in-current-sexp "eldoc")) ;;; Evaluation Result ;; |