From 28b2942167cff93f11478ee4dec2efae58657690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sat, 1 Nov 2014 22:08:04 +0100 Subject: [PATCH] FUEL: fix markup of stack effects of quotations nested in stack effects --- misc/fuel/fuel-markup.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/misc/fuel/fuel-markup.el b/misc/fuel/fuel-markup.el index cd4c2b23f0..7adbf1df59 100644 --- a/misc/fuel/fuel-markup.el +++ b/misc/fuel/fuel-markup.el @@ -579,11 +579,17 @@ (fuel-markup--print (cdr elem)) (fuel-markup--insert-newline)) +(defun fuel-markup--stack-effect (e) + (let* ((in (mapconcat 'identity (nth 1 e) " ")) + (out (mapconcat 'identity (nth 2 e) " ")) + (str (format "( %s -- %s )" in out))) + (fuel-markup--snippet (list '$snippet str)))) + (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)))) + (fuel-markup--stack-effect (nth 1 e))) (defun fuel-markup--warning (e) (fuel-markup--elem-with-heading e "Warning"))