From 3d711cf80edd759f2a6def0c8a65d51e1909bc3f Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Wed, 22 Sep 2010 00:32:57 +0000 Subject: proof-undo-and-delete-last-successful-command: repair (after proof-retract-until-point changed type). --- generic/pg-user.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'generic/pg-user.el') diff --git a/generic/pg-user.el b/generic/pg-user.el index cfc1e1fc..8021b45c 100644 --- a/generic/pg-user.el +++ b/generic/pg-user.el @@ -220,13 +220,12 @@ Notice that the deleted command is put into the Emacs kill ring, so you can use the usual `yank' and similar commands to retrieve the deleted text." (interactive) - (proof-undo-last-successful-command-1 'delete)) - ; (proof-script-new-command-advance)) + (proof-undo-last-successful-command-1 'delete-region)) -(defun proof-undo-last-successful-command-1 (&optional delete) +(defun proof-undo-last-successful-command-1 (&optional undo-action) "Undo last successful command at end of locked region. -If optional DELETE is non-nil, the text is also deleted from -the proof script." +If optional UNDO-ACTION is non-nil, that function is called on +the text region in the proof script after undoing." (interactive "P") (proof-with-script-buffer (let (lastspan) @@ -235,7 +234,7 @@ the proof script." (if (setq lastspan (span-at-before (proof-unprocessed-begin) 'type)) (progn (goto-char (span-start lastspan)) - (proof-retract-until-point delete)) + (proof-retract-until-point undo-action)) (error "Nothing to undo!")))) (if lastspan (proof-maybe-follow-locked-end (span-start lastspan)))))) -- cgit v1.2.3