From 48f15755c484de2e4b8b1c89cd3590455e791f72 Mon Sep 17 00:00:00 2001 From: Jesper Harder Date: Wed, 4 Feb 2004 02:24:45 +0000 Subject: [PATCH] * gnus-uu.el (gnus-uu-check-correct-stripped-uucode): Simplify. (gnus-uu-post-encoded): Use point-at-bol. * gnus-topic.el (gnus-group-active-topic-p): do. * gnus-start.el (gnus-newsrc-to-gnus-format): do. * gnus-group.el (gnus-group-kill-region): do. * gnus-art.el (article-date-ut): do. --- lisp/ChangeLog | 11 +++++++++++ lisp/gnus-art.el | 13 ++++++------- lisp/gnus-group.el | 6 ++---- lisp/gnus-start.el | 2 +- lisp/gnus-topic.el | 4 +--- lisp/gnus-uu.el | 18 ++++++------------ 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d004b711e..532f427ff 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,16 @@ 2004-02-04 Jesper Harder + * gnus-uu.el (gnus-uu-check-correct-stripped-uucode): Simplify. + (gnus-uu-post-encoded): Use point-at-bol. + + * gnus-topic.el (gnus-group-active-topic-p): do. + + * gnus-start.el (gnus-newsrc-to-gnus-format): do. + + * gnus-group.el (gnus-group-kill-region): do. + + * gnus-art.el (article-date-ut): do. + * message.el (message-fetch-field): Remove redundant case-fold-search binding. (message-narrow-to-field): Simplify. diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index e7106635d..f177b26a3 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -2789,19 +2789,18 @@ should replace the \"Date:\" one, or should be added below it." ;; Delete any old Date headers. (while (re-search-forward date-regexp nil t) (if pos - (delete-region (progn (beginning-of-line) (point)) + (delete-region (point-at-bol) (progn (gnus-article-forward-header) (point))) - (delete-region (progn (beginning-of-line) (point)) - (progn (gnus-article-forward-header) - (forward-char -1) - (point))) + (delete-region (point-at-bol) + (progn (gnus-article-forward-header) + (forward-char -1) + (point))) (setq pos (point)))) (when (and (not pos) (re-search-forward tdate-regexp nil t)) (forward-line 1)) - (when pos - (goto-char pos)) + (gnus-goto-char pos) (insert (article-make-date-line date (or type 'ut))) (unless pos (insert "\n") diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 9c6af631e..289dfe656 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -3340,12 +3340,10 @@ The killed newsgroups can be yanked by using \\[gnus-group-yank-group]." (count-lines (progn (goto-char begin) - (beginning-of-line) - (point)) + (point-at-bol)) (progn (goto-char end) - (beginning-of-line) - (point)))))) + (point-at-bol)))))) (goto-char begin) (beginning-of-line) ;Important when LINES < 1 (gnus-group-kill-group lines))) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index cd1154f08..fe39b883f 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -2442,7 +2442,7 @@ If FORCE is non-nil, the .newsrc file is read." (point-at-bol) ;; Options may continue on the next line. (or (and (re-search-forward "^[^ \t]" nil 'move) - (progn (beginning-of-line) (point))) + (point-at-bol)) (point))))) (forward-line -1)) (symbol diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index cb40c7c20..714bc6c7c 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -195,9 +195,7 @@ If TOPIC, start with that topic." (defun gnus-group-active-topic-p () "Say whether the current topic comes from the active topics." - (save-excursion - (beginning-of-line) - (get-text-property (point) 'gnus-active))) + (get-text-property (point-at-bol) '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-uu.el b/lisp/gnus-uu.el index 4c731ed2e..761398a20 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -1705,8 +1705,7 @@ Gnus might fail to display all of it.") (defun gnus-uu-check-correct-stripped-uucode (start end) (save-excursion (let (found beg length) - (if (not gnus-uu-correct-stripped-uucode) - () + (unless gnus-uu-correct-stripped-uucode (goto-char start) (if (re-search-forward " \\|`" end t) @@ -1719,19 +1718,15 @@ Gnus might fail to display all of it.") (forward-line 1)))) (while (not (eobp)) - (if (looking-at (concat gnus-uu-begin-string "\\|" - gnus-uu-end-string)) - () + (unless (looking-at (concat gnus-uu-begin-string "\\|" + gnus-uu-end-string)) (when (not found) - (beginning-of-line) - (setq beg (point)) - (end-of-line) - (setq length (- (point) beg))) + (setq length (- (point-at-eol) (point-at-bol)))) (setq found t) (beginning-of-line) (setq beg (point)) (end-of-line) - (when (not (= length (- (point) beg))) + (unless (= length (- (point) beg)) (insert (make-string (- length (- (point) beg)) ? )))) (forward-line 1))))))) @@ -2031,8 +2026,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) - (beginning-of-line) - (setq header (buffer-substring (point-min) (point))) + (setq header (buffer-substring (point-min) (point-at-bol))) (goto-char (point-min)) (when gnus-uu-post-separate-description -- 2.25.1