Fix crash on unknown character
This commit allows any unknown characters to be passed in text fed to `conlanging-proto-nyqy-to-phonetics' without any crash. Unrecognized characters will just be ignored.
This commit is contained in:
parent
ff60fddaf4
commit
77799b0e96
@ -340,16 +340,17 @@ See `conlanging--proto-nyqy-phoneme'.")
|
||||
(equal (oref elem :grapheme)
|
||||
grapheme))
|
||||
conlanging--proto-nyqy-phonetics)))
|
||||
(if (oref cur-phoneme :is-consonant)
|
||||
(progn
|
||||
(when (eq dorsal 'undefined)
|
||||
(setq dorsal (oref cur-phoneme :is-dorsal)))
|
||||
(setq phonetics (concat phonetics
|
||||
(if dorsal
|
||||
(oref cur-phoneme :phoneme)
|
||||
(oref cur-phoneme :alt-phoneme))))
|
||||
(setq dorsal (not dorsal)))
|
||||
(setq phonetics (concat phonetics (oref cur-phoneme :phoneme))))))
|
||||
(when cur-phoneme
|
||||
(if (oref cur-phoneme :is-consonant)
|
||||
(progn
|
||||
(when (eq dorsal 'undefined)
|
||||
(setq dorsal (oref cur-phoneme :is-dorsal)))
|
||||
(setq phonetics (concat phonetics
|
||||
(if dorsal
|
||||
(oref cur-phoneme :phoneme)
|
||||
(oref cur-phoneme :alt-phoneme))))
|
||||
(setq dorsal (not dorsal)))
|
||||
(setq phonetics (concat phonetics (oref cur-phoneme :phoneme)))))))
|
||||
phonetics))
|
||||
|
||||
;;;###autoload
|
||||
|
Loading…
Reference in New Issue
Block a user