diff options
author | Tom Willemse | 2019-02-28 22:06:47 -0800 |
---|---|---|
committer | Tom Willemse | 2019-02-28 22:06:47 -0800 |
commit | 7f0927f7cea7ed44b5d32083dd06d5c3feaba328 (patch) | |
tree | 6f9123984c2b0ffc99911241abb10a73af5cf59b /oni-ivy.el | |
parent | b87f32a9a3340bd5045e2c24ef3972fd608347b7 (diff) | |
download | emacs-config-7f0927f7cea7ed44b5d32083dd06d5c3feaba328.tar.gz emacs-config-7f0927f7cea7ed44b5d32083dd06d5c3feaba328.zip |
Add Windows-specific settings for Ivy
Diffstat (limited to 'oni-ivy.el')
-rw-r--r-- | oni-ivy.el | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -4,7 +4,7 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 20190228215753 +;; Version: 20190228220438 ;; Package-Requires: (ivy ivy-hydra diminish) ;; This program is free software; you can redistribute it and/or modify @@ -29,6 +29,22 @@ (require 'ivy) (require 'ivy-hydra) +(defun oni-ivy--disable (orig-fun &rest args) + "Disable ivy while running ORIG-FUN with ARGS." + (let ((ivy-enabled ivy-mode)) + (unwind-protect + (progn + (when ivy-enabled + (ivy-mode -1)) + (apply orig-fun args)) + (when ivy-enabled + (ivy-mode 1))))) + +(when (eq system-type 'windows-nt) + (with-eval-after-load 'grep + (add-function :around (symbol-function 'grep-read-files) + #'oni-ivy--disable))) + (diminish 'ivy-mode) ;;;###autoload(with-eval-after-load 'ivy (require 'oni-ivy)) |