+ (while (and (< (point) end)
+ (if (stringp matcher)
+ (re-search-forward matcher end t)
+ (funcall matcher end)))
+ (when (and (match-beginning 0)
+ (>= (point)
+ (save-excursion (goto-char (match-beginning 0))
+ (forward-line 1) (point))))
+ ;; this is a multiline regexp match
+ (put-text-property (match-beginning 0) (point)
+ 'font-lock-multiline t))