开发者

Emacs gud raising prefix key error

开发者 https://www.devze.com 2022-12-27 09:07 出处:网络
I\'m trying to debug code in Emacs but when I try either M-x gdb or M-x pdb, I get this error: global-set-key: Key sequence C-x C-a C-l starts with non-prefix key C-x C-a

I'm trying to debug code in Emacs but when I try either M-x gdb or M-x pdb, I get this error:

global-set-key: Key sequence C-x C-a C-l starts with non-prefix key C-x C-a

This is most likely coming from this bit in gud.el:

(defcustom gud-key-prefix "\C-x\C-a"
  "Prefix of all GUD commands valid in C buffers."
  :type 'string
  :group 'gud)

(global-set-key (concat gud-key-prefix "\C-l") 'gud-refresh)

I'm using GNU Emacs 23.1.95.1 (x86_64-apple-darwin, NS apple-appkit-1038.29) (pretest built from emacsformacosx.com. I have not modified any of the stock stuff that came with the build. My local elisp directories have no modifications to gud or gdb variables or hooks.

Specif开发者_如何学Cic questions:

  1. Has anybody seen/fixed this before?
  2. If not, how is gud defining an appropriate prefix key on your emacs and not mine?


Found the problem. I had bound C-x C-a to another function in my .emacs.


I have seen this on Emacs 23.1.1, Windows Vista, when loading matlab mode (matlab.el) using M-x matlab-mode. I've tried both with a matlab.el that I had from 2003, and an updated from 2010. The latter is from http://matlab-emacs.cvs.sourceforge.net/viewvc/checkout/matlab-emacs/matlab-emacs/matlab.el?revision=1.24

My solution might be the same. I have C-x C-a bound to recentf-open-files. But I want to keep that.

Helge

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号