emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 2c237cc 060/177: check function doc before variable doc


From: João Távora
Subject: [elpa] master 2c237cc 060/177: check function doc before variable doc
Date: Sat, 28 Mar 2015 15:40:50 +0000

branch: master
commit 2c237cc311a7e84c5c61b99a8e263d312ea145d6
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]