[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/jinx e9a46f03a8: jinx-exclude/include-faces, jinx-exclu
From: |
ELPA Syncer |
Subject: |
[elpa] externals/jinx e9a46f03a8: jinx-exclude/include-faces, jinx-exclude-regexps: Support mode aliases |
Date: |
Thu, 29 Feb 2024 09:58:18 -0500 (EST) |
branch: externals/jinx
commit e9a46f03a8833ee2d8b31b78684ca4f38441f137
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
jinx-exclude/include-faces, jinx-exclude-regexps: Support mode aliases
---
CHANGELOG.org | 2 ++
jinx.el | 13 +++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index af191e9e82..0e91f63a5b 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -8,6 +8,8 @@
in the file-local variable ~jinx-local-words~.
- ~jinx-correct~: If a region is marked, call ~jinx-correct-all~ and restrict
corrections to the marked region.
+- ~jinx-exclude-faces~, ~jinx-include-faces~, ~jinx-exclude-regexps~: Support
mode
+ aliases.
* Version 1.3 (2024-02-23)
diff --git a/jinx.el b/jinx.el
index d6f86447f7..bf45b2f1dd 100644
--- a/jinx.el
+++ b/jinx.el
@@ -94,12 +94,11 @@
;; while they should better be conf- or prog-modes.
(yaml-mode font-lock-comment-face
font-lock-string-face)
- (yaml-ts-mode font-lock-comment-face
- font-lock-string-face))
+ (yaml-ts-mode . yaml-mode)) ;; alias
"Alist of faces per major mode.
These faces mark regions which should be included in spell
checking."
- :type '(alist :key-type symbol :value-type (repeat face)))
+ :type '(alist :key-type symbol :value-type (choice symbol (repeat face))))
(defcustom jinx-camel-modes
'(java-mode java-ts-mode js-mode js-ts-mode ruby-mode ruby-ts-mode rust-mode
@@ -128,6 +127,7 @@ Set to t to enable camelCase everywhere."
tex-math font-latex-math-face font-latex-sedate-face
font-latex-verbatim-face font-lock-function-name-face
font-lock-keyword-face font-lock-variable-name-face)
+ (TeX-mode . tex-mode) ;; alias
(texinfo-mode
font-lock-function-name-face font-lock-keyword-face
font-lock-variable-name-face)
@@ -147,7 +147,7 @@ Set to t to enable camelCase everywhere."
"Alist of faces per major mode.
These faces mark regions which should be excluded in spell
checking."
- :type '(alist :key-type symbol :value-type (repeat face)))
+ :type '(alist :key-type symbol :value-type (choice symbol (repeat face))))
(defcustom jinx-exclude-regexps
'((emacs-lisp-mode "Package-Requires:.*$")
@@ -159,7 +159,7 @@ checking."
"\\(?:Local Variables\\|End\\):\\s-*$" ;; Local variable indicator
"jinx-\\(?:languages\\|local-words\\):\\s-+.*$")) ;; Local variables
"List of excluded regexps per major mode."
- :type '(alist :key-type symbol :value-type (repeat regexp)))
+ :type '(alist :key-type symbol :value-type (choice symbol (repeat regexp))))
(defcustom jinx-suggestion-distance 3
"Maximal edit distance for session words to be included in suggestions."
@@ -529,7 +529,8 @@ If CHECK is non-nil, always check first."
(defun jinx--mode-list (list)
"Lookup by major mode in LIST."
(cl-loop for (mode . vals) in list
- if (or (eq mode t) (derived-mode-p mode)) append vals))
+ if (or (eq mode t) (derived-mode-p mode))
+ append (if (symbolp vals) (alist-get vals list) vals)))
(defun jinx--get-org-language ()
"Get language from Org #+language keyword."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/jinx e9a46f03a8: jinx-exclude/include-faces, jinx-exclude-regexps: Support mode aliases,
ELPA Syncer <=