From: yoichi Date: Sat, 13 Sep 2003 09:06:41 +0000 (+0000) Subject: * wl-summary.el (wl-summary-narrow-to-region): New function. X-Git-Tag: wl-2_11_12~4 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d29abfad22a99c47c16a22e0152d91ed27b0c91d;p=elisp%2Fwanderlust.git * wl-summary.el (wl-summary-narrow-to-region): New function. (wl-summary-prefetch-region-no-mark, wl-summary-mark-as-read-region) (wl-summary-mark-as-unread-region, wl-summary-mark-as-important-region) (wl-summary-save-region): Use it. * wl-action.el (wl-summary-collect-numbers-region) (wl-summary-unmark-region, wl-summary-mark-region-subr): Ditto. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index d43bf0c..60c488a 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2003-09-13 Mito + + * wl-summary.el (wl-summary-narrow-to-region): New function. + (wl-summary-prefetch-region-no-mark, wl-summary-mark-as-read-region) + (wl-summary-mark-as-unread-region, wl-summary-mark-as-important-region) + (wl-summary-save-region): Use it. + * wl-action.el (wl-summary-collect-numbers-region) + (wl-summary-unmark-region, wl-summary-mark-region-subr): Ditto. + 2003-09-13 Hiroya Murata * wl-folder.el (wl-folder-count-incorporates): Don't use diff --git a/wl/wl-action.el b/wl/wl-action.el index 5a5ad78..4fc32a4 100644 --- a/wl/wl-action.el +++ b/wl/wl-action.el @@ -642,7 +642,7 @@ Return number if put mark succeed" (save-excursion (save-restriction (let (numbers) - (narrow-to-region (or begin (point-min))(or end (point-max))) + (wl-summary-narrow-to-region (or begin (point-min))(or end (point-max))) (goto-char (point-min)) ;; for thread... (if (eq wl-summary-buffer-view 'thread) @@ -852,7 +852,7 @@ If optional argument NUMBER is specified, unmark message specified by NUMBER." (interactive "r") (save-excursion (save-restriction - (narrow-to-region beg end) + (wl-summary-narrow-to-region beg end) (goto-char (point-min)) (if (eq wl-summary-buffer-view 'thread) (progn @@ -873,7 +873,7 @@ If optional argument NUMBER is specified, unmark message specified by NUMBER." (defun wl-summary-mark-region-subr (function beg end data) (save-excursion (save-restriction - (narrow-to-region beg end) + (wl-summary-narrow-to-region beg end) (goto-char (point-min)) (if (eq wl-summary-buffer-view 'thread) (progn diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 0a13323..dbdd091 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -1377,6 +1377,17 @@ If ARG is non-nil, checking is omitted." t) nil)))))) +(defsubst wl-summary-narrow-to-region (beg end) + (narrow-to-region + (save-excursion + (goto-char beg) + (beginning-of-line) + (point)) + (save-excursion + (goto-char end) + (if (eq (current-column) 0) (beginning-of-line) (end-of-line)) + (point)))) + (defun wl-summary-prefetch-region-no-mark (beg end &optional prefetch-marks) (interactive "r") (let ((count 0) @@ -1387,7 +1398,7 @@ If ARG is non-nil, checking is omitted." (save-excursion (setq start-pos (point)) (save-restriction - (narrow-to-region beg end) + (wl-summary-narrow-to-region beg end) ;; collect prefetch targets. (message "Collecting marks...") (goto-char (point-min)) @@ -1443,7 +1454,7 @@ If ARG is non-nil, checking is omitted." (interactive "r") (save-excursion (save-restriction - (narrow-to-region beg end) + (wl-summary-narrow-to-region beg end) (goto-char (point-min)) (if (eq wl-summary-buffer-view 'thread) (let (number-list) @@ -1468,7 +1479,7 @@ If ARG is non-nil, checking is omitted." (interactive "r") (save-excursion (save-restriction - (narrow-to-region beg end) + (wl-summary-narrow-to-region beg end) (goto-char (point-min)) (if (eq wl-summary-buffer-view 'thread) (let (number-list) @@ -1493,8 +1504,7 @@ If ARG is non-nil, checking is omitted." (interactive "r") (save-excursion (save-restriction - (narrow-to-region beg end);(save-excursion (goto-char end) - ; (end-of-line) (point))) + (wl-summary-narrow-to-region beg end) (goto-char (point-min)) (if (eq wl-summary-buffer-view 'thread) (progn @@ -4296,7 +4306,7 @@ If ASK-CODING is non-nil, coding-system for the message is asked." (interactive "r") (save-excursion (save-restriction - (narrow-to-region beg end) + (wl-summary-narrow-to-region beg end) (goto-char (point-min)) (let ((wl-save-dir (wl-read-directory-name "Save to directory: "