[Mew-dist 08618] Re: mail-user-agent

Hideyuki SHIRAI ( 白井秀行 ) shirai at example.com
1999年 4月 22日 (木) 19:06:18 JST


こんにちは、白井です。

From: Shuhei KOBAYASHI <shuhei at example.com> さん曰く
Subject: [Mew-dist 08617] Re: mail-user-agent
Message-ID: <86pv4xovtc.fsf at example.com>
Date: Thu, 22 Apr 1999 18:44:45 +0900

shuhei> >>>>> In <19990422161043M.shirai at example.com>,
shuhei> >>>>> Hideyuki SHIRAI (白井秀行) <shirai at example.com> wrote:
shuhei> > というのが入っているのですが、mew-send() は mail-user-agent() と
shuhei> > 引数の扱いも動作も全然違うので、mew-user-agent-compose() という
shuhei> > 関数を定義して、mew-summary-send() を lapping しています。
shuhei> 
shuhei> define-mail-user-agent を追加するだけというわけにはいかないのですね。

ちょっと、お見せするのがはずかしいのですが、私の
mew-user-agent-compose() はこうなっています。御参考までに。

# かずさんがちゃんと書いて下さると、私はとってもうれしいです。:-)

(defun mew-user-agent-compose (&optional to subject other-headers continue
					 switch-function yank-action
					 send-actions)
  "a mail message to be sent for mew."
  (interactive)
  (if (or (not (boundp 'mew-mail-path))
	  (null mew-mail-path))
      (let ((wconf (current-window-configuration)))
	(mew)
	(set-window-configuration wconf)))
  (let (cc body)
    (if (functionp 'assoc-ignore-case)
	(setq cc (cdr (assoc-ignore-case "cc" other-headers)))
      (if other-headers
	  (let ((tmp other-headers)
		(case-fold-search t))
	    (while (not (string-match "cc" (car (car tmp))))
	      (setq tmp (cdr tmp)))
	    (setq cc (cdr (car tmp))))))
    (if switch-function
	(let ((special-display-buffer-names nil)
	      (special-display-regexps nil)
	      (same-window-buffer-names nil)
	      (same-window-regexps nil))
	  (funcall switch-function (buffer-name))))
    (if (buffer-live-p "*mail*")
	(kill-buffer "*mail*"))
    (mew-summary-send to cc subject)
    (save-excursion
      (re-search-forward mew-header-separator nil t)
      (beginning-of-line)
      (while other-headers
	(if (not (member (car (car other-headers)) '("cc")))
	    (if (string= "body" (car (car other-headers)))
		(setq body (cdr (car other-headers)))
	      (let ((case-fold-search nil))
		(mew-draft-header-insert
		 (concat (capitalize (car (car other-headers))) ": ")
		 (cdr (car other-headers))))))
	(setq other-headers (cdr other-headers)))
      (mew-highlight-header)
      (if (not body)
	  ()
	(goto-char (point-max))
	(insert body)))))


-- 
白井秀行 (mailto:shirai at example.com)

# それ以前に、私は人に見せて *はずかしくない* emacs lisp なんて
# 書けないような気がする。



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