summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
authorCase Duckworth2021-05-21 11:01:46 -0500
committerCase Duckworth2021-05-21 11:01:46 -0500
commitdea4bff7f4204de1a7ba3218c3062213afe9d977 (patch)
treeb8a0f609f66e78d4b367b527e9dabacaacd7c160 /init.el
parentChange hook for `acdw/frame-setup' (diff)
downloademacs-dea4bff7f4204de1a7ba3218c3062213afe9d977.tar.gz
emacs-dea4bff7f4204de1a7ba3218c3062213afe9d977.zip
Fix arity of consult-sensible-* functions
... also fix the type of the equality function.
Diffstat (limited to 'init.el')
-rw-r--r--init.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/init.el b/init.el index a114c94..91f8baa 100644 --- a/init.el +++ b/init.el
@@ -713,17 +713,17 @@
713 :repo "minad/consult")) 713 :repo "minad/consult"))
714 714
715 ;; "Sensible" functions 715 ;; "Sensible" functions
716 (defun consult-sensible-grep () 716 (defun consult-sensible-grep (&optional arg)
717 "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep' 717 "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep'
718if ripgrep is installed, otherwise `consult-grep'." 718if ripgrep is installed, otherwise `consult-grep'."
719 (interactive "P") 719 (interactive "P")
720 (cond ((= (vc-backend buffer-file-name) "Git") 720 (cond ((string-equal (vc-backend buffer-file-name) "Git")
721 (call-interactively #'consult-git-grep)) 721 (call-interactively #'consult-git-grep))
722 ((executable-find "rg") 722 ((executable-find "rg")
723 (call-interactively #'consult-ripgrep)) 723 (call-interactively #'consult-ripgrep))
724 (t (call-interactively #'consult-grep)))) 724 (t (call-interactively #'consult-grep))))
725 725
726 (defun consult-sensible-find () 726 (defun consult-sensible-find (&optional arg)
727 "Peform `consult-locate' if locate is installed, otehrwise `consult-find'." 727 "Peform `consult-locate' if locate is installed, otehrwise `consult-find'."
728 (interactive "P") 728 (interactive "P")
729 (cond ((executable-find "locate") (call-interactively #'consult-locate)) 729 (cond ((executable-find "locate") (call-interactively #'consult-locate))