Skip to content

Commit b3468b7

Browse files
committed
fix: 1. missing group for mode 2. wrong close parenthesis position
1 parent b74fa52 commit b3468b7

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

sis.el

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ custom function: the cursor will be moved to the end of the inline region, and
247247
(define-minor-mode sis-log-mode
248248
"Log the execution of this package."
249249
:global t
250+
:group 'sis
250251
:init-value nil)
251252

252253
;;
@@ -605,6 +606,7 @@ TYPE: TYPE can be \\='native, \\='w32, \\='emp, \\='macism, \\='im-select,
605606
(define-minor-mode sis-auto-refresh-mode
606607
"Automaticly refresh input source."
607608
:global t
609+
:group 'sis
608610
:init-value nil
609611
(cond
610612
(; turn on the mode
@@ -682,6 +684,7 @@ way."
682684
(define-minor-mode sis-global-cursor-color-mode
683685
"Automaticly change cursor color according to input source."
684686
:global t
687+
:group 'sis
685688
:init-value nil
686689
(cond
687690
(; turn on the mode
@@ -1029,9 +1032,11 @@ Possible values: \\='normal, \\='prefix, \\='sequence.")
10291032
10301033
- Respect start: start this mode with specific input source.
10311034
- Respect ~evil~: switch to English when leaving ~evil~ ~insert~ mode.
1032-
- Respect prefix key: switch to English for ~C-c~/ ~C-x~/ ~C-h~.
1035+
- Respect prefix key: switch to English for \\[Control-c] / \\[Control-x] /
1036+
\\[Control-h].
10331037
- Respect buffer: restore buffer input source when it regain focus."
10341038
:global t
1039+
:group 'sis
10351040
:init-value nil
10361041
(cond
10371042
(; turn on the mode
@@ -1151,10 +1156,10 @@ Possible values: \\='normal, \\='prefix, \\='sequence.")
11511156
)
11521157

11531158
(defun sis--back-detect-chars ()
1154-
"Detect char backward by two steps.
1159+
"Detect char backward by two step.
11551160
1156-
First backward skip blank in the current line,
1157-
then backward skip blank across lines."
1161+
Step 1: backward skip blank in the current line.
1162+
Step 2: backward skip blank across lines."
11581163
(save-excursion
11591164
(skip-chars-backward sis-blank-pattern)
11601165
(let ((to (point))
@@ -1280,6 +1285,7 @@ If POSITION is not provided, then default to be the current position."
12801285
;;;###autoload
12811286
(define-minor-mode sis-context-mode
12821287
"Switch input source smartly according to context."
1288+
:group 'sis
12831289
:init-value nil
12841290
(cond
12851291
(; turn on the mode
@@ -1319,13 +1325,13 @@ If POSITION is not provided, then default to be the current position."
13191325
(dolist (hook sis-context-hooks)
13201326
(remove-hook hook #'sis-context nil))))
13211327
(dolist (trigger sis-context-triggers)
1322-
(let ((trigger-fn (eval (nth 0 trigger)))
1323-
;; delete advices with property of 'sis--context-trigger-advice
1324-
(advice-mapc
1325-
(lambda (advice _)
1326-
(when (get (intern advice) 'sis--context-trigger-advice)
1327-
(advice-remove trigger-fn advice))
1328-
trigger-fn))))))))
1328+
(let ((trigger-fn (eval (nth 0 trigger))))
1329+
;; delete advices with property of 'sis--context-trigger-advice
1330+
(advice-mapc
1331+
(lambda (advice _)
1332+
(when (get (intern advice) 'sis--context-trigger-advice)
1333+
(advice-remove trigger-fn advice)))
1334+
trigger-fn))))))
13291335

13301336
;;;###autoload
13311337
(define-globalized-minor-mode
@@ -1369,6 +1375,7 @@ If POSITION is not provided, then default to be the current position."
13691375
;;;###autoload
13701376
(define-minor-mode sis-inline-mode
13711377
"English overlay mode for mixed language editing."
1378+
:group 'sis
13721379
:init-value nil
13731380
(cond
13741381
(; turn on the mode
@@ -1516,8 +1523,8 @@ START: start position of the inline region."
15161523

15171524
;; select input source
15181525
(let* ((back-detect (sis--back-detect-chars))
1519-
(back-to (sis-back-detect-to back-detect))
1520-
(back-char (sis-back-detect-char back-detect)))
1526+
;; (back-char (sis-back-detect-char back-detect))
1527+
(back-to (sis-back-detect-to back-detect)))
15211528

15221529

15231530
(cond

0 commit comments

Comments
 (0)