I submitted a bug report about this behavior about a year ago on bug-gnu-emacs, but I got no useful responses and the behavior has gotten worse over time. Perhaps someone here has an explanation or work-around.
I am working on a MacBook Pro laptop running Mac OS 10.5.1. In my init.el, I have the following:
(global-set-key (kbd "A-c") 'kill-ring-save) (global-set-key (kbd "A-x") 'kill-region) (setq mac-command-modifier 'alt) ; cmd key -> alt A- (setq mac-option-modifier 'meta) ; option/alt key -> meta M- (setq mac-control-modifier 'control) ; control key -> control C- (setq mac-function-modifier 'super) ; Fn key -> super s- (setq mac-right-command-modifier 'hyper) ; right cmd key -> hyper H-
with the purpose of being able to use the Apple command key for its standard cua copy and paste functionality, among other things.
The problem is, from time to time, A-c, A-x, and perhaps a few other similar key sequences, stop working and become self-insert-command. This is quite disruptive because it means, for instance, the standard keystroke for copying selected text under macOS instead replaces the selected text with some Unicode character.
At first (last year), this seemed to happen after running the command
C-x 8 <any key>
where "any key" is any key at all, not just c.
More recently, it seems to be happening all the time. For what it's worth, my iso-transl-char-map variable contains pairs like ("*c" . ) ("c" . ) but I don't know how those get in there.
When I run describe-key on, say, A-c, I get:
¢ (translated from A-c) runs the command self-insert-command (found in global-map), which is an interactive built-in function in ‘src/cmds.c’. It is bound to many ordinary text characters. #+begin_src emacs-lisp (self-insert-command N &optional C) #+end_src Probably introduced at or before Emacs version 22.1. ...
This behavior is unexpected and unwanted. After the sequence changes, re-evaluating (global-set-key (kbd "A-c") 'kill-ring-save) produces no error message, but has no effect. I have not been able to find any way to get the binding to return to normal except by restarting Emacs.