Move the macro section to the top as suggested by Takahashi.
[m17n/m17n-contrib.git] / im / si-phonetic-static.mim
index f7d0f00..552aae1 100644 (file)
@@ -1,7 +1,24 @@
 ;; si-phonetic-static.mim -- Sinhala phonetic static keymap
+;; Copyright (C) 2006-2008  Harshula Jayasuriya <harshula@gmail.com>
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA  02110-1301, USA.
+
 ;; m17n Keymap file for Sinhala (Sri Lanka) (2006-04-26)
 ;; Maintainer: Harshula Jayasuriya <harshula@gmail.com>
-;; Last Updated: 2007-07-01
+;; Last Updated: 2008-09-10
 ;; This is a phonetic static mapping for a standard US-English keyboard
 ;; (qwerty)
 ;; http://www.nongnu.org/sinhala/doc/keymaps/sinhala-keyboard_3.html
@@ -13,7 +30,7 @@
   <http://www.nongnu.org/sinhala/doc/keymaps/sinhala-keyboard_3.html>"
 )
 
-(title "Phonetic Static")
+(title "සි (Phonetic Static)")
 
 (map
  (phon
   ((S-\ ) " ")                ; 0x00a0 - no-break space
   ((A-\ ) "‌")               ; 0x200c - ZWNJ
 
-  ((BackSpace)
-   (cond
-    ;; rakaaranshaya and yansaya
-    ((| (= @-1 0x0DBA) (= @-1 0x0DBB))
-     (delete @-1)
-     (delete-al-zwj)
-    )
-    ;; touch
-    ((& (= @-2 0x200D) (= @-1 0x0DCA))
-     (delete @-1)
-     (delete @-1)
-    )
-    ;; join
-    ((= @-1 0x200D)
-     (delete-al-zwj)
-    )
-    (1
-     (delete @-1)
-    )
-   )
-  )
-
  )
 )
 
-(macro
- (delete-al-zwj (set x 0))
-
- (delete-al-zwj
-  (cond
-   ((& (= @-2 0x0DCA) (= @-1 0x200D))
-    (delete @-1)
-    (delete @-1)
-    ;; repaya
-    (cond
-     ((= @-1 0x0DBB)
-      (delete @-1)
-     )
-    )
-   )
-  )
- )
-
-)
-
 (state
  (init
   (phon)