branch: elpa/adoc-mode commit ce247928ecb909d8fd4b9a9df294b521ac4db03d Author: Florian Kaufmann <sensor...@gmail.com> Commit: Florian Kaufmann <sensor...@gmail.com>
added test for byte-compile-file without errors however I still get warnings so far --- adoc-mode-test.el | 4 ++++ adoc-mode.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/adoc-mode-test.el b/adoc-mode-test.el index 79e2f3a5d6..29b96a235f 100644 --- a/adoc-mode-test.el +++ b/adoc-mode-test.el @@ -185,4 +185,8 @@ ;; .... todo ) +;; todo: also test for warnings +(ert-deftest adoctest-test-byte-compile () + (ert-should (byte-compile-file (locate-library "adoc-mode.el" t)))) + (ert-run-tests-interactively "^adoctest-test-") diff --git a/adoc-mode.el b/adoc-mode.el index c80e75e96b..3da79ac8f3 100644 --- a/adoc-mode.el +++ b/adoc-mode.el @@ -109,6 +109,7 @@ ;;; Variables: (require 'markup-faces) +(require 'cl) (defconst adoc-mode-version "0.4.0" "Based upon AsciiDoc version 8.5.2. I.e. regexeps and rules are taken from @@ -1721,7 +1722,7 @@ knowing it. E.g. when `adoc-unichar-name-resolver' is nil." (string-match "&\\(.+?\\);" entity)) (funcall adoc-unichar-name-resolver (match-string 1 entity))))) - (when (char-valid-p ch) (make-string 1 ch))))) + (when (characterp ch) (make-string 1 ch))))) (defun adoc-calc () "(Re-)calculates variables used in adoc-mode.