aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2001-02-06 23:39:26 +0000
committerKenichi Handa2001-02-06 23:39:26 +0000
commitf4a012a685981bc6826c7aee6f8d097b7a99a802 (patch)
tree020e4a09f81c17f45ecc950f00df046b4d6512e4
parentd3c26cdf9e27477382f1f7644317cc3079508001 (diff)
downloademacs-f4a012a685981bc6826c7aee6f8d097b7a99a802.tar.gz
emacs-f4a012a685981bc6826c7aee6f8d097b7a99a802.zip
(transform-make-coding-system-args): Make
it work also for coding systems not using CCL.
-rw-r--r--lisp/international/mule.el66
1 files changed, 60 insertions, 6 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 836644c05fd..b2320c88b26 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -584,15 +584,69 @@ Value is a list of transformed arguments."
584 (if (setq tmp (plist-get props 'pre-write-conversion)) 584 (if (setq tmp (plist-get props 'pre-write-conversion))
585 (setq properties (plist-put properties 'pre-write-conversion tmp))) 585 (setq properties (plist-put properties 'pre-write-conversion tmp)))
586 (cond 586 (cond
587 ((eq type 'shift-jis)
588 `(,name 1 ,mnemonic ,doc-string () ,properties ,eol-type))
589 ((eq type 'iso2022) ; This is not perfect.
590 (if (plist-get props 'escape-quoted)
591 (error "escape-quoted is not supported: %S"
592 `(,name ,type ,doc-string ,props)))
593 (let ((g0 (plist-get props 'charset-g0))
594 (g1 (plist-get props 'charset-g1))
595 (g2 (plist-get props 'charset-g2))
596 (g3 (plist-get props 'charset-g3))
597 (use-roman
598 (and
599 (eq (cadr (assoc 'latin-jisx0201
600 (plist-get props 'input-charset-conversion)))
601 'ascii)
602 (eq (cadr (assoc 'ascii
603 (plist-get props 'output-charset-conversion)))
604 'latin-jisx0201)))
605 (use-oldjis
606 (and
607 (eq (cadr (assoc 'japanese-jisx0208-1978
608 (plist-get props 'input-charset-conversion)))
609 'japanese-jisx0208)
610 (eq (cadr (assoc 'japanese-jisx0208
611 (plist-get props 'output-charset-conversion)))
612 'japanese-jisx0208-1978))))
613 (if (charsetp g0)
614 (if (plist-get props 'force-g0-on-output)
615 (setq g0 `(nil ,g0))
616 (setq g0 `(,g0 t))))
617 (if (charsetp g1)
618 (if (plist-get props 'force-g1-on-output)
619 (setq g1 `(nil ,g1))
620 (setq g1 `(,g1 t))))
621 (if (charsetp g2)
622 (if (plist-get props 'force-g2-on-output)
623 (setq g2 `(nil ,g2))
624 (setq g2 `(,g2 t))))
625 (if (charsetp g3)
626 (if (plist-get props 'force-g3-on-output)
627 (setq g3 `(nil ,g3))
628 (setq g3 `(,g3 t))))
629 `(,name 2 ,mnemonic ,doc-string
630 (,g0 ,g1 ,g2 ,g3
631 ,(plist-get props 'short)
632 ,(not (plist-get props 'no-ascii-eol))
633 ,(not (plist-get props 'no-ascii-cntl))
634 ,(plist-get props 'seven)
635 t
636 ,(not (plist-get props 'lock-shift))
637 ,use-roman
638 ,use-oldjis
639 ,(plist-get props 'no-iso6429)
640 nil nil nil nil)
641 ,properties ,eol-type)))
642 ((eq type 'big5)
643 `(,name 3 ,mnemonic ,doc-string () ,properties ,eol-type))
587 ((eq type 'ccl) 644 ((eq type 'ccl)
588 `(,name 4 645 `(,name 4 ,mnemonic ,doc-string
589 ,mnemonic
590 ,doc-string
591 (,(plist-get props 'decode) . ,(plist-get props 'encode)) 646 (,(plist-get props 'decode) . ,(plist-get props 'encode))
592 ,properties 647 ,properties ,eol-type))
593 ,eol-type))
594 (t 648 (t
595 (error "Unsupported XEmacs style arguments for make-coding-style: %S" 649 (error "unsupported XEmacs style make-coding-style arguments: %S"
596 `(,name ,type ,doc-string ,props)))))) 650 `(,name ,type ,doc-string ,props))))))
597 651
598(defun make-coding-system (coding-system type mnemonic doc-string 652(defun make-coding-system (coding-system type mnemonic doc-string