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.
This commit is contained in:
parent
688eb730ae
commit
d67f6721d7
4
sxiv.el
4
sxiv.el
|
@ -66,12 +66,12 @@ the files listed."
|
||||||
((derived-mode-p 'text-mode)
|
((derived-mode-p 'text-mode)
|
||||||
(--> (buffer-substring-no-properties (point-min)
|
(--> (buffer-substring-no-properties (point-min)
|
||||||
(point-max))
|
(point-max))
|
||||||
(split-string it "\n")
|
(split-string it "\n")))
|
||||||
(-drop-last 1 it))) ;; why?
|
|
||||||
(t (directory-files default-directory))))
|
(t (directory-files default-directory))))
|
||||||
(paths (--remove (or (equal it ".")
|
(paths (--remove (or (equal it ".")
|
||||||
(equal it ".."))
|
(equal it ".."))
|
||||||
paths))
|
paths))
|
||||||
|
;; recurse with prefix arg, or if every path is a directory
|
||||||
(recurse (or prefix
|
(recurse (or prefix
|
||||||
(-every? #'file-directory-p paths)))
|
(-every? #'file-directory-p paths)))
|
||||||
;; remove directories if not running recursively
|
;; remove directories if not running recursively
|
||||||
|
|
Reference in New Issue