grep: Signal error if unable to access directory
* lisp/progmodes/grep.el (lgrep, rgrep): grep: Signal error if unable to access directory, instead of just trying to use default-directory, because that level of DWIMishness is confusing. (Bug#71078)
This commit is contained in:
parent
22c9874760
commit
c0ca272bd7
1 changed files with 2 additions and 2 deletions
|
@ -1332,7 +1332,7 @@ command before it's run."
|
|||
(list regexp files dir confirm))))))
|
||||
(when (and (stringp regexp) (> (length regexp) 0))
|
||||
(unless (and dir (file-accessible-directory-p dir))
|
||||
(setq dir default-directory))
|
||||
(user-error "Unable to open directory: %s" dir))
|
||||
(unless (string-equal (file-remote-p dir) (file-remote-p default-directory))
|
||||
(let ((default-directory dir))
|
||||
(grep-compute-defaults)))
|
||||
|
@ -1437,7 +1437,7 @@ to indicate whether the grep should be case sensitive or not."
|
|||
(grep-compute-defaults))
|
||||
(when (and (stringp regexp) (> (length regexp) 0))
|
||||
(unless (and dir (file-accessible-directory-p dir))
|
||||
(setq dir default-directory))
|
||||
(user-error "Unable to open directory: %s" dir))
|
||||
(unless (string-equal (file-remote-p dir) (file-remote-p default-directory))
|
||||
(let ((default-directory dir))
|
||||
(grep-compute-defaults)))
|
||||
|
|
Loading…
Add table
Reference in a new issue