diff lisp/mule/mule-category.el @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children 41dbb7a9d5f2
line wrap: on
line diff
--- a/lisp/mule/mule-category.el	Mon Aug 13 11:19:22 2007 +0200
+++ b/lisp/mule/mule-category.el	Mon Aug 13 11:20:41 2007 +0200
@@ -1,8 +1,6 @@
 ;;; mule-category.el --- category functions for XEmacs/Mule.
 
 ;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc.
-;; Copyright (C) 1995, 1997, 1999 Electrotechnical Laboratory, JAPAN.
-;; Licensed to the Free Software Foundation.
 ;; Copyright (C) 1995 Amdahl Corporation.
 ;; Copyright (C) 1995 Sun Microsystems.
 
@@ -29,13 +27,13 @@
 ;; type of char table.  Some function names / arguments should be
 ;; parallel with syntax tables.
 
-;; Written by Ben Wing <ben@xemacs.org>.  The initialization code
+;; Written by Ben Wing <wing@666.com>.  The initialization code
 ;; at the end of this file comes from Mule.
 ;; Some bugfixes by Jareth Hein <jhod@po.iijnet.or.jp>
 
 ;;; Code:
 
-(defvar defined-category-hashtable (make-hash-table :size 50))
+(defvar defined-category-hashtable (make-hashtable 50))
 
 (defun define-category (designator doc-string)
   "Make a new category whose designator is DESIGNATOR.
@@ -69,8 +67,8 @@
   "Return an undefined category designator, or nil if there are none."
   (let ((a 32) found)
     (while (and (< a 127) (not found))
-      (unless (gethash a defined-category-hashtable)
-	(setq found (make-char 'ascii a)))
+      (if (gethash a defined-category-hashtable)
+	  (setq found a))
       (setq a (1+ a)))
     found))
 
@@ -117,11 +115,11 @@
       (let ((a 32) list)
 	(while (< a 127)
 	  (if (= 1 (aref vec (- a 32)))
-	      (setq list (cons (make-char 'ascii a) list)))
+	      (setq list (cons a list)))
 	  (setq a (1+ a)))
 	(nreverse list)))))
 
-;; implemented in c, file chartab.c (97/3/14 jhod@po.iijnet.or.jp)
+;; implimented in c, file chartab.c (97/3/14 jhod@po.iijnet.or.jp)
 ;(defun char-in-category-p (char category &optional table)
 ;  "Return non-nil if CHAR is in CATEGORY.
 ;TABLE defaults to the current buffer's category table.
@@ -137,9 +135,8 @@
   "Describe the category specifications in the category table.
 The descriptions are inserted in a buffer, which is then displayed."
   (interactive)
-  (with-displaying-help-buffer
-   (lambda ()
-     (describe-category-table (category-table) standard-output))))
+  (with-output-to-temp-buffer "*Help*"
+    (describe-category-table (category-table) standard-output)))
 
 (defun describe-category-table (table stream)
   (let (first-char
@@ -246,11 +243,9 @@
 
 (let (i l)
   (define-category ?a "ASCII character set.")
-  (define-category ?l "Latin-1 through Latin-5 character set")
   (setq i 32)
   (while (< i 127)
     (modify-category-entry i ?a)
-    (modify-category-entry i ?l)
     (setq i (1+ i)))
   (setq l predefined-category-list)
   (while l
@@ -260,23 +255,6 @@
     (modify-category-entry (car (car l)) (nth 1 (car l)))
     (setq l (cdr l))))
 
-;;; Setting word boundary.
-
-(setq word-combining-categories
-      '((?l . ?l)))
-
-(setq word-separating-categories	;  (2-byte character sets)
-      '((?A . ?K)			; Alpha numeric - Katakana
-	(?A . ?C)			; Alpha numeric - Chinese
-	(?H . ?A)			; Hiragana - Alpha numeric
-	(?H . ?K)			; Hiragana - Katakana
-	(?H . ?C)			; Hiragana - Chinese
-	(?K . ?A)			; Katakana - Alpha numeric
-	(?K . ?C)			; Katakana - Chinese
-	(?C . ?A)			; Chinese - Alpha numeric
-	(?C . ?K)			; Chinese - Katakana
-	))
-
 ;;; At the present, I know Japanese and Chinese text can
 ;;; break line at any point under a restriction of 'kinsoku'.
 (defvar word-across-newline "\\(\\cj\\|\\cc\\|\\ct\\)"