   ("k" kill-this-buffer)
   ("f" reveal-in-osx-finder)
   ("m" (switch-to-buffer "*Messages*"))
-  ("b" (progn
-         (cond ((eq dotemacs-switch-engine 'ivy)
-                (call-interactively #'my-ivy-mini))
-               ((eq dotemacs-switch-engine 'helm)
-                (call-interactively #'helm-mini))
-               (t
-                (call-interactively #'switch-to-buffer))))))
+  ("b" (my-switch-action #'switch-to-buffer :ivy #'my-ivy-mini :helm #'helm-mini)))
 
  

   errors:  _n_ → next error       _t_ → toggle flycheck (%`my-errors-hydra/flycheck)
            _p_ → previous error
"
  ("n" (progn
         (if my-errors-hydra/flycheck
             (call-interactively #'flycheck-next-error)
           (call-interactively #'next-error))))
  ("p" (progn
         (if my-errors-hydra/flycheck
             (call-interactively #'flycheck-previous-error)
           (call-interactively #'previous-error))))
  ("t" (progn
         (setq my-errors-hydra/flycheck (not my-errors-hydra/flycheck)))))



(defhydra my-quit-hydra (:hint nil :exit t)
  "
   quit:  _q_ → quit
          _r_ → restart
"
  ("q" save-buffers-kill-emacs)
  ("r" restart-emacs))

   jump   _i_ → outline in current buffer   _l_ → lines in current buffer
          _b_ → bookmarks                   _L_ → lines in all buffers
"
  ("i" (my-switch-action #'imenu :ivy #'counsel-imenu :helm #'helm-semantic-or-imenu))
  ("l" (my-switch-action nil     :ivy #'swiper        :helm #'helm-swoop))
  ("L" (my-switch-action nil     :ivy #'swiper-all    :helm #'helm-multi-swoop))
  ("b" bookmark-jump))

