[mew-dist 28341] Re: mew-refile-guess-alistについて

Kazu Yamamoto ( 山本和彦 ) kazu at example.com
2008年 4月 14日 (月) 23:56:15 JST


山本です。

>   実は僕の環境も動かなくなりました。
> 
>   僕は、mew-refile-guess-alist をスパム対応に使っていたりするの
> で・・。

すいません。これは、僕の理解不足から来る間違いでした。
以下のパッチを試して下さい。

--かず

Index: mew-config.el
===================================================================
RCS file: /cvsroot/mew/mew/mew-config.el,v
retrieving revision 1.111
diff -c -r1.111 mew-config.el
*** mew-config.el	4 Apr 2008 09:25:47 -0000	1.111
--- mew-config.el	14 Apr 2008 14:55:13 -0000
***************
*** 18,24 ****
  ;;
  ;;
  
! (defun mew-cfent-value (case key def &optional symbol listp)
    (let ((cases (and case (mapcar 'mew-chop (mew-split case ?,))))
  	ent ret cfent)
      (or (member mew-case-default cases)
--- 18,24 ----
  ;;
  ;;
  
! (defun mew-cfent-value (case key def &optional type)
    (let ((cases (and case (mapcar 'mew-chop (mew-split case ?,))))
  	ent ret cfent)
      (or (member mew-case-default cases)
***************
*** 31,41 ****
  		      (assoc (intern key) cfent))) ;; new
  	(when ent
  	  (setq ret (cdr ent)) ;; old
! 	  (if listp
! 	      (if (and (consp (car ret)) (null (cdr ret)))
! 		  (setq ret (car ret))) ;; new
! 	    (if (consp ret) (setq ret (car ret)))) ;; new
! 	  (if symbol (setq ret (symbol-value ret)))
  	  (if ent (throw 'loop nil))))
        (setq ret def))
      ret))
--- 31,45 ----
  		      (assoc (intern key) cfent))) ;; new
  	(when ent
  	  (setq ret (cdr ent)) ;; old
! 	  (cond
! 	   ((eq type 'symbol)
! 	    (if (consp ret) (setq ret (car ret)))
! 	    (setq ret (symbol-value ret)))
! 	   ((eq type 'list)
! 	    (if (and (consp (car ret)) (null (cdr ret)))
! 		(setq ret (car ret)))) ;; new
! 	   (t
! 	    (if (consp ret) (setq ret (car ret))))) ;; new
  	  (if ent (throw 'loop nil))))
        (setq ret def))
      ret))
***************
*** 182,188 ****
        (mew-mail-address case)))
  
  (defun mew-smtp-auth-list (&optional case)
!   (mew-cfent-value case "smtp-auth-list" mew-smtp-auth-list nil 'list))
  
  (defun mew-smtp-mail-from (&optional case)
    (mew-cfent-value case "smtp-mail-from" mew-smtp-mail-from))
--- 186,192 ----
        (mew-mail-address case)))
  
  (defun mew-smtp-auth-list (&optional case)
!   (mew-cfent-value case "smtp-auth-list" mew-smtp-auth-list 'list))
  
  (defun mew-smtp-mail-from (&optional case)
    (mew-cfent-value case "smtp-mail-from" mew-smtp-mail-from))
***************
*** 251,257 ****
    (mew-cfent-value case "pop-user" mew-pop-user))
  
  (defun mew-pop-auth-list (&optional case)
!   (mew-cfent-value case "pop-auth-list" mew-pop-auth-list nil 'list))
  
  (defun mew-pop-size (&optional case)
    (mew-cfent-value case "pop-size" mew-pop-size))
--- 255,261 ----
    (mew-cfent-value case "pop-user" mew-pop-user))
  
  (defun mew-pop-auth-list (&optional case)
!   (mew-cfent-value case "pop-auth-list" mew-pop-auth-list 'list))
  
  (defun mew-pop-size (&optional case)
    (mew-cfent-value case "pop-size" mew-pop-size))
***************
*** 295,301 ****
    (mew-cfent-value case "imap-user" mew-imap-user))
  
  (defun mew-imap-auth-list (&optional case)
!   (mew-cfent-value case "imap-auth-list" mew-imap-auth-list nil 'list))
  
  (defun mew-imap-size (&optional case)
    (mew-cfent-value case "imap-size" mew-imap-size))
--- 299,305 ----
    (mew-cfent-value case "imap-user" mew-imap-user))
  
  (defun mew-imap-auth-list (&optional case)
!   (mew-cfent-value case "imap-auth-list" mew-imap-auth-list 'list))
  
  (defun mew-imap-size (&optional case)
    (mew-cfent-value case "imap-size" mew-imap-size))
***************
*** 307,313 ****
    (mew-cfent-value case "imap-header-only" mew-imap-header-only))
  
  (defun mew-imap-prefix-list (&optional case)
!   (mew-cfent-value case "imap-prefix-list" mew-imap-prefix-list nil 'list))
  
  ;;
  
--- 311,317 ----
    (mew-cfent-value case "imap-header-only" mew-imap-header-only))
  
  (defun mew-imap-prefix-list (&optional case)
!   (mew-cfent-value case "imap-prefix-list" mew-imap-prefix-list 'list))
  
  ;;
  
***************
*** 376,385 ****
    (mew-cfent-value case "imap-trash-folder" mew-imap-trash-folder))
  
  (defun mew-imap-trash-folder-list (&optional case)
!   (mew-cfent-value case "imap-trash-folder-list" mew-imap-trash-folder-list nil 'list))
  
  (defun mew-header-alist (&optional case)
!   (mew-cfent-value case "header-alist" mew-header-alist nil 'list))
  
  (defun mew-signature-file (&optional case)
    (mew-cfent-value case "signature-file" mew-signature-file))
--- 380,389 ----
    (mew-cfent-value case "imap-trash-folder" mew-imap-trash-folder))
  
  (defun mew-imap-trash-folder-list (&optional case)
!   (mew-cfent-value case "imap-trash-folder-list" mew-imap-trash-folder-list 'list))
  
  (defun mew-header-alist (&optional case)
!   (mew-cfent-value case "header-alist" mew-header-alist 'list))
  
  (defun mew-signature-file (&optional case)
    (mew-cfent-value case "signature-file" mew-signature-file))
***************
*** 444,450 ****
  ;;
  
  (defun mew-refile-guess-alist (&optional case)
!   (mew-cfent-value case "refile-guess-alist" mew-refile-guess-alist 'symbol 'list))
  
  ;;
  
--- 448,454 ----
  ;;
  
  (defun mew-refile-guess-alist (&optional case)
!   (mew-cfent-value case "refile-guess-alist" mew-refile-guess-alist 'symbol))
  
  ;;
  
***************
*** 454,460 ****
  ;;
  
  (defun mew-inbox-action-alist (&optional case)
!   (mew-cfent-value case "inbox-action-alist" mew-inbox-action-alist nil 'list))
  
  ;;
  
--- 458,464 ----
  ;;
  
  (defun mew-inbox-action-alist (&optional case)
!   (mew-cfent-value case "inbox-action-alist" mew-inbox-action-alist 'list))
  
  ;;
  



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