reverse => nreverse; other optimizations

This commit is contained in:
Henrik Lissner 2017-03-01 19:15:45 -05:00
parent 4723a3d76f
commit 27cc4a9508
7 changed files with 22 additions and 22 deletions

View file

@ -216,7 +216,7 @@ project root). Excludes the file basename. See `doom-buffer-name' for that."
(max-length (truncate (* (window-body-width) 0.4))))
(when (and buffer-path (not (equal buffer-path ".")))
(if (> (length buffer-path) max-length)
(let ((path (reverse (split-string buffer-path "/" t)))
(let ((path (nreverse (split-string buffer-path "/" t)))
(output ""))
(when (and path (equal "" (car path)))
(setq path (cdr path)))