From: Juri Linkov Date: Mon, 23 Jan 2023 07:55:29 +0000 (+0200) Subject: * lisp/find-dired.el (find-dired): Fix bug where M-p skips first history item. X-Git-Tag: emacs-29.0.90~617 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e6c5f32e77dceed4e26b16889cc56547093bdc45;p=emacs.git * 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. --- 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 "")