title: Check if major mode is equal one of several emacs
body: <p>I found a snippet to close all dired buffers, which I want to use in sunrise commander:</p>
  
  <pre><code>(defun er/kill-all-dired-buffers()
        "Kill all dired buffers."
        (interactive)
        (save-excursion
          (let((count 0))
            (dolist(buffer (buffer-list))
              (set-buffer buffer)
              (when (equal major-mode 'sr-mode) 
                (or (equal major-mode 'dired-mode))
                (setq count (1+ count))
                (kill-buffer buffer)))
            (message "Killed %i dired buffer(s)." count ))))
  (setq sr-quit-hook 'er/kill-all-dired-buffers)
  </code></pre>
  
  <p>Issue being, I can't make it work both for sr-mode and dired-mode together.
  How do I check "if major mode is sr-mode OR dired-mode"?</p>
  
  <hr>
  
  <p>EDIT:
  Just a syntax error.
  Should be</p>
  
  <pre><code>(when (or (equal major-mode 'dired-mode) (equal major-mode 'sr-mode))
  </code></pre>
  
  <p>Have to admit it's not too intuitive.</p>