From cc2476c59df7c01510dff6fb30c8e981183f2ccc Mon Sep 17 00:00:00 2001 From: hmurata Date: Sat, 9 Aug 2003 18:39:16 +0000 Subject: [PATCH] * wl-vars.el (wl-summary-print-argument-within-window): New variable. * wl-action.el (wl-summary-print-argument): Print argument to right side of window if `wl-summary-print-argument-within-window' is non-nil. --- wl/ChangeLog | 8 ++++++++ wl/wl-action.el | 29 +++++++++++++++++++++-------- wl/wl-vars.el | 6 ++++++ 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 22f877f..a946e16 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2003-08-09 Hiroya Murata + + * wl-vars.el (wl-summary-print-argument-within-window): New variable. + + * wl-action.el (wl-summary-print-argument): Print argument to + right side of window if `wl-summary-print-argument-within-window' + is non-nil. + 2003-08-09 Yuuichi Teranishi * wl-action.el (wl-summary-set-mark): Use diff --git a/wl/wl-action.el b/wl/wl-action.el index 2eb5238..7612fe0 100644 --- a/wl/wl-action.el +++ b/wl/wl-action.el @@ -760,14 +760,27 @@ Return number if put mark succeed" (search-forward "\r") (forward-char -1) (setq re (point)) - (setq c 0) - (while (< c len) - (forward-char -1) - (setq c (+ c (char-width (following-char))))) - (and (> c len) (setq folder (concat " " folder))) - (setq rs (point)) - (when wl-summary-width - (put-text-property rs re 'invisible t)) + (let ((width (cond (wl-summary-width) + (wl-summary-print-argument-within-window + (1- (window-width))))) + (c (current-column)) + (padding 0)) + (if (and width (> (+ c len) width)) + (progn + (move-to-column width) + (setq c (current-column)) + (while (> (+ c len) width) + (forward-char -1) + (setq c (current-column))) + (when (< (+ c len) width) + (setq folder (concat " " folder))) + (setq rs (point)) + (put-text-property rs re 'invisible t)) + (when (and width + (> (setq padding (- width len c)) 0)) + (setq folder (concat (make-string padding ?\ ) + folder))) + (setq rs (1- re)))) (put-text-property rs re 'wl-summary-action-argument t) (goto-char re) (wl-highlight-action-argument-string folder) diff --git a/wl/wl-vars.el b/wl/wl-vars.el index b64ba3b..71705ab 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -1691,6 +1691,12 @@ with wl-highlight-folder-many-face." :group 'wl-summary :group 'wl-pref) +(defcustom wl-summary-print-argument-within-window nil + "*If non-nil, always print argument right side of window." + :type 'boolean + :group 'wl-summary + :group 'wl-pref) + (defcustom wl-summary-pick-field-default "Body" "*Default field for pick." :type '(radio (const "From") -- 1.7.10.4