help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to make M-C-p and M-C-n global aliases for M-down and


From: Steinar Bang
Subject: Re: Is it possible to make M-C-p and M-C-n global aliases for M-down and M-up?
Date: Fri, 26 Feb 2021 18:28:11 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt)

>>>>> Stefan Monnier <monnier@iro.umontreal.ca>:

>> On a releated note: is it possible to be able to use C-p for what
>> down does and C-n for what up does, when cycling through 'M-x'
>> commands in the minibuffer?

> Sure, just tweak the bindings in `minibuffer-local-map`.  IIRC up/down
> are bound to previous/next-line-or-history-element, so just bind
> C-p/C-n to those.

I've tried this:
(define-key minibuffer-local-map [C-p] 'previous-history-element)
(define-key minibuffer-local-map [C-n] 'next-history-element)

But pressing 'C-p' after doing M-x, still just outputs "Beginning of
buffer" and pressing 'C-n' still just outputs "End of buffer", which was
what I got before doing the define-key settings about.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]