[Mew-dist 10294] Re: mew-fromme-to-list

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
1999年 8月 20日 (金) 18:42:42 JST


From: Takuro Horikawa <takuroho at example.com>
Subject: [Mew-dist 10282] Re: mew-fromme-to-list
Date: Fri, 20 Aug 1999 16:43:50 +0900

> で、to の場合も cc と似たような処理にした所、自分が消えてくれました。

b52 にこのパッチを当てて試して下さい。

--かず
-------------- next part --------------
Index: mew-draft.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-draft.el,v
retrieving revision 1.130
diff -c -r1.130 mew-draft.el
*** mew-draft.el	1999/08/18 04:04:49	1.130
--- mew-draft.el	1999/08/20 09:51:47
***************
*** 539,598 ****
          (insert comma adr)
        (insert ",\n\t" adr))))
  
  (defun mew-draft-header (&optional subject nl to cc newsgroups in-reply-to references other-headers)
  ;; to -- string or list
  ;; cc -- string or list
  ;; nl -- one empty line under "----", which is necessary if
  ;;      attachment is prepared
!   (let ((del (mew-get-my-address-regex-list))
! 	;; deleting list for Cc:
! 	(tf to) c cep body) ;; to is used in last
      (goto-char (point-min))
      ;; Insert To: first.
      ;; All addresses inserted on To: are appended to del.
      (cond
!      ((null tf) (insert mew-to: " \n"))
!      ((stringp tf)
!       ;; Don't check tf is mine. Cc: is also string
!       ;; We believe that user never specifies the same address of To: to Cc:
!       ;; So, not add to to del.
!       (insert mew-to: " " tf "\n"))
       ;; To: collected by reply
!      ((listp tf)
!       (insert mew-to: " " (car tf))
!       (setq del (cons (concat "^" (regexp-quote (car tf)) "$") del))
!       (while tf
! 	(setq c (car tf) tf (cdr tf))
! 	(if (mew-is-my-address del c)
! 	    ()
! 	  (mew-insert-address c)
! 	  (setq del (cons (concat "^" (regexp-quote c) "$") del))))
!       (insert "\n")))
      (cond
       ((null cc) ()) ;; do nothing 
!      ;; Cc: inputed from the mini-buffer.
!      ((stringp cc)
!       (insert  mew-cc: " " cc "\n"))
!      ;; Cc: collected by reply.
!      ((listp cc)
!       ;; find the first Cc: value since this is preceding by Cc:
!       (catch 'first
! 	(while cc
! 	  (setq c (car cc) cc (cdr cc))
! 	  (if (mew-is-my-address del c)
! 	      ()
! 	    (insert mew-cc: " " c)
! 	    (setq del (cons (concat "^" (regexp-quote c) "$") del))
! 	    (setq cep t)
! 	    (throw 'first nil))))
!       ;; insert the second or more Cc: preceding ",\n\t"
!       (while cc
! 	(setq c (car cc) cc (cdr cc))
! 	(if (mew-is-my-address del c)
! 	    ()
! 	  (mew-insert-address c)
! 	  (setq del (cons (concat "^" (regexp-quote c) "$") del))))
!       (if cep (insert "\n"))))
      (mew-draft-header-insert mew-newsgroups: newsgroups)
      (mew-draft-header-insert mew-cc:         mew-cc)
      (mew-draft-header-insert mew-subj:       (or subject ""))
--- 539,589 ----
          (insert comma adr)
        (insert ",\n\t" adr))))
  
+ (defun mew-insert-address-list (field adrs del)
+   (let (adr fep)
+     (catch 'first
+       (while adrs
+ 	(setq adr (car adrs) adrs (cdr adrs))
+ 	(if (mew-is-my-address del adr)
+ 	    ()
+ 	  (insert field " " adr)
+ 	  (setq del (cons (concat "^" (regexp-quote adr) "$") del))
+ 	  (setq fep t)
+ 	  (throw 'first nil))))
+     (while adrs
+       (setq adr (car adrs) adrs (cdr adrs))
+       (if (mew-is-my-address del adr)
+ 	  ()
+ 	(mew-insert-address adr)
+ 	(setq del (cons (concat "^" (regexp-quote adr) "$") del))))
+     (if fep (insert "\n"))
+     del))
+ 
  (defun mew-draft-header (&optional subject nl to cc newsgroups in-reply-to references other-headers)
  ;; to -- string or list
  ;; cc -- string or list
  ;; nl -- one empty line under "----", which is necessary if
  ;;      attachment is prepared
!   (let ((del (mew-get-my-address-regex-list)) ;; deleting list for Cc:
! 	body)
      (goto-char (point-min))
      ;; Insert To: first.
      ;; All addresses inserted on To: are appended to del.
      (cond
!      ((null to) (insert mew-to: " \n"))
!      ((stringp to) ;; To: inputed from the mini-buffer.
!       ;; Don't check to is mine. Cc: is also string
!       ;; We believe that user never specifies the same address of To: to Cc:.
!       (insert mew-to: " " to "\n"))
       ;; To: collected by reply
!      ((listp to)
!       (setq del (mew-insert-address-list mew-to: to del))))
      (cond
       ((null cc) ()) ;; do nothing 
!      ((stringp cc) ;; Cc: inputed from the mini-buffer.
!       (insert mew-cc: " " cc "\n"))
!      ((listp cc) ;; Cc: collected by reply.
!       (mew-insert-address-list mew-cc: cc del)))
      (mew-draft-header-insert mew-newsgroups: newsgroups)
      (mew-draft-header-insert mew-cc:         mew-cc)
      (mew-draft-header-insert mew-subj:       (or subject ""))


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