title: Execute a particular command on multiple emacs buffers
body: <p>Is there a way to execute emacs command on multiple buffers without having to selecting them individually and executing it on each individual buffer.</p>
  
  <p>I usually open multiple files matching a particular regex, e.g. <code>~/*.py</code> and wish to enable a particular mode, say <code>hs-minor-mode</code> or <code>glasses-mode</code> on each, or say execute <code>C-c @ C-M-h</code> on each. Currently I have to select each one of them and do it individually. So is there a hack or a loop to automate the task.</p>
  
  <p>Lets say I mark the buffers from the buffer-list and then run the command for all those marked.</p>
  
  <p>I tried <a href="https://stackoverflow.com/a/12778675/1309352">this</a> but after executing the commands in <code>eval-expression</code> I completely lost access to my minibuffer, meaning whenever I typed <code>M-x</code> the minibuffer returned this</p>
  
  <blockquote>
    <p>unable to access the minibuffer emacs error "Process Menu Mode doesn't support Hideshow Minor Mode"</p>
  </blockquote>
  
  <p>and I was forced to actually kill the entire emacs process because the <code>C-x C-s</code> wasn't working neither was the End Task.</p>
  
  <p>PS: I have no experience in elisp</p>