Function: viet-encode-viqr-region
viet-encode-viqr-region is an autoloaded, interactive and
byte-compiled function defined in viet-util.el.gz.
Signature
(viet-encode-viqr-region FROM TO)
Documentation
Convert Vietnamese characters of the current region to VIQR mnemonics.
When called from a program, expects two arguments, positions (integers or markers) specifying the stretch of the region.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/language/viet-util.el.gz
;;;###autoload
(defun viet-encode-viqr-region (from to)
"Convert Vietnamese characters of the current region to `VIQR' mnemonics.
When called from a program, expects two arguments,
positions (integers or markers) specifying the stretch of the region."
(interactive "r")
(save-restriction
(narrow-to-region from to)
(goto-char (point-min))
(replace-regexp-in-region viqr-punctuation-regexp "\\\\\\&")
(while (re-search-forward "\\cv" nil t)
(let* ((ch (preceding-char))
(viqr (cdr (assq ch viet-viqr-alist))))
(if viqr
(progn
(delete-char -1)
(insert viqr)))))))