 (defun my/dired-sort()
   "Toggle sorting in dired buffers."
   (interactive)
-  (let ((type (ido-completing-read
-               "Sort by: "
-               '( "size" "extension" "ctime" "utime" "time" "name")
-               nil t)))
+  ( let ((type
+          (funcall
+           my/choose-func
+           '( "size" "extension" "ctime" "utime" "time" "name")
+           "Sort by:")))
     ;; on os x, extension (X) not supported;
     ;; also, ctime means time file status was last changed
     (cond ((string= type "size") (dired-sort-size))

  (smex-initialize)
  (global-set-key (kbd "M-x") 'smex)
  (global-set-key (kbd "M-X") 'smex-major-mode-commands))
;; the old M-x
(global-set-key "\e\ex" 'execute-extended-command)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; imenu ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; I prefer imenu-anywhere to return imenu results only for the current

;; Author: Dan Harms <danielrharms@gmail.com>
;; Created: Friday, February 27, 2015
;; Version: 1.0
;; Modified Time-stamp: <2015-09-29 17:02:25 dan.harms>
;; Modified by: Dan Harms
;; Keywords:

