comparison lisp/mule/mule-category.el @ 434:9d177e8d4150 r21-2-25

Import from CVS: tag r21-2-25
author cvs
date Mon, 13 Aug 2007 11:30:53 +0200
parents 3ecd8885ac67
children 8de8e3f6228a
comparison
equal deleted inserted replaced
433:892ca416f0fb 434:9d177e8d4150
67 67
68 (defun undefined-category-designator () 68 (defun undefined-category-designator ()
69 "Return an undefined category designator, or nil if there are none." 69 "Return an undefined category designator, or nil if there are none."
70 (let ((a 32) found) 70 (let ((a 32) found)
71 (while (and (< a 127) (not found)) 71 (while (and (< a 127) (not found))
72 (if (gethash a defined-category-hashtable) 72 (unless (gethash a defined-category-hashtable)
73 (setq found a)) 73 (setq found (make-char 'ascii a)))
74 (setq a (1+ a))) 74 (setq a (1+ a)))
75 found)) 75 found))
76 76
77 (defun category-doc-string (designator) 77 (defun category-doc-string (designator)
78 "Return the doc-string for the category denoted by DESIGNATOR." 78 "Return the doc-string for the category denoted by DESIGNATOR."
115 (let ((vec (get-char-table char table))) 115 (let ((vec (get-char-table char table)))
116 (if (null vec) nil 116 (if (null vec) nil
117 (let ((a 32) list) 117 (let ((a 32) list)
118 (while (< a 127) 118 (while (< a 127)
119 (if (= 1 (aref vec (- a 32))) 119 (if (= 1 (aref vec (- a 32)))
120 (setq list (cons a list))) 120 (setq list (cons (make-char 'ascii a) list)))
121 (setq a (1+ a))) 121 (setq a (1+ a)))
122 (nreverse list))))) 122 (nreverse list)))))
123 123
124 ;; implimented in c, file chartab.c (97/3/14 jhod@po.iijnet.or.jp) 124 ;; implimented in c, file chartab.c (97/3/14 jhod@po.iijnet.or.jp)
125 ;(defun char-in-category-p (char category &optional table) 125 ;(defun char-in-category-p (char category &optional table)
135 135
136 (defun describe-category () 136 (defun describe-category ()
137 "Describe the category specifications in the category table. 137 "Describe the category specifications in the category table.
138 The descriptions are inserted in a buffer, which is then displayed." 138 The descriptions are inserted in a buffer, which is then displayed."
139 (interactive) 139 (interactive)
140 (with-output-to-temp-buffer "*Help*" 140 (with-displaying-help-buffer
141 (describe-category-table (category-table) standard-output))) 141 (lambda ()
142 (describe-category-table (category-table) standard-output))))
142 143
143 (defun describe-category-table (table stream) 144 (defun describe-category-table (table stream)
144 (let (first-char 145 (let (first-char
145 last-char 146 last-char
146 prev-val 147 prev-val