dotfiles

🎜 Clone'em, tweak'em, stick'em in your $HOME 🎝
git clone https://git.kevinlegouguec.net/dotfiles
Log | Files | Refs | README

commit 01d279f8f1008c67b705ab8c759aff10a2282ab2
parent 143e59d7d84bf851eadbf57bc24afd79a0e1b31b
Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Sun, 13 Jan 2019 18:46:08 +0100

Define my own input method instead of cluttering TeX

Diffstat:
M.emacs | 27+++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/.emacs b/.emacs @@ -55,20 +55,19 @@ (rg-enable-default-bindings) ; Uses the C-c s prefix. -;; TODO: define my own input method, instead of overloading TeX. -;; Look at unicode-math-input for inspiration, since according to -;; (elisp)Input Methods: "How to define input methods is not yet -;; documented". -(with-temp-buffer - (activate-input-method "TeX") - (let ((quail-current-package (assoc "TeX" quail-package-alist))) - (quail-define-rules ((append . t)) - ("~~" ?β‰ˆ) ("~=" ?β‰Š) - ;; would like to add ("^=" ?≙), but "^=" already exists - ("..." ?…) - ("-->" ?β†’) ("-/>" ?↛) ("==>" ?β‡’) ("=/>" ?⇏) - ("<--" ?←) ("</-" ?β†š) ("<==" ?⇐) ("</=" ?⇍) - ("<->" ?↔) ("<=>" ?⇔)))) +;; Hopefully these will be easier to remember than TeX commands: + +(require 'quail) +(quail-define-package "my/input-method" "symbols" "𝒰" t + "Input arbitrary symbols with other arbitrary symbols.") + +(mapc (lambda (item) + (quail-defrule (car item) (cdr item) "my/input-method")) + '(("~~" ?β‰ˆ) ("~=" ?β‰Š) ("^=" ?≙) + ("..." ?…) + ("-->" ?β†’) ("-/>" ?↛) ("==>" ?β‡’) ("=/>" ?⇏) + ("<--" ?←) ("</-" ?β†š) ("<==" ?⇐) ("</=" ?⇍) + ("<->" ?↔) ("<=>" ?⇔))) ;; What's life without a little risk? (setq disabled-command-function nil)