Because the minibuffer's major mode is minibuffer-mode
which has a different keymap than whatever mode you are using for the "normal" buffer. You could try (but you shouldn't - DAMHIKT) enabling paredit-mode
in the usual way in your minibuffer - like this:
(add-hook 'minibuffer-mode-hook #'paredit-mode)
The problem with that is that the minor mode keymap (i.e. paredit-mode-map
in this case) would shadow the major mode keymap (i.e. minibuffer-mode-map
in this case), and since the minor mode keymap binds things like RET
, it would wreak havoc on the minibuffer's operations; e.g. RET
is bound to minibuffer-complete-and-exit
in the minibuffer-mode
keymap but if you enable the minor mode, it would be bound to paredit-RET
, a different function that knows nothing about the minibuffer or how to exit it.
You might want to try selectively modifying the major mode keymap to modify just the C-k
binding (which, incidentally, is not defined in this keymap: it is picked up from the global map - see Active keymaps in the Elisp Reference manual):
(define-key minibuffer-mode-map (kbd "C-k") #'paredit-kill)
or you can, if you want, redefine it in global-map
so that any mode that does not define it on its own, will pick it up from the global map (however, if it it does define it on its own, then you'll have to do some digging to find out which map you have to modify).
C-k
does. But my educated guess says it does the same thatC-M-k
does.