Emacs auto-modes and tabs
Kevin D. Clark
kclark at CetaceanNetworks.com
Wed Apr 16 19:09:20 EDT 2003
bscott at ntisys.com writes:
> On Wed, 16 Apr 2003, at 4:12pm, pll at lanminds.com wrote:
> >> Is there some way to globally tell Emacs to leave my freaking
> >> [Tab] key alone, while leaving everything else working the way it is?
Precisely speaking, what you want seems to be pretty difficult to
accomplish, given that each mode tends to install their own
keybindings. I can't think of a way to globally nuke all of these.
My suggestion is to configure what you want via elisp hooks, 1 per
mode that you want to use. For example:
(setq c-mode-hook '(lambda () (interactive)
(define-key c-mode-base-map "\t"
'(lambda () (interactive) (insert-char (string-to-char "\t"))))))
I'm still mulling over a better way to do this...
(not to start a flamewar or anything, but you do know that inserting
real tabs in certain files (i.e. source code files) is frowned upon
(by some people) right?)
Will hack Lisp for good beer,
--kevin
--
Kevin D. Clark (kclark at CetaceanNetworks.com)
ADVERTISEMENT: On Sunday May 4th, I'm riding my bicycle 100 miles
in the American Diabetes Association's Tour de Cure ride. If you're
interested in sponsoring me, please send me email.
More information about the gnhlug-discuss
mailing list