aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-06-18 16:58:08 +0530
committerArun Isaac2022-06-18 16:58:08 +0530
commit9360b5a607147e0af3151b659e933e72423357e3 (patch)
treee22cdb98ba6b48fc89aa9fe878519f2c8597a6ea
parent2e83b7a960c32be52130642bc48ce110c768c94c (diff)
downloadthogai-9360b5a607147e0af3151b659e933e72423357e3.tar.gz
thogai-9360b5a607147e0af3151b659e933e72423357e3.tar.lz
thogai-9360b5a607147e0af3151b659e933e72423357e3.zip
Rename thogai-user-dictionary-alist to thogai-global-map.
* thogai.el (thogai-user-dictionary-alist): Rename to thogai-global-map. (thogai-lookup, thogai-reverse-lookup): Update reference of thogai-user-dictionary-alist.
-rw-r--r--thogai.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/thogai.el b/thogai.el
index 3039583..0ab579e 100644
--- a/thogai.el
+++ b/thogai.el
@@ -63,14 +63,14 @@ https://github.com/openstenoproject/plover/blob/master/plover/assets/main.json
and
https://github.com/openstenoproject/plover/blob/master/plover/assets/commands.json")
-(defvar thogai-user-dictionary-alist
+(defvar thogai-global-map
nil
"Additional dictionary entries.
This is an association list specifying additional translations
not present in `thogai-dictionary-files'. For example,
-(setq thogai-user-dictionary-alist
+(setq thogai-global-map
'((\"PER\" . \"perfect\")
(\"THO/TKPWAOEU\" . \"thogai\")))")
@@ -164,10 +164,10 @@ and the variable is reset to nil.")
(defun thogai-lookup (stroke)
"Lookup STROKE in dictionary.
-STROKE is looked up in `thogai-user-dictionary-alist' and
-`thogai-dictionary' with `thogai-user-dictionary-alist' having
-higher precedence. If STROKE is in neither, nil is returned."
- (or (map-elt thogai-user-dictionary-alist stroke)
+STROKE is looked up in `thogai-global-map' and
+`thogai-dictionary' with `thogai-global-map' having higher
+precedence. If STROKE is in neither, nil is returned."
+ (or (map-elt thogai-global-map stroke)
(map-elt thogai-dictionary stroke)))
(defun thogai-filter-map (function sequence)
@@ -182,13 +182,13 @@ only the non-nil results."
"Lookup TRANSLATION in reverse dictionary.
A list of all strokes producing TRANSLATION is returned.
-TRANSLATION is looked up in `thogai-user-dictionary-alist' and
+TRANSLATION is looked up in `thogai-global-map' and
`thogai-reverse-dictionary'."
(append
(thogai-filter-map (pcase-lambda (`(,key . ,value))
(and (equal value translation)
key))
- thogai-user-dictionary-alist)
+ thogai-global-map)
(gethash translation thogai-reverse-dictionary)))
(defun thogai-longest-match (state)