Skip to content

Commit 2335dff

Browse files
committed
Make cider-eldoc-thing-type consistent with cider-propertize
1 parent 4941aaf commit 2335dff

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

cider-eldoc.el

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ is non-nil. Else format it as a variable."
120120
(if-let ((method-name (if (and symbol (not (string= symbol "")))
121121
symbol
122122
thing))
123-
(propertized-method-name (if (equal type 'function)
124-
(cider-propertize method-name 'fn)
125-
(cider-propertize method-name 'var)))
123+
(propertized-method-name (cider-propertize method-name type))
126124
(ns-or-class (if (and ns (stringp ns))
127125
(funcall cider-eldoc-ns-function ns)
128126
(cider--eldoc-format-class-names ns))))
@@ -214,7 +212,7 @@ arglists. ELDOC-INFO is a p-list containing the eldoc information."
214212
(symbol (lax-plist-get eldoc-info "symbol"))
215213
(arglists (lax-plist-get eldoc-info "arglists")))
216214
(format "%s: %s"
217-
(cider-eldoc-format-thing ns symbol thing 'function)
215+
(cider-eldoc-format-thing ns symbol thing 'fn)
218216
(cider-eldoc-format-arglist arglists pos))))
219217

220218
(defun cider-highlight-args (arglist pos)
@@ -295,7 +293,7 @@ if the maximum number of sexps to skip is exceeded."
295293
"Return the type of the thing being displayed by eldoc.
296294
It can be a function or var now."
297295
(pcase (lax-plist-get eldoc-info "type")
298-
("function" 'function)
296+
("function" 'fn)
299297
("variable" 'var)))
300298

301299
(defun cider-eldoc-info-at-point ()
@@ -417,7 +415,7 @@ Only useful for interop forms. Clojure forms would be returned unchanged."
417415
(pos (lax-plist-get sexp-eldoc-info "pos"))
418416
(thing (lax-plist-get sexp-eldoc-info "thing")))
419417
(when eldoc-info
420-
(if (equal (cider-eldoc-thing-type eldoc-info) 'function)
418+
(if (equal (cider-eldoc-thing-type eldoc-info) 'fn)
421419
(cider-eldoc-format-function thing pos eldoc-info)
422420
(cider-eldoc-format-variable thing pos eldoc-info))))))
423421

0 commit comments

Comments
 (0)