From 9360b5a607147e0af3151b659e933e72423357e3 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 18 Jun 2022 16:58:08 +0530 Subject: 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. --- thogai.el | 16 ++++++++-------- 1 file 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) -- cgit v1.2.3