Re: Emacs 31: Issue with C-x binding in comint.el
[email protected] Mon, 15 Jun 2026 15:24:56 -0400
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
aitor <[email protected]> writes: > In Emacs 31, `comint.el` maps "C-x up" to > `comint-complete-input-ring`, which breaks my setup. I > globally bind "C-x up" to `windmove-up`, but the comint > mapping prevents me from using "C-x up" in shell > mode. I've solved this by adding the following to my > `init.el`: > > ```elisp > (with-eval-after-load 'comint > (define-key comint-mode-map (kbd "C-x <up>") 'windmove-up)) > ``` > Starting with Emacs 29, ‘define-key’ is deprecated in favor of the new function ‘keymap-set’. So your definition would (slightly) simplify to: (keymap-set comint-mode-map "C-x <up>" #'windmove-up) See, C-h f keymap-set, M-: (shortdoc 'keymaps), and M-: (info "(emacs) Init Rebinding") -- The lyf so short, the craft so long to lerne. - Geoffrey Chaucer, The Parliament of Birds.