diff options
| author | Stefan Monnier | 2007-10-09 05:17:21 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-10-09 05:17:21 +0000 |
| commit | f49f5ca9c4f1b41652b7fe5c5ff8f178b4a984a0 (patch) | |
| tree | f4cd75aaf505d9f56d08d31b0dad871b95496027 /lisp | |
| parent | 8e33712945830b427e05732391ad9072f5279543 (diff) | |
| download | emacs-f49f5ca9c4f1b41652b7fe5c5ff8f178b4a984a0.tar.gz emacs-f49f5ca9c4f1b41652b7fe5c5ff8f178b4a984a0.zip | |
(encoded-kbd-setup-display):
Use input-decode-map rather than local-key-translation-map.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/international/encoded-kb.el | 16 |
2 files changed, 11 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 823ecb77788..36941f109ac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2007-10-09 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-10-09 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * international/encoded-kb.el (encoded-kbd-setup-display): | ||
| 4 | Use input-decode-map rather than local-key-translation-map. | ||
| 5 | |||
| 3 | * term/rxvt.el (rxvt-alternatives-map): New map. | 6 | * term/rxvt.el (rxvt-alternatives-map): New map. |
| 4 | (terminal-init-rxvt): Use it. | 7 | (terminal-init-rxvt): Use it. |
| 5 | Bind rxvt-function-map in input-decode-map. | 8 | Bind rxvt-function-map in input-decode-map. |
diff --git a/lisp/international/encoded-kb.el b/lisp/international/encoded-kb.el index 392951d1c0d..14c61560a41 100644 --- a/lisp/international/encoded-kb.el +++ b/lisp/international/encoded-kb.el | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | ;; Usually this map is empty (even if Encoded-kbd mode is on), but if | 31 | ;; Usually this map is empty (even if Encoded-kbd mode is on), but if |
| 32 | ;; the keyboard coding system is iso-2022-based, it defines dummy key | 32 | ;; the keyboard coding system is iso-2022-based, it defines dummy key |
| 33 | ;; bindings for ESC $ ..., etc. so that those bindings in | 33 | ;; bindings for ESC $ ..., etc. so that those bindings in |
| 34 | ;; key-translation-map take effect. | 34 | ;; input-decode-map take effect. |
| 35 | (defconst encoded-kbd-mode-map (make-sparse-keymap) | 35 | (defconst encoded-kbd-mode-map (make-sparse-keymap) |
| 36 | "Keymap for Encoded-kbd minor mode.") | 36 | "Keymap for Encoded-kbd minor mode.") |
| 37 | 37 | ||
| @@ -255,16 +255,16 @@ The following key sequence may cause multilingual text insertion." | |||
| 255 | 255 | ||
| 256 | ;;;###autoload | 256 | ;;;###autoload |
| 257 | (defun encoded-kbd-setup-display (display) | 257 | (defun encoded-kbd-setup-display (display) |
| 258 | "Set up a `key-translation-map' for `keyboard-coding-system' on DISPLAY. | 258 | "Set up a `input-decode-map' for `keyboard-coding-system' on DISPLAY. |
| 259 | 259 | ||
| 260 | DISPLAY may be a display id, a frame, or nil for the selected frame's display." | 260 | DISPLAY may be a display id, a frame, or nil for the selected frame's display." |
| 261 | (let ((frame (if (framep display) display (car (frames-on-display-list display))))) | 261 | (let ((frame (if (framep display) display (car (frames-on-display-list display))))) |
| 262 | (when frame | 262 | (when frame |
| 263 | (with-selected-frame frame | 263 | (with-selected-frame frame |
| 264 | ;; Remove any previous encoded-kb keymap from key-translation-map. | 264 | ;; Remove any previous encoded-kb keymap from input-decode-map. |
| 265 | (let ((m local-key-translation-map)) | 265 | (let ((m input-decode-map)) |
| 266 | (if (equal (keymap-prompt m) "encoded-kb") | 266 | (if (equal (keymap-prompt m) "encoded-kb") |
| 267 | (setq local-key-translation-map (keymap-parent m)) | 267 | (setq input-decode-map (keymap-parent m)) |
| 268 | (while (keymap-parent m) | 268 | (while (keymap-parent m) |
| 269 | (if (equal (keymap-prompt (keymap-parent m)) "encoded-kb") | 269 | (if (equal (keymap-prompt (keymap-parent m)) "encoded-kb") |
| 270 | (set-keymap-parent m (keymap-parent (keymap-parent m)))) | 270 | (set-keymap-parent m (keymap-parent (keymap-parent m)))) |
| @@ -276,8 +276,8 @@ DISPLAY may be a display id, a frame, or nil for the selected frame's display." | |||
| 276 | (keymap (make-sparse-keymap "encoded-kb")) | 276 | (keymap (make-sparse-keymap "encoded-kb")) |
| 277 | (cim (current-input-mode)) | 277 | (cim (current-input-mode)) |
| 278 | result) | 278 | result) |
| 279 | (set-keymap-parent keymap local-key-translation-map) | 279 | (set-keymap-parent keymap input-decode-map) |
| 280 | (setq local-key-translation-map keymap) | 280 | (setq input-decode-map keymap) |
| 281 | (unless (terminal-parameter nil 'encoded-kbd-saved-input-meta-mode) | 281 | (unless (terminal-parameter nil 'encoded-kbd-saved-input-meta-mode) |
| 282 | (set-terminal-parameter nil 'encoded-kbd-saved-input-mode (nth 2 cim))) | 282 | (set-terminal-parameter nil 'encoded-kbd-saved-input-mode (nth 2 cim))) |
| 283 | (setq result (and coding (encoded-kbd-setup-keymap keymap coding))) | 283 | (setq result (and coding (encoded-kbd-setup-keymap keymap coding))) |
| @@ -297,5 +297,5 @@ DISPLAY may be a display id, a frame, or nil for the selected frame's display." | |||
| 297 | 297 | ||
| 298 | (provide 'encoded-kb) | 298 | (provide 'encoded-kb) |
| 299 | 299 | ||
| 300 | ;;; arch-tag: 76f0f9b3-65e7-45c3-b692-59509a87ad44 | 300 | ;; arch-tag: 76f0f9b3-65e7-45c3-b692-59509a87ad44 |
| 301 | ;;; encoded-kb.el ends here | 301 | ;;; encoded-kb.el ends here |