This behavior seems to introduced by the packages iso-transl
. From the library's commentary (M-xfind-library
RETiso-transl
RET)
Loading this package defines three ways of entering the non-ASCII
printable characters with codes above 127: the prefix C-x 8, or the
Alt key, or a dead accent key. For example, you can enter uppercase
A-umlaut as C-x 8 " A' or
Alt-" A' (if you have an Alt key) or
`umlaut A' (if you have an umlaut/diaeresis key).
To disable the keybinding for A-m introduced by this package add something like this to your init file
(with-eval-after-load 'iso-transl
(let ((vec (vconcat "m")))
(aset vec 0 (logior (aref vec 0) ?\A-\^@))
(define-key key-translation-map vec nil)))
Alternatively if you want to disable all key translation set iso-transl-char-map
to nil before iso-transl
has loaded. Other way would be map over iso-transl-char-map
and unset keys like above, something like this
(dolist (transl-char iso-transl-char-map)
(let ((vec (vconcat (car transl-char))))
(aset vec 0 (logior (aref vec 0) ?\A-\^@))
(define-key key-translation-map vec nil)))
After which your binding for the key will start working. This works, I tested by instructing emacs to use meta
key as alt
modifier and alt
key as meta
modifier by doing
(setq x-meta-keysym 'alt)
(setq x-alt-keysym 'meta)
Now M-m will act as A-m, to disable it do the reverse of the above.
I feel you should report this as a bug to emacs-devel, there should be a way to easily disable to the key translations introduced by iso-transl
(perhaps there is a way, but I don't see it).
iso-transl
package, that has defined the translation(let ((vec (vconcat "m"))) (aset vec 0 (logior (aref vec 0) ?\A-\^@)) (define-key key-translation-map vec nil))