viqr.el 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ;;; viqr.el --- Quail packages for inputting Vietnamese with VIQR system -*-coding: iso-2022-7bit;-*-
  2. ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
  3. ;; 2006, 2007, 2008, 2009, 2010, 2011
  4. ;; National Institute of Advanced Industrial Science and Technology (AIST)
  5. ;; Registration Number H14PRO021
  6. ;; Keywords: multilingual, input method, latin
  7. ;; This file is part of GNU Emacs.
  8. ;; GNU Emacs is free software: you can redistribute it and/or modify
  9. ;; it under the terms of the GNU General Public License as published by
  10. ;; the Free Software Foundation, either version 3 of the License, or
  11. ;; (at your option) any later version.
  12. ;; GNU Emacs is distributed in the hope that it will be useful,
  13. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. ;; GNU General Public License for more details.
  16. ;; You should have received a copy of the GNU General Public License
  17. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  18. ;;; Commentary:
  19. ;;; Code:
  20. (require 'quail)
  21. (require 'viet-util)
  22. ;; `viet-viqr-alist' is an alist of Vietnamese characters vs
  23. ;; corresponding VIQR strings. We create Quail map which maps VIQR
  24. ;; strings to corresponding Vietnamese characters.
  25. (defmacro viet-quail-define-rules ()
  26. (cons 'quail-define-rules
  27. (let ((l viet-viqr-alist)
  28. rules)
  29. (while l
  30. (setq rules (cons (list (cdr (car l)) (car (car l))) rules))
  31. (setq l (cdr l)))
  32. rules)))
  33. (quail-define-package
  34. "vietnamese-viqr" "Vietnamese" "VQ" t
  35. "Vietnamese input method with VIQR mnemonic system
  36. effect | postfix | examples
  37. ------------+---------+----------
  38. breve | ( | a( -> ,1e(B
  39. circumflex | ^ | a^ -> ,1b(B
  40. horn | + | o+ -> ,1=(B
  41. ------------+---------+----------
  42. acute | ' | a' -> ,1a(B
  43. grave | ` | a` -> ,1`(B
  44. hook above | ? | a? -> ,1d(B
  45. tilde | ~ | a~ -> ,1c(B
  46. dot below | . | a. -> ,1U(B
  47. ------------+---------+----------
  48. d bar | dd | dd -> ,1p(B
  49. ------------+---------+----------
  50. no compose | \\ | a\\. -> a.
  51. ------------+---------+----------
  52. combination| (~ | a(~ -> ,1G(B
  53. " nil t t nil nil t nil nil nil nil t)
  54. (viet-quail-define-rules)
  55. ;;; viqr.el ends here