Assume that I have defined a function like below with some keybinding (e.g.
(defun foo () (interactive) (insert "something very long") ) (global-set-key [(meta p)] 'foo)
If I hit
M-p while the cursor is at the main buffer, of course the text
something very long is inserted. But when the cursor is at mini-buffer by hitting
M-p the text
foo is inserted.
Is there a way to redefine this function in such a way to work in both main buffer and mini-buffer?