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

Mikey Boldt

What am I doing?

  • Home
  • About Mikey
  • Contact

gnu global

Remove a Key Binding From Emacs Mode

January 5, 2016 by 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)))

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

Primary Sidebar

Recent Posts

  • Recover from Blank Screen After Unplugging External Display in XFCE
  • Remove a Key Binding From Emacs Mode
  • Disable Bluetooth on Ubuntu Startup
  • Geequie: Cull Photos on Linux
  • Sync PDFs with Android using Dropsync

Recent Comments

  • Ricardo Orbegozo on Linking to MS Office File in Emacs Org Mode
  • eliaso on Linking to MS Office File in Emacs Org Mode
  • Joao Brito on Linking to MS Office File in Emacs Org Mode
  • Unable to install Emacs 24 from ppa:cassou/emacs | Ubuntu InfoUbuntu Info on Install Emacs 24 in Ubuntu
  • Unable to install Emacs 24 from ppa:cassou/emacs | WyldePlayground.netWyldePlayground.net - on Install Emacs 24 in Ubuntu

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