Function: mh-add-msgs-to-seq

mh-add-msgs-to-seq is an autoloaded and byte-compiled function defined in mh-seq.el.gz.

Signature

(mh-add-msgs-to-seq MSGS SEQ &optional INTERNAL-FLAG DONT-ANNOTATE-FLAG)

Documentation

Add MSGS to SEQ.

Remove duplicates and keep sequence sorted. If optional INTERNAL-FLAG is non-nil, do not mark the message in the scan listing or inform MH of the addition.

If DONT-ANNOTATE-FLAG is non-nil then the annotations in the folder buffer are not updated.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-seq.el.gz
;;;###mh-autoload
(defun mh-add-msgs-to-seq (msgs seq &optional internal-flag dont-annotate-flag)
  "Add MSGS to SEQ.

Remove duplicates and keep sequence sorted. If optional
INTERNAL-FLAG is non-nil, do not mark the message in the scan
listing or inform MH of the addition.

If DONT-ANNOTATE-FLAG is non-nil then the annotations in the
folder buffer are not updated."
  (let ((entry (mh-find-seq seq))
        (internal-seq-flag (mh-internal-seq seq)))
    (if (and msgs (atom msgs)) (setq msgs (list msgs)))
    (if (null entry)
        (setq mh-seq-list
              (cons (mh-make-seq seq (mh-canonicalize-sequence msgs))
                    mh-seq-list))
      (if msgs (setcdr entry (mh-canonicalize-sequence
                              (append msgs (mh-seq-msgs entry))))))
    (unless internal-flag
      (mh-add-to-sequence seq msgs)
      (when (not dont-annotate-flag)
        (mh-iterate-on-range msg msgs
          (unless (memq msg (cdr entry))
            (mh-add-sequence-notation msg internal-seq-flag)))))))