diff options
author | Vibhav Pant <vibhavp@gmail.com> | 2020-08-21 14:04:35 +0530 |
---|---|---|
committer | Vibhav Pant <vibhavp@gmail.com> | 2020-08-21 14:04:35 +0530 |
commit | f0f8d7b82492e741950c363a03b886965c91b1b0 (patch) | |
tree | 19b716830b1ebabc0d7d75949c4e6800c0f104ad /lisp/progmodes/elisp-mode.el | |
parent | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff) | |
parent | c818c29771d3cb51875643b2f6c894073e429dd2 (diff) | |
download | emacs-feature/native-comp-macos-fixes.tar.gz |
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lisp/progmodes/elisp-mode.el')
-rw-r--r-- | lisp/progmodes/elisp-mode.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 2f44118edb5..21ba42a0fe1 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1420,10 +1420,12 @@ Intended for `eldoc-documentation-functions' (which see)." (defun elisp-eldoc-var-docstring (callback &rest _ignored) "Document variable at point. Intended for `eldoc-documentation-functions' (which see)." - (let ((sym (elisp--current-symbol))) - (when sym (funcall callback (elisp-get-var-docstring sym) - :thing sym - :face 'font-lock-variable-name-face)))) + (let* ((sym (elisp--current-symbol)) + (docstring (and sym (elisp-get-var-docstring sym)))) + (when docstring + (funcall callback docstring + :thing sym + :face 'font-lock-variable-name-face)))) (defun elisp-get-fnsym-args-string (sym &optional index) "Return a string containing the parameter list of the function SYM. |