[Mew-dist 15043] Re: cite labelの制限

KOIE Hidetaka ( 鯉江英隆 ) hide at example.com
2000年 11月 25日 (土) 13:49:04 JST


 From:       Tatsuya Kinoshita <tatsuyak at example.com>
 Subject:    [Mew-dist 14991] Re: cite labelの制限
 Date:       Thu, 23 Nov 2000 12:34:46 +0900
 Message-Id: <20001123.123825.85407683.tats at example.com>

  | > mew-cite-fields / mew-cite-format を挿入するときに
  | > fill-column を越えた分は削って「 ..」に付けかえるためのパッチです。
  | 
  | 「削る」「詰める(折り返す)」「そのまま」を選びたい。
  | 
  | あと、「 ..」以外の文字にしたい人もいるかも。

.mewに
    (setq mew-draft-cite-fill-mode 'wrap)
と設定すれば「詰める(折り返す)」になり、
    (setq mew-draft-cite-fill-mode 'truncate)
    (setq mew-draft-cite-dotdot " …")    
と設定すれば「削る」になります。
    (setq mew-draft-cite-fill-mode nil)
で従来どおりの「そのまま」になります。

--
KOIE Hidetaka 鯉江英隆 <hide at example.com>
-------------- next part --------------
*** mew-draft.el.~1~	Fri Nov 24 12:08:22 2000
--- mew-draft.el	Sat Nov 25 13:34:07 2000
*************** (defun mew-cite-get-value (field)
*** 535,545 ****
  (defun mew-cite-strings ()
    "A function to create cite label according to 
  'mew-cite-format' and 'mew-cite-fields'."
!   (if (null mew-cite-fields)
!       ""
!     (apply (function format)
! 	   mew-cite-format
! 	   (mapcar (function mew-cite-get-value) mew-cite-fields))))
  
  (defun mew-cite-prefix-username ()
    "A good candidate for mew-cite-prefix-function.
--- 535,574 ----
  (defun mew-cite-strings ()
    "A function to create cite label according to 
  'mew-cite-format' and 'mew-cite-fields'."
!   (save-excursion
!     (if (null mew-cite-fields)
!         ""
!       (let ((label
!              (apply (function format)
!                     mew-cite-format
!                     (mapcar (function mew-cite-get-value) mew-cite-fields))))
!         (mew-set-buffer-tmp)
!         (insert label)
!         (goto-char (point-min))
!         (while (< (point) (point-max))
!           (cond
!            ((eq mew-draft-cite-fill-mode 'truncate)
!             (let ((dotdot (if (stringp mew-draft-cite-dotdot)
!                               mew-draft-cite-dotdot "")))
!               (end-of-line)            
!               (if (< fill-column (current-column))
!                   (let ((eol (point)))
!                   (insert dotdot)
!                   (goto-char eol)
!                   (while (< fill-column (current-column))
!                     (delete-backward-char 1))))
!               (forward-line)
!               (beginning-of-line)))
!            ((eq mew-draft-cite-fill-mode 'wrap)
!             (let ((beg (point)))
!               (end-of-line)
!               (fill-region beg (point)))
!             (forward-line)
!             (beginning-of-line))
!            (t
!             (forward-line)
!             (beginning-of-line))))
!         (buffer-string)))))
  
  (defun mew-cite-prefix-username ()
    "A good candidate for mew-cite-prefix-function.
-------------- next part --------------
*** mew-vars.el.~1~	Fri Nov 24 12:08:22 2000
--- mew-vars.el	Sat Nov 25 13:01:15 2000
*************** (defcustom mew-cite-format "From: %s\nSu
*** 935,940 ****
--- 935,954 ----
    :group 'mew-cite
    :type 'string)
  
+ (defcustom mew-draft-cite-fill-mode nil
+   "*Method to format a citation header.
+ If 'wrap, format with fill-region.
+ If 'truncate, cut over fill-column and insert mew-draft-cite-dotdot."
+   :group 'mew-draft
+   :type '(choice (symbol :tag "Wrap" wrap)
+                  (symbol :tag "Truncate" truncate)
+                  (symbol :tag "No fill" nil)))
+ 
+ (defcustom mew-draft-cite-dotdot " .."
+   "String that is inserted a truncated line when mew-draft-cite-fill-mode is 'truncate"
+   :group 'mew-cite
+   :type 'string)
+ 
  (defcustom mew-summary-reply-position 'body
    "If 'body, the cursor locates in the beginning of the body. 
  Otherwise, the cursor is after To:."


Mew-dist メーリングリストの案内