aboutsummaryrefslogtreecommitdiffhomepage
path: root/lego
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2009-09-28 08:40:57 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2009-09-28 08:40:57 +0000
commit4b2801a521f7365f8a3833fa9805828792dac853 (patch)
tree1c9159ba41b75b362370307a098e3c86821dafcc /lego
parent07c7e94620921a826ac07363bf49f35cff0e6bc9 (diff)
Functions find-and-forget and count-undos now return lists of commands
Diffstat (limited to 'lego')
-rw-r--r--lego/lego.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lego/lego.el b/lego/lego.el
index 92ef462a..2234bb12 100644
--- a/lego/lego.el
+++ b/lego/lego.el
@@ -187,8 +187,7 @@ Given is the first SPAN which needs to be undone."
(if (= (aref str i) proof-terminal-char) (setq ct (+ 1 ct)))
(setq i (+ 1 i)))))
(setq span (next-span span 'type)))
- ;; FIXME: make this stuff generic. This should be undo-n-times-cmd
- (concat "Undo " (int-to-string ct) ";")))
+ (list (concat "Undo " (int-to-string ct) ";"))))
(defun lego-goal-command-p (span)
"Decide whether argument is a goal or not"
@@ -231,7 +230,7 @@ Given is the first SPAN which needs to be undone."
;; Carry on searching forward for something to forget
;; (The first thing to be forget will forget everything following)
(setq span (next-span span 'type)))
- ans)); was (or ans proof-no-command)
+ (when ans (list ans)))); was (or ans proof-no-command)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Other stuff which is required to customise script management ;;