From dea4bff7f4204de1a7ba3218c3062213afe9d977 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 21 May 2021 11:01:46 -0500 Subject: Fix arity of consult-sensible-* functions ... also fix the type of the equality function. --- init.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index a114c94..91f8baa 100644 --- a/init.el +++ b/init.el @@ -713,17 +713,17 @@ :repo "minad/consult")) ;; "Sensible" functions - (defun consult-sensible-grep () + (defun consult-sensible-grep (&optional arg) "Perform `consult-git-grep' if in a git project, otherwise `consult-ripgrep' if ripgrep is installed, otherwise `consult-grep'." (interactive "P") - (cond ((= (vc-backend buffer-file-name) "Git") + (cond ((string-equal (vc-backend buffer-file-name) "Git") (call-interactively #'consult-git-grep)) ((executable-find "rg") (call-interactively #'consult-ripgrep)) (t (call-interactively #'consult-grep)))) - (defun consult-sensible-find () + (defun consult-sensible-find (&optional arg) "Peform `consult-locate' if locate is installed, otehrwise `consult-find'." (interactive "P") (cond ((executable-find "locate") (call-interactively #'consult-locate)) -- cgit 1.4.1-21-gabe81