diff lisp/mule/mule-category.el @ 3970:949ac151a10d

[xemacs-hg @ 2007-05-20 20:09:20 by aidan] Test that all listed langenv input methods exist; comment out those we can't support while using 21.4 to compile our packages.
author aidan
date Sun, 20 May 2007 20:09:40 +0000
parents c10d0c3f965f
children d402d7b18bd8
line wrap: on
line diff
--- a/lisp/mule/mule-category.el	Sun May 20 16:04:10 2007 +0000
+++ b/lisp/mule/mule-category.el	Sun May 20 20:09:40 2007 +0000
@@ -37,13 +37,18 @@
 
 (defvar defined-category-hashtable (make-hash-table :size 50))
 
-(defun define-category (designator doc-string)
+(defun define-category (designator doc-string &optional table)
   "Make a new category whose designator is DESIGNATOR.
 DESIGNATOR should be a visible letter of ' ' thru '~'.
-STRING is a doc string for the category.
-Letters of 'a' thru 'z' are already used or kept for the system."
+DOC-STRING is a doc string for the category.
+Letters of 'a' thru 'z' are already used or kept for the system.
+The category should be defined only in category table TABLE, which defaults
+to the current buffer's category table, but this is not implemented.  "
+  ;; #### Implement the limiting of the definition. 
   (check-argument-type 'category-designator-p designator)
   (check-argument-type 'stringp doc-string)
+  (setq table (or table (category-table)))
+  (check-argument-type 'category-table-p table)
   (puthash designator doc-string defined-category-hashtable))
 
 (defun undefine-category (designator)
@@ -142,6 +147,10 @@
 	 (progn ,@body)
        (set-category-table current-category-table))))
 
+(defun make-category-table ()
+  "Construct a new and empty category table and return it."
+  (make-char-table 'category))
+
 (defun describe-category ()
   "Describe the category specifications in the category table.
 The descriptions are inserted in a buffer, which is then displayed."