* gnus-uu.el (gnus-uu-check-correct-stripped-uucode): Simplify.
authorJesper Harder <harder@ifa.au.dk>
Wed, 4 Feb 2004 02:24:45 +0000 (02:24 +0000)
committerJesper Harder <harder@ifa.au.dk>
Wed, 4 Feb 2004 02:24:45 +0000 (02:24 +0000)
(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
lisp/gnus-art.el
lisp/gnus-group.el
lisp/gnus-start.el
lisp/gnus-topic.el
lisp/gnus-uu.el

index d004b71..532f427 100644 (file)
@@ -1,5 +1,16 @@
 2004-02-04  Jesper Harder  <harder@ifa.au.dk>
 
+       * 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.
index e710663..f177b26 100644 (file)
@@ -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")
index 9c6af63..289dfe6 100644 (file)
@@ -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)))
index cd1154f..fe39b88 100644 (file)
@@ -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
index cb40c7c..714bc6c 100644 (file)
@@ -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.
index 4c731ed..761398a 100644 (file)
@@ -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