[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master dfeb059 1/3: * lisp/files.el (insert-directory): Simplify (if ...
From: |
Paul Eggert |
Subject: |
master dfeb059 1/3: * lisp/files.el (insert-directory): Simplify (if ... X X) to X. |
Date: |
Wed, 26 Aug 2020 16:28:02 -0400 (EDT) |
branch: master
commit dfeb0593128006e4cd1e47d831bf00bde9867437
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
* lisp/files.el (insert-directory): Simplify (if ... X X) to X.
---
lisp/files.el | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index e08f0f0..3403e25 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -7070,6 +7070,8 @@ normally equivalent short `-D' option is just passed on to
((stringp switches) (concat switches " -d"))
((member "-d" switches) switches)
(t (append switches '("-d"))))))
+ (if (string-match "\\`~" file)
+ (setq file (expand-file-name file)))
(apply 'call-process
insert-directory-program nil t nil
(append
@@ -7080,14 +7082,7 @@ normally equivalent short `-D' option is just passed on
to
(split-string-and-unquote switches)))
;; Avoid lossage if FILE starts with `-'.
'("--")
- (progn
- (if (string-match "\\`~" file)
- (setq file (expand-file-name file)))
- (list
- (if full-directory-p
- ;; (concat (file-name-as-directory file) ".")
- file
- file))))))))
+ (list file))))))
;; If we got "//DIRED//" in the output, it means we got a real
;; directory listing, even if `ls' returned nonzero.