From 7c842139bcdf41b20b1cf409d5599be2a760e70d Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 2 Sep 2019 22:52:09 +0530 Subject: Add language suffix to filenames without an extension. * ennu.el (ennu-add-tongue-suffix): Support filenames without extension. --- ennu.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ennu.el b/ennu.el index ae2dc17..3bd5f79 100644 --- a/ennu.el +++ b/ennu.el @@ -145,10 +145,10 @@ last form in BODY." (defun ennu-add-tongue-suffix (filename tongue) (pcase tongue ("en" filename) - (_ (format "%s.%s.%s" + (_ (format "%s.%s%s" (file-name-sans-extension filename) tongue - (file-name-extension filename))))) + (file-name-extension filename t))))) (defun ennu-index-filename (filename-prefix tongue &optional extension page-number) (let ((extension (if extension (concat "." extension) ""))) -- cgit v1.2.3