fix docstring extraction for "fancy" docs

The docstrings for yas-expand and yas-expand-from-keymap are generated
on the fly, depending on how they are called ("context"). Add a context
argument to the synthesizing functions and pass it nil when extracting
docstrings for the manual.
This commit is contained in:
Noam Postavsky
2013-11-27 21:34:29 -05:00
parent 8d7c9a63a2
commit eaa3141402
2 changed files with 22 additions and 17 deletions

View File

@@ -49,7 +49,10 @@
(body (or (cond ((boundp symbol)
(documentation-property symbol 'variable-documentation t))
((fboundp symbol)
(documentation symbol t))
(let ((doc-synth (car-safe (get symbol 'function-documentation))))
(if (functionp doc-synth)
(funcall doc-synth nil)
(documentation symbol t))))
(t
(format "*WARNING*: no symbol named =%s=" symbol)))
(format "*WARNING*: no doc for symbol =%s=" symbol)))