Hi all,
We currently check if MIME attachments constructs (with part
declarations) are present using:
(defun mh-mml-tag-present-p ()
"Check if the current buffer has text which may be a MML tag."
(save-excursion
(goto-char (point-min))
(re-search-forward
(concat
"\\(<#\\(mml\|part\\)\\(.\|\n\\)*>[ \n\t]*<#/\\(mml\|part\\)>\|"
"^<#secure.+>$\\)")
nil t)))
But in the content of the attachment may not be in a file, but in the
buffer itself. In such cases, the above may fail when ther is too much text:
Debugger entered--Lisp error: (error "Stack overflow in regexp matcher")
I suggest that looking for the closing part isn't required and this
should be okay:
(defun mh-mml-tag-present-p ()
"Check if the current buffer has text which may be a MML tag."
(save-excursion
(goto-char (point-min))
(re-search-forward "\\(<#\\(mml\|part\\)\|^<#secure.+>$\\)" nil t)))
See #479, which may be a duplicate and contains a test message.