[Mew-dist 96] mew-1.52 on mule-19.33-delta (was Re: encoded-word and space)
Murata Shuuichirou
mrt at example.com
1996年 11月 22日 (金) 02:23:17 JST
むらた@九工大です。
In message <19961122000255E/shuhei-k at example.com>,
Shuhei KOBAYASHI <shuhei-k at example.com> wrote:
> alternate-charset-table を常に nil にしておくのは危険な気がして、
> tm の preview-buffer でしか nil にしないようにしていますので、ここ
> では関係ありませんでした。
不便だと思いつつも常に nil にしちゃってます:-)
# せめて hide-headers のあとに decode してくれるとうれしいんだけど。無
# 理なのかな。(Gnus で、です)
> 問題はやはり mule-19.33-delta では find-charset-* が charset-ascii
> を含めた値を返すということで、mew-charset-guess-region と同様の変更を
> mew-header-encode にも加える必要がありました。 original (たぶん) の
> mew-header.el からの patch です。
参考にさせていただきました。
> | @@ -665,4 +684,4 @@
> | qpstr
> | ))
> |
> | -(provide 'mew-header)
> | \ No newline at end of file
> | +(provide 'mew-header)
> #これには悩まされています:-(
そこは削りました。
> > それでしたら手元の mule-19.33-delta 対応版ではなおっていますが、また
> > ここに流しましょうか?
>
> 私の方では alternate-charset-table に関する対策はしていませんので、
> やはりむらたさんの patch が必要ですね。お願いします。
はい。
1.52ベースになった。
typo を修正。
charset 判定部分を変更した。
です。
--
むらたしゅういちろう
-------------- next part --------------
diff -ur mew-1.52.org/mew-charset.el mew-1.52/mew-charset.el
--- mew-1.52.org/mew-charset.el Thu Nov 21 00:07:40 1996
+++ mew-1.52/mew-charset.el Thu Nov 21 22:56:50 1996
@@ -14,8 +14,54 @@
(require 'mew)
-(if (null mew-mule-p)
- ()
+(cond
+ (mew-mule24-p
+ (defvar mew-mule-character-set
+ (list
+ (if (coding-system-p 'coding-system-iso-8859-1)
+ (list charset-latin-iso8859-1 'coding-system-iso-8859-1 "iso-8859-1"))
+ (if (coding-system-p 'coding-system-iso-8859-2)
+ (list charset-latin-iso8859-2 'coding-system-iso-8859-2 "iso-8859-2"))
+ (if (coding-system-p 'coding-system-iso-8859-3)
+ (list charset-latin-iso8859-3 'coding-system-iso-8859-3 "iso-8859-3"))
+ (if (coding-system-p 'coding-system-iso-8859-4)
+ (list charset-latin-iso8859-4 'coding-system-iso-8859-4 "iso-8859-4"))
+ (if (coding-system-p 'coding-system-iso-8859-5)
+ (list charset-cyrillic-iso8859-5 'coding-system-iso-8859-5 "iso-8859-5"))
+ (if (coding-system-p 'coding-system-iso-8859-6)
+ (list charset-arabic-iso8859-6 'coding-system-iso-8859-6 "iso-8859-6"))
+ (if (coding-system-p 'coding-system-iso-8859-7)
+ (list charset-greek-iso8859-7 'coding-system-iso-8859-7 "iso-8859-7"))
+ (if (coding-system-p 'coding-system-iso-8859-8)
+ (list charset-hebrew-iso8859-8 'coding-system-iso-8859-8 "iso-8859-8"))
+ (if (coding-system-p 'coding-system-iso-8859-9)
+ (list charset-latin-iso8859-9 'coding-system-iso-8859-9 "iso-8859-9"))
+ (if (coding-system-p 'coding-system-iso-2022-jp)
+ (list (list
+ charset-latin-jisx0201
+ charset-japanese-jisx0208
+ charset-japanese-jisx0208-1978 )
+ 'coding-system-iso-2022-jp "iso-2022-jp"))
+ (if (coding-system-p 'coding-system-iso-2022-kr)
+ (list charset-korean-ksc5601 'coding-system-iso-2022-kr "iso-2022-kr"))
+ (if (coding-system-p 'coding-system-iso-2022-cn)
+ (list (list
+ charset-chinese-gb2312
+ charset-chinese-cns11643-1
+ charset-chinese-cns11643-2 )
+ 'coding-system-iso-2022-cn "iso-2022-cn"))
+ (if (coding-system-p 'coding-system-iso-2022-ss2-7)
+ (list t 'coding-system-iso-2022-ss2-7 "iso-2022-jp-2"))
+ ;; for charset to symbol
+ (if (coding-system-p 'coding-system-euc-japan)
+ (list nil 'coding-system-euc-japan "euc-japan"))
+ (if (coding-system-p 'coding-system-euc-korea)
+ (list nil 'coding-system-euc-korea "euc-korea"))
+ (if (coding-system-p 'coding-system-sjis)
+ (list nil 'coding-system-sjis "sjis"))
+ )))
+
+ (mew-mule-p
(defvar mew-mule-character-set
(list
(if (boundp '*iso-8859-1*) ;; Latin-1
@@ -54,9 +100,11 @@
(if (boundp '*sjis*)
(list nil *sjis* "sjis"))
))
- (defvar mew-mule-mime-charset
- (mapcar (function (lambda (x) (nth 2 x))) mew-mule-character-set))
- )
+ ))
+
+(if mew-mule-p
+ (defvar mew-mule-mime-charset
+ (mapcar (function (lambda (x) (nth 2 x))) mew-mule-character-set)) )
(defmacro mew-mule-lc-attr (lc alist)
(` (mew-assoc (, lc) (, alist) 0 nil)))
@@ -70,6 +118,9 @@
(defmacro mew-mule-lc-symbol (attr)
(` (car (cdr (, attr)))))
+(defmacro mew-mule-lc-subset (lc alist)
+ (` (mew-assoc-subset (, lc) (, alist) 0)) )
+
(defun mew-charset-to-symbol (charset)
(mew-mule-lc-symbol
(mew-mule-lc-attr-by-charset charset mew-mule-character-set)))
@@ -81,6 +132,18 @@
(` (car (cdr (, attr)))))
(cond
+ (mew-mule24-p
+ (defvar mew-mule-charset-mime-trans 'coding-system-iso-2022-ss2-7)
+ (defvar mew-mule-charset-rfc822-trans 'coding-system-iso-2022-ss2-7)
+ (defvar mew-mule-charset-draft 'coding-system-iso-2022-jp)
+ (defvar mew-mule-charset-scan 'coding-system-iso-2022-jp)
+ ;; coding-system-iso-2022-ss2-7
+ (defvar mew-mule-charset-spool 'no-conversion)
+ (defvar mew-mule-charset-infile 'automatic-conversion)
+ (defvar mew-mule-charset-outfile 'coding-system-iso-2022-jp)
+ (defvar mew-mule-charset-virtual 'coding-system-iso-2022-jp-unix)
+ ;; ^M as it is
+ )
(mew-mule-p
(defvar mew-mule-charset-mime-trans *iso-2022-ss2-7*)
(defvar mew-mule-charset-rfc822-trans *iso-2022-ss2-7*)
@@ -94,6 +157,21 @@
)
(cond
+ (mew-mule24-p
+ (setq
+ coding-system-alist
+ (append
+ (list
+ (list mew-prog-inc 'process mew-mule-charset-scan)
+ (list mew-prog-scan 'process mew-mule-charset-scan)
+ (list mew-prog-send 'process
+ 'no-conversion mew-mule-charset-mime-trans)
+ (list mew-prog-pick 'process mew-mule-charset-scan)
+ (list mew-prog-mime-encode 'process 'no-conversion)
+ (list mew-prog-mime-decode 'process 'no-conversion)
+ (list mew-prog-vscan 'process mew-mule-charset-virtual))
+ coding-system-alist))
+ )
(mew-mule-p
(define-program-coding-system nil mew-prog-inc mew-mule-charset-scan)
(define-program-coding-system nil mew-prog-scan mew-mule-charset-scan)
@@ -128,6 +206,13 @@
(interactive "r")
"Guess minimum character set name."
(cond
+ (mew-mule24-p
+ (let ((lc (delq charset-ascii (find-charset-region beg end))))
+ (cond
+ ((equal 0 (length lc)) "us-ascii")
+ (t (mew-mule-lc-content
+ (mew-mule-lc-subset lc mew-mule-character-set)))
+ )))
(mew-mule-p
(let* ((lc (find-charset-region beg end))
(len (length lc)))
diff -ur mew-1.52.org/mew-decode.el mew-1.52/mew-decode.el
--- mew-1.52.org/mew-decode.el Thu Nov 21 00:07:40 1996
+++ mew-1.52/mew-decode.el Thu Nov 21 20:18:54 1996
@@ -240,7 +240,9 @@
(setq opt (cdr (mew-assoc-match enc switch 0)))
;; opt is nil if 7bit, 8bit, and binary
(if opt
- (let ((file-coding-system (if mew-mule-p *noconv*))
+ (let ((file-coding-system (if (and mew-mule-p (not mew-mule24-p)
+ *noconv*)))
+ (codig-system-for-write (if mew-mule24-p 'no-conversion))
file)
;; NEVER use call-process-region for privary reasons
(if (not (file-exists-p mew-temp-dir))
@@ -257,11 +259,14 @@
(if (null charset)
()
(setq charset (downcase charset))
- (if (and mew-mule-p (not (string-match "us-ascii" charset)))
+ (if (and (or mew-mule-p mew-mule24-p)
+ (not (string-match "us-ascii" charset)))
(progn
(setq cs (mew-mule-content-coding
(mew-mule-content-attr charset mew-mule-character-set)))
- (code-convert-region beg (point-max) cs *internal*)
+ (if mew-mule24-p
+ (decode-coding-region beg (point-max) cs)
+ (code-convert-region beg (point-max) cs *internal*))
)
))
))
@@ -278,7 +283,9 @@
;; in cache buffer
(widen)
(erase-buffer)
- (let ((file-coding-system-for-read (if mew-mule-p *noconv*))
+ (let ((file-coding-system-for-read (if (and mew-mule-p (not mew-mule24-p))
+ *noconv*))
+ (coding-system-for-read (if mew-mule24-p 'no-conversion))
(size (mew-file-size file)))
(if (> size mew-file-max-size)
(if (mew-y-or-n-p (format "This mail size is %s. Truncate it? " size))
@@ -360,7 +367,10 @@
(re-search-forward "^$")
(forward-line)
;; the beginning of the BODY(i.e. the physical content body)
- (if mew-mule-p (code-convert-region (point) (point-max) from *internal*))
+ (cond (mew-mule24-p
+ (decode-coding-region (point) (point-max) from))
+ (mew-mule-p
+ (code-convert-region (point) (point-max) from *internal*)))
(mew-syntax-set-key syntax 'message)
(mew-syntax-set-end syntax (1- (point)))
(mew-decode-syntax-rfc822 syntax)
@@ -560,7 +570,10 @@
(insert "\n") ;; CT:text/plain; charset=us-ascii
(insert "Multipart/Encrypted could not be decrypted.\n"))
(let ((mc-flag nil)
- (file-coding-system-for-read (if mew-mule-p *noconv*)))
+ (file-coding-system-for-read
+ (if (and mew-mule-p (not mew-mule24-p)) *noconv*))
+ (coding-system-for-read (if mew-mule24-p 'no-conversion))
+ )
(insert-file-contents file3)
;; because of RICH functionality of RFC1847... Gee dirty!
(mew-decode-crlf-magic)
@@ -641,7 +654,8 @@
))
(defun mew-save-decode-form (beg end)
- (let ((file-coding-system (if mew-mule-p *noconv*))
+ (let ((file-coding-system (if (and mew-mule-p (not mew-mule24-p)) *noconv*))
+ (coding-system-for-write (if mew-mule24-p 'no-conversion))
(mc-flag nil)
syntax file)
(if (not (file-exists-p mew-temp-dir))
diff -ur mew-1.52.org/mew-draft.el mew-1.52/mew-draft.el
--- mew-1.52.org/mew-draft.el Thu Nov 21 00:07:39 1996
+++ mew-1.52/mew-draft.el Thu Nov 21 20:18:54 1996
@@ -310,6 +310,14 @@
(redraw-display))
;; xxx how about xemacs ?
(cond
+ (mew-mule24-p
+ (make-local-variable 'coding-system-for-write)
+ (make-local-variable 'coding-system-for-read)
+ (make-local-variable 'default-process-coding-system)
+ (make-local-variable 'mew-draft-window-config)
+ (setq coding-system-for-write mew-mule-charset-draft)
+ (setq coding-system-for-read 'automatic-conversion)
+ )
(mew-mule-p
(make-local-variable 'file-coding-system)
(make-local-variable 'file-coding-system-for-read)
@@ -465,8 +473,11 @@
(and mew-x-mailer (mew-header-insert-here "X-Mailer:" mew-x-mailer))
(let ((halist mew-header-alist))
(while halist
- (and (stringp (car (car halist))) (stringp (cdr (car halist)))
- (mew-header-insert-here (car (car halist)) (cdr (car halist))))
+ (and (stringp (car (car halist)))
+ (mew-header-insert-here (car (car halist))
+ (if (stringp (cdr (car halist)))
+ (cdr (car halist))
+ (eval (cdr (car halist))) )))
(setq halist (cdr halist)))
)
(mew-header-insert-here "Mime-Version:" mew-mime-version)
@@ -537,7 +548,9 @@
(fcc nil)
(delete nil))
(set-buffer-modified-p t) ; Make sure buffer is written
- (let ((file-coding-system (if mew-mule-p mew-mule-charset-mime-trans)))
+ (let ((file-coding-system
+ (if (and mew-mule-p (not mew-mule24-p)) mew-mule-charset-mime-trans))
+ (coding-system-for-write (if mew-mule24-p mew-mule-charset-mime-trans)))
(save-buffer)
)
;; make backup folder(s)
diff -ur mew-1.52.org/mew-encode.el mew-1.52/mew-encode.el
--- mew-1.52.org/mew-encode.el Thu Nov 21 00:07:38 1996
+++ mew-1.52/mew-encode.el Thu Nov 21 20:18:55 1996
@@ -107,7 +107,10 @@
;; Even if charset is specified, we need to check the entire
;; text object for cte to escape "\nFrom ".
(let ((file-coding-system-for-read
- (if mew-mule-p (or charsym mew-mule-charset-infile))))
+ (if (and mew-mule-p (not mew-mule24-p))
+ (or charsym mew-mule-charset-infile)))
+ (coding-system-for-read
+ (if mew-mule24-p (or charsym mew-mule-charset-infile))) )
;; Input the text file converting its charset to the internel.
;; If charset is specified, use it.
;; If mew-mule-charset-infile is *autoconv*, charset is guessed
@@ -140,7 +143,9 @@
(setq file nil) ;; Not encode a file
(if (not file)
(let ((file-coding-system
- (if mew-mule-p (mew-charset-to-symbol charset))))
+ (if (and mew-mule-p (not mew-mule24-p)) (mew-charset-to-symbol charset)))
+ (coding-system-for-write
+ (if mew-mule24-p (mew-charset-to-symbol charset))) )
(if (not (file-exists-p mew-temp-dir))
(mew-make-directory mew-temp-dir)) ;; just in case
(setq file (make-temp-name mew-temp-file))
@@ -311,7 +316,9 @@
;; On Mule, from internal to mew-mule-charset-draft.
;; This code may be overhead but makes code simple.
(let ((mc-flag t) ;; just in case
- (file-coding-system (if mew-mule-p mew-mule-charset-draft)))
+ (file-coding-system
+ (if (and mew-mule-p (not mew-mule24-p)) mew-mule-charset-draft))i
+ (coding-system-for-write (if mew-mule24-p mew-mule-charset-draft)) )
(write-region beg (point-max) coverfile)
)
;; A cover page doesn't exist
@@ -446,7 +453,9 @@
)
(defun mew-save-transfer-form (beg end)
- (let ((file-coding-system (if mew-mule-p *iso-2022-ss2-7*dos))
+ (let ((file-coding-system
+ (if (and mew-mule-p (not mew-mule24-p)) *iso-2022-ss2-7*dos))
+ (coding-system-for-write (if mew-mule24-p 'coding-system-iso-2022-ss2-7-dos))
file)
(if mew-mule-p
()
@@ -461,7 +470,8 @@
))
(defun mew-save-signature-form (beg end)
- (let ((file-coding-system (if mew-mule-p *iso-2022-ss2-7*))
+ (let ((file-coding-system (if (and mew-mule-p (not mew-mule24-p)) *iso-2022-ss2-7*))
+ (coding-system-for-write (if mew-mule24-p 'coding-system-iso-2022-ss2-7))
file1 file2)
(save-excursion
(save-restriction
diff -ur mew-1.52.org/mew-ext.el mew-1.52/mew-ext.el
--- mew-1.52.org/mew-ext.el Thu Nov 21 00:07:37 1996
+++ mew-1.52/mew-ext.el Thu Nov 21 20:18:55 1996
@@ -383,7 +383,9 @@
(defun mew-ext-include-local-file (params)
(let* ((file (mew-syntax-get-member params "name"))
- (file-coding-system-for-read (if mew-mule-p *noconv*))
+ (file-coding-system-for-read
+ (if (and mew-mule-p (not mew-mule24-p)) *noconv*))
+ (coding-system-for-read (if mew-mule24-p 'no-conversion))
(size (mew-file-size file)))
(if (file-exists-p file)
(if (> size mew-file-max-size)
diff -ur mew-1.52.org/mew-header.el mew-1.52/mew-header.el
--- mew-1.52.org/mew-header.el Thu Nov 21 00:07:37 1996
+++ mew-1.52/mew-header.el Fri Nov 22 01:40:33 1996
@@ -442,6 +442,17 @@
(fun (cdr attr))
lc)
(cond
+ (mew-mule24-p
+ (if (setq lc (delq charset-ascii (find-charset-string str)))
+ (let* ((attr (mew-mule-lc-subset lc mew-mule-character-set))
+ (charset (mew-mule-lc-content attr))
+ (symbol (mew-mule-lc-symbol attr))
+ (txstr (encode-coding-string str symbol)))
+ (concat "=?" charset "?" encode "?" (funcall fun txstr) "?=")
+ )
+ str
+ )
+ )
(mew-mule-p
(if (setq lc (car (find-charset-string str)))
(let* ((attr (mew-mule-lc-attr lc mew-mule-character-set))
@@ -483,15 +494,23 @@
(funcall
(cdr (mew-assoc encode mew-header-decode-switch 0 t))
enstr))
- (if mew-mule-p
- (setq destr
- (code-convert-string
- destr
- (mew-mule-content-coding
- (mew-mule-content-attr charset mew-mule-character-set))
- *internal*
- ))
- )
+ (cond
+ (mew-mule24-p
+ (setq destr
+ (decode-coding-string
+ destr
+ (mew-mule-content-coding
+ (mew-mule-content-attr charset mew-mule-character-set))
+ )))
+ (mew-mule-p
+ (setq destr
+ (code-convert-string
+ destr
+ (mew-mule-content-coding
+ (mew-mule-content-attr charset mew-mule-character-set))
+ *internal*
+ ))
+ ))
(setq str (concat head destr tail))
))
str
diff -ur mew-1.52.org/mew-pgp.el mew-1.52/mew-pgp.el
--- mew-1.52.org/mew-pgp.el Thu Nov 21 00:07:36 1996
+++ mew-1.52/mew-pgp.el Thu Nov 21 20:23:43 1996
@@ -441,7 +441,9 @@
(setq mew-pgp-tmp-file (make-temp-name mew-temp-file))
(save-excursion
(set-buffer (mew-current-get 'cache))
- (let ((file-coding-system (if mew-mule-p *noconv*)))
+ (let ((file-coding-system
+ (if (and mew-mule-p (not mew-mule24-p)) *noconv*))
+ (coding-system-for-write (if mew-mule24-p 'no-conversion)))
(write-region begin end mew-pgp-tmp-file)
(message "");; flush write-region message
)
diff -ur mew-1.52.org/mew-summary.el mew-1.52/mew-summary.el
--- mew-1.52.org/mew-summary.el Thu Nov 21 00:07:35 1996
+++ mew-1.52/mew-summary.el Thu Nov 21 21:37:51 1996
@@ -1311,7 +1311,9 @@
"Reply to current message and insert it in draft-buffer."
(interactive)
(if (mew-summary-reply)
- (mew-draft-cite)
+ (save-excursion
+ (goto-char (point-max))
+ (mew-draft-cite))
))
(defun mew-summary-reedit ()
@@ -1698,18 +1700,30 @@
(widen)
(erase-buffer)
(let ((mc-flag nil)
- (file-coding-system-for-read (if mew-mule-p *noconv*))
- (file-coding-system (if mew-mule-p *noconv*)))
+ (file-coding-system-for-read
+ (if (and mew-mule-p (not mew-mule24-p)) *noconv*))
+ (file-coding-system
+ (if (and mew-mule-p (not mew-mule24-p)) *noconv*))
+ (coding-system-for-read (if mew-mule24-p 'no-conversion))
+ (coding-system-for-write (if mew-mule24-p 'no-conversion)) )
(insert-file-contents (mew-expand-file-name msg cbuf))
- (if (and mew-mule-p user-coding-system (not append-p))
- (progn
+ (if (and user-coding-system (not append-p))
+ (cond
+ (mew-mule24-p
+ (decode-coding-region (point-min) (point-max)
+ 'automatic-conversion)
+ (encode-coding-region (point-min) (point-max)
+ user-coding-system)
+ )
+ (mew-mule-p
(if (stringp user-coding-system) ;; for mule 1.x
(setq user-coding-system
(intern-soft user-coding-system)))
(code-convert-region (point-min) (point-max)
*autoconv* *internal*)
(code-convert-region (point-min) (point-max)
- *internal* user-coding-system)))
+ *internal* user-coding-system))
+ ))
(write-region (point-min) (point-max) file append-p nil nil))
(message "Wrote to %s" file)
)
@@ -1731,10 +1745,13 @@
(mew-syntax-get-part syntax)))) ;;; xxxx
(if (mew-member-match ct mew-mime-content-type-binary-list)
(let ((mc-flag nil)
- (file-coding-system (if mew-mule-p *noconv*)))
+ (file-coding-system
+ (if (and mew-mule-p (not mew-mule24-p)) *noconv*))
+ (coding-system-for-write (if mew-mule24-p 'no-conversion)) )
(write-region begin end file append-p))
(let ((file-coding-system
- (if mew-mule-p mew-mule-charset-outfile)))
+ (if (and mew-mule-p (not mew-mule24-p)) mew-mule-charset-outfile))
+ (coding-system-for-write (if mew-mule24-p mew-mule-charset-outfile)) )
(write-region begin end file append-p)
))
)
@@ -2242,8 +2259,11 @@
(forward-line 1)
))
(let ((buffer-read-only nil))
- (code-convert-region (point) (point-max)
- mew-mule-charset-rfc822-trans *internal*)
+ (if mew-mule24-p
+ (decode-coding-region (point) (point-max)
+ mew-mule-charset-rfc822-trans)
+ (code-convert-region (point) (point-max)
+ mew-mule-charset-rfc822-trans *internal*) )
)
))
)
@@ -2297,7 +2317,9 @@
(mc-flag nil)
(call-process-hook nil)
(default-process-coding-system
- (if mew-mule-p (cons *noconv* *noconv*)))
+ (cond
+ (mew-mule24-p (cons 'no-conversion 'no-conversion))
+ (mew-mule-p (cons *noconv* *noconv*))))
(filters mew-x-face-filter))
(while filters
;; call-process-region is OK...
diff -ur mew-1.52.org/mew.el mew-1.52/mew.el
--- mew-1.52.org/mew.el Thu Nov 21 00:07:41 1996
+++ mew-1.52/mew.el Thu Nov 21 22:11:06 1996
@@ -25,7 +25,8 @@
(defvar mew-emacs18-p (string-match "^18" emacs-version))
(defvar mew-emacs19-p (string< "19" emacs-version))
-(defvar mew-mule-p (boundp 'MULE))
+(defvar mew-mule-p (featurep 'mule))
+(defvar mew-mule24-p (and mew-mule-p (string< "2.4" mule-version)))
(defvar mew-xemacs-p (string-match "XEmacs\\|Lucid" emacs-version))
(defvar mew-os2-p nil)
@@ -121,7 +122,16 @@
"*If non-nil, ask for a range for scanning. If false, always
use default.")
-
+(defun mew-delq (key list)
+ (let* ((pointer (cons nil list))
+ (top pointer))
+ (while (cdr pointer)
+ (if (equal key (car (cdr pointer)))
+ (progn
+ (setcdr pointer (cdr (cdr pointer)))
+ (setq pointer (cons nil nil)))
+ (setq pointer (cdr pointer))))
+ (cdr top)))
(defvar mew-emacs-y-or-n-p-use nil
"*SPC is y and RET is n if t. SPC is n and RET is y, otherwise.")
@@ -806,17 +816,6 @@
))
))
-(defun mew-delq (key list)
- (let* ((pointer (cons nil list))
- (top pointer))
- (while (cdr pointer)
- (if (equal key (car (cdr pointer)))
- (progn
- (setcdr pointer (cdr (cdr pointer)))
- (setq pointer (cons nil nil)))
- (setq pointer (cdr pointer))))
- (cdr top)))
-
(defun mew-folder-to-dir (folder)
(if (equal (aref folder 0) ?+)
(substring folder 1 nil)
@@ -909,6 +908,19 @@
car
(mew-assoc-equal key (cdr alist) nth)))))
+(defun mew-assoc-subset (key alist nth)
+ (if (null alist)
+ ()
+ (let* ((car (car alist))
+ (nthobj (nth nth car)))
+ (if (or (and (listp nthobj)
+ (subsetp key nthobj))
+ (and (equal (length key) 1)
+ (eq nthobj (car key)) )
+ (eq nthobj t))
+ car
+ (mew-assoc-subset key (cdr alist) nth) ))))
+
;;(defun mew-assoc2 (key alist nth exact)
;; (let ((case-fold-search t))
;; (cond
@@ -1424,7 +1436,9 @@
(if (mew-which program exec-path)
(if (mew-y-or-n-p (format "Start %s? " program))
(let ((mc-flag nil)
- (file-coding-system (if mew-mule-p *noconv*))
+ (file-coding-system (if (and mew-mule-p (not mew-mule24-p))
+ *noconv*))
+ (coding-system-for-write (if mew-mule24-p 'no-conversion))
pro file)
(if (not (file-exists-p mew-temp-dir))
(mew-make-directory mew-temp-dir)) ;; just in case
@@ -1455,7 +1469,9 @@
(if (mew-which program exec-path)
(if (mew-y-or-n-p (format "Call %s? " program))
(let ((mc-flag nil)
- (file-coding-system (if mew-mule-p *noconv*))
+ (file-coding-system (if (and mew-mule-p (not mew-mule24-p)
+ *noconv*)))
+ (coding-system-for-write (if mew-mule24-p 'no-conversion))
file)
(message "Calling %s ..." program)
(if (not (file-exists-p mew-temp-dir))
@@ -1522,7 +1538,9 @@
(set-buffer (mew-current-get 'cache))
(let ((file (mew-input-filename))
(mc-flag nil)
- (file-coding-system (if mew-mule-p *noconv*)))
+ (file-coding-system (if (and mew-mule-p (not mew-mule24-p)
+ *noconv*)))
+ (coding-system-for-write (if mew-mule24-p 'no-conversion)))
(if (file-exists-p file)
(if mew-file-append-p
(write-region begin end file t)
Mew-dist メーリングリストの案内