From ff408364fb857394929662cd32554c52e8d5114b Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Tue, 4 Jun 2024 22:27:18 +0200 Subject: [PATCH] Improve a couple of grep.el error messages --- lisp/progmodes/grep.el | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 3e67fa37cb6..dc2d9519746 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -1060,10 +1060,7 @@ easily repeat a find command." (if grep-find-command (list (read-shell-command "Run find (like this): " grep-find-command 'grep-find-history)) - ;; No default was set - (read-string - "compile.el: No `grep-find-command' command available. Press RET.") - (list nil)))) + (user-error "No `grep-find-command' available")))) (when command-args (let ((null-device nil)) ; see grep (grep command-args)))) @@ -1234,8 +1231,7 @@ command before it's run." ((and grep-command (equal current-prefix-arg '(16))) (list (read-from-minibuffer "Run: " grep-command nil nil 'grep-history))) - ((not grep-template) - (error "grep.el: No `grep-template' available")) + ((not grep-template) (user-error "No `grep-template' available")) (t (let* ((regexp (grep-read-regexp)) (files (grep-read-files regexp)) (dir (read-directory-name "In directory: " -- 2.39.5