1

In Emacs, I've become accustomed to using "C-x p" for switching to the previous window.

I've recently had to start including a company-wide startup .el file that defines the prefix "C-x p-". I don't use any of the "C-x p-" shortcuts.

Is there a way that I can undefine the "C-x p-" prefix after it's been defined?

1
  • I normally open up the source code of the library at issue and take a look at the mode map. If I don't like the key assignments, then I use the following in my .emacs file: (eval-after-load "name-of-library-without-the-dot-el-at-the-end" '(progn (define-key name-of-mode-map "\C-c\C-a" nil)(define-key name-of-mode-map "\C-c\C-r" nil))) You can fill up the progn statement with as many things as you want -- insert the corresponding key assignment based on what's in the particular mode-map that you want to nullify and set the value to nil as in the above-example.
    – lawlist
    Nov 18, 2014 at 20:16

1 Answer 1

0

If that prefix is defined globally, then a simple

(global-unset-key [?\C-x ?p])

should do.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .