Function: ethio-sera-to-fidel-region
ethio-sera-to-fidel-region is an autoloaded, interactive and
byte-compiled function defined in ethio-util.el.gz.
Signature
(ethio-sera-to-fidel-region BEGIN END &optional SECONDARY FORCE)
Documentation
Convert the characters in region from SERA to FIDEL.
FIDEL is the Amharic alphabet; SERA (System for Ethiopic Representation
in ASCII) is the Latin representation of Ethiopic script.
The variable ethio-primary-language specifies the primary
language and ethio-secondary-language specifies the secondary.
If the 3rd argument SECONDARY is given and non-nil, assume the region begins with the secondary language; otherwise with the primary language.
If the 4th argument FORCE is given and non-nil, perform conversion even if the buffer is read-only.
See also the descriptions of the variables
ethio-use-colon-for-colon(var)/ethio-use-colon-for-colon(fun) and ethio-use-three-dot-question(var)/ethio-use-three-dot-question(fun).
Probably introduced at or before Emacs version 21.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/language/ethio-util.el.gz
;;;###autoload
(defun ethio-sera-to-fidel-region (begin end &optional secondary force)
"Convert the characters in region from SERA to FIDEL.
FIDEL is the Amharic alphabet; SERA (System for Ethiopic Representation
in ASCII) is the Latin representation of Ethiopic script.
The variable `ethio-primary-language' specifies the primary
language and `ethio-secondary-language' specifies the secondary.
If the 3rd argument SECONDARY is given and non-nil, assume the
region begins with the secondary language; otherwise with the
primary language.
If the 4th argument FORCE is given and non-nil, perform
conversion even if the buffer is read-only.
See also the descriptions of the variables
`ethio-use-colon-for-colon' and `ethio-use-three-dot-question'."
(interactive "r\nP")
(if (and buffer-read-only
(not force)
(not (y-or-n-p "Buffer is read-only. Force to convert? ")))
(error ""))
(let ((ethio-primary-language ethio-primary-language)
(ethio-secondary-language ethio-secondary-language)
;; The above two variables may be changed temporarily by tilde
;; escapes during conversion. We bind them to the variables
;; of the same names so that the original values are restored
;; when this function exits.
(buffer-read-only nil)
(lang (if secondary ethio-secondary-language ethio-primary-language))
ret)
(ethio-use-colon-for-colon ethio-use-colon-for-colon)
(ethio-use-three-dot-question ethio-use-three-dot-question)
(save-restriction
(narrow-to-region begin end)
(goto-char (point-min))
(while (not (eobp))
(setq ret
(cond
((eq lang 'amharic)
(ethio-prefer-amharic t)
(ethio-sera-to-fidel-region-ethio 'amharic))
((eq lang 'tigrigna)
(ethio-prefer-amharic nil)
(ethio-sera-to-fidel-region-ethio 'tigrigna))
(t
(ethio-sera-to-fidel-region-noethio))))
(setq lang
(if (eq ret 'toggle)
(if (eq lang ethio-primary-language)
ethio-secondary-language
ethio-primary-language)
ret)))))
;; Restore user's preference.
(ethio-adjust-robin))