* wl-address.el (wl-address-add-or-change): Use `point-at-bol' and `point-at-eol'.
authorkaoru <kaoru>
Sat, 2 Jan 2010 02:07:23 +0000 (02:07 +0000)
committerkaoru <kaoru>
Sat, 2 Jan 2010 02:07:23 +0000 (02:07 +0000)
* wl-addrmgr.el (wl-addrmgr-unmark, wl-addrmgr-address-entry): Ditto.

wl/ChangeLog
wl/wl-address.el
wl/wl-addrmgr.el

index b56ec91..3f56ea2 100644 (file)
@@ -1,3 +1,10 @@
+2010-01-02  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+       * wl-address.el (wl-address-add-or-change): Use `point-at-bol'
+       and `point-at-eol'.
+       * wl-addrmgr.el (wl-addrmgr-unmark, wl-addrmgr-address-entry):
+       Ditto.
+
 2010-01-01  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * wl-util.el (wl-count-lines): Use `point-at-bol' instead of
index 3f7dbb9..0e79c29 100644 (file)
@@ -720,10 +720,7 @@ If already registerd, change it."
                  (insert "\n")))
          ;; override
          (while (re-search-forward (concat "^[ \t]*" address) nil t)
-           (delete-region (save-excursion (beginning-of-line)
-                                          (point))
-                          (save-excursion (end-of-line)
-                                          (+ 1 (point))))))
+           (delete-region (point-at-bol) (1+ (point-at-eol)))))
        (insert (format "%s\t%s\t%s\n"
                        (or new-addr address)
                        (prin1-to-string the-petname)
index 5c27f35..d31bab9 100644 (file)
@@ -439,8 +439,7 @@ Return nil if no ADDRESS exists."
   (let ((entry (wl-addrmgr-address-entry))
        buffer-read-only)
     (save-excursion
-      (beginning-of-line)
-      (delete-region (point) (progn (end-of-line)(point)))
+      (delete-region (point-at-bol) (point-at-eol))
       (wl-addrmgr-insert-line entry))
     (set-buffer-modified-p nil)
     (wl-addrmgr-next)))
@@ -552,14 +551,10 @@ Return nil if no ADDRESS exists."
 ;;; Operations.
 
 (defun wl-addrmgr-address-entry ()
-  (save-excursion
-    (end-of-line)
-    (get-text-property (previous-single-property-change
-                       (point) 'wl-addrmgr-entry nil
-                       (progn
-                         (beginning-of-line)
-                         (point)))
-                      'wl-addrmgr-entry)))
+  (get-text-property (previous-single-property-change
+                     (point-at-eol) 'wl-addrmgr-entry nil
+                     (point-at-bol))
+                    'wl-addrmgr-entry))
 
 (defun wl-addrmgr-mark-write (&optional mark)
   "Set MARK to the current address entry."