diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 3372ab758..308e29708 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -221,8 +221,9 @@ counsel-rg to discard the rest of the output to display an error. This advice suppresses the error code, so you can still operate on whatever workable results ripgrep produces, despite the error." :around #'counsel-rg - (letf! (defun process-exit-status (code) - (funcall process-exit-status (if (= code 2) 0 code))) + (letf! (defun process-exit-status (proc) + (let ((code (funcall process-exit-status proc))) + (if (= code 2) 0 code))) (apply fn args))) ;; Integrate with `helpful'