diff options
| -rw-r--r-- | .emacs | 40 |
1 files changed, 20 insertions, 20 deletions
@@ -51,21 +51,21 @@ "my/symbols" "UTF-8" "𝒰" t "Input arbitrary Unicode symbols with other arbitrary symbols.") -(mapc (lambda (item) - (quail-defrule (car item) (cdr item) "my/symbols")) - (list - ;; Punctuation - '("..." ?…) - ;; Math symbols - '("~~" ?≈) '("~~_" ?≊) '("~=" ?≅) '("~_" ?≃) - '("=_" ?≡) '("^=" ?≙) '(":=" ?≔) - '("-->" ?→) '("-/>" ?↛) '("==>" ?⇒) '("=/>" ?⇏) - '("<--" ?←) '("</-" ?↚) '("<==" ?⇐) '("</=" ?⇍) - '("<->" ?↔) '("<=>" ?⇔) - ;; Emojis - '("\\o/" ?🙌) '("\\m/" ?🤘) - ;; Pictograms - '("/!\\" ?⚠))) +(pcase-dolist + (`(,key ,translation) + '(;; Punctuation + ("..." ?…) + ;; Math symbols + ("~~" ?≈) ("~~_" ?≊) ("~=" ?≅) ("~_" ?≃) + ("=_" ?≡) ("^=" ?≙) (":=" ?≔) + ("-->" ?→) ("-/>" ?↛) ("==>" ?⇒) ("=/>" ?⇏) + ("<--" ?←) ("</-" ?↚) ("<==" ?⇐) ("</=" ?⇍) + ("<->" ?↔) ("<=>" ?⇔) + ;; Emojis + ("\\o/" ?🙌) ("\\m/" ?🤘) + ;; Pictograms + ("/!\\" ?⚠))) + (quail-defrule key translation "my/symbols")) (defmacro my/make-input-toggle (input-method) (let ((fsym (intern (format "my/toggle-input-%s" input-method))) @@ -131,20 +131,20 @@ (declare (indent defun)) `(defvar ,name (let ((map (define-prefix-command ',name))) - (pcase-dolist (`(,key . ,fun) ,bindings) + (pcase-dolist (`(,key ,fun) ,bindings) (define-key map key fun)) map) ,doc)) (my/define-prefix-command my/display-map "Keymap for display-related commands." - '(("t" . toggle-truncate-lines) - ("v" . visual-line-mode))) + '(("t" toggle-truncate-lines) + ("v" visual-line-mode))) (my/define-prefix-command my/input-map "Keymap for input methods shortcuts." - `(("t" . ,(my/make-input-toggle TeX)) - ("u" . ,(my/make-input-toggle my/symbols)))) + `(("t" ,(my/make-input-toggle TeX)) + ("u" ,(my/make-input-toggle my/symbols)))) ;; C-c [[:alpha:]] is reserved for users - let's make good use of it. |
