[Mac-emacs-users] command-x (cut), command-c (copy) and command-v (paste)
Brought to you by:
akochoi
|
From: Rodney S. <rsp...@mc...> - 2001-12-14 03:33:39
|
mac-emacs-users
I wanted to get command-x (cut), command-c (copy) and command-v (paste) to
work in 21.1 on OS X. Of course, Andrew did most of the work. Here's his
instructions (I'm attaching macterm.c since you won't be able to copy and
paste the code into emacs until after you re-compile):
add the following IF statement just before the line
bufp->modifiers = the_modifiers;
in macterm.c in function XTread_socket.
if (NILP (Vmac_command_key_is_meta) && (er.modifiers & cmdKey))
the_modifiers |= alt_modifier;
Now, do a "make" and a "make install". And, finally, you need to define
your keys appropriately in ~/.emacs
(setq mac-command-key-is-meta nil) ; meta key is option
(global-set-key [?\A-v] 'yank) ; paste is command-v
(global-set-key [?\A-x] 'kill-region) ; cut is command-x
(global-set-key [?\A-c] 'kill-ring-save) ; copy is command-c
Rodney
<File attached: macterm.c.gz>
|