Function: mh-remove-sequence-notation

mh-remove-sequence-notation is a byte-compiled function defined in mh-seq.el.gz.

Signature

(mh-remove-sequence-notation MSG INTERNAL-SEQ-FLAG &optional ALL)

Documentation

Remove sequence notation from the MSG on the current line.

If INTERNAL-SEQ-FLAG is non-nil, then font-lock was used to highlight the sequence. In that case, no notation needs to be removed. Otherwise the effect of inserting mh-note-seq needs to be reversed. If ALL is non-nil, then all sequence marks on the scan line are removed.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-seq.el.gz
(defun mh-remove-sequence-notation (msg internal-seq-flag &optional all)
  "Remove sequence notation from the MSG on the current line.
If INTERNAL-SEQ-FLAG is non-nil, then `font-lock' was used to
highlight the sequence. In that case, no notation needs to be removed.
Otherwise the effect of inserting `mh-note-seq' needs to be reversed.
If ALL is non-nil, then all sequence marks on the scan line are
removed."
  (with-mh-folder-updating (t)
    ;; This takes care of internal sequences...
    (mh-notate nil nil mh-cmd-note)
    (unless internal-seq-flag
      ;; ... and this takes care of user sequences.
      (let ((stack (gethash msg mh-sequence-notation-history)))
        (while (and all (cdr stack))
          (setq stack (cdr stack)))
        (when stack
          (save-excursion
            (beginning-of-line)
            (forward-char (+ mh-cmd-note mh-scan-field-destination-offset))
            (delete-char 1)
            (insert (car stack))))
        (setf (gethash msg mh-sequence-notation-history) (cdr stack))))))