branch: externals/guess-language commit 47ff6ad8301a9b98c2a8b070e3c396d930dbcbe2 Author: Syohei YOSHIDA <syo...@gmail.com> Commit: Syohei YOSHIDA <syo...@gmail.com>
Fix package - Add missing dependency 'typo' - Load libraries explicitly - Add meta comment - Remove needless buffer local variable --- guess-language.el | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/guess-language.el b/guess-language.el index b623d7e..f736866 100644 --- a/guess-language.el +++ b/guess-language.el @@ -3,7 +3,7 @@ ;; Author: Titus von der Malsburg <malsb...@posteo.de> ;; Maintainer: Titus von der Malsburg <malsb...@posteo.de> ;; Version: 0.0.1 -;; Package-Requires: ((cl-lib "0.5") (emacs "24")) +;; Package-Requires: ((cl-lib "0.5") (emacs "24") (typo "1.1")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -27,6 +27,14 @@ ;; See here for more details: ;; https://github.com/tmalsburg/guess-language.el +;;; Code: + +(require 'cl-lib) +(require 'typo) +(require 'find-func) +(require 'ispell) +(require 'flyspell) + (defcustom guess-language-languages '(en de fr) "List of symbols that identify the languages that should be considered when guessing language. Currently supported @@ -76,7 +84,7 @@ little material to reliably guess the language." for lang in guess-language-regexps for regexp = (cdr lang) collect (cons (car lang) (how-many regexp beginning end))))) - (car (reduce (lambda (x y) (if (> (cdr x) (cdr y)) x y)) tally)))) + (car (cl-reduce (lambda (x y) (if (> (cdr x) (cdr y)) x y)) tally)))) (defun guess-language-buffer () (interactive) @@ -156,7 +164,6 @@ correctly." (provide 'guess-language) ;; Local Variables: -;; byte-compile-warnings: (not cl-functions obsolete) ;; coding: utf-8 ;; indent-tabs-mode: nil ;; End: