Function: mh-get-msg-num

mh-get-msg-num is an autoloaded and byte-compiled function defined in mh-utils.el.gz.

Signature

(mh-get-msg-num ERROR-IF-NO-MESSAGE)

Documentation

Return the message number of the displayed message.

If the argument ERROR-IF-NO-MESSAGE is non-nil, then complain if the cursor is not pointing to a message.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-utils.el.gz
;;;###mh-autoload
(defun mh-get-msg-num (error-if-no-message)
  "Return the message number of the displayed message.
If the argument ERROR-IF-NO-MESSAGE is non-nil, then complain if
the cursor is not pointing to a message."
  (save-excursion
    (beginning-of-line)
    (cond ((looking-at (mh-scan-msg-number-regexp))
           (string-to-number (buffer-substring (match-beginning 1)
                                               (match-end 1))))
          (error-if-no-message
           (user-error "Cursor not pointing to message"))
          (t nil))))