       (delete-region start (point)))))
 
 (defun p2l-remove-footer ()
+  "Remove the useless end of the file."
   (interactive)
   (goto-char (point-max))
   (let ((end (point)))

      t)))

(defun p2l--convert-command1 (latex pillar-begin &optional pillar-end newline)
  (p2l--setup-buffer)
  (while (p2l--convert-command1-once latex pillar-begin pillar-end newline)))

(defun p2l--convert-command2-once (latex pillar-begin pillar-middle &optional pillar-end newline)
  (when (p2l--convert-command1-once latex pillar-begin pillar-middle newline)
    (let ((start (point)))
      (forward-sexp)
      (delete-backward-char 1)
      (insert pillar-end)
      (goto-char start)
      (delete-forward-char 1)
      t)))

(defun p2l--convert-command2 (latex pillar-begin pillar-middle &optional pillar-end newline)
  (p2l--setup-buffer)
  (while (p2l--convert-command2-once latex pillar-begin pillar-middle pillar-end newline)))


     (delete-region (point) end))))

(defun p2l--convert-command0-once (latex pillar &optional newline)
  "Transform the next LATEX 0-arg command to PILLAR.
LATEX is the name of a 0-argument macro (e.g., \eg).  PILLAR is
the Pillar markup to replace the macro with.  NEWLINE, if t, will
make sure the replacement text will start on a newline."
  (when (re-search-forward
         (concat "\\\\" latex) nil t)
    (let ((start (match-beginning 0))
