renamed variables, added Einnlandic functions
This commit is contained in:
parent
5c90eead58
commit
d8a4a5a274
180
funcs.el
180
funcs.el
@ -9,62 +9,120 @@
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq latin-to-runes-table '((", *" . "᛬")
|
||||
("\\. *" . "᛭")
|
||||
(" +" . "᛫")
|
||||
("ċ" . "ᛇ") ("ch" . "ᛇ")
|
||||
("ae" . "ᚫ") ("æ" . "ᚫ")
|
||||
("dh" . "ᛋ") ("z" . "ᛋ") ("ð" . "ᛋ")
|
||||
("th" . "ᚦ") ("s" . "ᚦ") ("þ" . "ᚦ")
|
||||
("w" . "ᚹ") ("ƿ" . "ᚹ")
|
||||
("g" . "ᚷ") ("ᵹ" . "ᚷ")
|
||||
("ea" . "ᛠ")
|
||||
("f" . "ᚠ")
|
||||
("u" . "ᚢ")
|
||||
("o" . "ᚩ")
|
||||
("r" . "ᚱ")
|
||||
("c" . "ᚳ")
|
||||
("h" . "ᚻ")
|
||||
("n" . "ᚾ")
|
||||
("i" . "ᛁ")
|
||||
("j" . "ᛄ")
|
||||
("p" . "ᛈ")
|
||||
("v" . "ᛝ")
|
||||
("t" . "ᛏ")
|
||||
("b" . "ᛒ")
|
||||
("e" . "ᛖ")
|
||||
("m" . "ᛗ")
|
||||
("l" . "ᛚ")
|
||||
("d" . "ᛞ")
|
||||
("é" . "ᛟ")
|
||||
("a" . "ᚪ")
|
||||
("y" . "ᚣ")))
|
||||
(setq latin-to-native-table '((" +" . " ")
|
||||
("ch" . "ċ")
|
||||
("ae" . "æ")
|
||||
("th" . "þ") ("s" . "þ")
|
||||
("dh" . "ð") ("z" . "ð")
|
||||
("w" . "ƿ")
|
||||
("j" . "i")))
|
||||
(setq latin-to-latex-runes '((", *" . ":")
|
||||
("\\. *" . "*")
|
||||
(" +" . ".")
|
||||
("ch" . "I") ("ċ" . "I")
|
||||
("ae" . "æ")
|
||||
("ea" . "\\\\ea") ("ƿ" . "w")
|
||||
("dh" . "s") ("z" . "s") ("ð" . "s")
|
||||
("th" . "þ") ("s" . "þ")
|
||||
("v" . "\\\\ng")
|
||||
("é " . "\\\\oe")))
|
||||
(setq conlanging//matter-latin-to-runes '((", *" . "᛬")
|
||||
("\\. *" . "᛭")
|
||||
(" +" . "᛫")
|
||||
("ċ" . "ᛇ")
|
||||
("ch" . "ᛇ")
|
||||
("ae" . "ᚫ")
|
||||
("æ" . "ᚫ")
|
||||
("dh" . "ᛋ")
|
||||
("z" . "ᛋ")
|
||||
("ð" . "ᛋ")
|
||||
("th" . "ᚦ")
|
||||
("s" . "ᚦ")
|
||||
("þ" . "ᚦ")
|
||||
("w" . "ᚹ")
|
||||
("ƿ" . "ᚹ")
|
||||
("g" . "ᚷ")
|
||||
("ᵹ" . "ᚷ")
|
||||
("ea" . "ᛠ")
|
||||
("f" . "ᚠ")
|
||||
("u" . "ᚢ")
|
||||
("o" . "ᚩ")
|
||||
("r" . "ᚱ")
|
||||
("c" . "ᚳ")
|
||||
("h" . "ᚻ")
|
||||
("n" . "ᚾ")
|
||||
("i" . "ᛁ")
|
||||
("j" . "ᛄ")
|
||||
("p" . "ᛈ")
|
||||
("v" . "ᛝ")
|
||||
("t" . "ᛏ")
|
||||
("b" . "ᛒ")
|
||||
("e" . "ᛖ")
|
||||
("m" . "ᛗ")
|
||||
("l" . "ᛚ")
|
||||
("d" . "ᛞ")
|
||||
("é" . "ᛟ")
|
||||
("a" . "ᚪ")
|
||||
("y" . "ᚣ")))
|
||||
(setq conlanging//matter-latin-to-native '((" +" . " ")
|
||||
("ch" . "ċ")
|
||||
("ae" . "æ")
|
||||
("th" . "þ")
|
||||
("s" . "þ")
|
||||
("dh" . "ð")
|
||||
("z" . "ð")
|
||||
("w" . "ƿ")
|
||||
("j" . "i")))
|
||||
(setq conlanging//matter-latin-to-latex-runes '((", *" . ":")
|
||||
("\\. *" . "*")
|
||||
(" +" . ".")
|
||||
("ch" . "I")
|
||||
("ċ" . "I")
|
||||
("ae" . "æ")
|
||||
("ea" . "\\\\ea")
|
||||
("ƿ" . "w")
|
||||
("dh" . "s")
|
||||
("z" . "s")
|
||||
("ð" . "s")
|
||||
("th" . "þ")
|
||||
("s" . "þ")
|
||||
("v" . "\\\\ng")
|
||||
("é " . "\\\\oe")))
|
||||
|
||||
(setq conlanging//einnlanda-latin-to-latex '((", *" . "\\\\tripledot")
|
||||
("\\. *" . "\\\\tripledot")
|
||||
(" +" . ":")
|
||||
("hw" . "x")
|
||||
("ø" . "\\\\o")
|
||||
("ö" . "\\\\oO")
|
||||
("ó" . "v")
|
||||
("ń" . "\\\\ndot")
|
||||
("v" . "b")))
|
||||
(setq conlanging//einnlanda-latin-to-runes '((", *" . "⁝")
|
||||
("\\. *" . "⁝")
|
||||
(" +" . "᛬")
|
||||
("hw" . "ᛪ")
|
||||
("i" . "ᛁ")
|
||||
("j" . "ᛁ")
|
||||
("y" . "ᛦ")
|
||||
("u" . "ᚢ")
|
||||
("e" . "ᛂ")
|
||||
("ø" . "ᚯ")
|
||||
("o" . "ᚮ")
|
||||
("ö" . "ᚰ")
|
||||
("ó" . "ᚤ")
|
||||
("æ" . "ᛅ")
|
||||
("a" . "ᛆ")
|
||||
("m" . "ᛘ")
|
||||
("n" . "ᚾ")
|
||||
("ń" . "ᛀ")
|
||||
("p" . "ᛔ")
|
||||
("b" . "ᛒ")
|
||||
("t" . "ᛐ")
|
||||
("d" . "ᛑ")
|
||||
("k" . "ᚴ")
|
||||
("g" . "ᚵ")
|
||||
("f" . "ᚠ")
|
||||
("v" . "ᛒ")
|
||||
("þ" . "ᚦ")
|
||||
("ð" . "ᚧ")
|
||||
("s" . "ᛋ")
|
||||
("h" . "ᚼ")
|
||||
("w" . "ᚥ")
|
||||
("r" . "ᚱ")
|
||||
("l" . "ᛚ")))
|
||||
|
||||
(defun conlanging//replace-string-by-char (t-string t-correspondance-table)
|
||||
"Return a copy of t-string converted with the correspondance
|
||||
table"
|
||||
(interactive)
|
||||
(while t-correspondance-table
|
||||
(let ((cur-from-char (car (car t-correspondance-table)))
|
||||
(cur-to-char (cdr (car t-correspondance-table))))
|
||||
(setq t-string (replace-regexp-in-string cur-from-char
|
||||
cur-to-char
|
||||
(setq t-string (replace-regexp-in-string cur-from-char cur-to-char
|
||||
t-string))
|
||||
(setq t-correspondance-table (cdr t-correspondance-table))))
|
||||
t-string)
|
||||
@ -97,18 +155,34 @@ with."
|
||||
(insert regionp)))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Mattér ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(defun conlanging/matter-to-runes ()
|
||||
"Replaces transliterated Mattér to its runic writing system"
|
||||
(interactive)
|
||||
(conlanging//replace-char-by-table latin-to-runes-table))
|
||||
(conlanging//replace-char-by-table conlanging//matter-latin-to-runes))
|
||||
|
||||
(defun conlanging/matter-to-native-latin ()
|
||||
"Replaces transliterated Mattér by its corresponding native
|
||||
latin writing system"
|
||||
(interactive)
|
||||
(conlanging//replace-char-by-table latin-to-native-table))
|
||||
(conlanging//replace-char-by-table conlanging//matter-latin-to-native))
|
||||
|
||||
(defun conlanging/matter-to-latex-runes ()
|
||||
(defun conlanging/matter-to-latex ()
|
||||
"Replaces transliterated Mattér by its corresponding runes"
|
||||
(interactive)
|
||||
(conlanging//replace-char-by-table latin-to-latex-runes))
|
||||
(conlanging//replace-char-by-table conlanging//matter-latin-to-latex-runes))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Einnlanda ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(defun conlanging/einnlanda-to-runes ()
|
||||
"Replaces transliterated Mattér to its runic writing system"
|
||||
(interactive)
|
||||
(conlanging//replace-char-by-table conlanging//einnlanda-latin-to-runes))
|
||||
|
||||
(defun conlanging/einnlanda-to-latex ()
|
||||
"Replaces transliterated Mattér by its corresponding runes"
|
||||
(interactive)
|
||||
(conlanging//replace-char-by-table conlanging//einnlanda-latin-to-latex-runes))
|
||||
|
@ -21,6 +21,7 @@
|
||||
(spacemacs/declare-prefix "olt" "Tãso")
|
||||
(spacemacs/declare-prefix "olto" "taso.org")
|
||||
(spacemacs/declare-prefix-for-mode 'org-mode "ml" "conlanging")
|
||||
(spacemacs/declare-prefix-for-mode 'org-mode "mle" "Einnlanda")
|
||||
(spacemacs/declare-prefix-for-mode 'org-mode "mlm" "Mattér")
|
||||
|
||||
(spacemacs/set-leader-keys
|
||||
@ -38,6 +39,8 @@
|
||||
(spacemacs/set-leader-keys-for-major-mode 'org-mode
|
||||
"lmr" 'conlanging/matter-to-runes
|
||||
"lml" 'conlanging/matter-to-native-latin
|
||||
"lmL" 'conlanging/matter-to-latex-runes)
|
||||
"lmL" 'conlanging/matter-to-latex
|
||||
"ler" 'conlanging/einnlanda-to-runes
|
||||
"lel" 'conlanging/einnlanda-to-latex)
|
||||
|
||||
;;; keybindings.el ends here
|
||||
|
Reference in New Issue
Block a user