moved and renamed some nyqy-related functions
This commit is contained in:
parent
fd36457790
commit
8e6a12d91d
30
funcs.el
30
funcs.el
@ -53,6 +53,17 @@ with."
|
||||
(goto-char beg)
|
||||
(insert regionp)))
|
||||
|
||||
(defun conlanging//find-elem-in-list (elem list)
|
||||
"In a list containing lists, returns the element of `list'
|
||||
whose first element equals `elem'"
|
||||
(if list
|
||||
(if (string= (caar list)
|
||||
elem)
|
||||
(car list)
|
||||
(conlanging//find-elem-in-list elem
|
||||
(cdr list)))
|
||||
nil))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Mattér ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -243,10 +254,10 @@ runes during org-mode export"
|
||||
(";" nil nil " ")
|
||||
("." nil nil " ")))
|
||||
|
||||
(defun conlanging//is-consonant (elem)
|
||||
(defun conlanging//nyqy-is-consonant (elem)
|
||||
(nth 1 elem))
|
||||
|
||||
(defun conlanging//is-dorsal (elem)
|
||||
(defun conlanging//nyqy-is-dorsal (elem)
|
||||
(nth 2 elem))
|
||||
|
||||
(defun conlanging//nyqy-get-phoneme (consonant phon need-dorsal is-dorsal)
|
||||
@ -258,17 +269,6 @@ runes during org-mode export"
|
||||
4))
|
||||
phon))
|
||||
|
||||
(defun conlanging//find-elem-in-list (elem list)
|
||||
"In a list containing lists, returns the element of `list'
|
||||
whose first element equals `elem'"
|
||||
(if list
|
||||
(if (string= (caar list)
|
||||
elem)
|
||||
(car list)
|
||||
(conlanging//find-elem-in-list elem
|
||||
(cdr list)))
|
||||
nil))
|
||||
|
||||
(defun conlanging//nyqy-convert (text phonetics need-dorsal)
|
||||
"
|
||||
need-dorsal: initial = 2, sinon t ou nil
|
||||
@ -277,8 +277,8 @@ need-dorsal: initial = 2, sinon t ou nil
|
||||
(mapconcat 'identity phonetics "")
|
||||
(let* ((curr-char (car text))
|
||||
(curr-phon-list (conlanging//find-elem-in-list curr-char conlanging//nyqy-phonetics))
|
||||
(consonant (conlanging//is-consonant curr-phon-list))
|
||||
(dorsal (conlanging//is-dorsal curr-phon-list))
|
||||
(consonant (conlanging//nyqy-is-consonant curr-phon-list))
|
||||
(dorsal (conlanging//nyqy-is-dorsal curr-phon-list))
|
||||
(phon (conlanging//nyqy-get-phoneme consonant curr-phon-list
|
||||
need-dorsal dorsal)))
|
||||
(if (eq need-dorsal 2)
|
||||
|
Reference in New Issue
Block a user