diff --git a/.gitignore b/.gitignore index 56f713cfba0746b02df711dff844aa6798ea801c..5f0b98fec64a4a80b046b44772aa071a53f519fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.zip *.elc *.tar - +build/ +*.tmp diff --git a/zero-input.el b/zero-input.el index 78bb29aa9910148ee181f56d6169a65d14d4afb1..741c5c2ec343bd98b0931cd2622a9f79fac1a810 100644 --- a/zero-input.el +++ b/zero-input.el @@ -12,7 +12,7 @@ ;; See the License for the specific language governing permissions and ;; limitations under the License. -;; Version: 2.0.4 +;; Version: 2.0.6 ;; URL: https://gitlab.emacsos.com/sylecn/zero-el ;; Package-Requires: ((emacs "24.3") (s "1.2.0")) @@ -243,7 +243,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.0.4") +(setq zero-input-version "2.0.7") ;; FSM state (defconst zero-input--state-im-off 'IM-OFF) @@ -463,13 +463,17 @@ COMPLETE-FUNC the function to call when build candidates completes." ;; update cache to make SPC and digit key selection possible. (funcall complete-func candidates))) -(defvar zero-input-full-width-char-map - ;; ascii 33 to 126 map to - ;; unicode FF01 to FF5E - (cl-loop - for i from 33 to 126 - collect (cons (make-char 'ascii i) (make-char 'unicode 0 255 (- i 32)))) +(defvar zero-input-full-width-char-map nil "An alist that map half-width char to full-width char.") +(setq zero-input-full-width-char-map + (cons + ;; ascii 32 -> unicode 3000 + (cons ?\s ?\u3000) + ;; ascii [33, 126] -> unicode [FF01, FF5E] + (cl-loop + for i from 33 to 126 + collect (cons (make-char 'ascii i) + (make-char 'unicode 0 255 (- i 32)))))) (defun zero-input-convert-ch-to-full-width (ch) "Convert half-width char CH to full-width. @@ -786,8 +790,9 @@ Otherwise, show Zero." (:eval (zero-input-modeline-string)) zero-input-mode-map ;; local variables and variable init - (zero-input-reset) (make-local-variable 'zero-input-candidates-per-page) + (make-local-variable 'zero-input-full-width-mode) + (zero-input-reset) (zero-input-set-im zero-input-im) ;; hooks (add-hook 'focus-in-hook 'zero-input-focus-in)