Function: ethio-insert-space
ethio-insert-space is an interactive and byte-compiled function
defined in ethio-util.el.gz.
Signature
(ethio-insert-space ARG)
Documentation
Insert ASCII spaces or Ethiopic word separators depending on context.
If the current word separator (indicated in mode-line) is the ASCII space, insert an ASCII space. With ARG, insert that many ASCII spaces.
If the current word separator is the colon-like Ethiopic word
separator and the point is preceded by an Ethiopic punctuation mark
followed by zero or more ASCII spaces, then insert also an ASCII
space. With ARG, insert that many ASCII spaces.
Otherwise, insert a colon-like Ethiopic word separator. With ARG, insert that many Ethiopic word separators.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/language/ethio-util.el.gz
(defun ethio-insert-space (arg)
"Insert ASCII spaces or Ethiopic word separators depending on context.
If the current word separator (indicated in mode-line) is the ASCII space,
insert an ASCII space. With ARG, insert that many ASCII spaces.
If the current word separator is the colon-like Ethiopic word
separator and the point is preceded by `an Ethiopic punctuation mark
followed by zero or more ASCII spaces', then insert also an ASCII
space. With ARG, insert that many ASCII spaces.
Otherwise, insert a colon-like Ethiopic word separator. With ARG, insert that
many Ethiopic word separators."
(interactive "*p")
(cond
(ethio-prefer-ascii-space
(insert-char 32 arg))
((save-excursion
(skip-chars-backward " ")
(memq (preceding-char)
'(?፡ ?። ?፣ ?፤ ?፥ ?፦ ?፧ ?፨ ?\x1A01CB ?\x1A01CC ?\x1A01CD ?\x1A01CE ?\x1A01CF)))
(insert-char 32 arg))
(t
(insert-char ?፡ arg))))