title: Mode-specific or buffer-local text objects in evil?
body: <p><strong>Q:</strong> in Emacs, how does one make mode-specific key bindings for text objects in <code>evil</code>?</p>
  
  <p>One may bind a key in a specific <em>state</em> (normal, insert, etc.) in a specific mode as the following example demonstrates:</p>
  
  <pre><code>(evil-define-key 'normal org-mode "a" 'some-command)
  </code></pre>
  
  <p>However, it's not clear to me how to bind a key in a mode-specific way to <code>evil-outer-text-objects-map</code> (or its <code>-inner-</code> counterpart).  As an alternative, it's also not clear how one might bind keys in these maps in a buffer-local way through a mode hook.</p>
  
  <p>It doesn't look like <code>evil-local-set-key</code> will do it, because it expects a state (normal, insert, etc.) as its first argument, and that's not relevant to this task.</p>
  
  <p>It's also not clear how to use <code>local-set-key</code> in this instance, because it expects a key and a command as arguments, but does not take a map as an argument.</p>