]> git.eshelyaron.com Git - emacs.git/commitdiff
Make ls-lisp--dired ape dired-noselect more closely
authorDrew Adams <drew.adams@oracle.com>
Sun, 23 Jun 2019 17:24:20 +0000 (19:24 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 23 Jun 2019 17:24:20 +0000 (19:24 +0200)
* lisp/ls-lisp.el (ls-lisp--dired): Emulate the behaviour of
non-ls-lisp.el dired better by defaulting to default-directory as
dired-noselect does (bug#35390).

lisp/ls-lisp.el

index 1f2c46834ecd0580141c08507233699f15ea9b93..66c56f0fceef7fc41c080ea710110e1e67881055 100644 (file)
@@ -488,6 +488,8 @@ not contain `d', so that a full listing is expected."
 
 (defun ls-lisp--dired (orig-fun dir-or-list &optional switches)
   (interactive (dired-read-dir-and-switches ""))
+  (unless dir-or-list
+    (setq dir-or-list default-directory))
   (if (consp dir-or-list)
       (funcall orig-fun dir-or-list switches)
     (let ((dir-wildcard (insert-directory-wildcard-in-dir-p