X-Debbugs-CC: dgutov@yandex.ru If a project is named something like ".emacs.d", file-name-base will return ".emacs" instead of ".emacs.d" as expected (or at least as I expect it). Therefore, we use file-name-nondirectory instead.