[mew-dist 18209] Re: C-cC-l vs file-coding-system
Shun-ichi TAHARA ( 田原 俊一 )
jado at example.com
2001年 7月 25日 (水) 10:31:04 JST
From: Kazu Yamamoto (山本和彦) <kazu at example.com>
Message-Id: <20010725.092340.46630589.kazu at example.com>
> 以下、お願いできますか?
> (3) mew-mule3.el と mew-edit.el のパッチを作る。
今CVSにアクセスできないですので、今朝3時の時点でのCVSからのパッチです。
_______________________________
田原 俊一 jado at example.com, shunichi_tahara at example.com
http://flowernet.gr.jp/jado/
FingerPrint: 16 9E 70 3B 05 86 5D 08 B8 4C 47 3A E7 E9 8E D9
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
diff -rc mew/mew-edit.el mew.temp1/mew-edit.el
*** mew/mew-edit.el Wed Jul 25 02:56:27 2001
--- mew.temp1/mew-edit.el Wed Jul 25 10:25:39 2001
***************
*** 292,298 ****
(win (selected-window))
(orig-lang current-language-environment)
PLUS1P limit msg bodyp hbeg hend beg end start
! lang prompt tocs)
(save-excursion
;; First of all, we should determine which part the user want to
;; save due to the ambiguity.
--- 292,298 ----
(win (selected-window))
(orig-lang current-language-environment)
PLUS1P limit msg bodyp hbeg hend beg end start
! lang prompt tocs cs-env)
(save-excursion
;; First of all, we should determine which part the user want to
;; save due to the ambiguity.
***************
*** 333,339 ****
(setq tocs mew-cs-autoconv)
(setq prompt (format "Language (%s): " orig-lang))
(setq lang (read-language-name nil prompt orig-lang))
! (mew-set-language-environment-coding-systems lang)))
(mew-dinfo-set limit 'no-cs-conv)
(mew-decode-for-edit)
;;
--- 333,339 ----
(setq tocs mew-cs-autoconv)
(setq prompt (format "Language (%s): " orig-lang))
(setq lang (read-language-name nil prompt orig-lang))
! (setq cs-env (mew-set-language-environment-coding-systems lang))))
(mew-dinfo-set limit 'no-cs-conv)
(mew-decode-for-edit)
;;
***************
*** 359,366 ****
(insert-buffer-substring buf beg end)
(mew-cs-decode-region start (point-max) tocs)
(mew-highlight-body-region start (point-max)))
! (unless askcs
! (mew-set-language-environment-coding-systems orig-lang)))
(mew-summary-display-postscript 'no-hook)
(select-window win))
(mew-remove-buffer buf)))))
--- 359,366 ----
(insert-buffer-substring buf beg end)
(mew-cs-decode-region start (point-max) tocs)
(mew-highlight-body-region start (point-max)))
! (when (and (not askcs) cs-env)
! (mew-reset-coding-systems (car cs-env) (cdr cs-env))))
(mew-summary-display-postscript 'no-hook)
(select-window win))
(mew-remove-buffer buf)))))
diff -rc mew/mew-mule3.el mew.temp1/mew-mule3.el
*** mew/mew-mule3.el Wed Jul 25 02:56:28 2001
--- mew.temp1/mew-mule3.el Wed Jul 25 10:22:58 2001
***************
*** 240,255 ****
;; Stolen from mule-cmd.el
;;
(defun mew-set-language-environment-coding-systems (language-name)
! (let* ((priority (get-language-info language-name 'coding-priority))
! (default-coding (car priority)))
(when priority
! (let ((categories (mapcar 'coding-system-category priority)))
! (set-coding-priority categories)
! (while priority
! (set (car categories) (car priority))
! (setq priority (cdr priority) categories (cdr categories)))
! (update-coding-systems-internal)))))
;;
;;
--- 240,282 ----
;; Stolen from mule-cmd.el
;;
+ (cond
+ (mew-xemacs-p
+ (defsubst mew-set-coding-priority (pri) (set-coding-priority-list pri))
+ (defsubst mew-coding-category-list () (coding-priority-list))
+ (defsubst mew-coding-category-system (cat) (coding-category-system cat)))
+ (t
+ (defsubst mew-set-coding-priority (pri) (set-coding-priority pri))
+ (defsubst mew-coding-category-list () coding-category-list)
+ (defsubst mew-coding-category-system (cat) (eval cat))))
+
+ (defun mew-reset-coding-systems (priority categories)
+ (let ((rest-ctgs categories) checked-ctgs)
+ (while priority
+ (cond
+ (mew-xemacs-p
+ (unless (memq (car rest-ctgs) checked-ctgs)
+ (when (car priority)
+ (set-coding-category-system (car rest-ctgs) (car priority)))
+ (setq checked-ctgs (cons (car rest-ctgs) checked-ctgs))))
+ (t
+ (set (car rest-ctgs) (car priority))))
+ (setq priority (cdr priority) rest-ctgs (cdr rest-ctgs)))
+ (cond
+ (mew-xemacs-p
+ (setq categories (nreverse checked-ctgs)))
+ (t
+ (update-coding-systems-internal)))
+ (mew-set-coding-priority categories)))
+
(defun mew-set-language-environment-coding-systems (language-name)
! (let ((priority (get-language-info language-name 'coding-priority)))
(when priority
! (let* ((categories (mapcar 'coding-system-category priority))
! (orig-ctg (mew-coding-category-list))
! (orig-pri (mapcar 'mew-coding-category-system orig-ctg)))
! (mew-reset-coding-systems priority categories)
! (cons orig-pri orig-ctg)))))
;;
;;
Mew-dist メーリングリストの案内