I use purescript-unicode-input-method
in Purescript. However, I want the input method not to translate ->
, ~>
and =>
because their Unicode characters look very similar. Is there a way to disable certain rules of an input method?
Asked
Active
Viewed 79 times
0

Zhu Jinxuan
- 101
- 1
1 Answers
1
You can try something like the following:
(defvar my-quail-activate-hook-done nil)
(defun my-quail-activate-hook ()
(unless (member (quail-name) my-quail-activate-hook-done)
(push (quail-name) my-quail-activate-hook-done)
(when (member (quail-name) '("purescript-unicode"))
;; Remove the "->" binding.
(setf (alist-get ?> (cdr (alist-get ?- (quail-map)))) nil)
...
)))
(add-hook 'quail-activate-hook #'my-quail-activate-hook)
-
Hi, can I know what does ?> and ?- mean? – Zhu Jinxuan Jul 30 '19 at 20:42
-
`?
` is the Elisp syntax for a character literal, like `' – Stefan Jul 30 '19 at 20:43'` in C. -
Great! Thank you a lot. Can I know where I can find document of quail-map? I tried describe-variable but it is not there. – Zhu Jinxuan Jul 30 '19 at 21:05
-
IIRC it's not very documented :-( – Stefan Jul 30 '19 at 22:11
-
Got it! Thank you a lot! – Zhu Jinxuan Jul 31 '19 at 19:20