Loading ChangeLog +9 −2 Original line number Diff line number Diff line 2020-02-20 Yuanle Song <root@emacsos.com> zero-pinyin-service v1.10.0 - enable ue -> ve fuzzy by default. now lue -> lve -> 略。 zero-input v2.6.0 - allow customize Chinese punctuation mapping via M-x customize-variable - add bug report link in README - update intro doc for melpa - add melpa badge in README - add punctuation doc in README 2020-02-16 Yuanle Song <root@emacsos.com> Loading @@ -11,6 +15,9 @@ - some variables declared using defcustom - bugfix: use 'zero-input instead of 'zero as customize group name zero-pinyin-service v1.10.0 - enable ue -> ve fuzzy by default. now lue -> lve -> 略。 2020-02-04 Yuanle Song <root@emacsos.com> zero-input v2.2.1 Loading NOTICE +1 −1 Original line number Diff line number Diff line zero-el Copyright (C) 2019 Yuanle Song <sylecn@gmail.com> Copyright (C) 2019, 2020 Yuanle Song <sylecn@gmail.com> zero-input--ibus-compute-pixel-position function in zero-input.el is copied from ibus.el. This function is under GPLv3 license. Copyright (C) 2010-2012 Loading README +29 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,32 @@ M-x customize-group zero-input-pinyin - Use ' to separate pinyin substring like xi'an 西安 * Zero Framework features - Chinese punctuation mapping. Type the char will insert the corresponding Chinese punctuation when zero-input-punctuation-level is basic or full. | char | punctuation | |---------+-------------| | =basic= | | | , | , | | . | 。 | | ? | ? | | \! | ! | | \ | 、 | | : | : | | =full= | | | \_ | —— | | < > | 《 》 | | ( ) | ( ) | | [ ] | 【 】 | | \^ | …… | | " " | “ ” | | ' ' | ‘ ’ | | ~ | ~ | | ; | ; | | \$ | ¥ | You may customize punctuation mapping via zero-input-convert-punctuation-basic and zero-input-punctuation-full-map. - Auto save user phrases. When you type a new phrase, it will be remembered in user phrase db. - To delete system phrase or user phrase, type C-<digit> when candidate is Loading Loading @@ -65,8 +91,8 @@ reporting issue easier. - zero-input-framework.el zero framework source code. This provides the framework and user interface for zero-el. zero input framework source code. This provides the framework and user interface for zero-el. - zero-input-panel.el Loading @@ -78,7 +104,7 @@ reporting issue easier. - zero-input-pinyin.el Pinyin input method implemented using zero.el Pinyin input method implemented using zero-input-framework.el - zero-input-quickdial.el Loading operational +24 −4 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ cd ~/lisp/elisp/zero/ (load-file "~/.emacs.d/elpa/s-1.11.0/s.elc") (byte-compile-file "~/lisp/elisp/zero/zero-input.el" t) (global-set-key (kbd "<f1>") 'zero-input-mode) (zero-input-set-default-im 'pinyin) (zero-input-set-default-im "pinyin") now in some buffer, press F1 and start typing. Loading @@ -114,16 +114,24 @@ cd ~/lisp/elisp/zero/ * later :entry: * current :entry: ** ** 2020-02-20 integrate travis CI support. just run "make dist-check". ** 2019-10-23 checkdoc and package-lint can't ignore some non-issues. I can't run them in git pre-commit hook. * done :entry: ** 2020-02-20 add github issue system support. - create issue templates online. then merge into master. git remote add github git@github.com:sylecn/zero-el.git git fetch github sylecn-patch-1 gco github/sylecn-patch-1 .github/ drop the feature branch on github git push github :sylecn-patch-1 git push github :pkg git push github :multi-file-pkg - update README, add bug report doc. - ** 2019-10-23 checkdoc and package-lint can't ignore some non-issues. I can't run them in git pre-commit hook. * done :entry: ** 2019-11-03 add completion support for zero-input-set-im complete registered im symbols. Loading Loading @@ -868,6 +876,18 @@ https://github.com/melpa/melpa/blob/master/CONTRIBUTING.org#preparing-a-pull-req fixed. * wontfix :entry: ** 2020-02-20 gitlab doesn't render README as org-mode file. github does render it. should I name it README.org? - does gitlab newer version support parsing mode line? search: gitlab parse mode line from README file search: gitlab render README file without suffix gitlab only support markdown, ascii doc and rst. org-mode is not supported. add .org suffix won't help gitlab. Either keep it or rewrite it as markdown or rst. I will keep it. ** 2020-02-04 zero-input-pinyin-pending-preedit-str="erduo" not correct? - zero-input-pinyin-pending-preedit-str="erduo" Loading zero-input-framework.el +41 −25 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ If item is not in lst, return nil." ;; zero-input-el version (defvar zero-input-version nil "Zero package version.") (setq zero-input-version "2.5.0") (setq zero-input-version "2.6.0") ;; FSM state (defconst zero-input--state-im-off 'IM-OFF) Loading Loading @@ -168,6 +168,35 @@ independent from punctuation map. You can change this via :safe t :type 'boolean) (make-variable-buffer-local 'zero-input-full-width-p) (defcustom zero-input-punctuation-basic-map '((?, ",") (?, ",") (?. "。") ; 0x3002 (?? "?") (?! "!") (?\\ "、") ; 0x3001 (?: ":")) "Punctuation map used when `zero-input-punctuation-level' is not 'NONE." :group 'zero-input :type '(alist :key-type character :value-type (group string))) (defcustom zero-input-punctuation-full-map '((?_ "——") (?< "《") ;0x300A (?> "》") ;0x300B (?\( "(") (?\) ")") (?\[ "【") ;0x3010 (?\] "】") ;0x3011 (?^ "……") (?~ "~") (?\; ";") (?$ "¥")) "Additional punctuation map used when `zero-input-punctuation-level' is 'FULL." :group 'zero-input :type '(alist :key-type character :value-type (group string))) (defcustom zero-input-punctuation-level zero-input-punctuation-level-basic "Default punctuation level. Loading Loading @@ -422,36 +451,19 @@ If there is no full-width char for CH, return it unchanged." "Convert punctuation for `zero-input-punctuation-level-basic'. Return CH's Chinese punctuation if CH is converted. Return nil otherwise." (cl-case ch (?, ",") (?. "。") ; 0x3002 (?? "?") (?! "!") (?\\ "、") ; 0x3001 (?: ":") (otherwise nil))) (cadr (assq ch zero-input-punctuation-basic-map))) (defun zero-input-convert-punctuation-full (ch) "Convert punctuation for `zero-input-punctuation-level-full'. Return CH's Chinese punctuation if CH is converted. Return nil otherwise" (cl-case ch (?_ "——") (?< "《") ;0x300A (?> "》") ;0x300B (?\( "(") (?\) ")") (?\[ "【") ;0x3010 (?\] "】") ;0x3011 (?^ "……") (?\" (setq zero-input-double-quote-flag (not zero-input-double-quote-flag)) (if zero-input-double-quote-flag "“" "”")) (?\' (setq zero-input-single-quote-flag (not zero-input-single-quote-flag)) (if zero-input-single-quote-flag "‘" "’")) (?~ "~") (?\; ";") (?$ "¥") (t (zero-input-convert-punctuation-basic ch)))) (t (or (cadr (assq ch zero-input-punctuation-full-map)) (zero-input-convert-punctuation-basic ch))))) (defun zero-input-convert-punctuation (ch) "Convert punctuation based on `zero-input-punctuation-level'. Loading Loading @@ -867,7 +879,7 @@ IM-NAME (a string) should be a registered input method in zero-input." (error "Input method name is required") (zero-input-set-im im-name-str)))) ((symbolp im-name) ;; for backward compatibility ;; symbol is allowed for backward compatibility. (zero-input-set-im (symbol-name im-name))) (t (let* ((im-slot (assoc im-name zero-input-ims)) (im-functions (cdr im-slot))) Loading Loading @@ -914,9 +926,13 @@ IM-NAME (a string) should be a registered input method in zero-input." ;;;###autoload (defun zero-input-set-default-im (im-name) "Set given IM-NAME as default zero input method." (unless (symbolp im-name) (signal 'wrong-type-argument (list 'symbolp im-name))) (setq-default zero-input-im im-name)) ;; symbol is allowed for backward compatibility. (unless (or (stringp im-name) (symbolp im-name)) (signal 'wrong-type-argument (list 'string-or-symbolp im-name))) (let ((im-name-str (if (symbolp im-name) (symbol-name im-name) im-name))) (setq-default zero-input-im im-name-str) (unless (assoc im-name-str zero-input-ims) (warn "Input method %s is not registered with zero-input" im-name-str)))) ;;;###autoload (defun zero-input-on () Loading Loading
ChangeLog +9 −2 Original line number Diff line number Diff line 2020-02-20 Yuanle Song <root@emacsos.com> zero-pinyin-service v1.10.0 - enable ue -> ve fuzzy by default. now lue -> lve -> 略。 zero-input v2.6.0 - allow customize Chinese punctuation mapping via M-x customize-variable - add bug report link in README - update intro doc for melpa - add melpa badge in README - add punctuation doc in README 2020-02-16 Yuanle Song <root@emacsos.com> Loading @@ -11,6 +15,9 @@ - some variables declared using defcustom - bugfix: use 'zero-input instead of 'zero as customize group name zero-pinyin-service v1.10.0 - enable ue -> ve fuzzy by default. now lue -> lve -> 略。 2020-02-04 Yuanle Song <root@emacsos.com> zero-input v2.2.1 Loading
NOTICE +1 −1 Original line number Diff line number Diff line zero-el Copyright (C) 2019 Yuanle Song <sylecn@gmail.com> Copyright (C) 2019, 2020 Yuanle Song <sylecn@gmail.com> zero-input--ibus-compute-pixel-position function in zero-input.el is copied from ibus.el. This function is under GPLv3 license. Copyright (C) 2010-2012 Loading
README +29 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,32 @@ M-x customize-group zero-input-pinyin - Use ' to separate pinyin substring like xi'an 西安 * Zero Framework features - Chinese punctuation mapping. Type the char will insert the corresponding Chinese punctuation when zero-input-punctuation-level is basic or full. | char | punctuation | |---------+-------------| | =basic= | | | , | , | | . | 。 | | ? | ? | | \! | ! | | \ | 、 | | : | : | | =full= | | | \_ | —— | | < > | 《 》 | | ( ) | ( ) | | [ ] | 【 】 | | \^ | …… | | " " | “ ” | | ' ' | ‘ ’ | | ~ | ~ | | ; | ; | | \$ | ¥ | You may customize punctuation mapping via zero-input-convert-punctuation-basic and zero-input-punctuation-full-map. - Auto save user phrases. When you type a new phrase, it will be remembered in user phrase db. - To delete system phrase or user phrase, type C-<digit> when candidate is Loading Loading @@ -65,8 +91,8 @@ reporting issue easier. - zero-input-framework.el zero framework source code. This provides the framework and user interface for zero-el. zero input framework source code. This provides the framework and user interface for zero-el. - zero-input-panel.el Loading @@ -78,7 +104,7 @@ reporting issue easier. - zero-input-pinyin.el Pinyin input method implemented using zero.el Pinyin input method implemented using zero-input-framework.el - zero-input-quickdial.el Loading
operational +24 −4 Original line number Diff line number Diff line Loading @@ -92,7 +92,7 @@ cd ~/lisp/elisp/zero/ (load-file "~/.emacs.d/elpa/s-1.11.0/s.elc") (byte-compile-file "~/lisp/elisp/zero/zero-input.el" t) (global-set-key (kbd "<f1>") 'zero-input-mode) (zero-input-set-default-im 'pinyin) (zero-input-set-default-im "pinyin") now in some buffer, press F1 and start typing. Loading @@ -114,16 +114,24 @@ cd ~/lisp/elisp/zero/ * later :entry: * current :entry: ** ** 2020-02-20 integrate travis CI support. just run "make dist-check". ** 2019-10-23 checkdoc and package-lint can't ignore some non-issues. I can't run them in git pre-commit hook. * done :entry: ** 2020-02-20 add github issue system support. - create issue templates online. then merge into master. git remote add github git@github.com:sylecn/zero-el.git git fetch github sylecn-patch-1 gco github/sylecn-patch-1 .github/ drop the feature branch on github git push github :sylecn-patch-1 git push github :pkg git push github :multi-file-pkg - update README, add bug report doc. - ** 2019-10-23 checkdoc and package-lint can't ignore some non-issues. I can't run them in git pre-commit hook. * done :entry: ** 2019-11-03 add completion support for zero-input-set-im complete registered im symbols. Loading Loading @@ -868,6 +876,18 @@ https://github.com/melpa/melpa/blob/master/CONTRIBUTING.org#preparing-a-pull-req fixed. * wontfix :entry: ** 2020-02-20 gitlab doesn't render README as org-mode file. github does render it. should I name it README.org? - does gitlab newer version support parsing mode line? search: gitlab parse mode line from README file search: gitlab render README file without suffix gitlab only support markdown, ascii doc and rst. org-mode is not supported. add .org suffix won't help gitlab. Either keep it or rewrite it as markdown or rst. I will keep it. ** 2020-02-04 zero-input-pinyin-pending-preedit-str="erduo" not correct? - zero-input-pinyin-pending-preedit-str="erduo" Loading
zero-input-framework.el +41 −25 Original line number Diff line number Diff line Loading @@ -133,7 +133,7 @@ If item is not in lst, return nil." ;; zero-input-el version (defvar zero-input-version nil "Zero package version.") (setq zero-input-version "2.5.0") (setq zero-input-version "2.6.0") ;; FSM state (defconst zero-input--state-im-off 'IM-OFF) Loading Loading @@ -168,6 +168,35 @@ independent from punctuation map. You can change this via :safe t :type 'boolean) (make-variable-buffer-local 'zero-input-full-width-p) (defcustom zero-input-punctuation-basic-map '((?, ",") (?, ",") (?. "。") ; 0x3002 (?? "?") (?! "!") (?\\ "、") ; 0x3001 (?: ":")) "Punctuation map used when `zero-input-punctuation-level' is not 'NONE." :group 'zero-input :type '(alist :key-type character :value-type (group string))) (defcustom zero-input-punctuation-full-map '((?_ "——") (?< "《") ;0x300A (?> "》") ;0x300B (?\( "(") (?\) ")") (?\[ "【") ;0x3010 (?\] "】") ;0x3011 (?^ "……") (?~ "~") (?\; ";") (?$ "¥")) "Additional punctuation map used when `zero-input-punctuation-level' is 'FULL." :group 'zero-input :type '(alist :key-type character :value-type (group string))) (defcustom zero-input-punctuation-level zero-input-punctuation-level-basic "Default punctuation level. Loading Loading @@ -422,36 +451,19 @@ If there is no full-width char for CH, return it unchanged." "Convert punctuation for `zero-input-punctuation-level-basic'. Return CH's Chinese punctuation if CH is converted. Return nil otherwise." (cl-case ch (?, ",") (?. "。") ; 0x3002 (?? "?") (?! "!") (?\\ "、") ; 0x3001 (?: ":") (otherwise nil))) (cadr (assq ch zero-input-punctuation-basic-map))) (defun zero-input-convert-punctuation-full (ch) "Convert punctuation for `zero-input-punctuation-level-full'. Return CH's Chinese punctuation if CH is converted. Return nil otherwise" (cl-case ch (?_ "——") (?< "《") ;0x300A (?> "》") ;0x300B (?\( "(") (?\) ")") (?\[ "【") ;0x3010 (?\] "】") ;0x3011 (?^ "……") (?\" (setq zero-input-double-quote-flag (not zero-input-double-quote-flag)) (if zero-input-double-quote-flag "“" "”")) (?\' (setq zero-input-single-quote-flag (not zero-input-single-quote-flag)) (if zero-input-single-quote-flag "‘" "’")) (?~ "~") (?\; ";") (?$ "¥") (t (zero-input-convert-punctuation-basic ch)))) (t (or (cadr (assq ch zero-input-punctuation-full-map)) (zero-input-convert-punctuation-basic ch))))) (defun zero-input-convert-punctuation (ch) "Convert punctuation based on `zero-input-punctuation-level'. Loading Loading @@ -867,7 +879,7 @@ IM-NAME (a string) should be a registered input method in zero-input." (error "Input method name is required") (zero-input-set-im im-name-str)))) ((symbolp im-name) ;; for backward compatibility ;; symbol is allowed for backward compatibility. (zero-input-set-im (symbol-name im-name))) (t (let* ((im-slot (assoc im-name zero-input-ims)) (im-functions (cdr im-slot))) Loading Loading @@ -914,9 +926,13 @@ IM-NAME (a string) should be a registered input method in zero-input." ;;;###autoload (defun zero-input-set-default-im (im-name) "Set given IM-NAME as default zero input method." (unless (symbolp im-name) (signal 'wrong-type-argument (list 'symbolp im-name))) (setq-default zero-input-im im-name)) ;; symbol is allowed for backward compatibility. (unless (or (stringp im-name) (symbolp im-name)) (signal 'wrong-type-argument (list 'string-or-symbolp im-name))) (let ((im-name-str (if (symbolp im-name) (symbol-name im-name) im-name))) (setq-default zero-input-im im-name-str) (unless (assoc im-name-str zero-input-ims) (warn "Input method %s is not registered with zero-input" im-name-str)))) ;;;###autoload (defun zero-input-on () Loading