* lisp/gnus/message.el (message-point-in-header-p): Replace two unbound
regular expression matches with a single bound string match thus
reducing amount of work the function is doing.
(defun message-point-in-header-p ()
"Return t if point is in the header."
(save-excursion
- (and
- (not
- (re-search-backward
- (concat "^" (regexp-quote mail-header-separator) "\n") nil t))
- (re-search-forward
- (concat "^" (regexp-quote mail-header-separator) "\n") nil t))))
+ (save-restriction
+ (widen)
+ (let ((bound (+ (point-at-eol) 1)) case-fold-search)
+ (goto-char (point-min))
+ (not (search-forward (concat "\n" mail-header-separator "\n")
+ bound t))))))
(defun message-do-auto-fill ()
"Like `do-auto-fill', but don't fill in message header."