From e6c5f32e77dceed4e26b16889cc56547093bdc45 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 23 Jan 2023 09:55:29 +0200 Subject: [PATCH] * lisp/find-dired.el (find-dired): Fix bug where M-p skips first history item. Don't apply "skip first duplicate history item" trick when find-args used as initial input is nil. --- lisp/find-dired.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/find-dired.el b/lisp/find-dired.el index 9fa139a8025..33376ee4ed9 100644 --- a/lisp/find-dired.el +++ b/lisp/find-dired.el @@ -177,7 +177,9 @@ using GNU findutils (on macOS and *BSD systems), see instead the man page for \"find\"." (interactive (list (read-directory-name "Run find in directory: " nil "" t) (read-string "Run find (with args): " find-args - '(find-args-history . 1)))) + (if find-args + '(find-args-history . 1) + 'find-args-history)))) (setq find-args args ; save for next interactive call args (concat find-program " . " (if (string= args "") -- 2.39.2