Ian Crowther wrote: > I'm trying to make emacs bind end-of-line to the tab key in all modes. > Doing: > > (global-set-key (kbd "TAB") 'end-of-line) > > doesn't have any effect. "C-h k <TAB>" shows: > TAB runs the command lisp-indent-line > > I assume my parameters to global-set-key are correct, as local-set-key > works. It looks like the lisp mode is defining the tab key. If I > evaluate "(lisp-mode)" then my binding made with local-set-key is > disabled. > > Is there a way to override the mode settings for the tab key?
Yes. But you'll have to change the binding for each mode you use: (add-hook 'lisp-mode-hook (lambda () (local-set-key (kbd "TAB") 'end-of-line))) > Or a way to prevent modes overriding certain keys in the first place? You might be able to fudge it by using key-translation-map to generate a user-defined function key from (kbd "TAB") that you would map globally to end-of-line. -- Kevin Rodgers _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs