From c7b589f7127a8a4128d10d9d0d37b57a7bb06606 Mon Sep 17 00:00:00 2001 From: "Jose A. Ortega Ruiz" Date: Mon, 5 Jan 2009 04:58:19 +0100 Subject: [PATCH] FUEL: $quotation and $see markup; no autodoc by default in help buffers. --- misc/fuel/fuel-help.el | 5 ----- misc/fuel/fuel-markup.el | 27 +++++++++++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/misc/fuel/fuel-help.el b/misc/fuel/fuel-help.el index 2c936f5557..12091ea399 100644 --- a/misc/fuel/fuel-help.el +++ b/misc/fuel/fuel-help.el @@ -296,12 +296,7 @@ buffer." (set-syntax-table fuel-syntax--syntax-table) (setq mode-name "FUEL Help") (setq major-mode 'fuel-help-mode) - (setq fuel-markup--follow-link-function 'fuel-help--follow-link) - - (setq fuel-autodoc-mode-string "") - (fuel-autodoc-mode) - (setq buffer-read-only t)) diff --git a/misc/fuel/fuel-markup.el b/misc/fuel/fuel-markup.el index 2ee120c296..a2c94d4f4a 100644 --- a/misc/fuel/fuel-markup.el +++ b/misc/fuel/fuel-markup.el @@ -239,7 +239,7 @@ (insert (cadr e)))) (defun fuel-markup--snippet (e) - (let ((snip (fuel-markup--print-str (cdr e)))) + (let ((snip (format "%s" (cdr e)))) (insert (fuel-font-lock--factor-str snip)))) (defun fuel-markup--code (e) @@ -262,13 +262,15 @@ (defun fuel-markup--examples (e) (fuel-markup--insert-heading "Examples") - (fuel-markup--print (cdr e))) + (dolist (ex (cdr e)) + (fuel-markup--print ex) + (newline))) (defun fuel-markup--example (e) - (fuel-markup--print (cons '$code (cdr e)))) + (fuel-markup--snippet (list '$snippet (cadr e)))) (defun fuel-markup--markup-example (e) - (fuel-markup--print (cons '$code (cdr e)))) + (fuel-markup--snippet (cons '$snippet (cadr e)))) (defun fuel-markup--link (e) (let* ((link (nth 1 e)) @@ -430,6 +432,12 @@ (fuel-markup--print (cdr elem)) (fuel-markup--insert-newline)) +(defun fuel-markup--quotation (e) + (insert "a ") + (fuel-markup--link (list '$link 'quotation 'quotation 'word)) + (insert " with stack effect ") + (fuel-markup--snippet (list '$snippet (nth 1 e)))) + (defun fuel-markup--warning (e) (fuel-markup--elem-with-heading e "Warning")) @@ -455,14 +463,17 @@ (fuel-markup--elem-with-heading e "Notes")) (defun fuel-markup--see (e) - (insert (format " %S " e))) + (let* ((word (nth 1 e)) + (cmd (and word `(:fuel* (,(format "%s" word) fuel-word-see) "fuel" t))) + (res (and cmd + (fuel-eval--retort-result (fuel-eval--send/wait cmd 100))))) + (if res + (fuel-markup--code (list '$code res)) + (fuel-markup--snippet (list '$snippet word))))) (defun fuel-markup--synopsis (e) (insert (format " %S " e))) -(defun fuel-markup--quotation (e) - (insert (format " %S " e))) - (provide 'fuel-markup) ;;; fuel-markup.el ends here