Refactor ein:kernel-construct-help-string

This commit is contained in:
Takafumi Arakaki 2012-07-25 18:55:55 +02:00
parent c07b273fcb
commit 19563ceb4e

View file

@ -509,14 +509,15 @@ Used in `ein:cell-finish-tooltip', etc."
(ein:kernel-construct-defstring content) (ein:kernel-construct-defstring content)
(ansi-color-apply it) (ansi-color-apply it)
(ein:string-fill-paragraph it))) (ein:string-fill-paragraph it)))
(docstring (or (plist-get content :call_docstring) (docstring (ein:aand
(or (plist-get content :call_docstring)
(plist-get content :init_docstring) (plist-get content :init_docstring)
(plist-get content :docstring) (plist-get content :docstring)
;; "<empty docstring>" ;; "<empty docstring>"
)) )
(help (ansi-color-apply it)))
(ein:aif (ein:filter 'identity (list defstring docstring)) (help (ein:join-str
(ansi-color-apply (ein:join-str "\n" it))))) "\n" (ein:filter 'identity (list defstring docstring)))))
(ein:log 'debug "EIN:KERNEL-CONSTRUCT-HELP-STRING") (ein:log 'debug "EIN:KERNEL-CONSTRUCT-HELP-STRING")
(ein:log 'debug "help %s" help) (ein:log 'debug "help %s" help)
help)) help))