branch: externals/pyim commit 69649c2c4ecde584a6df7e6cb7b0258c68eb39cb Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
Fix wrong dir in pyim-elint.el. --- Makefile | 2 +- pyim-cstring-utils.el | 5 +++-- pyim-cstring.el | 7 +++---- tests/pyim-elint.el | 6 ++++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index c1b450b5ee..85889e6f98 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ deps: @if [ ! -f .deps/pyim-basedict.pyim ]; then curl -L $(BASEDICT_PYIM_URL) > .deps/pyim-basedict.pyim; fi; lint: deps - @$(EMACS) $(EMACS_BATCH_OPTS) --load ./tests/pyim-elint.el 2>&1 | grep -vE "pyim-cregexp.el:[0-9]+:Warning: Empty varlist in let|pyim-indicator.el:[0-9]+:Error: Call to undefined function: posframe-show" | grep -E "([Ee]rror|[Ww]arning):" && exit 1 || exit 0 + @$(EMACS) $(EMACS_BATCH_OPTS) --load ./tests/pyim-elint.el 2>&1 | grep -E "([Ee]rror|[Ww]arning):" && exit 1 || exit 0 compile: deps $(RM) *.elc diff --git a/pyim-cstring-utils.el b/pyim-cstring-utils.el index 76a46938b2..8fc854904d 100644 --- a/pyim-cstring-utils.el +++ b/pyim-cstring-utils.el @@ -248,8 +248,9 @@ CHINESE-STRING 分词,得到一个词条 alist,这个 alist 的元素都是 (max-length (max (or max-length 1) 1))) (backward-char max-length)))) -(defalias 'pyim-forward-word 'pyim-cstring-forward-word) -(defalias 'pyim-backward-word 'pyim-cstring-backward-word) +(defalias 'pyim-cwords-at-point #'pyim-cstring-words-at-point) +(defalias 'pyim-forward-word #'pyim-cstring-forward-word) +(defalias 'pyim-backward-word #'pyim-cstring-backward-word) ;; * Footer (provide 'pyim-cstring-utils) diff --git a/pyim-cstring.el b/pyim-cstring.el index 5127f5993f..8a8a76dbdb 100644 --- a/pyim-cstring.el +++ b/pyim-cstring.el @@ -266,10 +266,9 @@ CRITERIA 字符串一般是通过 imobjs 构建的,它保留了用户原始的 (list (car codes-sorted))))) ;; PYIM 重构以前使用的一些函数名称,alias 一下,便于兼容。 -(defalias 'pyim-hanzi2pinyin-simple 'pyim-cstring-to-pinyin-simple) -(defalias 'pyim-hanzi2pinyin 'pyim-cstring-to-pinyin) -(defalias 'pyim-hanzi2xingma 'pyim-cstring-to-xingma) -(defalias 'pyim-cwords-at-point 'pyim-cstring-words-at-point) +(defalias 'pyim-hanzi2pinyin-simple #'pyim-cstring-to-pinyin-simple) +(defalias 'pyim-hanzi2pinyin #'pyim-cstring-to-pinyin) +(defalias 'pyim-hanzi2xingma #'pyim-cstring-to-xingma) ;; * Footer (provide 'pyim-cstring) diff --git a/tests/pyim-elint.el b/tests/pyim-elint.el index cbcdac2085..9cf1817a61 100644 --- a/tests/pyim-elint.el +++ b/tests/pyim-elint.el @@ -27,8 +27,10 @@ ;;; Code: (require 'elint) -(let ((elint-directory-skip-re "\\(\\.dir-locals\\|ldefs-boot\\|loaddefs\\)\\.el\\'")) - (elint-directory "..")) +(let ((elint-directory-skip-re "\\(\\.dir-locals\\|ldefs-boot\\|loaddefs\\)\\.el\\'") + ;; elint can not work well with cl-defgeneric and cl-defstruct. + (elint-ignored-warnings '(undefined-functions))) + (elint-directory ".")) (provide 'pyim-elint) ;;; pyim-elint.el ends here