title: Why do my emacs comint buffers sometimes seem to share the same history?
body: <p>I often have several comint buffers open at once, for example I'll have a SQLi buffer open to a database and a set of shell buffers open in various places. Sometimes, for no reason I can detect, all of these buffers start to share a common buffer command history, such that M-p will pull up my last SQL command in a shell-mode buffer, and so on.</p>
  
  <p>How can I fix this? What on earth is causing it?</p>