mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 13:13:03 +00:00
check function doc before variable doc
This means functions shadow variables with the same name, but at least that's better than listing functions with the documentation from the variable! (That happened because the call to yas--document-symbols in snippet-reference.org was prefering function values to variables, while the yas--document-symbol was prefering variable doc to function doc).
This commit is contained in:
parent
eaa3141402
commit
2c237cc311
@ -46,13 +46,13 @@
|
||||
(concat-lines ":PROPERTIES:"
|
||||
(format ":CUSTOM_ID: %s" symbol)
|
||||
":END:"))
|
||||
(body (or (cond ((boundp symbol)
|
||||
(documentation-property symbol 'variable-documentation t))
|
||||
((fboundp symbol)
|
||||
(body (or (cond ((fboundp symbol)
|
||||
(let ((doc-synth (car-safe (get symbol 'function-documentation))))
|
||||
(if (functionp doc-synth)
|
||||
(funcall doc-synth nil)
|
||||
(documentation symbol t))))
|
||||
((boundp symbol)
|
||||
(documentation-property symbol 'variable-documentation t))
|
||||
(t
|
||||
(format "*WARNING*: no symbol named =%s=" symbol)))
|
||||
(format "*WARNING*: no doc for symbol =%s=" symbol)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user