]> code.delx.au - gnu-emacs/blobdiff - lisp/language/hebrew.el
Update copyright year to 2015
[gnu-emacs] / lisp / language / hebrew.el
index 89a22d2d238149017ccc1f1ad5e246c66fd307ad..a3f4b3dd9976724f99a707e63436a912e3c2f023 100644 (file)
@@ -1,9 +1,8 @@
 ;;; hebrew.el --- support for Hebrew -*- coding: utf-8 -*-
 
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 2001-2015 Free Software Foundation, Inc.
 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009, 2010
+;;   2005, 2006, 2007, 2008, 2009, 2010, 2011
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H14PRO021
 
 (define-coding-system-alias 'iso-8859-8 'hebrew-iso-8bit)
 
 ;; These are for Explicit and Implicit directionality information, as
-;; defined in RFC 1556.  We don't yet support directional information
-;; in bidi languages, so these aliases are a lie, especially as far as
-;; iso-8859-8-e is concerned.  FIXME.
+;; defined in RFC 1556.
 (define-coding-system-alias 'iso-8859-8-e 'hebrew-iso-8bit)
 (define-coding-system-alias 'iso-8859-8-i 'hebrew-iso-8bit)
 
 (set-language-info-alist
- "Hebrew" '((charset iso-8859-8)
+ "Hebrew" '((tutorial . "TUTORIAL.he")
+           (charset iso-8859-8)
            (coding-priority hebrew-iso-8bit)
            (coding-system hebrew-iso-8bit windows-1255 cp862)
            (nonascii-translation . iso-8859-8)
@@ -89,14 +87,14 @@ Bidirectional editing is supported.")))
 ;; corresponding glyph of FONT-OBJECT.
 (defun hebrew-font-get-precomposed (font-object)
   (let ((precomposed (font-get font-object 'hebrew-precomposed))
-       ;; Vector of Hebrew precomposed charaters.
+       ;; Vector of Hebrew precomposed characters.
        (chars [#xFB2A #xFB2B #xFB2C #xFB2D #xFB2E #xFB2F #xFB30 #xFB31
                #xFB32 #xFB33 #xFB34 #xFB35 #xFB36 #xFB38 #xFB39 #xFB3A
                #xFB3B #xFB3C #xFB3E #xFB40 #xFB41 #xFB43 #xFB44 #xFB46
                #xFB47 #xFB48 #xFB49 #xFB4A #xFB4B #xFB4C #xFB4D #xFB4E])
        ;; Vector of decomposition character sequences corresponding
        ;; to the above vector.
-       (decomposed 
+       (decomposed
         [[#x05E9 #x05C1]
          [#x05E9 #x05C2]
          [#x05E9 #x05BC #x05C1]
@@ -238,20 +236,26 @@ Bidirectional editing is supported.")))
          (setq idx (1+ idx))))))
     gstring))
 
-(let ((pattern1 "[\u05D0-\u05F2][\u0591-\u05BF\u05C1-\u05C5\u05C7]+")
-      (pattern2 "[\u05D0-\u05F2]\u200D[\u0591-\u05BF\u05C1-\u05C5\u05C7]+"))
+(let* ((base "[\u05D0-\u05F2]")
+       (combining "[\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7]+")
+       (pattern1 (concat base combining))
+       (pattern2 (concat base "\u200D" combining)))
   (set-char-table-range
    composition-function-table '(#x591 . #x5C7)
    (list (vector pattern2 3 'hebrew-shape-gstring)
         (vector pattern2 2 'hebrew-shape-gstring)
         (vector pattern1 1 'hebrew-shape-gstring)
         [nil 0 hebrew-shape-gstring]))
+  ;; Exclude non-combining characters.
+  (set-char-table-range
+   composition-function-table #x5BE nil)
   (set-char-table-range
    composition-function-table #x5C0 nil)
+  (set-char-table-range
+   composition-function-table #x5C3 nil)
   (set-char-table-range
    composition-function-table #x5C6 nil))
 
 (provide 'hebrew)
 
-;; arch-tag: 3ca04f32-3f1e-498e-af46-8267498ba5d9
 ;;; hebrew.el ends here