From 756464a4871ec7e9a0faf52b0c24e1c2ed257c6b Mon Sep 17 00:00:00 2001 From: "Jose A. Ortega Ruiz" Date: Fri, 16 Jan 2009 00:38:18 +0100 Subject: [PATCH] FUEL: Help browser: Fix for links to articles keyed by string lists. --- extra/fuel/fuel.factor | 2 +- misc/fuel/fuel-eval.el | 1 + misc/fuel/fuel-help.el | 3 ++- misc/fuel/fuel-markup.el | 7 ++++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/extra/fuel/fuel.factor b/extra/fuel/fuel.factor index 46d6ba12c7..f52a34ff28 100644 --- a/extra/fuel/fuel.factor +++ b/extra/fuel/fuel.factor @@ -141,7 +141,7 @@ PRIVATE> : fuel-get-article ( name -- ) article fuel-eval-set-result ; -MEMO: fuel-get-article-title ( name -- ) +: fuel-get-article-title ( name -- ) articles get at [ article-title ] [ f ] if* fuel-eval-set-result ; : fuel-word-help ( name -- ) (fuel-word-help) fuel-eval-set-result ; diff --git a/misc/fuel/fuel-eval.el b/misc/fuel/fuel-eval.el index 543d23bd3f..4c34ef17b8 100644 --- a/misc/fuel/fuel-eval.el +++ b/misc/fuel/fuel-eval.el @@ -31,6 +31,7 @@ ((listp sexp) (case (car sexp) (:array (factor--seq 'V{ '} (cdr sexp))) + (:seq (factor--seq '{ '} (cdr sexp))) (:quote (format "\\ %s" (factor `(:factor ,(cadr sexp))))) (:quotation (factor--seq '\[ '\] (cdr sexp))) (:using (factor `(USING: ,@(cdr sexp) :end))) diff --git a/misc/fuel/fuel-help.el b/misc/fuel/fuel-help.el index 705d1469a2..a82de388da 100644 --- a/misc/fuel/fuel-help.el +++ b/misc/fuel/fuel-help.el @@ -137,7 +137,8 @@ (defun fuel-help--get-article (name label) (message "Retrieving article ...") - (let* ((cmd `(:fuel* ((,name fuel-get-article)) "fuel" t)) + (let* ((name (if (listp name) (cons :seq name) name)) + (cmd `(:fuel* ((,name fuel-get-article)) "fuel" t)) (ret (fuel-eval--send/wait cmd)) (res (fuel-eval--retort-result ret))) (if (not res) diff --git a/misc/fuel/fuel-markup.el b/misc/fuel/fuel-markup.el index 696e4ff080..6a374cd5c8 100644 --- a/misc/fuel/fuel-markup.el +++ b/misc/fuel/fuel-markup.el @@ -61,7 +61,7 @@ (defun fuel-markup--insert-button (label link type) (let ((label (format "%s" label)) - (link (format "%s" link))) + (link (if (listp link) link (format "%s" link)))) (insert-text-button label :type 'fuel-markup--button 'markup-link link @@ -70,8 +70,9 @@ 'help-echo (format "%s (%s)" label type)))) (defun fuel-markup--article-title (name) - (fuel-eval--retort-result - (fuel-eval--send/wait `(:fuel* ((,name fuel-get-article-title)) "fuel")))) + (let ((name (if (listp name) (cons :seq name) name))) + (fuel-eval--retort-result + (fuel-eval--send/wait `(:fuel* ((,name fuel-get-article-title)) "fuel"))))) (defun fuel-markup--link-at-point () (let ((button (condition-case nil (forward-button 0) (error nil))))