                 (get-buffer-create "*compilation*"))
               ((eq ocamlformat-show-errors 'echo)
                 (get-buffer-create "*OCamlFormat stderr*"))))
-          (patchbuf (get-buffer-create "*OCamlFormat patch*"))
           (coding-system-for-read 'utf-8)
           (coding-system-for-write 'utf-8)
           (margin-args

        (erase-buffer))
      (kill-buffer errbuf))))

(defun ocamlformat ()
   "Format the current buffer according to the ocamlformat tool."
   (interactive)

                 (ocamlformat--process-errors
                   (buffer-file-name) bufferfile errorfile errbuf)))
             (message "Could not apply ocamlformat"))))
     (delete-file errorfile)
     (delete-file bufferfile)
     (delete-file outputfile)))
