Just do this:
(define-key minibuffer-local-map "\M-s" nil)
The problem is that M-s
is locally bound in the minibuffer (in minibuffer-local-must-match-map
and other minibuffer keymaps) to next-matching-history-element
, which gives you that prompt and lets you search the history.
What you need to do is unbind M-s
in each of the minibuffer keymaps: i.e., bind it to nil
. Some of those maps inherit from others; minibuffer-local-map
should take care of it, but you might want to do the same thing for minibuffer-local-ns-map
. M-x apropos-variable minibuffer map
tells you about all of the maps.
[You can use C-h M-k
to see the bindings of any keymap, e.g., minibuffer-local-must-match-map
-- it is available in library help-fns+.el
.]