|
6 | 6 | ;; Version: 0.0.4 |
7 | 7 | ;; Homepage: https://github.com/tomoya/consult-ghq |
8 | 8 | ;; Keywords: convenience, usability, consult, ghq |
9 | | -;; Package-Requires: ((emacs "26.1") (consult "0.8") (affe "0.1")) |
| 9 | +;; Package-Requires: ((emacs "26.1") (consult "0.8")) |
10 | 10 | ;; License: GPL-3.0-or-later |
11 | 11 |
|
12 | 12 | ;; This program is free software; you can redistribute it and/or modify |
|
27 | 27 | ;; This packaage provides ghq interface using Consult. |
28 | 28 | ;; |
29 | 29 | ;; Its main entry points are the commands `consult-ghq-find' and |
30 | | -;; `consult-ghq-grep`. Default find-function is affe-find. If you |
31 | | -;; want to use consult-find instead, you can change like below: |
| 30 | +;; `consult-ghq-grep`. Default find-function is affe-find, if it's |
| 31 | +;; installed, otherwise consult-find. If you want to use consult-find |
| 32 | +;; despite having affe installed, you can change like below: |
32 | 33 | ;; |
33 | 34 | ;; (setq consult-ghq-find-function #'consult-find) |
34 | 35 |
|
35 | 36 | ;;; Code: |
36 | 37 |
|
37 | 38 | (require 'consult) |
38 | | -(require 'affe) |
39 | 39 |
|
40 | 40 | (defgroup consult-ghq nil |
41 | 41 | "Ghq interface using consult." |
|
48 | 48 | :type 'string |
49 | 49 | :group 'consult-ghq) |
50 | 50 |
|
51 | | -(defcustom consult-ghq-find-function #'affe-find |
| 51 | +(defcustom consult-ghq-find-function (if (fboundp 'affe-find) |
| 52 | + #'affe-find |
| 53 | + #'consult-find) |
52 | 54 | "Find function that find files after selected repo." |
53 | 55 | :type 'function |
54 | 56 | :group 'consult-ghq) |
55 | 57 |
|
56 | | -(defcustom consult-ghq-grep-function #'affe-grep |
| 58 | +(defcustom consult-ghq-grep-function (if (fboundp 'affe-grep) |
| 59 | + #'affe-grep |
| 60 | + #'consult-grep) |
57 | 61 | "Grep function that find files after selected repo." |
58 | 62 | :type 'function |
59 | 63 | :group 'consult-ghq) |
|
0 commit comments