* wl-vars.el (wl-summary-print-argument-within-window): New variable.
authorhmurata <hmurata>
Sat, 9 Aug 2003 18:39:16 +0000 (18:39 +0000)
committerhmurata <hmurata>
Sat, 9 Aug 2003 18:39:16 +0000 (18:39 +0000)
* 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
wl/wl-action.el
wl/wl-vars.el

index 22f877f..a946e16 100644 (file)
@@ -1,3 +1,11 @@
+2003-08-09  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <teranisi@gohome.org>
 
        * wl-action.el (wl-summary-set-mark): Use
index 2eb5238..7612fe0 100644 (file)
@@ -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)
index b64ba3b..71705ab 100644 (file)
@@ -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")