;; There might be a continuation header, so we have to search
;; until we find a new non-continuation line.
(progn
- (forward-line 1)
- (if (re-search-forward "^[^ \t]" nil t)
- (goto-char (match-beginning 0))
- (point-max)))))
- (forward-line 1)
- (if (re-search-forward "^[^ \t]" nil t)
- (goto-char (match-beginning 0))
- (point-max))))
+ (while (and (zerop (forward-line 1))
+ (memq (char-after) '(?\t ?\ ))))
+ (point))))
+ (while (and (zerop (forward-line 1))
+ (memq (char-after) '(?\t ?\ ))))))
number))
(defun message-narrow-to-headers ()
(defun message-next-header ()
"Go to the beginning of the next header."
- (beginning-of-line)
- (or (eobp) (forward-char 1))
- (not (if (re-search-forward "^[^ \t]" nil t)
- (beginning-of-line)
- (goto-char (point-max)))))
+ (while (and (zerop (forward-line 1))
+ (memq (char-after) '(?\t ?\ ))))
+ (not (eobp)))
(defun message-sort-headers-1 ()
"Sort the buffer as headers using `message-rank' text props."
(message-remove-header message-ignored-mail-headers t))
(goto-char (point-max))
;; require one newline at the end.
- (or (eq (char-before) ?\n)
+ (or (bolp)
(insert ?\n))
(when (and news
(or (message-fetch-field "cc")
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n"))
(replace-match "\n")
- (backward-char 1)
+ (forward-char -1)
(setq delimline (point-marker))
(run-hooks 'message-send-mail-hook)
;; Insert an extra newline if we need it to work around
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n"))
(replace-match "\n")
- (backward-char 1)
+ (forward-char -1)
(run-hooks 'message-send-mail-hook)
(if recipients
(let ((result (smtp-via-smtp user-mail-address
(message-remove-header message-ignored-news-headers t))
(goto-char (point-max))
;; require one newline at the end.
- (or (eq (char-before) ?\n)
+ (or (bolp)
(insert ?\n))
(setq result (message-maybe-split-and-send-news method)))
(kill-buffer tembuf))
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n"))
(replace-match "\n")
- (backward-char 1)
+ (forward-char -11)
(run-hooks 'message-send-news-hook)
;;(require (car method))
;;(funcall (intern (format "%s-open-server" (car method)))
(while (re-search-forward "[\t\n]+" nil t)
(replace-match "" t t))
(unless (zerop (buffer-size))
- (buffer-string)))))
+ (buffer-substring (point-min) (point-max))))))
(defun message-make-lines ()
"Count the number of lines and return numeric string."
(replace-match "\\1(\\3)" t)
(goto-char fullname-start)))
(insert ")")))
- (buffer-string))))
+ (buffer-substring (point-min) (point-max)))))
(defun message-make-sender ()
"Return the \"real\" user address.
(while (re-search-forward "[ \t]+" nil t)
(replace-match " " t t))
;; Remove addresses that match `rmail-dont-reply-to-names'.
- (insert (prog1 (rmail-dont-reply-to (buffer-string))
+ (insert (prog1 (rmail-dont-reply-to (buffer-substring
+ (point-min) (point-max)))
(erase-buffer)))
(goto-char (point-min))
;; Perhaps Mail-Copies-To: never removed the only address?
(mapcar
(lambda (addr)
(cons (mail-strip-quoted-names addr) addr))
- (message-tokenize-header (buffer-string))))
+ (message-tokenize-header (buffer-substring
+ (point-min) (point-max)))))
(let ((s ccalist))
(while s
(setq ccalist (delq (assoc (car (pop s)) s) ccalist)))))
(while (re-search-backward "[ \t]+$" nil t)
(replace-match ""))
- (buffer-string)))
+ (buffer-substring (point-min) (point-max))))
;;; Forwarding messages.