[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/guess-language 1f1602f 098/101: Merge pull request #18
From: |
Stefan Monnier |
Subject: |
[elpa] externals/guess-language 1f1602f 098/101: Merge pull request #18 from humitos/master |
Date: |
Sat, 23 Feb 2019 10:34:51 -0500 (EST) |
branch: externals/guess-language
commit 1f1602f74d7159e7fb8c90f92ec5a3d1df5429da
Merge: 65dccb1 1afd382
Author: Titus von der Malsburg <address@hidden>
Commit: GitHub <address@hidden>
Merge pull request #18 from humitos/master
defcustom to set the trigrams path
---
guess-language.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/guess-language.el b/guess-language.el
index cc8f877..7550b6d 100644
--- a/guess-language.el
+++ b/guess-language.el
@@ -121,6 +121,11 @@ detected."
:type 'hook
:group 'guess-language)
+(defcustom guess-language-trigrams-directory (file-name-directory
(find-library-name "guess-language"))
+ "Directory where trigrams are stored.
+
+By default it's the same directory where this module is installed.")
+
(defvar guess-language-current-language nil
"The language detected when `guess-language' was last executed.
@@ -131,9 +136,8 @@ Uses ISO 639-1 to identify languages.")
"Load language statistics."
(cl-loop
for lang in guess-language-languages
- for basedir = (file-name-directory (find-library-name "guess-language"))
- for fname = (let ((dir1 (expand-file-name (symbol-name lang) basedir))
- (dir2 (expand-file-name (symbol-name lang)
(expand-file-name "trigrams" basedir))))
+ for fname = (let ((dir1 (expand-file-name (symbol-name lang)
guess-language-trigrams-directory))
+ (dir2 (expand-file-name (symbol-name lang)
(expand-file-name "trigrams" guess-language-trigrams-directory))))
(if (file-exists-p dir1) dir1 dir2))
for trigrams = (with-temp-buffer
(insert-file-contents fname)
- [elpa] externals/guess-language 044f6d1 074/101: README: Updated documentation regarding new hook, (continued)
- [elpa] externals/guess-language 044f6d1 074/101: README: Updated documentation regarding new hook, Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language d6c2fac 081/101: README re typo, Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language 7e8c9e2 084/101: Function: guess language of current line., Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language 11f74d0 088/101: Moved test_data.org to subdir., Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language 89537dc 090/101: Merge pull request #16 from peterwvj/master, Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language f6a7861 061/101: Merge pull request #6 from joostkremers/master, Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language 0c4e9ab 069/101: Minor fixes in test data., Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language b8ab800 070/101: Use hooks for greater configurability., Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language 1107b93 101/101: Fixes #21, Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language 65dccb1 096/101: Added workaround for bug in org mode., Stefan Monnier, 2019/02/23
- [elpa] externals/guess-language 1f1602f 098/101: Merge pull request #18 from humitos/master,
Stefan Monnier <=