branch: master commit 2c237cc311a7e84c5c61b99a8e263d312ea145d6 Author: Noam Postavsky <npost...@users.sourceforge.net> Commit: Noam Postavsky <npost...@users.sourceforge.net>
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). --- doc/yas-doc-helper.el | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/yas-doc-helper.el b/doc/yas-doc-helper.el index f9e0f69..c940b20 100755 --- a/doc/yas-doc-helper.el +++ b/doc/yas-doc-helper.el @@ -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)))