Mercurial > emacs
diff lisp/international/encoded-kb.el @ 88493:410ca4f1df02
(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'.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 14 May 2002 07:50:09 +0000 |
parents | a64bb690ca28 |
children | 3629e02a95c1 |
line wrap: on
line diff
--- a/lisp/international/encoded-kb.el Tue May 14 07:48:11 2002 +0000 +++ b/lisp/international/encoded-kb.el Tue May 14 07:50:09 2002 +0000 @@ -189,23 +189,27 @@ (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 @@ (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))