summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-14 13:14:49 +0200
committerThanos Apollo <[email protected]>2023-12-14 13:14:49 +0200
commit801cda946148a06953930ca6ce0c62cadebfa5c7 (patch)
treeae9806f6ddc4ddf13e010ec4ba7a10f90aa196b9
parent525cc7613fec31aa6a76f08d2f9ca085b177b04b (diff)
Move all custom variables at the start of code
-rw-r--r--gnosis.el50
1 files changed, 25 insertions, 25 deletions
diff --git a/gnosis.el b/gnosis.el
index 88cb4e8..16a8874 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -41,6 +41,31 @@
:group 'external
:prefix "gnosis-")
+(defcustom gnosis-interval '(1 3)
+ "Gnosis initial interval.
+
+Interval by which a new question is displayed or when it's ef is at 1.3.
+
+First item: First interval
+Second item: Second interval."
+ :group 'gnosis
+ :type 'list)
+
+(defcustom gnosis-ef '(0.3 0.3)
+ "Gnosis easiness factor.
+
+First item : Increase factor
+Second item: Decrease factor"
+ :group 'gnosis
+ :type 'list)
+
+(defcustom gnosis-ff 0.5
+ "Gnosis forgetting factor.
+
+Used to calcuate new interval for failed questions."
+ :group 'gnosis
+ :type 'float)
+
(defvar gnosis-db (emacsql-sqlite (concat user-emacs-directory "gnosis.db")))
(cl-defun gnosis--select (value table &optional (restrictions '1=1))
@@ -231,31 +256,6 @@ TAGS are used to organize questions."
;; Gnosis Algorithm ;;
;;;;;;;;;;;;;;;;;;;;;;
-(defcustom gnosis-interval '(1 3)
- "Gnosis initial interval.
-
-Interval by which a new question is displayed or when it's ef is at 1.3.
-
-First item: First interval
-Second item: Second interval."
- :group 'gnosis
- :type 'list)
-
-(defcustom gnosis-ef '(0.3 0.3)
- "Gnosis easiness factor.
-
-First item : Increase factor
-Second item: Decrease factor"
- :group 'gnosis
- :type 'list)
-
-(defcustom gnosis-ff 0.5
- "Gnosis forgetting factor.
-
-Used to calcuate new interval for failed questions."
- :group 'gnosis
- :type 'float)
-
(defun gnosis-current-date (&optional offset)
"Return the current date in a list (year month day).
Optional integer OFFSET is a number of days from the current date."