Open Fuco1 opened 6 years ago
There's a bunch of other changes related to the readme/docs, I can split it out but meh... ? :D
As long as they are separate commits, I'm good.
Oh damn, directory-name-p
is emacs 25 only. Are we cool with compat/polyfills or should I reimplement it somehow else?
The implementation is
(defsubst directory-name-p (name)
"Return non-nil if NAME ends with a directory separator character."
(let ((len (length name))
(lastc ?.))
(if (> len 0)
(setq lastc (aref name (1- len))))
(or (= lastc ?/)
(and (memq system-type '(windows-nt ms-dos))
(= lastc ?\\)))))
I trust you judgement 🙂
I've added f-directory-name?
which exposes this to older versions of Emacs. So it is stand-alone function while not shadowing the "global" so that we have a "unified" API for all versions. On E25+ it simply aliases.
@rejeep There seems to be some issue with the build regarding the snapshot emacs version. I stalls and never produces any error. I've added Emacs 25.2 and 25.3 to the build to cover all released versions.
Are you comfortable merging this with failing build on the snapshot? I'm not quite sure what is there to do about that :O
@Fuco1 I think we should allow failures for snapshot.
Ugh... I think I will reimplement the function in some other way, this breaks quite spectacularly with remote file names. And it shouldn't as this is purely string manipulation so we don't actually even need to connect to the remote host.
This is continuation of #63
I've extracted the function @FrancisMurillo wrote and changed some of the operations to Emacs primitives so it's faster and then applied it to the
f--uniquify
problem instead of a lambda funcall.