Page To Next Message

If you are at the end of the message and press the SPACE key then MH-E warns you if that the next SPACE key will take you to the next message. With the following bit of code in your .emacs, MH-E will page to the next message without any warning.

;; Page to next message without prompting
(defmacro sa2-add-page-advice (function when)
  `(defadvice ,function (,when sa2-page-to-next activate)
     (set (make-local-variable 'mh-page-to-next-msg-flag)
          (mh-in-show-buffer (mh-show-buffer)
            (pos-visible-in-window-p (point-max))))))

(sa2-add-page-advice mh-show before)
(sa2-add-page-advice mh-page-msg before)
(sa2-add-page-advice mh-previous-page after)

Satyaki Das
Last modified: Wed May 7 15:30:21 PDT 2003