开发者

Emacs on Mac OS X Lion forward delete

I updated my iMac desktop from Snow Leopard to Lion. I use an extended USB keyboard which has two delete keys: one together with the usual keys (above \) an开发者_如何学Cd one in the extended part (below fn).

In my Emacs under Snow, the first delete key worked as "backward delete" and the second one as "forward delete". However under Lion, they are both "backward delete". On the other hand, they work as expected in other contexts (TextEditor, MS Word, Terminal, this text, etc).

I presume I have to insert some additional key configuration in my .emacs file, but I don't know what. Any hints?

My Emacs is Emacs 23.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.35).


Put this in your Emacs init file:

(global-set-key '[(kp-delete)] 'delete-char)

You might also need to add the following:

(global-set-key '[(delete)] 'delete-char)
(global-set-key '[(meta delete)] 'kill-word)
(global-set-key '[(meta kp-delete)] 'kill-word)
(global-set-key '[(control delete)] 'kill-word)
(global-set-key '[(control kp-delete)] 'kill-word)


Try M-x global-set-key RET key forward-delete -- if it works, try M-x repeat-complex-command but instead of reissuing the command, copy and paste it into your .emacs file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜