"Lennart Borgman (gmail)" <address@hidden> writes:
I would like to undo a change made by a function that I call with
funcall. I do not know exactly what the function does, but hopefully
it will only indent the current line. However the new indentation
might be wrong.
The scenario is something like this
(funcall the-indentation-function)
(when (= 0 (current-indentation))
;; undo what `the-indentation-function' did,
;; but how?
)
I am a bit scared of writing this undo part so if someone could help
me I would be glad. I do not think I can use `undo-boundary' here.
I'd be tempted to do something like
(condition-case nil
(atomic-change-group
(funcall the-indentation-function)
(when (=0 (current-indentation))
(signal 'barfout nil)))
(barfout))