al-ido.el 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ;;; al-ido.el --- Additional functionality for ido-mode
  2. ;; Copyright © 2013–2017 Alex Kost
  3. ;; This program is free software; you can redistribute it and/or modify
  4. ;; it under the terms of the GNU General Public License as published by
  5. ;; the Free Software Foundation, either version 3 of the License, or
  6. ;; (at your option) any later version.
  7. ;;
  8. ;; This program is distributed in the hope that it will be useful,
  9. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. ;; GNU General Public License for more details.
  12. ;;
  13. ;; You should have received a copy of the GNU General Public License
  14. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. ;;; Code:
  16. (require 'ido)
  17. (defvar ido-rotate-temp)
  18. ;;;###autoload
  19. (defun al/ido-set-current-directory (dir)
  20. "Change the current ido working directory to DIR."
  21. (interactive)
  22. (ido-set-current-directory dir)
  23. (setq ido-exit 'refresh)
  24. (setq ido-text-init ido-text)
  25. (setq ido-rotate-temp t)
  26. (exit-minibuffer))
  27. ;;;###autoload
  28. (defun al/ido-copy-current-item ()
  29. "Put the current ido item into `kill-ring'."
  30. (interactive)
  31. (kill-new (car ido-matches)))
  32. (provide 'al-ido)
  33. ;;; al-ido.el ends here