(require 'button)
-\f
;;; Customization:
;;;###autoload
:type 'list
:group 'fuel-help)
-\f
;;; Help browser history:
(defun fuel-help--make-history ()
--
("Switch to listener" "\C-c\C-z" run-factor))
-\f
;;; IN: support
(defun fuel-help--find-in-buffer-link ()
(re-search-forward "Vocabulary: \\(.+\\)$" nil t)
(match-string-no-properties 1)))))
-\f
;;; Help mode definition:
;;;###autoload
(setq factor-current-vocab-function 'fuel-help--find-in)
(setq fuel-markup--follow-link-function 'fuel-help--follow-link))
-\f
(provide 'fuel-help)
;;; fuel-help.el ends here
($author . fuel-markup--author)
($authors . fuel-markup--authors)
($class-description . fuel-markup--class-description)
- ($code . fuel-markup--code)
+ ($code . (lambda (e) (fuel-markup--code e t)))
($command . fuel-markup--command)
($command-map . fuel-markup--null)
($complex-shuffle . fuel-markup--complex-shuffle)
($emphasis . fuel-markup--emphasis)
($error-description . fuel-markup--error-description)
($errors . fuel-markup--errors)
- ($example . fuel-markup--example)
+ ($example . (lambda (e) (fuel-markup--code e t)))
($examples . fuel-markup--examples)
($fuel-nav-crumbs . fuel-markup--nav-crumbs)
($heading . fuel-markup--heading)
($table . fuel-markup--table)
($tag . fuel-markup--tag)
($tags . fuel-markup--tags)
- ($unchecked-example . fuel-markup--example)
+ ($unchecked-example . (lambda (e) (fuel-markup--code e t)))
($url . fuel-markup--url)
($value . fuel-markup--value)
($values . fuel-markup--values)
(cdr e)
" ")))
-(defun fuel-markup--code (e)
+(defun fuel-markup--code (e indent)
(fuel-markup--insert-nl-if-nb)
(newline)
(dolist (snip (cdr e))
+ (when indent (insert " "))
(if (stringp snip)
(insert (factor-font-lock-string snip))
(fuel-markup--print snip))
(fuel-markup--print (cons '$code (cdr e)))
(newline))
-(defun fuel-markup--example (e)
- (fuel-markup--insert-newline)
- (dolist (s (cdr e))
- (fuel-markup--snippet (list '$snippet s))
- (newline))
- (newline))
-
(defun fuel-markup--markup-example (e)
(fuel-markup--insert-newline)
(fuel-markup--snippet (cons '$snippet (cdr e))))
(defun fuel-markup--definition (e)
(fuel-markup--insert-heading "Definition")
- (fuel-markup--code (cons '$code (cdr e))))
+ (fuel-markup--code (cons '$code (cdr e)) nil))
(defun fuel-markup--methods (e)
(fuel-markup--insert-heading "Methods")
- (fuel-markup--code (cons '$code (cdr e))))
+ (fuel-markup--code (cons '$code (cdr e)) nil))
(defun fuel-markup--value (e)
(fuel-markup--insert-heading "Variable value")
(res (and (not (fuel-eval--retort-error ret))
(fuel-eval--retort-output ret))))
(if res
- (fuel-markup--code (list '$code res))
+ (fuel-markup--code (list '$code res) nil)
(fuel-markup--snippet (list '$snippet " " word)))))
(defun fuel-markup--see (e)