Mercurial > emacs
changeset 16142:e7fb56cda7cc
(iso-transl-dead-key-alist): Add dead-...
and S-dead-... key names to this list.
(key-translation-map): Don't define dead-... and S-dead... here.
(iso-transl-define-keys): Handle multiple matches
in iso-transl-dead-key-alist for one accent character.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 09 Sep 1996 22:19:42 +0000 |
parents | 9cbc74969e46 |
children | c19260c70d7b |
files | lisp/international/iso-transl.el |
diffstat | 1 files changed, 37 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/iso-transl.el Mon Sep 09 02:30:05 1996 +0000 +++ b/lisp/international/iso-transl.el Mon Sep 09 22:19:42 1996 +0000 @@ -37,26 +37,28 @@ '((?\' . mute-acute) (?\` . mute-grave) (?\" . mute-diaeresis) - (?^ . mute-asciicircum) ;; Don't use \, since \^ is special. - (?\~ . mute-asciitilde)) + (?^ . mute-asciicircum) + (?\~ . mute-asciitilde) + (?\' . dead-acute) + (?\` . dead-grave) + (?\" . dead-diaeresis) + (?^ . dead-asciicircum) + (?\~ . dead-asciitilde) + (?^ . dead-circum) + (?^ . dead-circumflex) + (?\~ . dead-tilde) + ;; Someone reports that these keys don't work if shifted. + ;; This might fix it--no word yet. + (?\' . S-dead-acute) + (?\` . S-dead-grave) + (?\" . S-dead-diaeresis) + (?^ . S-dead-asciicircum) + (?\~ . S-dead-asciitilde) + (?^ . S-dead-circum) + (?^ . S-dead-circumflex) + (?\~ . S-dead-tilde)) "Mapping of ASCII characters to their corresponding dead-key symbols.") -;; Some X servers use these alternate names. -(or key-translation-map - (setq key-translation-map (make-sparse-keymap))) -(define-key key-translation-map [dead-acute] [mute-acute]) -(define-key key-translation-map [dead-grave] [mute-grave]) -(define-key key-translation-map [dead-diaeresis] [mute-diaeresis]) -(define-key key-translation-map [dead-asciicircum] [mute-asciicircum]) -(define-key key-translation-map [dead-asciitilde] [mute-asciitilde]) -;; Someone reports that these keys don't work if shifted. -;; This might fix it--no word yet. -(define-key key-translation-map [S-dead-acute] [mute-acute]) -(define-key key-translation-map [S-dead-grave] [mute-grave]) -(define-key key-translation-map [S-dead-diaeresis] [mute-diaeresis]) -(define-key key-translation-map [S-dead-asciicircum] [mute-asciicircum]) -(define-key key-translation-map [S-dead-asciitilde] [mute-asciitilde]) - ;; The two-character mnemonics are intended to be available in all languages. ;; The ones beginning with `*' have one-character synonyms, but a ;; language-specific table might override the short form for its own use. @@ -213,20 +215,23 @@ ;; character associated with the string "~n" can be input with `C-x 8 ~ n' ;; or `Alt-~ n' or `mute-asciitilde n'. (defun iso-transl-define-keys (alist) - (while alist - (define-key iso-transl-ctl-x-8-map (car (car alist)) (cdr (car alist))) - (let ((vec (vconcat (car (car alist)))) - (deadpair (assq (aref (car (car alist)) 0) - iso-transl-dead-key-alist))) - (aset vec 0 (logior (aref vec 0) ?\A-\^@)) - (define-key key-translation-map vec (cdr (car alist))) - (define-key isearch-mode-map (vector (aref vec 0)) nil) - (if deadpair - (let ((deadvec (copy-sequence vec))) - (aset deadvec 0 (cdr deadpair)) - (define-key isearch-mode-map (vector (aref deadvec 0)) nil) - (define-key key-translation-map deadvec (cdr (car alist)))))) - (setq alist (cdr alist)))) + (while alist + (define-key iso-transl-ctl-x-8-map (car (car alist)) (cdr (car alist))) + (let ((inchar (aref (car (car alist)) 0)) + (vec (vconcat (car (car alist)))) + (tail iso-transl-dead-key-alist)) + (aset vec 0 (logior (aref vec 0) ?\A-\^@)) + (define-key key-translation-map vec (cdr (car alist))) + (define-key isearch-mode-map (vector (aref vec 0)) nil) + (while tail + (if (eq (car (car tail)) inchar) + (let ((deadvec (copy-sequence vec)) + (deadkey (cdr (car tail)))) + (aset deadvec 0 deadkey) + (define-key isearch-mode-map (vector deadkey) nil) + (define-key key-translation-map deadvec (cdr (car alist))))) + (setq tail (cdr tail))))) + (setq alist (cdr alist))) (defun iso-transl-set-language (lang) (interactive (list (let ((completion-ignore-case t))