[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jinx 967f70115f: Add jinx--syntax-overrides
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jinx 967f70115f: Add jinx--syntax-overrides |
Date: |
Wed, 17 Jul 2024 03:58:51 -0400 (EDT) |
branch: externals/jinx
commit 967f70115fb286fd0bc0f5634ae7d3d007a8956a
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add jinx--syntax-overrides
---
jinx.el | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/jinx.el b/jinx.el
index f66dd91ff9..f8cfdddeb8 100644
--- a/jinx.el
+++ b/jinx.el
@@ -291,7 +291,13 @@ Predicate may return a position to skip forward.")
(modify-syntax-entry '(#x1cf00 . #x1d7ff) "_" st) ;; Znamenny Musical -
Math. Alpha.
(modify-syntax-entry '(#x1ee00 . #x1fbff) "_" st) ;; Arabic Math. -
Legacy Computing
st)
- "Base syntax table for spell checking.")
+ "Parent syntax table of `jinx--syntax-table'.")
+
+(defvar jinx--syntax-overrides
+ '((?' . "w")
+ (?’ . "w")
+ (?. . "."))
+ "Syntax table overrides used for `jinx--syntax-table'.")
(defvar jinx--select-keys
"123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -319,7 +325,10 @@ Predicate may return a position to skip forward.")
"List of dictionaries.")
(defvar-local jinx--syntax-table nil
- "Syntax table used during checking.")
+ "Syntax table used during checking.
+The table inherits from `jinx--base-syntax-table'. The table is
+configured according to the word characters defined by the local
+dictionaries. Afterwards `jinx--syntax-overrides' are applied.")
(defvar-local jinx--session-words nil
"List of words accepted in this session.")
@@ -864,9 +873,8 @@ Optionally show prompt INFO and insert INITIAL input."
(dolist (dict jinx--dicts)
(cl-loop for c across (jinx--mod-wordchars dict) do
(modify-syntax-entry c "w" jinx--syntax-table)))
- (modify-syntax-entry ?' "w" jinx--syntax-table)
- (modify-syntax-entry ?’ "w" jinx--syntax-table)
- (modify-syntax-entry ?. "." jinx--syntax-table))
+ (cl-loop for (k . v) in jinx--syntax-overrides do
+ (modify-syntax-entry k v jinx--syntax-table)))
(defun jinx--bounds-of-word ()
"Return bounds of word at point using `jinx--syntax-table'."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/jinx 967f70115f: Add jinx--syntax-overrides,
ELPA Syncer <=