Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mobilehaathi

macrumors G3
Original poster
Aug 19, 2008
9,368
6,352
The Anthropocene
So I recently got myself an apple keyboard for when I'm doing programming at lab on my MBP. I usually code in emacs and compile with gnu make, etc. However, I've noticed that in emacs my delete key #2 works the same as my delete key #1. I'd like to change it such that it will delete to the right of the cursor instead of to the left. I did something like this to define the scroll wheel action by adding the following code to my .emacs file (found it on the web).

Code:
(global-set-key [wheel-down] 'up-slightly)
(global-set-key [wheel-up] 'down-slightly)
(global-set-key [double-wheel-down] 'up-slightly)
(global-set-key [double-wheel-up] 'down-slightly)
(global-set-key [triple-wheel-down] 'up-slightly)
(global-set-key [triple-wheel-up] 'down-slightly)

Anyone know what to add to make my delete #2 work as I want?
 

o.simon

macrumors newbie
Apr 16, 2011
1
0
add this line to your .emacs file (or to your .emacs.d/init.el file)
Code:
(normal-erase-is-backspace-mode 1)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.