[TeX] Move function for adding additional symbols to input method to db-utils
This commit is contained in:
parent
f213e3d31c
commit
abe02fe511
35
init.el
35
init.el
|
@ -506,38 +506,6 @@
|
||||||
:config (add-hook 'input-method-activate-hook
|
:config (add-hook 'input-method-activate-hook
|
||||||
#'db/add-symbols-to-TeX-input-method))
|
#'db/add-symbols-to-TeX-input-method))
|
||||||
|
|
||||||
(defun db/add-symbols-to-TeX-input-method ()
|
|
||||||
"Add some new symbols to TeX input method."
|
|
||||||
(when (string= current-input-method "TeX")
|
|
||||||
(let ((quail-current-package (assoc "TeX" quail-package-alist)))
|
|
||||||
(quail-define-rules
|
|
||||||
((append . t))
|
|
||||||
("\\land" ?∧)
|
|
||||||
("\\lor" ?∨)
|
|
||||||
("\\lnot" ?¬)
|
|
||||||
("\\implies" ?⇒)
|
|
||||||
("\\powerset" ?𝔓)
|
|
||||||
("\\mathbbK" ?𝕂)
|
|
||||||
("\\mathbbR" ?ℝ)
|
|
||||||
("\\mathbbN" ?ℕ)
|
|
||||||
("\\mathbbZ" ?ℤ)
|
|
||||||
("\\mathbbP" ?ℙ)
|
|
||||||
("\\mathcalA" ?𝒜)
|
|
||||||
("\\mathcalB" ?ℬ)
|
|
||||||
("\\mathcalC" ?𝒞)
|
|
||||||
("\\mathcalD" ?𝒟)
|
|
||||||
("\\mathcalE" ?ℰ)
|
|
||||||
("\\mathcalH" ?ℋ)
|
|
||||||
("\\mathcalI" ?ℐ)
|
|
||||||
("\\mathcalJ" ?𝒥)
|
|
||||||
("\\mathcalK" ?𝒦)
|
|
||||||
("\\mathcalL" ?ℒ)
|
|
||||||
("\\mathcalM" ?ℳ)
|
|
||||||
("\\mathcalR" ?ℛ)
|
|
||||||
("\\mathcalQ" ?𝒬)
|
|
||||||
("\\mathcalS" ?𝒮)
|
|
||||||
("\\mathfrakP" ?𝔓)))))
|
|
||||||
|
|
||||||
(use-package server
|
(use-package server
|
||||||
:commands (server-running-p server-start))
|
:commands (server-running-p server-start))
|
||||||
|
|
||||||
|
@ -587,7 +555,8 @@ _h_ _l_ _o_k _y_ank
|
||||||
db/hex-to-ascii
|
db/hex-to-ascii
|
||||||
db/ascii-to-hex
|
db/ascii-to-hex
|
||||||
conditionally-enable-lispy
|
conditionally-enable-lispy
|
||||||
db/export-diary))
|
db/export-diary
|
||||||
|
db/add-symbols-to-TeX-input-method))
|
||||||
|
|
||||||
(use-package db-emacsclient)
|
(use-package db-emacsclient)
|
||||||
|
|
||||||
|
|
|
@ -366,6 +366,41 @@ This is done only if the value of this variable is not null."
|
||||||
(org-icalendar-combine-agenda-files)
|
(org-icalendar-combine-agenda-files)
|
||||||
(message "Exporting diary ... done.")))))))
|
(message "Exporting diary ... done.")))))))
|
||||||
|
|
||||||
|
|
||||||
|
;;; Extend Input Methods
|
||||||
|
|
||||||
|
(defun db/add-symbols-to-TeX-input-method ()
|
||||||
|
"Add some new symbols to TeX input method."
|
||||||
|
(when (string= current-input-method "TeX")
|
||||||
|
(let ((quail-current-package (assoc "TeX" quail-package-alist)))
|
||||||
|
(quail-define-rules
|
||||||
|
((append . t))
|
||||||
|
("\\land" ?∧)
|
||||||
|
("\\lor" ?∨)
|
||||||
|
("\\lnot" ?¬)
|
||||||
|
("\\implies" ?⇒)
|
||||||
|
("\\powerset" ?𝔓)
|
||||||
|
("\\mathbbK" ?𝕂)
|
||||||
|
("\\mathbbR" ?ℝ)
|
||||||
|
("\\mathbbN" ?ℕ)
|
||||||
|
("\\mathbbZ" ?ℤ)
|
||||||
|
("\\mathbbP" ?ℙ)
|
||||||
|
("\\mathcalA" ?𝒜)
|
||||||
|
("\\mathcalB" ?ℬ)
|
||||||
|
("\\mathcalC" ?𝒞)
|
||||||
|
("\\mathcalD" ?𝒟)
|
||||||
|
("\\mathcalE" ?ℰ)
|
||||||
|
("\\mathcalH" ?ℋ)
|
||||||
|
("\\mathcalI" ?ℐ)
|
||||||
|
("\\mathcalJ" ?𝒥)
|
||||||
|
("\\mathcalK" ?𝒦)
|
||||||
|
("\\mathcalL" ?ℒ)
|
||||||
|
("\\mathcalM" ?ℳ)
|
||||||
|
("\\mathcalR" ?ℛ)
|
||||||
|
("\\mathcalQ" ?𝒬)
|
||||||
|
("\\mathcalS" ?𝒮)
|
||||||
|
("\\mathfrakP" ?𝔓)))))
|
||||||
|
|
||||||
|
|
||||||
;;; End
|
;;; End
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user