[Mew-dist 3] Re: Following up with Mew and impost (Re: Mew 1.51)
SAKAI Kiyotaka
ksakai at example.com
1996年 11月 20日 (水) 15:00:33 JST
>> In article <19961120014724V/ksakai at example.com>, SAKAI Kiyotaka <ksakai at example.com> writes:
>> この方法を使ったとき、Summary モードから 'a' や 'A' で用意される
>> 草稿のヘッダに Newsgroups: を自動的に決定して表示させるには
>> どのようにしたらよいでしょうか。
> 古賀さんのパッチを 1.51 で当たるように変更すれば、もっと楽になるんでしょ
> うけど。
このように書きましたが、Reply 時に Newsgroups ヘッダを自動挿入するだけ
なら簡単な変更でできますので、古賀さんのパッチを参考にして作ってみまし
た。
N[TAB] で補完できるので、mew-refer-newsgroups は不要でしょう。
# 後は Newsgroups の補完の仕様をどのようにするか、ですか。
--
酒井 清隆 (E-mail: ksakai at example.com)
===================================================================
RCS file: RCS/mew-summary.el,v
retrieving revision 1.1
diff -u -r1.1 mew-summary.el
--- mew-summary.el 1996/11/20 05:35:52 1.1
+++ mew-summary.el 1996/11/20 05:38:30
@@ -1238,7 +1238,7 @@
(mew-current-set 'window (current-window-configuration))
(let ((buf (buffer-name))
(file (mew-draft-get-new))
- from to cc subject in-reply-to references
+ from to cc newsgroups subject in-reply-to references
cbuf cache
num folder)
(unwind-protect
@@ -1288,6 +1288,8 @@
)
)
)
+ (setq newsgroups (or (mew-header-get-value "Followup-To:")
+ (mew-header-get-value "Newsgroups:")))
(setq subject (mew-header-get-value "Subject:"))
(if (and subject (not (string-match "^Re:" subject)))
(setq subject (concat "Re: " subject)))
@@ -1295,7 +1297,7 @@
(setq references (mew-header-get-value "Message-ID:"))
;;
(pop-to-buffer cbuf) ;; draft
- (mew-draft-header subject nil to cc in-reply-to references)
+ (mew-draft-header subject nil to cc newsgroups in-reply-to references)
(mew-draft-mode) ;; for hilight
)
(save-buffer))) ;; to make sure not to use this draft again
===================================================================
RCS file: RCS/mew-draft.el,v
retrieving revision 1.1
diff -u -r1.1 mew-draft.el
--- mew-draft.el 1996/11/20 05:35:55 1.1
+++ mew-draft.el 1996/11/20 05:56:43
@@ -22,7 +22,7 @@
(defvar mew-fields
'("To:" "Cc:" "Subject:" "Dcc:" "Fcc:" "Bcc:"
- "Reply-To:" "Followup-To:" "From:")
+ "Reply-To:" "Followup-To:" "From:" "Newsgroups:")
"*Completion field list on draft mode"
)
@@ -374,7 +374,7 @@
del)))
(string-match ":;" c))))
-(defun mew-draft-header (&optional subject nl to cc in-reply-to references)
+(defun mew-draft-header (&optional subject nl to cc newsgroups in-reply-to references)
;; to -- string or list
;; cc -- string or list
;; nl -- one empty line under "----", which is necessary if
@@ -438,7 +438,12 @@
(setq del (cons c del))
))
(if cep (insert "\n")))
- ))
+ )
+ (cond
+ ((null newsgroups) ()) ; do nothing
+ ((stringp newsgroups)
+ (mew-header-insert-here "Newsgroups:" newsgroups))
+ ))
(and mew-cc (mew-header-insert-here "Cc:" mew-cc))
(mew-header-insert-here "Subject:" (if subject subject "")) ;; tricky
(and mew-from (mew-header-insert-here "From:" mew-from))
Mew-dist メーリングリストの案内