]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve a couple of grep.el error messages
authorEshel Yaron <me@eshelyaron.com>
Tue, 4 Jun 2024 20:27:18 +0000 (22:27 +0200)
committerEshel Yaron <me@eshelyaron.com>
Tue, 4 Jun 2024 20:27:18 +0000 (22:27 +0200)
lisp/progmodes/grep.el

index 3e67fa37cb673beedeb9de7119c8a4def5b83131..dc2d9519746100d51ac1473de1fa65fa41229069 100644 (file)
@@ -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: "