aboutsummaryrefslogtreecommitdiff
path: root/ennu.el
diff options
context:
space:
mode:
authorArun Isaac2019-09-02 22:52:09 +0530
committerArun Isaac2019-09-02 22:52:09 +0530
commit7c842139bcdf41b20b1cf409d5599be2a760e70d (patch)
treef8e377649b62fcf21b92f905233d69a819392b2e /ennu.el
parent95ca12914ed23c38cd9640f5ed51d7b767b20e10 (diff)
downloadennum-7c842139bcdf41b20b1cf409d5599be2a760e70d.tar.gz
ennum-7c842139bcdf41b20b1cf409d5599be2a760e70d.tar.lz
ennum-7c842139bcdf41b20b1cf409d5599be2a760e70d.zip
Add language suffix to filenames without an extension.
* ennu.el (ennu-add-tongue-suffix): Support filenames without extension.
Diffstat (limited to 'ennu.el')
-rw-r--r--ennu.el4
1 files 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) "")))