From: kaoru Date: Sat, 2 Jan 2010 02:07:23 +0000 (+0000) Subject: * wl-address.el (wl-address-add-or-change): Use `point-at-bol' and `point-at-eol'. X-Git-Tag: elmo-imap4-compliance-root~55 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=bb548bb9ad710a6def1353929aa24cf5ff7516a8;p=elisp%2Fwanderlust.git * 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. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index b56ec91..3f56ea2 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,10 @@ +2010-01-02 TAKAHASHI Kaoru + + * 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 * wl-util.el (wl-count-lines): Use `point-at-bol' instead of diff --git a/wl/wl-address.el b/wl/wl-address.el index 3f7dbb9..0e79c29 100644 --- a/wl/wl-address.el +++ b/wl/wl-address.el @@ -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) diff --git a/wl/wl-addrmgr.el b/wl/wl-addrmgr.el index 5c27f35..d31bab9 100644 --- a/wl/wl-addrmgr.el +++ b/wl/wl-addrmgr.el @@ -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."