Function: rmail-undelete-previous-message

rmail-undelete-previous-message is an interactive and byte-compiled function defined in rmail.el.gz.

Signature

(rmail-undelete-previous-message COUNT)

Documentation

Back up to deleted message, select it, and undelete it.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/mail/rmail.el.gz
(defun rmail-undelete-previous-message (count)
  "Back up to deleted message, select it, and undelete it."
  (interactive "p")
  (set-buffer rmail-buffer)
  (dotimes (_ count)
    (let ((msg rmail-current-message))
      (while (and (> msg 0)
                  (not (rmail-message-deleted-p msg)))
        (setq msg (1- msg)))
      (if (= msg 0)
          (error "No previous deleted message")
        (if (/= msg rmail-current-message)
            (rmail-show-message msg))
        (rmail-set-attribute rmail-deleted-attr-index nil)
        (if (rmail-summary-exists)
            (with-current-buffer rmail-summary-buffer
              (rmail-summary-mark-undeleted msg))))))
  (rmail-maybe-display-summary))