Eli Zaretskii writes: >> From: "Basil L. Contovounesios" >> Cc: , >> Date: Fri, 11 May 2018 16:16:09 +0100 >> >> > The original code carefully verified that the members in >> > custom-theme--load-path are directories, whereas your proposal calls >> > directory-files on each member unconditionally, which will barf if a >> > file is not a directory. >> >> The function custom-theme--load-path already incorporates the >> file-directory-p check, so it is technically redundant here. >> Would you rather it be kept regardless? > > We should at least have a comment there that we are relying on > custom-theme--load-path to do the test, and perhaps also an assertion. Do you mean a cl-assertion, or an emulation thereof? E.g.: (unless (file-directory-p dir) (signal 'file-missing (list "`custom-theme-load-path'" "No such directory" dir))) (I'm unsure on the convention for file-missing errors.) Either way, what is the benefit of barfing before directory-files does? Wouldn't a docstring for custom-theme--load-path and a comment in custom-available-themes suffice for the reader (they do for me)? E.g.: