• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Mikey Boldt

What am I doing?

  • Home
  • About Mikey
  • Contact

Remove a Key Binding From Emacs Mode

2016-01-05 by Mikey Boldt Leave a Comment

I am experimenting with Gnu Global to navigate a Java project in emacs with the ggtags package. I find it fast and slick, but I hit a bump in the road when I found that it remaps M-< and M-> — the default bindings to jump to the top and bottom of a buffer — when there are multiple matches for a tag. I find this intolerable. Don’t whack useful key bindings. </rant>

Luckily, this is emacs and I can customize everything. I think this is the first time I have deleted key bindings, so I figured I’d document it. A quick search found a post on Emacs Redux which includes how to remove emacs key bindings. In short, set the mode map entry for the key binding you want to remove to nil. Here is what I added:

;; ggtags: don't whack my useful key bindings!
(eval-after-load 'ggtags
  '(progn
     (define-key ggtags-navigation-map (kbd "M-<") nil)
     (define-key ggtags-navigation-map (kbd "M->") nil)))

Share this:

  • Email
  • Facebook
  • Twitter

Filed Under: Tech Tagged With: emacs, gnu global, key bindings

Reader Interactions

Leave a Reply Cancel reply

Primary Sidebar

Categories

  • Orthodoxy
  • Tech
  • Uncategorized

Tags

4331 abfh android apache bible bluetooth cull dropbox dropsync emacs email ezpdf reader fastcgi geeqie gnome gnu global gnus htaccess key bindings keyboard linux mac macbook mod_fcgid msoffice nexus 7 notmuch orgmode papers pdf photo php politics prayer proced processes software sopa top ubuntu upgrade virtualbox vnc xfce xmonad

Archives

  • February 2016
  • January 2016
  • September 2014
  • December 2013
  • November 2013
  • December 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • January 2012
  • December 2011
  • November 2011

Subscribe

  • RSS - Posts
  • RSS - Comments

Copyright © 2021 · Mikey Boldt Theme on Genesis Framework · WordPress · Log in

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.