From: morioka Date: Thu, 17 Sep 1998 17:16:51 +0000 (+0000) Subject: (decode-coding-string): Regard integer as coding-system. X-Git-Tag: poe-199811302358~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=706c46fc928d868383c10488b5ee3e74faec2bb3;p=elisp%2Fapel.git (decode-coding-string): Regard integer as coding-system. (encode-coding-string): Likewise. (decode-coding-region): Likewise. (encode-coding-region): Likewise. --- diff --git a/poem-nemacs.el b/poem-nemacs.el index e5c6e9d..6738d19 100644 --- a/poem-nemacs.el +++ b/poem-nemacs.el @@ -112,7 +112,9 @@ (defun decode-coding-string (string coding-system) "Decode the STRING which is encoded in CODING-SYSTEM. \[emu-nemacs.el; EMACS 20 emulating function]" - (let ((code (cdr (assq coding-system coding-system-kanji-code-alist)))) + (let ((code (if (integerp coding-system) + coding-system + (cdr (assq coding-system coding-system-kanji-code-alist))))) (if (eq code 3) string (convert-string-kanji-code string code 3) @@ -121,7 +123,9 @@ (defun encode-coding-string (string coding-system) "Encode the STRING to CODING-SYSTEM. \[emu-nemacs.el; EMACS 20 emulating function]" - (let ((code (cdr (assq coding-system coding-system-kanji-code-alist)))) + (let ((code (if (integerp coding-system) + coding-system + (cdr (assq coding-system coding-system-kanji-code-alist))))) (if (eq code 3) string (convert-string-kanji-code string 3 code) @@ -130,7 +134,9 @@ (defun decode-coding-region (start end coding-system) "Decode the text between START and END which is encoded in CODING-SYSTEM. \[emu-nemacs.el; EMACS 20 emulating function]" - (let ((code (cdr (assq coding-system coding-system-kanji-code-alist)))) + (let ((code (if (integerp coding-system) + coding-system + (cdr (assq coding-system coding-system-kanji-code-alist))))) (save-excursion (save-restriction (narrow-to-region start end) @@ -140,7 +146,9 @@ (defun encode-coding-region (start end coding-system) "Encode the text between START and END to CODING-SYSTEM. \[emu-nemacs.el; EMACS 20 emulating function]" - (let ((code (cdr (assq coding-system coding-system-kanji-code-alist)))) + (let ((code (if (integerp coding-system) + coding-system + (cdr (assq coding-system coding-system-kanji-code-alist))))) (save-excursion (save-restriction (narrow-to-region start end)