diff options
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/mail-utils.el | 5 | ||||
-rw-r--r-- | lisp/mail/mailabbrev.el | 2 | ||||
-rw-r--r-- | lisp/mail/mspools.el | 4 | ||||
-rw-r--r-- | lisp/mail/rfc2047.el | 16 | ||||
-rw-r--r-- | lisp/mail/sendmail.el | 2 | ||||
-rw-r--r-- | lisp/mail/smtpmail.el | 5 |
6 files changed, 18 insertions, 16 deletions
diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 63752f953a7..a6e508155f6 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -310,7 +310,7 @@ matches may be returned from the message body." (buffer-substring-no-properties opoint (point))))) (if delete - (delete-region (point-at-bol) (point))))) + (delete-region (line-beginning-position) (point))))) (if list value (and (not (string= value "")) value))) @@ -326,7 +326,8 @@ matches may be returned from the message body." (prog1 (buffer-substring-no-properties opoint (point)) (if delete - (delete-region (point-at-bol) (1+ (point)))))))))))) + (delete-region (line-beginning-position) + (1+ (point)))))))))))) ;; Parse a list of tokens separated by commas. ;; It runs from point to the end of the visible part of the buffer. diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index 86711a4543f..0e0fb512003 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el @@ -394,7 +394,7 @@ with a space." (let (p) (save-excursion (while (>= (current-column) fill-column) - (while (and (search-backward "," (point-at-bol) 'move) + (while (and (search-backward "," (line-beginning-position) 'move) (>= (current-column) (1- fill-column)) (setq p (point)))) (when (or (not (bolp)) diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index 2ab4fa411a6..0673493487a 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el @@ -264,7 +264,7 @@ Buffer is not displayed if SHOW is non-nil." (delete-char 1)))) (message "folder %s spool %s" folder-name spool-name) - (forward-line (if (eq (count-lines (point-min) (point-at-eol)) + (forward-line (if (eq (count-lines (point-min) (line-end-position)) mspools-files-len) ;; FIXME: Why use `mspools-files-len' instead ;; of looking if we're on the last line and @@ -307,7 +307,7 @@ Buffer is not displayed if SHOW is non-nil." (defun mspools-get-spool-name () "Return the name of the spool on the current line." - (let ((line-num (1- (count-lines (point-min) (point-at-eol))))) + (let ((line-num (1- (count-lines (point-min) (line-end-position))))) ;; FIXME: Why not extract the name directly from the current line's text? (car (nth line-num mspools-files)))) diff --git a/lisp/mail/rfc2047.el b/lisp/mail/rfc2047.el index 67874d508b1..abb95a63f16 100644 --- a/lisp/mail/rfc2047.el +++ b/lisp/mail/rfc2047.el @@ -175,7 +175,7 @@ This is either `base64' or `quoted-printable'." (progn (forward-line 1) (if (re-search-forward "^[^ \n\t]" nil t) - (point-at-bol) + (line-beginning-position) (point-max)))) (goto-char (point-min))) @@ -681,14 +681,14 @@ Point moves to the end of the region." (goto-char b) (setq b (point-marker) e (set-marker (make-marker) e)) - (rfc2047-fold-region (point-at-bol) b) + (rfc2047-fold-region (line-beginning-position) b) (goto-char b) (skip-chars-backward "^ \t\n") (unless (= 0 (skip-chars-backward " \t")) ;; `crest' may contain whitespace and an open parenthesis. (setq crest (buffer-substring-no-properties (point) b))) (setq eword (rfc2047-encode-1 - (- b (point-at-bol)) + (- b (line-beginning-position)) (replace-regexp-in-string "\n\\([ \t]?\\)" "\\1" (buffer-substring-no-properties b e)) @@ -824,18 +824,18 @@ Return the new end point." (goto-char (point-min)) (let ((bol (save-restriction (widen) - (point-at-bol))) - (eol (point-at-eol))) + (line-beginning-position))) + (eol (line-end-position))) (forward-line 1) (while (not (eobp)) (if (and (looking-at "[ \t]") - (< (- (point-at-eol) bol) 76)) + (< (- (line-end-position) bol) 76)) (delete-region eol (progn (goto-char eol) (skip-chars-forward "\r\n") (point))) - (setq bol (point-at-bol))) - (setq eol (point-at-eol)) + (setq bol (line-beginning-position))) + (setq eol (line-end-position)) (forward-line 1))))) (defun rfc2047-b-encode-string (string) diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 189ad075c47..387792eb310 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -1293,7 +1293,7 @@ external program defined by `sendmail-program'." ;; should override any specified in the message itself. (when where-content-type (goto-char where-content-type) - (delete-region (point-at-bol) + (delete-region (line-beginning-position) (progn (forward-line 1) (point))))))) ;; Insert an extra newline if we need it to work around ;; Sun's bug that swallows newlines. diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 45b25b55301..c2f8f273772 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -474,7 +474,7 @@ for `smtpmail-try-auth-method'.") (smtpmail--sanitize-error-message result)))))) (delete-file file-data) (delete-file file-elisp) - (delete-region (point-at-bol) (point-at-bol 2))) + (delete-region (line-beginning-position) (line-beginning-position 2))) (write-region (point-min) (point-max) qfile)))) (defun smtpmail--sanitize-error-message (string) @@ -1057,7 +1057,8 @@ Returns an error if the server cannot be contacted." (while data-continue (with-current-buffer buffer (progress-reporter-update pr (point)) - (setq sending-data (buffer-substring (point-at-bol) (point-at-eol))) + (setq sending-data (buffer-substring (line-beginning-position) + (line-end-position))) (end-of-line 2) (setq data-continue (not (eobp)))) (smtpmail-send-data-1 process sending-data)) |