diff options
Diffstat (limited to 'lisp/gnus')
31 files changed, 128 insertions, 125 deletions
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index e4704b35c8d..e1c7bcb467d 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -1681,7 +1681,7 @@ and that there are no duplicates." (gnus-message 1 "Overview buffer contains garbage `%s'." (buffer-substring - p (point-at-eol)))) + p (line-end-position)))) ((= cur prev-num) (or backed-up (setq backed-up (gnus-agent-backup-overview-buffer))) @@ -2687,7 +2687,7 @@ The following commands are available: (gnus-category-position-point))) (defun gnus-category-name () - (or (intern (get-text-property (point-at-bol) 'gnus-category)) + (or (intern (get-text-property (line-beginning-position) 'gnus-category)) (error "No category on the current line"))) (defun gnus-category-read () @@ -3363,7 +3363,7 @@ missing NOV entry. Run gnus-agent-regenerate-group to restore it."))) (cl-incf nov-entries-deleted) - (let* ((from (point-at-bol)) + (let* ((from (line-beginning-position)) (to (progn (forward-line 1) (point))) (freed (- to from))) (cl-incf bytes-freed freed) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 480ebe377d7..83ba72c091f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1930,7 +1930,7 @@ always hide." (while (re-search-forward "^[^: \t]+:[ \t]*\n[^ \t]" nil t) (forward-line -1) (gnus-article-hide-text-type - (point-at-bol) + (line-beginning-position) (progn (end-of-line) (if (re-search-forward "^[^ \t]" nil t) @@ -2060,7 +2060,7 @@ always hide." (goto-char (point-min)) (when (re-search-forward (concat "^" header ":") nil t) (gnus-article-hide-text-type - (point-at-bol) + (line-beginning-position) (progn (end-of-line) (if (re-search-forward "^[^ \t]" nil t) @@ -2081,7 +2081,7 @@ always hide." (article-narrow-to-head) (while (not (eobp)) (cond - ((< (setq column (- (point-at-eol) (point))) + ((< (setq column (- (line-end-position) (point))) gnus-article-normalized-header-length) (end-of-line) (insert (make-string @@ -2092,7 +2092,7 @@ always hide." (progn (forward-char gnus-article-normalized-header-length) (point)) - (point-at-eol) + (line-end-position) 'invisible t)) (t ;; Do nothing. @@ -2389,7 +2389,7 @@ fill width." (end-of-line) (when (>= (current-column) width) (narrow-to-region (min (1+ (point)) (point-max)) - (point-at-bol)) + (line-beginning-position)) (let ((goback (point-marker)) (fill-column width)) (fill-paragraph nil) @@ -2446,7 +2446,7 @@ fill width." (while (and (not (bobp)) (looking-at "^[ \t]*$") (not (gnus-annotation-in-region-p - (point) (point-at-eol)))) + (point) (line-end-position)))) (forward-line -1)) (forward-line 1) (point)))))) @@ -3583,9 +3583,10 @@ possible values." 'original-date) bface (get-text-property (match-beginning 0) 'face) eface (get-text-property (match-end 0) 'face)) - (delete-region (point-at-bol) (progn - (gnus-article-forward-header) - (point))))) + (delete-region (line-beginning-position) + (progn + (gnus-article-forward-header) + (point))))) (when (and (not date) visible-date) (setq date visible-date)) @@ -4388,8 +4389,8 @@ If variable `gnus-use-long-file-name' is non-nil, it is (message-narrow-to-head) (goto-char (point-max)) (forward-line -1) - (setq bface (get-text-property (point-at-bol) 'face) - eface (get-text-property (1- (point-at-eol)) 'face)) + (setq bface (get-text-property (line-beginning-position) 'face) + eface (get-text-property (1- (line-end-position)) 'face)) (message-remove-header "X-Gnus-PGP-Verify") (if (re-search-forward "^X-PGP-Sig:" nil t) (forward-line) @@ -5925,7 +5926,7 @@ all parts." ;; Go to the displayed subpart, assuming this is ;; multipart/alternative. (setq part start - end (point-at-eol)) + end (line-end-position)) (while (and (not handle) part (< part end) @@ -6825,9 +6826,9 @@ not have a face in `gnus-article-boring-faces'." "Read article specified by message-id around point." (interactive nil gnus-article-mode) (save-excursion - (re-search-backward "[ \t]\\|^" (point-at-bol) t) - (re-search-forward "<?news:<?\\|<" (point-at-eol) t) - (if (re-search-forward "[^@ ]+@[^ \t>]+" (point-at-eol) t) + (re-search-backward "[ \t]\\|^" (line-beginning-position) t) + (re-search-forward "<?news:<?\\|<" (line-end-position) t) + (if (re-search-forward "[^@ ]+@[^ \t>]+" (line-end-position) t) (let ((msg-id (concat "<" (match-string 0) ">"))) (set-buffer gnus-summary-buffer) (gnus-summary-refer-article msg-id)) @@ -8180,7 +8181,7 @@ url is put as the `gnus-button-url' overlay property on the button." (goto-char start) (string-match "\\(?:\"\\|\\(<\\)\\)[\t ]*\\(?:url[\t ]*:[\t ]*\\)?\\'" - (buffer-substring (point-at-bol) start))) + (buffer-substring (line-beginning-position) start))) (progn (setq url (list (buffer-substring start end)) delim (if (match-beginning 1) ">" "\"")) diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index 4f5b9bd3422..18732218c9f 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el @@ -509,7 +509,7 @@ Optional argument SHOW means show them unconditionally." (let ((bmrk (gnus-bookmark-bmenu-bookmark))) (setq gnus-bookmark-bmenu-hidden-bookmarks (cons bmrk gnus-bookmark-bmenu-hidden-bookmarks)) - (let ((start (point-at-eol))) + (let ((start (line-end-position))) (move-to-column gnus-bookmark-bmenu-file-column t) ;; Strip off `mouse-face' from the white spaces region. (if (display-mouse-p) @@ -543,7 +543,7 @@ Optional argument SHOW means show them unconditionally." "Kill from point to end of line. If optional arg NEWLINE-TOO is non-nil, delete the newline too. Does not affect the kill ring." - (delete-region (point) (point-at-eol)) + (delete-region (point) (line-end-position)) (if (and newline-too (looking-at "\n")) (delete-char 1))) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index ee20ba3c7f0..449b73163f4 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -552,7 +552,7 @@ Returns the list of articles removed." (set-buffer cache-buf) (if (search-forward (concat "\n" (int-to-string (car cached)) "\t") nil t) - (setq beg (point-at-bol) + (setq beg (line-beginning-position) end (progn (end-of-line) (point))) (setq beg nil)) (set-buffer nntp-server-buffer) diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 3ba2bbd6fea..b4d7661d742 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -371,7 +371,7 @@ Lines matching `gnus-cite-attribution-suffix' and perhaps (goto-char (point-min)) (forward-line (1- number)) (when (re-search-forward gnus-cite-attribution-suffix - (point-at-eol) + (line-end-position) t) (gnus-article-add-button (match-beginning 1) (match-end 1) 'gnus-cite-toggle prefix)) @@ -756,7 +756,7 @@ See also the documentation for `gnus-article-highlight-citation'." ;; Each line. (setq begin (point) guess-limit (progn (skip-chars-forward "^> \t\r\n") (point)) - end (point-at-bol 2) + end (line-beginning-position 2) start end) (goto-char begin) ;; Ignore standard Supercite attribution prefix. @@ -1105,8 +1105,8 @@ Returns nil if there is no such line before LIMIT, t otherwise." "[\t [:alnum:]]+"))) gnus-message-max-citation-depth)) (mlist (make-list (* (1+ gnus-message-max-citation-depth) 2) nil)) - (start (point-at-bol)) - (end (point-at-eol))) + (start (line-beginning-position)) + (end (line-end-position))) (setcar mlist start) (setcar (cdr mlist) end) (setcar (nthcdr (* cdepth 2) mlist) start) diff --git a/lisp/gnus/gnus-diary.el b/lisp/gnus/gnus-diary.el index 6028d4fcb2f..3c57d7b1124 100644 --- a/lisp/gnus/gnus-diary.el +++ b/lisp/gnus/gnus-diary.el @@ -327,7 +327,7 @@ If ARG (or prefix) is non-nil, force prompting for all fields." (when (re-search-forward (concat "^" header ":") nil t) (unless (eq (char-after) ? ) (insert " ")) - (setq value (buffer-substring (point) (point-at-eol))) + (setq value (buffer-substring (point) (line-end-position))) (and (string-match "[ \t]*\\([^ \t]+\\)[ \t]*" value) (setq value (match-string 1 value))) (condition-case () diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el index 56d498cc4d3..e38deefe2aa 100644 --- a/lisp/gnus/gnus-draft.el +++ b/lisp/gnus/gnus-draft.el @@ -150,7 +150,7 @@ Obeys the standard process/prefix convention." (concat "^" (regexp-quote gnus-agent-target-move-group-header) ":") nil t) (skip-syntax-forward "-") - (setq move-to (buffer-substring (point) (point-at-eol))) + (setq move-to (buffer-substring (point) (line-end-position))) (message-remove-header gnus-agent-target-move-group-header)) (goto-char (point-min)) (when (re-search-forward diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index a6b6c4a6cda..fcad601d0c3 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1204,7 +1204,7 @@ case interactively), the level will be updated by this command." (gnus-group-setup-buffer) (gnus-update-format-specifications nil 'group 'group-mode) (let ((case-fold-search nil) - (props (text-properties-at (point-at-bol))) + (props (text-properties-at (line-beginning-position))) (empty (= (point-min) (point-max))) (group (gnus-group-group-name)) number) @@ -1724,24 +1724,24 @@ already. If INFO-UNCHANGED is non-nil, dribble buffer is not updated." (defun gnus-group-group-name () "Get the name of the newsgroup on the current line." - (let ((group (get-text-property (point-at-bol) 'gnus-group))) + (let ((group (get-text-property (line-beginning-position) 'gnus-group))) (cond ((stringp group) group) (group (symbol-name group))))) (defun gnus-group-group-level () "Get the level of the newsgroup on the current line." - (get-text-property (point-at-bol) 'gnus-level)) + (get-text-property (line-beginning-position) 'gnus-level)) (defun gnus-group-group-indentation () "Get the indentation of the newsgroup on the current line." - (or (get-text-property (point-at-bol) 'gnus-indentation) + (or (get-text-property (line-beginning-position) 'gnus-indentation) (and gnus-group-indentation-function (funcall gnus-group-indentation-function)) "")) (defun gnus-group-group-unread () "Get the number of unread articles of the newsgroup on the current line." - (get-text-property (point-at-bol) 'gnus-unread)) + (get-text-property (line-beginning-position) 'gnus-unread)) (defun gnus-group-new-mail (group) (if (nnmail-new-mail-p group) @@ -2095,14 +2095,14 @@ be permanent." (looking-at "[][\C-@-*,/;-@\\^`{-\C-?]"))) (prog1 t (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" - (point-at-bol)))) + (line-beginning-position)))) (and (looking-at "[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*$") (prog1 t (skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?") (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" - (point-at-bol)))) + (line-beginning-position)))) (string-match "\\`[][\C-@-\t\v-*,/;-@\\^`{-\C-?]*\\'" - (buffer-substring (point-at-bol) (point)))) + (buffer-substring (line-beginning-position) (point)))) (when (looking-at regexp) (match-string 1)) (let (group distance) @@ -2111,7 +2111,7 @@ be permanent." distance (- (match-beginning 1) (match-beginning 0)))) (skip-chars-backward "][\C-@-\t\v-*,/;-@\\^`{-\C-?") (skip-chars-backward "^][\C-@-\t\v-*,/;-@\\^`{-\C-?" - (point-at-bol)) + (line-beginning-position)) (if (looking-at regexp) (if (and group (<= distance (- start (match-end 0)))) group @@ -3948,10 +3948,10 @@ The killed newsgroups can be yanked by using \\[gnus-group-yank-group]." (count-lines (progn (goto-char begin) - (point-at-bol)) + (line-beginning-position)) (progn (goto-char end) - (point-at-bol)))))) + (line-beginning-position)))))) (goto-char begin) (beginning-of-line) ;Important when LINES < 1 (gnus-group-kill-group lines))) diff --git a/lisp/gnus/gnus-picon.el b/lisp/gnus/gnus-picon.el index d0edf2cba85..012ac9d556f 100644 --- a/lisp/gnus/gnus-picon.el +++ b/lisp/gnus/gnus-picon.el @@ -220,13 +220,13 @@ replacement is added." (error 0))) spec))) (when (> len 0) - (goto-char (point-at-eol)) + (goto-char (line-end-position)) (insert (propertize " " 'display (cons 'space (list :align-to (- (window-width) 1 len)))))) - (goto-char (point-at-eol)) - (setq point (point-at-eol)) + (goto-char (line-end-position)) + (setq point (line-end-position)) (dolist (image spec) (unless (stringp image) (goto-char point) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 4ef2ebf1dd7..6b7958dcb91 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -686,7 +686,7 @@ it in the environment specified by BINDINGS." (unless (zerop level) (gnus-tree-indent level) (insert (cadr gnus-tree-parent-child-edges)) - (setq col (- (setq beg (point)) (point-at-bol) 1)) + (setq col (- (setq beg (point)) (line-beginning-position) 1)) ;; Draw "|" lines upwards. (while (progn (forward-line -1) @@ -710,7 +710,7 @@ it in the environment specified by BINDINGS." (defsubst gnus-tree-indent-vertical () (let ((len (- (* (1+ gnus-tree-node-length) gnus-tmp-indent) - (- (point) (point-at-bol))))) + (- (point) (line-beginning-position))))) (when (> len 0) (insert (make-string len ? ))))) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index c852986ae61..5f49c280072 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -1168,9 +1168,9 @@ If FORMAT, also format the current score file." (reg " -> +") (file (save-excursion (end-of-line) - (if (and (re-search-backward reg (point-at-bol) t) - (re-search-forward reg (point-at-eol) t)) - (buffer-substring (point) (point-at-eol)) + (if (and (re-search-backward reg (line-beginning-position) t) + (re-search-forward reg (line-end-position) t)) + (buffer-substring (point) (line-end-position)) nil)))) (if (or (not file) (string-match "\\<\\(non-file rule\\|A file\\)\\>" file) @@ -1999,7 +1999,7 @@ score in `gnus-newsgroup-scored' by SCORE." (goto-char (point-min)) (if (= dmt ?e) (while (funcall search-func match nil t) - (and (= (point-at-bol) + (and (= (line-beginning-position) (match-beginning 0)) (= (progn (end-of-line) (point)) (match-end 0)) @@ -2170,7 +2170,7 @@ score in `gnus-newsgroup-scored' by SCORE." (funcall search-func match nil t)) ;; Is it really exact? (and (eolp) - (= (point-at-bol) (match-beginning 0)) + (= (line-beginning-position) (match-beginning 0)) ;; Yup. (progn (setq found (setq arts (get-text-property @@ -2260,7 +2260,7 @@ score in `gnus-newsgroup-scored' by SCORE." (goto-char (point-min)) (while (and (not (eobp)) (search-forward match nil t)) - (when (and (= (point-at-bol) (match-beginning 0)) + (when (and (= (line-beginning-position) (match-beginning 0)) (eolp)) (setq found (setq arts (get-text-property (point) 'articles))) (if trace @@ -2344,7 +2344,7 @@ score in `gnus-newsgroup-scored' by SCORE." hashtb)) (puthash word - (append (get-text-property (point-at-eol) 'articles) val) + (append (get-text-property (line-end-position) 'articles) val) hashtb))) ;; Make all the ignorable words ignored. (let ((ignored (append gnus-ignored-adaptive-words diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 53b6d1b4c6f..327dba95c07 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -565,7 +565,7 @@ returning the one at the supplied position." (buffer-substring (point) (progn - (re-search-forward ":" (point-at-eol) t) + (re-search-forward ":" (line-end-position) t) (1- (point)))))) (value (gnus-search-query-return-string (when (looking-at-p "[\"/]") t)))) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 54be0f8e6a0..e659a648e10 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -339,13 +339,13 @@ The following commands are available: (gnus-server-position-point)) (defun gnus-server-server-name () - (let ((server (get-text-property (point-at-bol) 'gnus-server))) + (let ((server (get-text-property (line-beginning-position) 'gnus-server))) (and server (symbol-name server)))) (defun gnus-server-named-server () "Return a server name that matches one of the names returned by `gnus-method-to-server'." - (let ((server (get-text-property (point-at-bol) 'gnus-named-server))) + (let ((server (get-text-property (line-beginning-position) 'gnus-named-server))) (and server (symbol-name server)))) (defalias 'gnus-server-position-point 'gnus-goto-colon) @@ -949,7 +949,7 @@ how new groups will be entered into the group buffer." (save-excursion (beginning-of-line) (let ((name (get-text-property (point) 'gnus-group))) - (when (re-search-forward ": \\(.*\\)$" (point-at-eol) t) + (when (re-search-forward ": \\(.*\\)$" (line-end-position) t) (concat (gnus-method-to-server-name gnus-browse-current-method) ":" (or name (match-string-no-properties 1))))))) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 7b5721fafbb..7700e6bd430 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -855,7 +855,7 @@ If REGEXP is given, lines that match it will be deleted." (unless (bolp) (forward-line 1)) (setq end (point)) (goto-char (match-beginning 0)) - (delete-region (point-at-bol) end)))) + (delete-region (line-beginning-position) end)))) (goto-char (point-max)) ;; Make sure that each dribble entry is a single line, so that ;; the "remove" code above works. @@ -2173,7 +2173,7 @@ The info element is shared with the same element of (unless ignore-errors (gnus-message 3 "Warning - invalid active: %s" (buffer-substring - (point-at-bol) (point-at-eol)))))) + (line-beginning-position) (line-end-position)))))) (forward-line 1))))) (defun gnus-groups-to-gnus-format (method &optional hashtb real-active) @@ -2527,10 +2527,10 @@ The form should return either t or nil." ;; don't give a damn, frankly, my dear. (concat gnus-newsrc-options (buffer-substring - (point-at-bol) + (line-beginning-position) ;; Options may continue on the next line. (or (and (re-search-forward "^[^ \t]" nil 'move) - (point-at-bol)) + (line-beginning-position)) (point))))) (forward-line -1)) (group @@ -2592,8 +2592,8 @@ The form should return either t or nil." ;; The line was buggy. (setq group nil) (gnus-error 3.1 "Mangled line: %s" - (buffer-substring (point-at-bol) - (point-at-eol)))) + (buffer-substring (line-beginning-position) + (line-end-position)))) nil)) ;; Skip past ", ". Spaces are invalid in these ranges, but ;; we allow them, because it's a common mistake to put a @@ -2702,9 +2702,9 @@ The form should return either t or nil." (while (re-search-forward "[ \t]-n" nil t) (setq eol (or (save-excursion - (and (re-search-forward "[ \t]-n" (point-at-eol) t) + (and (re-search-forward "[ \t]-n" (line-end-position) t) (- (point) 2))) - (point-at-eol))) + (line-end-position))) ;; Search for all "words"... (while (re-search-forward "[^ \t,\n]+" eol t) (if (eq (char-after (match-beginning 0)) ?!) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 90b57695c57..dde60caee7e 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3383,7 +3383,7 @@ marks of articles." (let (config) (goto-char (point-min)) (while (not (eobp)) - (when (eq (get-char-property (point-at-eol) 'invisible) 'gnus-sum) + (when (eq (get-char-property (line-end-position) 'invisible) 'gnus-sum) (push (save-excursion (forward-line 0) (point)) config)) (forward-line 1)) config))) @@ -4505,7 +4505,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (let (header) ;; overview: [num subject from date id refs chars lines misc] (unwind-protect - (narrow-to-region (point) (point-at-eol)) + (narrow-to-region (point) (line-end-position)) (unless (eobp) (forward-char)) (setq header (nnheader-parse-nov number)) @@ -4661,7 +4661,7 @@ If LINE, insert the rebuilt thread starting on line LINE." (setq thread (list (car (gnus-id-to-thread id)))) ;; Get the thread this article is part of. (setq thread (gnus-remove-thread id))) - (setq old-pos (point-at-bol)) + (setq old-pos (line-beginning-position)) (setq current (save-excursion (and (re-search-backward "[\r\n]" nil t) (gnus-summary-article-number)))) @@ -4845,9 +4845,9 @@ If LINE, insert the rebuilt thread starting on line LINE." (gnus-summary-show-thread) (gnus-data-remove number - (- (point-at-bol) + (- (line-beginning-position) (prog1 - (1+ (point-at-eol)) + (1+ (line-end-position)) (gnus-delete-line))))))) (defun gnus-sort-threads-recursive (threads func) @@ -6468,7 +6468,7 @@ This is meant to be called in `gnus-article-internal-prepare-hook'." (looking-at "Xref:")) (search-forward "\nXref:" nil t)) (goto-char (1+ (match-end 0))) - (setq xref (buffer-substring (point) (point-at-eol))) + (setq xref (buffer-substring (point) (line-end-position))) (setf (mail-header-xref headers) xref))))))) (defun gnus-summary-insert-subject (id &optional old-header use-old-header) @@ -6499,9 +6499,9 @@ too, instead of trying to fetch new headers." (goto-char (gnus-data-pos d)) (gnus-data-remove number - (- (point-at-bol) + (- (line-beginning-position) (prog1 - (1+ (point-at-eol)) + (1+ (line-end-position)) (gnus-delete-line)))))) ;; Remove list identifiers from subject. (let ((gnus-newsgroup-headers (list header))) @@ -11219,7 +11219,7 @@ If NO-EXPIRE, auto-expiry will be inhibited." (defun gnus-summary-update-mark (mark type) (let ((forward (cdr (assq type gnus-summary-mark-positions))) (inhibit-read-only t)) - (re-search-backward "[\n\r]" (point-at-bol) 'move-to-limit) + (re-search-backward "[\n\r]" (line-beginning-position) 'move-to-limit) (when forward (when (looking-at "\r") (cl-incf forward)) @@ -11756,7 +11756,7 @@ If ARG is positive number, turn showing conversation threads on." Returns nil if no thread was there to be shown." (interactive nil gnus-summary-mode) (let* ((orig (point)) - (end (point-at-eol)) + (end (line-end-position)) (end (or (gnus-summary--inv end) (gnus-summary--inv (1- end)))) ;; Leave point at bol (beg (progn (beginning-of-line) (if (bobp) (point) (1- (point))))) @@ -12675,8 +12675,8 @@ If REVERSE, save parts that do not match TYPE." ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>. (when gnus-summary-selected-face (save-excursion - (let* ((beg (point-at-bol)) - (end (point-at-eol)) + (let* ((beg (line-beginning-position)) + (end (line-end-position)) ;; Fix by Mike Dugan <dugan@bucrf16.bu.edu>. (from (if (get-text-property beg 'mouse-face) beg @@ -12732,7 +12732,7 @@ If REVERSE, save parts that do not match TYPE." (with-no-warnings ;See docstring of gnus-summary-highlight. (defvar score) (defvar default) (defvar default-high) (defvar default-low) (defvar mark) (defvar uncached)) - (let* ((beg (point-at-bol)) + (let* ((beg (line-beginning-position)) (article (or (gnus-summary-article-number) gnus-current-article)) (score (or (cdr (assq article gnus-newsgroup-scored)) @@ -12748,7 +12748,7 @@ If REVERSE, save parts that do not match TYPE." (let ((face (funcall (gnus-summary-highlight-line-0)))) (unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face)) (gnus-put-text-property-excluding-characters-with-faces - beg (1+ (point-at-eol)) 'face + beg (1+ (line-end-position)) 'face (setq face (if (boundp face) (symbol-value face) face))) (when gnus-summary-highlight-line-function (funcall gnus-summary-highlight-line-function article face)))))) @@ -12895,7 +12895,7 @@ treated as multipart/mixed." (insert "Mime-Version: 1.0\n") (widen) (when (search-forward "\n--" nil t) - (let ((separator (buffer-substring (point) (point-at-eol)))) + (let ((separator (buffer-substring (point) (line-end-position)))) (message-narrow-to-head) (message-remove-header "Content-Type") (goto-char (point-max)) diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index fa942bee8e8..13263dddc9c 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -107,15 +107,15 @@ should return non-nil if the topic is to be displayed." (defun gnus-group-topic-name () "The name of the topic on the current line." - (get-text-property (point-at-bol) 'gnus-topic)) + (get-text-property (line-beginning-position) 'gnus-topic)) (defun gnus-group-topic-level () "The level of the topic on the current line." - (get-text-property (point-at-bol) 'gnus-topic-level)) + (get-text-property (line-beginning-position) 'gnus-topic-level)) (defun gnus-group-topic-unread () "The number of unread articles in topic on the current line." - (get-text-property (point-at-bol) 'gnus-topic-unread)) + (get-text-property (line-beginning-position) 'gnus-topic-unread)) (defun gnus-topic-unread (topic) "Return the number of unread articles in TOPIC." @@ -128,7 +128,7 @@ should return non-nil if the topic is to be displayed." (defun gnus-topic-visible-p () "Return non-nil if the current topic is visible." - (get-text-property (point-at-bol) 'gnus-topic-visible)) + (get-text-property (line-beginning-position) 'gnus-topic-visible)) (defun gnus-topic-articles-in-topic (entries) (let ((total 0) @@ -188,7 +188,7 @@ If TOPIC, start with that topic." (defun gnus-group-active-topic-p () "Say whether the current topic comes from the active topics." - (get-text-property (point-at-bol) 'gnus-active)) + (get-text-property (line-beginning-position) 'gnus-active)) (defun gnus-topic-find-groups (topic &optional level all lowest recursive) "Return entries for all visible groups in TOPIC. diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 4c93814e0dc..fe556b155a8 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -118,7 +118,7 @@ This is a compatibility function for different Emacsen." ;; Delete the current line (and the next N lines). (defmacro gnus-delete-line (&optional n) - `(delete-region (point-at-bol) + `(delete-region (line-beginning-position) (progn (forward-line ,(or n 1)) (point)))) (defun gnus-extract-address-components (from) @@ -178,7 +178,7 @@ is slower." (defun gnus-goto-colon () (move-beginning-of-line 1) - (let ((eol (point-at-eol))) + (let ((eol (line-end-position))) (goto-char (or (text-property-any (point) eol 'gnus-position t) (search-forward ":" eol t) (point))))) diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el index ee6cab365f3..9cafc78ab89 100644 --- a/lisp/gnus/gnus-uu.el +++ b/lisp/gnus/gnus-uu.el @@ -544,11 +544,11 @@ didn't work, and overwrite existing files. Otherwise, ask each time." "Various")))) (goto-char (point-min)) (when (re-search-forward "^Subject: ") - (delete-region (point) (point-at-eol)) + (delete-region (point) (line-end-position)) (insert subject)) (goto-char (point-min)) (when (re-search-forward "^From:") - (delete-region (point) (point-at-eol)) + (delete-region (point) (line-end-position)) (insert " " from)) (let ((message-forward-decoded-p t)) (message-forward post t)))) @@ -1763,7 +1763,7 @@ Gnus might fail to display all of it.") (unless (looking-at (concat gnus-uu-begin-string "\\|" gnus-uu-end-string)) (when (not found) - (setq length (- (point-at-eol) (point-at-bol)))) + (setq length (- (line-end-position) (line-beginning-position)))) (setq found t) (beginning-of-line) (setq beg (point)) @@ -2068,7 +2068,7 @@ If no file has been included, the user will be asked for a file." (goto-char (point-min)) (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$") nil t) - (setq header (buffer-substring (point-min) (point-at-bol))) + (setq header (buffer-substring (point-min) (line-beginning-position))) (goto-char (point-min)) (when gnus-uu-post-separate-description diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index da05a768e3b..b98e623db80 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2185,7 +2185,7 @@ see `message-narrow-to-headers-or-head'." (progn (forward-line 1) (if (re-search-forward "^[^ \n\t]" nil t) - (point-at-bol) + (line-beginning-position) (point-max)))) (goto-char (point-min))) @@ -3664,7 +3664,7 @@ Message buffers and is not meant to be called directly." (save-excursion (save-restriction (widen) - (let ((bound (+ (point-at-eol) 1)) case-fold-search) + (let ((bound (+ (line-end-position) 1)) case-fold-search) (goto-char (point-min)) (not (search-forward (concat "\n" mail-header-separator "\n") bound t)))))) @@ -5671,11 +5671,11 @@ Otherwise, generate and save a value for `canlock-password' first." (goto-char (point-max)) (if (not (re-search-backward message-signature-separator nil t)) t - (setq sig-start (1+ (point-at-eol))) + (setq sig-start (1+ (line-end-position))) (setq sig-end (if (re-search-forward "<#/?\\(multipart\\|part\\|external\\|mml\\)" nil t) - (- (point-at-bol) 1) + (- (line-beginning-position) 1) (point-max))) (if (>= (count-lines sig-start sig-end) 5) (if (message-gnksa-enable-p 'signature) @@ -6361,7 +6361,7 @@ Headers already prepared in the buffer are not modified." (forward-line -1))) ;; The value of this header was empty, so we clear ;; totally and insert the new value. - (delete-region (point) (point-at-eol)) + (delete-region (point) (line-end-position)) ;; If the header is optional, and the header was ;; empty, we can't insert it anyway. (unless optionalp @@ -6616,10 +6616,10 @@ beginning of a folded header)." (or (eq (char-after) ?\s) (eq (char-after) ?\t))) (beginning-of-line 0))) (when (or (eq (char-after) ?\s) (eq (char-after) ?\t) - (search-forward ":" (point-at-eol) t)) + (search-forward ":" (line-end-position) t)) ;; We are a bit more lacks than the RFC and allow any positive number of WSP ;; characters. - (skip-chars-forward " \t" (point-at-eol)) + (skip-chars-forward " \t" (line-end-position)) (point))) (defun message-beginning-of-line (&optional n) @@ -8642,7 +8642,7 @@ From headers in the original article." (autoload 'ecomplete-display-matches "ecomplete") (defun message--in-tocc-p () - (and (memq (char-after (point-at-bol)) '(?C ?T ?\t ? )) + (and (memq (char-after (line-beginning-position)) '(?C ?T ?\t ? )) (message-point-in-header-p) (save-excursion (beginning-of-line) diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el index 5f9903a5b06..1a699d0e705 100644 --- a/lisp/gnus/nnbabyl.el +++ b/lisp/gnus/nnbabyl.el @@ -307,7 +307,7 @@ (while (re-search-forward "^X-Gnus-Newsgroup:" (save-excursion (search-forward "\n\n" nil t) (point)) t) - (delete-region (point-at-bol) (progn (forward-line 1) (point)))) + (delete-region (line-beginning-position) (progn (forward-line 1) (point)))) (setq result (eval accept-form t)) (kill-buffer (current-buffer)) result) @@ -424,7 +424,7 @@ (defun nnbabyl-delete-mail (&optional force leave-delim) ;; Delete the current X-Gnus-Newsgroup line. (unless force - (delete-region (point-at-bol) (progn (forward-line 1) (point)))) + (delete-region (line-beginning-position) (progn (forward-line 1) (point)))) ;; Beginning of the article. (save-excursion (save-restriction @@ -630,7 +630,8 @@ (while (re-search-forward "^X-Gnus-Newsgroup: \\([^ ]+\\) " nil t) (if (gethash (setq id (match-string 1)) idents) (progn - (delete-region (point-at-bol) (progn (forward-line 1) (point))) + (delete-region (line-beginning-position) + (progn (forward-line 1) (point))) (nnheader-message 7 "Moving %s..." id) (nnbabyl-save-mail (nnmail-article-group 'nnbabyl-active-number))) diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index 14540ac7e87..27204b3618a 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -862,7 +862,7 @@ all. This may very well take some time.") (search-forward id nil t)) ; We find the ID. ;; And the id is in the fourth field. (if (not (and (search-backward "\t" nil t 4) - (not (search-backward"\t" (point-at-bol) t)))) + (not (search-backward"\t" (line-beginning-position) t)))) (forward-line 1) (beginning-of-line) (setq found t) diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index a2b461c15f0..c47a398c4c2 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el @@ -179,7 +179,7 @@ all. This may very well take some time.") (goto-char (match-end 0)) (setq num (string-to-number (buffer-substring - (point) (point-at-eol)))) + (point) (line-end-position)))) (goto-char start) (< num article))) ;; Check that we are before an article with a @@ -189,7 +189,7 @@ all. This may very well take some time.") (progn (setq num (string-to-number (buffer-substring - (point) (point-at-eol)))) + (point) (line-end-position)))) (> num article)) ;; Discard any article numbers before the one we're ;; now looking at. @@ -259,7 +259,7 @@ all. This may very well take some time.") (if (search-forward (concat "\n" nnfolder-article-marker) nil t) (string-to-number (buffer-substring - (point) (point-at-eol))) + (point) (line-end-position))) -1)))))))) (deffoo nnfolder-request-group (group &optional server dont-check _info) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 634cc251b87..b91798b8a0c 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -188,7 +188,7 @@ on your system, you could say something like: (defsubst nnheader-header-value () (skip-chars-forward " \t") - (buffer-substring (point) (point-at-eol))) + (buffer-substring (point) (line-end-position))) (autoload 'ietf-drums-unfold-fws "ietf-drums") @@ -397,7 +397,7 @@ leaving the original buffer untouched." (autoload 'gnus-extract-message-id-from-in-reply-to "gnus-sum") (defun nnheader-parse-nov (&optional number) - (let ((eol (point-at-eol)) + (let ((eol (line-end-position)) references in-reply-to x header) (setq header (make-full-mail-header @@ -632,7 +632,7 @@ the line could be found." ;; This is invalid, but not all articles have Message-IDs. () (mail-position-on-field "References") - (let ((begin (point-at-bol)) + (let ((begin (line-beginning-position)) (fill-column 78) (fill-prefix "\t")) (when references diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index bde0de98924..afa14448fc7 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -661,7 +661,7 @@ nn*-request-list should have been called before calling this function." (while (not (eobp)) (condition-case nil (progn - (narrow-to-region (point) (point-at-eol)) + (narrow-to-region (point) (line-end-position)) (setq group (read buffer) group (cond ((symbolp group) @@ -1116,7 +1116,7 @@ FUNC will be called with the group name to determine the article number." (while (not (eobp)) (unless (< (move-to-column nnmail-split-header-length-limit) nnmail-split-header-length-limit) - (delete-region (point) (point-at-eol))) + (delete-region (point) (line-end-position))) (forward-line 1)) ;; Allow washing. (goto-char (point-min)) @@ -1650,7 +1650,7 @@ See the documentation for the variable `nnmail-split-fancy' for details." (skip-chars-forward "^\n\r\t") (unless (looking-at "[\r\n]") (forward-char 1) - (buffer-substring (point) (point-at-eol))))))) + (buffer-substring (point) (line-end-position))))))) ;; Function for nnmail-split-fancy: look up all references in the ;; cache and if a match is found, return that group. diff --git a/lisp/gnus/nnmairix.el b/lisp/gnus/nnmairix.el index 8c811b0c6c0..b1eee2d5308 100644 --- a/lisp/gnus/nnmairix.el +++ b/lisp/gnus/nnmairix.el @@ -574,7 +574,7 @@ Other back ends might or might not work.") (gnus-group-get-parameter qualgroup 'folder))) (progn (replace-match cur) - (delete-region cpoint (point-at-bol)) + (delete-region cpoint (line-beginning-position)) (forward-line) (setq cpoint (point))) (forward-line))) diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index ae726ba0f7b..40e4b9ea828 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -601,7 +601,7 @@ non-nil.") (search-forward id nil t)) ; We find the ID. ;; And the id is in the fourth field. (if (not (and (search-backward "\t" nil t 4) - (not (search-backward "\t" (point-at-bol) t)))) + (not (search-backward "\t" (line-beginning-position) t)))) (forward-line 1) (beginning-of-line) (setq found t) @@ -755,7 +755,7 @@ article number. This function is called narrowed to an article." (nnheader-insert-nov headers))) (defsubst nnml-header-value () - (buffer-substring (match-end 0) (point-at-eol))) + (buffer-substring (match-end 0) (line-end-position))) (defun nnml-parse-head (chars &optional number) "Parse the head of the current buffer." @@ -1061,7 +1061,7 @@ Use the nov database for the current group if available." (regexp-quote (concat group ":" old-number-string)) "\\>") - (point-at-eol) t)) + (line-end-position) t)) (replace-match (concat group ":" new-number-string))) ;; Save to the new file: @@ -1109,7 +1109,7 @@ Use the nov database for the current group if available." (regexp-quote (concat group ":" old-number-string)) "\\>") - (point-at-eol) t) + (line-end-position) t) (replace-match (concat "\\1" group ":" new-number-string)))))) ;; 4/ Possibly remove the article from the backlog: diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 6fa424a1555..6dea405d02b 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -480,7 +480,7 @@ retried once before actually displaying the error report." (goto-char pos) (if (looking-at (regexp-quote command)) (delete-region pos (progn (forward-line 1) - (point-at-bol))))))) + (line-beginning-position))))))) (nnheader-report 'nntp "Couldn't open connection to %s." nntp-address)))) @@ -503,7 +503,7 @@ retried once before actually displaying the error report." (goto-char pos) (if (looking-at (regexp-quote command)) (delete-region pos (progn (forward-line 1) - (point-at-bol))))))) + (line-beginning-position))))))) (nnheader-report 'nntp "Couldn't open connection to %s." nntp-address)))) @@ -528,7 +528,8 @@ retried once before actually displaying the error report." (with-current-buffer buffer (goto-char pos) (if (looking-at (regexp-quote command)) - (delete-region pos (progn (forward-line 1) (point-at-bol)))) + (delete-region pos (progn (forward-line 1) + (line-beginning-position)))) ))) (nnheader-report 'nntp "Couldn't open connection to %s." nntp-address)))) diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index 7b192aa1d2e..e150cbf2b46 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el @@ -387,7 +387,7 @@ lines have the correct component server prefix." (looking-at "[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t") (goto-char (match-end 0)) - (unless (search-forward "\t" (point-at-eol) 'move) + (unless (search-forward "\t" (line-end-position) 'move) (insert "\t")) ;; Remove any spaces at the beginning of the Xref field. @@ -403,8 +403,8 @@ lines have the correct component server prefix." ;; component server prefix. (save-restriction (narrow-to-region (point) - (or (search-forward "\t" (point-at-eol) t) - (point-at-eol))) + (or (search-forward "\t" (line-end-position) t) + (line-end-position))) (goto-char (point-min)) (when (re-search-forward "Xref: *[^\n:0-9 ]+ *" nil t) (replace-match "" t t)) diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index 87b5551d31c..fd2791f5c51 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -519,7 +519,7 @@ A string or a list of strings is returned." (goto-char b) (let (res) (while (< (point) e) - (let ((str (buffer-substring (point) (point-at-eol)))) + (let ((str (buffer-substring (point) (line-end-position)))) (unless (string= "" str) (push str res))) (forward-line)) diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index 334204768b4..014b8254fa0 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -291,7 +291,7 @@ symbol `ask', query before flushing the queue file." (goto-char (point-min)) (while (and (not (eobp)) (re-search-forward - "http://\\([^/]+\\)\\(/.*\\) *$" (point-at-eol) t)) + "http://\\([^/]+\\)\\(/.*\\) *$" (line-end-position) t)) (let ((spam-report-gmane-wait (zerop (% (line-number-at-pos) spam-report-gmane-max-requests)))) (gnus-message 6 "Reporting %s%s..." diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 2883a6186bd..e0d90e5547a 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -2132,7 +2132,7 @@ See `spam-ifile-database'." ;; check the return now (we're back in the temp buffer) (goto-char (point-min)) (if (not (eobp)) - (setq category (buffer-substring (point) (point-at-eol)))) + (setq category (buffer-substring (point) (line-end-position)))) (when (not (zerop (length category))) ; we need a category here (if spam-ifile-all-categories (setq return category) @@ -2321,7 +2321,7 @@ With a non-nil REMOVE, remove the ADDRESSES." (with-temp-buffer (insert-file-contents file) (while (not (eobp)) - (setq address (buffer-substring (point) (point-at-eol))) + (setq address (buffer-substring (point) (line-end-position))) (forward-line 1) ;; insert the e-mail address if detected, otherwise the raw data (unless (zerop (length address)) |