renamed variables, added Einnlandic functions

This commit is contained in:
Phuntsok Drak-pa 2019-08-13 01:52:51 +02:00
parent 5c90eead58
commit d8a4a5a274
2 changed files with 131 additions and 54 deletions

116
funcs.el
View File

@ -9,15 +9,23 @@
;;
;;; License: GPLv3
(setq latin-to-runes-table '((", *" . "")
(setq conlanging//matter-latin-to-runes '((", *" . "")
("\\. *" . "")
(" +" . "")
("ċ" . "") ("ch" . "")
("ae" . "") ("æ" . "")
("dh" . "") ("z" . "") ("ð" . "")
("th" . "") ("s" . "") ("þ" . "")
("w" . "") ("ƿ" . "")
("g" . "") ("" . "")
("ċ" . "")
("ch" . "")
("ae" . "")
("æ" . "")
("dh" . "")
("z" . "")
("ð" . "")
("th" . "")
("s" . "")
("þ" . "")
("w" . "")
("ƿ" . "")
("g" . "")
("" . "")
("ea" . "")
("f" . "")
("u" . "")
@ -39,32 +47,82 @@
("é" . "")
("a" . "")
("y" . "")))
(setq latin-to-native-table '((" +" . " ")
(setq conlanging//matter-latin-to-native '((" +" . " ")
("ch" . "ċ")
("ae" . "æ")
("th" . "þ") ("s" . "þ")
("dh" . "ð") ("z" . "ð")
("th" . "þ")
("s" . "þ")
("dh" . "ð")
("z" . "ð")
("w" . "ƿ")
("j" . "i")))
(setq latin-to-latex-runes '((", *" . ":")
(setq conlanging//matter-latin-to-latex-runes '((", *" . ":")
("\\. *" . "*")
(" +" . ".")
("ch" . "I") ("ċ" . "I")
("ch" . "I")
("ċ" . "I")
("ae" . "æ")
("ea" . "\\\\ea") ("ƿ" . "w")
("dh" . "s") ("z" . "s") ("ð" . "s")
("th" . "þ") ("s" . "þ")
("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))

View File

@ -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