From: Kenichi Handa Date: Tue, 14 May 2002 07:50:09 +0000 (+0000) Subject: (encoded-kbd-self-insert-iso2022-8bit): New arg ARG. Directly X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~893 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dbeabda3e30199dbb3ecf3dfd85133dc2ce76e84;p=emacs.git (encoded-kbd-self-insert-iso2022-8bit): New arg ARG. Directly call self-insert-command. This is a temporary workaround to make it work with latin-1. (encoded-kbd-mode): Change `sjis' to `shift-jis'. --- diff --git a/lisp/international/encoded-kb.el b/lisp/international/encoded-kb.el index 2cdeba4baaf..4e17d62691c 100644 --- a/lisp/international/encoded-kb.el +++ b/lisp/international/encoded-kb.el @@ -189,23 +189,27 @@ The following key sequence may cause multilingual text insertion." (aset encoded-kbd-iso2022-invocations 2 nil) (setq unread-command-events (cons char unread-command-events)))) -(defun encoded-kbd-self-insert-iso2022-8bit () - (interactive) +(defun encoded-kbd-self-insert-iso2022-8bit (arg) + (interactive "p") (cond ((= last-command-char ?\216) ; SS2 (Single Shift 2) (aset encoded-kbd-iso2022-invocations 2 2)) ((= last-command-char ?\217) ; SS3 (Single Shift 3) (aset encoded-kbd-iso2022-invocations 2 3)) (t - (let* ((charset (aref encoded-kbd-iso2022-designations - (or (aref encoded-kbd-iso2022-invocations 2) - (aref encoded-kbd-iso2022-invocations 1)))) - (char (if (= (charset-dimension charset) 1) - (make-char charset last-command-char) + (let* ((charset (aref encoded-kbd-iso2022-designations + (or (aref encoded-kbd-iso2022-invocations 2) + (aref encoded-kbd-iso2022-invocations 1)))) + (char (if (= (charset-dimension charset) 1) + (make-char charset last-command-char) (make-char charset last-command-char (read-char-exclusive))))) - (aset encoded-kbd-iso2022-invocations 2 nil) - (setq unread-command-events (cons char unread-command-events)))))) + (aset encoded-kbd-iso2022-invocations 2 nil) + ;; As simply setting unread-command-events may result in + ;; infinite-loop for characters 160..255, this is a temporary + ;; workaround until we found a better solution. + (let ((last-command-char char)) + (self-insert-command arg)))))) (defun encoded-kbd-self-insert-sjis () (interactive) @@ -311,7 +315,7 @@ as a multilingual text encoded in a coding system set by (setq encoded-kbd-mode nil) (error "No coding system for keyboard input is set")) - ((eq (coding-system-type coding) 'sjis) + ((eq (coding-system-type coding) 'shift-jis) (set-input-mode (nth 0 saved-input-mode) (nth 1 saved-input-mode) 'use-8th-bit (nth 3 saved-input-mode))