[Mew-dist 08660] Re: mail-user-agent
Kazu Yamamoto ( 山本和彦 )
kazu at example.com
1999年 4月 26日 (月) 17:26:43 JST
From: Hideyuki SHIRAI (白井秀行) <shirai at example.com>
Subject: [Mew-dist 08658] Re: mail-user-agent
Date: Mon, 26 Apr 1999 15:06:08 +0900
> としたら、うまく動いているような感じです。mew-window-configure
> との兼ね合いが不明なんですが……
ありがとうございます。前のパッチを当てた状態で、下記のパッチを当てて下さ
い。
Emacs 20.3 では、ヘッダにあらかじめ日本語を入れていると悲しくなります。
これは、強制的に
(set-buffer-multibyte nil)
されるためです。report-emacs-bug にはフックがないのでどうしようもありません。
--かず
-------------- next part --------------
Index: 00changes
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/00changes,v
retrieving revision 1.298
diff -c -r1.298 00changes
*** 00changes 1999/04/26 05:35:16 1.298
--- 00changes 1999/04/26 08:26:52
***************
*** 29,35 ****
Hideyuki SHIRAI <shirai at example.com>
* Defined mew-user-agent-compose.
* Defined mew-unhighlight-header-region.
! * Require highlight-headers instead of autoload.
1.94b24 (99/04/22) mew-dist release
--- 29,35 ----
Hideyuki SHIRAI <shirai at example.com>
* Defined mew-user-agent-compose.
* Defined mew-unhighlight-header-region.
! * Require highlight-headers instead of autoload. Added mew-which-el.
1.94b24 (99/04/22) mew-dist release
Index: mew-draft.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-draft.el,v
retrieving revision 1.78
diff -c -r1.78 mew-draft.el
*** mew-draft.el 1999/04/24 07:05:09 1.78
--- mew-draft.el 1999/04/26 08:26:52
***************
*** 478,483 ****
--- 478,493 ----
(concat (file-name-as-directory mew-draft-mime-folder)
(file-name-nondirectory draft)))
+ (defun mew-draft-header-insert-alist (halist)
+ (let ((halist other-headers) key val)
+ (while halist
+ (setq key (car (car halist)))
+ (setq val (cdr (car halist)))
+ (setq halist (cdr halist))
+ (if (not (string-match ":$" key))
+ (setq key (concat key ":")))
+ (mew-draft-header-insert key val))))
+
(defun mew-draft-header (&optional subject nl to cc newsgroups in-reply-to references other-headers)
;; to -- string or list
;; cc -- string or list
***************
*** 555,568 ****
)
(mew-draft-header-insert mew-x-face: xface)))
(mew-draft-header-insert mew-x-mailer: mew-x-mailer)
! (let ((halist other-headers))
! (while halist
! (mew-draft-header-insert (car (car halist)) (cdr (car halist)))
! (setq halist (cdr halist))))
! (let ((halist mew-header-alist))
! (while halist
! (mew-draft-header-insert (car (car halist)) (cdr (car halist)))
! (setq halist (cdr halist))))
(mew-header-prepared)
(if nl (insert "\n"))
;; move the cursor after "To: "
--- 565,572 ----
)
(mew-draft-header-insert mew-x-face: xface)))
(mew-draft-header-insert mew-x-mailer: mew-x-mailer)
! (mew-draft-header-insert-alist other-headers)
! (mew-draft-header-insert-alist mew-header-alist)
(mew-header-prepared)
(if nl (insert "\n"))
;; move the cursor after "To: "
Index: mew-encode.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-encode.el,v
retrieving revision 1.66
diff -c -r1.66 mew-encode.el
*** mew-encode.el 1999/04/24 07:05:09 1.66
--- mew-encode.el 1999/04/26 08:26:52
***************
*** 99,105 ****
(defun mew-draft-make-single ()
(mew-draft-make-backup 'single)
! (mew-header-goto-end)
(forward-line)
(mew-encode-singlepart (mew-encode-syntax-single "text-file") nil nil t))
--- 99,105 ----
(defun mew-draft-make-single ()
(mew-draft-make-backup 'single)
! (goto-char (mew-header-end)) ;; due to illegal null lines in the header
(forward-line)
(mew-encode-singlepart (mew-encode-syntax-single "text-file") nil nil t))
***************
*** 295,301 ****
(defun mew-draft-make-multi ()
(mew-draft-make-backup)
;; delete delimiter
! (mew-header-goto-end)
(forward-line)
(let* ((beg (point))
(syntax mew-encode-syntax)
--- 295,301 ----
(defun mew-draft-make-multi ()
(mew-draft-make-backup)
;; delete delimiter
! (goto-char (mew-header-end)) ;; due to illegal null lines in the header
(forward-line)
(let* ((beg (point))
(syntax mew-encode-syntax)
Index: mew-highlight.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew-highlight.el,v
retrieving revision 1.32
diff -c -r1.32 mew-highlight.el
*** mew-highlight.el 1999/04/24 07:05:09 1.32
--- mew-highlight.el 1999/04/26 08:26:52
***************
*** 188,194 ****
(cond
(mew-xemacs-p
;;(autoload 'highlight-headers-x-face-to-pixmap "highlight-headers")
! (require 'highlight-headers) ;; due to the timing problem.
;; now this is in the "mail-lib" package.
(defvar mew-use-highlight-x-face-function
(function (lambda (beg end)
--- 188,195 ----
(cond
(mew-xemacs-p
;;(autoload 'highlight-headers-x-face-to-pixmap "highlight-headers")
! (if (mew-which-el "highlight-headers" load-path)
! (require 'highlight-headers)) ;; due to the timing problem.
;; now this is in the "mail-lib" package.
(defvar mew-use-highlight-x-face-function
(function (lambda (beg end)
Index: mew.el
===================================================================
RCS file: /usr/home/kazu/cvsroot/Mew/mew/mew.el,v
retrieving revision 1.159
diff -c -r1.159 mew.el
*** mew.el 1999/04/24 07:05:09 1.159
--- mew.el 1999/04/26 08:26:52
***************
*** 16,22 ****
--- 16,34 ----
;; (setq mew-mail-domain-list '("your mail domain"))
;; (setq mew-icon-directory "icon directory")
;;
+ ;; Optional setup:
+ ;; ;; report-emacs-bug is in the net-utils package for XEmacs.
+ ;; (autoload 'mew-user-agent-compose "mew" nil t)
+ ;; (if (boundp 'mail-user-agent)
+ ;; (progn
+ ;; (setq mail-user-agent 'mew-user-agent)
+ ;; (define-mail-user-agent 'mew-user-agent
+ ;; 'mew-user-agent-compose
+ ;; 'mew-draft-send-letter
+ ;; 'mew-draft-kill
+ ;; 'mew-send-hook)))
+
;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
***************
*** 87,101 ****
OTHER-HEADERS is an alist specifying additional
header fields. Elements look like (HEADER . VALUE) where both
HEADER and VALUE are strings.
! CONTINUE, SWITCH-FUNCTION, YANK-ACTION and SEND-ACTIONS are ignored."
(let ((file (mew-folder-new-message mew-draft-folder))
(find-file-hooks nil)
(inhibit-quit t))
(mew-current-set 'window (current-window-configuration))
(mew-window-configure (current-buffer) 'draft)
(mew-summary-prepare-draft
! (switch-to-buffer (find-file-noselect file))
(mew-draft-rename file)
(mew-draft-header subject nil to nil nil nil nil other-headers)
(mew-draft-mode))))
--- 99,124 ----
OTHER-HEADERS is an alist specifying additional
header fields. Elements look like (HEADER . VALUE) where both
HEADER and VALUE are strings.
+
+ A Draft buffer is prepared according to SWITCH-FUNCTION.
! CONTINUE, YANK-ACTION and SEND-ACTIONS are ignored."
! (if (null mew-mail-path) (mew-init))
(let ((file (mew-folder-new-message mew-draft-folder))
(find-file-hooks nil)
(inhibit-quit t))
(mew-current-set 'window (current-window-configuration))
(mew-window-configure (current-buffer) 'draft)
(mew-summary-prepare-draft
! (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 (find-file-noselect file)))
! (switch-to-buffer (find-file-noselect file)))
! (make-variable-buffer-local 'mail-header-separator)
! (setq mail-header-separator mew-header-separator)
(mew-draft-rename file)
(mew-draft-header subject nil to nil nil nil nil other-headers)
(mew-draft-mode))))
Mew-dist メーリングリストの案内