[Mew-dist 03628] Re: Mew 1.93b6: mew-config breaks out mew-config-list setting ?
Maybe TABOO
y-koga at example.com
1998年 2月 2日 (月) 16:44:14 JST
こんな感じ…かな?
C-cC-m に割り当てる関数を変更。メニュー中のは mew-draft-make-mime のま
まにしています (理由なし)。
diff -urN ../orig/mew-draft.el ./mew-draft.el
--- ../orig/mew-draft.el Thu Jan 29 13:05:06 1998
+++ ./mew-draft.el Mon Feb 2 16:40:41 1998
@@ -142,7 +142,7 @@
(define-key mew-draft-mode-map "\C-c\C-y" 'mew-draft-cite)
(define-key mew-draft-mode-map "\C-c\C-t" 'mew-draft-yank)
(define-key mew-draft-mode-map "\C-c\C-w" 'mew-draft-check-whom)
- (define-key mew-draft-mode-map "\C-c\C-m" 'mew-draft-make-mime)
+ (define-key mew-draft-mode-map "\C-c\C-m" 'mew-draft-make-message)
(define-key mew-draft-mode-map "\C-c\C-u" 'mew-draft-undo)
(define-key mew-draft-mode-map "\C-c\C-c" 'mew-draft-send-letter)
(define-key mew-draft-mode-map "\C-c\C-s" 'mew-pgp-sign-letter)
@@ -534,9 +534,7 @@
(save-excursion
(if (mew-header-get-value mew-ct:)
(mew-draft-real-send-letter arg)
- (message "Making a MIME letter ...")
- (mew-draft-make-mime)
- (message "Making a MIME letter ... done")
+ (mew-draft-make-message)
(condition-case nil
(if (or mew-auto-add-content-type
(y-or-n-p (format "%s was automatically added. Send this message? " mew-ct:)))
@@ -809,6 +807,18 @@
(message "Checking recipients ... done")
))
+(defun mew-draft-make-message ()
+ (interactive)
+ (save-excursion
+ (if mew-ask-config
+ (if (y-or-n-p "Do you want to use Config:?")
+ (mew-draft-insert-config)
+ (mew-header-delete-lines '("Config:"))))
+ (message "Making a MIME letter ...")
+ (mew-draft-make-mime)
+ (message "Making a MIME letter ... done")
+ ))
+
(defun mew-draft-kill ()
"Kill this draft."
(interactive)
@@ -851,30 +861,32 @@
(defun mew-draft-insert-config ()
(interactive)
- (if mew-config-auto-insert
- (let ((config-cur (mew-header-get-value "Config:"))
+ (let ((config-cur (mew-header-get-value "Config:"))
+ (config-new))
+ (if (and config-cur
+ (y-or-n-p "Do you want to use current Config:?")) ()
+ (cond
+ ((equal mew-config 'guess)
+ (setq config-new (car (mew-config-guess-by-alist)))
+ (or config-new (setq config-new (car mew-config-list))))
+ (t
+ (setq config-new mew-config))
+ )
+ (if (not mew-config-auto-insert)
+ (setq config-new (mew-input-config config-new)))
+ (if config-new
+ (progn
+ (widen)
+ (mew-header-delete-lines '("Config:"))
+ (goto-char (point-min))
+ (re-search-forward mew-eoh2)
+ (beginning-of-line)
+ (mew-header-insert-here "Config:" config-new)
+ (mew-draft-refresh)
+ (forward-line -1)
+ (end-of-line)
config-new)
- (cond
- ((equal mew-config 'guess)
- (setq config-new (car (mew-config-guess-by-alist)))
- (or config-new (setq config-new (car mew-config-list))))
- (t
- (setq config-new mew-config))
- )
- (if (and config-new
- (or (not config-cur)
- (and (not (equal config-new config-cur))
- (y-or-n-p
- (format "Do you want to change Config: value to %s?" config-new)))))
- (progn
- (widen)
- (mew-header-delete-lines '("Config:"))
- (goto-char (point-min))
- (re-search-forward mew-eoh2)
- (beginning-of-line)
- (mew-header-insert-here "Config:" config-new)
- (forward-line -1)
- (end-of-line))))))
+ nil))))
(defun mew-draft-insert-signature ()
(interactive)
diff -urN ../orig/mew-encode.el ./mew-encode.el
--- ../orig/mew-encode.el Thu Jan 29 00:44:48 1998
+++ ./mew-encode.el Fri Jan 30 21:02:16 1998
@@ -50,7 +50,6 @@
"Make a MIME message. Charset guess, mapping directory structure
to multipart, and so on."
(interactive)
- (mew-draft-insert-config)
(if (mew-header-get-value mew-ct:)
(progn
(ding)
diff -urN ../orig/mew-minibuf.el ./mew-minibuf.el
--- ../orig/mew-minibuf.el Thu Jan 29 00:44:50 1998
+++ ./mew-minibuf.el Mon Feb 2 16:41:56 1998
@@ -187,6 +187,20 @@
(if (string= type "") default type)
))
+(defun mew-input-config (default)
+ (let ((config))
+ (setq config (completing-read
+ (format "Config value (%s): " (or default "default"))
+ (mapcar
+ (function
+ (lambda (x) (cons x x)))
+ mew-config-list)
+ nil nil nil))
+ (if (string= config "")
+ default
+ config)
+ ))
+
(provide 'mew-minibuf)
;;; Copyright Notice:
diff -urN ../orig/mew-vars.el ./mew-vars.el
--- ../orig/mew-vars.el Thu Jan 29 22:44:53 1998
+++ ./mew-vars.el Fri Jan 30 21:02:17 1998
@@ -635,6 +635,9 @@
(defvar mew-ask-newsgroups nil
"*If non-nil, prompt user if he/she want to include Newsgroups: field")
+(defvar mew-ask-config nil
+ "*If non-nil, prompt user if he/she want to include/change Config: field")
+
;;
;; Field Magic
;;
----
NEC ネットワーキング技術研究所 & 慶應義塾SFC研究所
こがよういちろう <y-koga at example.com>
Mew-dist メーリングリストの案内