XEmacs 21.2.28 "Hermes".
[chise/xemacs-chise.git.1] / lisp / mule / mule-category.el
index deb9efc..92af2d0 100644 (file)
@@ -29,7 +29,7 @@
 ;; type of char table.  Some function names / arguments should be
 ;; parallel with syntax tables.
 
-;; Written by Ben Wing <wing@666.com>.  The initialization code
+;; Written by Ben Wing <ben@xemacs.org>.  The initialization code
 ;; at the end of this file comes from Mule.
 ;; Some bugfixes by Jareth Hein <jhod@po.iijnet.or.jp>
 
@@ -69,8 +69,8 @@ Categories are given by their designators."
   "Return an undefined category designator, or nil if there are none."
   (let ((a 32) found)
     (while (and (< a 127) (not found))
-      (if (gethash a defined-category-hashtable)
-         (setq found a))
+      (unless (gethash a defined-category-hashtable)
+       (setq found (make-char 'ascii a)))
       (setq a (1+ a)))
     found))
 
@@ -117,11 +117,11 @@ The categories are given by their designators."
       (let ((a 32) list)
        (while (< a 127)
          (if (= 1 (aref vec (- a 32)))
-             (setq list (cons a list)))
+             (setq list (cons (make-char 'ascii a) list)))
          (setq a (1+ a)))
        (nreverse list)))))
 
-;; implimented in c, file chartab.c (97/3/14 jhod@po.iijnet.or.jp)
+;; implemented 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,8 +137,9 @@ The categories are given by their designators."
   "Describe the category specifications in the category table.
 The descriptions are inserted in a buffer, which is then displayed."
   (interactive)
-  (with-output-to-temp-buffer "*Help*"
-    (describe-category-table (category-table) standard-output)))
+  (with-displaying-help-buffer
+   (lambda ()
+     (describe-category-table (category-table) standard-output))))
 
 (defun describe-category-table (table stream)
   (let (first-char