title: Emacs: how do I bind to M-s?
body: <p>I want to bind </p>
  
  <pre class="lang-lisp prettyprint-override"><code>(defun switch-to-next-frame ()
    "Select the next frame on current display, and raise it."
    (interactive)
    (other-frame 1)
    )
  </code></pre>
  
  <p>to <code>M-s</code> in emacs? I tried:</p>
  
  <pre class="lang-lisp prettyprint-override"><code>(global-unset-key "\M-s")
  </code></pre>
  
  <p>but it doesn't work. The problem is - <code>M-s</code> is a prefix key.</p>
  
  <p><strong>Edit 2</strong>:</p>
  
  <p>I made myself terribly unclear. I wanted to bind to <code>switch-to-next-frame</code> to <code>M-s</code>. I tried:</p>
  
  <pre><code> (global-set-key (kbd "M-s") 'switch-to-next-frame)
  </code></pre>
  
  <p>it didn't work: emacs was doing <code>M-s-</code> when I had been pressing <code>M-s</code>. I thought - the problem was the <code>M-s</code> being a prefix key. I tired to unbind it - but it didn't work out. Then I came here and asked this question. As I found out later - the problem was with my <code>.emacs</code> - when I commented out <code>icicles</code> it all started to work as expected.</p>
  
  <p><strong>Edit 3</strong>:</p>
  
  <p>Actually dired is realy using <code>M-s</code> a prefix key:</p>
  
  <pre><code>M-s a           Prefix Command
  M-s f           Prefix Command
  M-s f C-s       dired-isearch-filenames
  M-s f ESC       Prefix Command
  M-s a C-s       dired-do-isearch
  M-s a ESC       Prefix Command
  M-s f C-M-s     dired-isearch-filenames-regexp
  M-s a C-M-s     dired-do-isearch-regexp
  </code></pre>
  
  <p>So binding to M-s is a realy bad idea.</p>