diff --git a/zero-framework.el b/zero-framework.el index 038d742c2d74e40a286b9d790761ea70fca16ab0..5263beb355b0f2e57eb652c45c9a18e541b07f6c 100644 --- a/zero-framework.el +++ b/zero-framework.el @@ -75,10 +75,10 @@ if item is not in lst, return nil" (ert-deftest zero-cycle-list () (should (= (zero-cycle-list '(1 2 3) 1) 2)) - (should (= (zero-cycle-list '(a b c) 'a) 'b)) - (should (= (zero-cycle-list '(a b c) 'b) 'c)) - (should (= (zero-cycle-list '(a b c) 'c) 'a)) - (should (= (zero-cycle-list '(a b c) 'd) nil))) + (should (eq (zero-cycle-list '(a b c) 'a) 'b)) + (should (eq (zero-cycle-list '(a b c) 'b) 'c)) + (should (eq (zero-cycle-list '(a b c) 'c) 'a)) + (should (eq (zero-cycle-list '(a b c) 'd) nil))) ;;===================== ;; key logic functions @@ -137,7 +137,9 @@ if nil, next single quote insert open quote. otherwise, next single quote insert close quote") (defvar zero-preedit-str "") (defvar zero-candidates nil) -(defvar zero-candidates-per-page 10 "how many candidates to show on each page") +(defcustom zero-candidates-per-page 10 + "how many candidates to show on each page" + :group 'zero) (defvar zero-current-page 0 "current page number. count from 0") (defvar zero-previous-page-key ?\- "previous page key") (defvar zero-next-page-key ?\= "next page key") @@ -253,12 +255,6 @@ return ch's Chinese punctuation if ch is converted. return nil otherwise" (funcall zero-can-start-sequence-func ch) (error "`zero-can-start-sequence-func' is not a function"))) -(ert-deftest zero-can-start-sequence () - (should (zero-can-start-sequence ?a)) - (should (zero-can-start-sequence ?m)) - (should-not (zero-can-start-sequence ?1)) - (should-not (zero-can-start-sequence ?b))) - (defun zero-page-up () "if not at first page, show candidates on previous page." (when (> zero-current-page 0)