--- woman.el.~1~	2017-11-05 15:00:52.696647297 +0000
+++ woman.el	2018-03-22 17:47:44.014986089 +0000
@@ -3710,13 +3710,14 @@ defun woman2-roff-buffer ()
 	       (set-marker to (woman-find-next-control-line)))
              ;; Call the appropriate function:
              (funcall fn to)))
-      (if (not (eobp))			; This should not happen, but ...
-	  (woman2-format-paragraphs (copy-marker (point-max) t)
-                                    woman-left-margin))
-      (fset 'canonically-space-region canonically-space-region)
-      (fset 'set-text-properties set-text-properties)
-      (fset 'insert-and-inherit insert-and-inherit)
-      (set-marker to nil))))
+      (unwind-protect
+          (if (not (eobp))             ; This should not happen, but ...
+              (woman2-format-paragraphs (copy-marker (point-max) t)
+                                        woman-left-margin))
+        (fset 'canonically-space-region canonically-space-region)
+        (fset 'set-text-properties set-text-properties)
+        (fset 'insert-and-inherit insert-and-inherit)
+        (set-marker to nil)))))
 
 (defun woman-find-next-control-line (&optional pat)
   "Find and return start of next control line.
