From d67f6721d75df19a7db9fccae2988a51e4137b86 Mon Sep 17 00:00:00 2001 From: contrapunctus Date: Mon, 13 Jan 2020 16:15:03 +0530 Subject: [PATCH] Remove unnecessary code There was no need to remove the last element. It was added to remove a blank string if the file ended with a blank line, but that blank string was harmless. --- sxiv.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sxiv.el b/sxiv.el index 9b62884..44b8d92 100644 --- a/sxiv.el +++ b/sxiv.el @@ -66,12 +66,12 @@ the files listed." ((derived-mode-p 'text-mode) (--> (buffer-substring-no-properties (point-min) (point-max)) - (split-string it "\n") - (-drop-last 1 it))) ;; why? + (split-string it "\n"))) (t (directory-files default-directory)))) (paths (--remove (or (equal it ".") (equal it "..")) paths)) + ;; recurse with prefix arg, or if every path is a directory (recurse (or prefix (-every? #'file-directory-p paths))) ;; remove directories if not running recursively