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).
(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)))