- (let ((vector (make-vector 256 nil))
- (case-table (current-case-table))
- (i 0))
- (while (< i 256)
- (aset vector i
- (cond ((/= ch (downcase ch))
- (concat "uppercase, matches "
- (text-char-description (downcase ch))))
- ((/= ch (upcase ch))
- (concat "lowercase, matches "
- (text-char-description (upcase ch))))
- (t "case-invariant")))
- (setq i (1+ i)))
- (with-output-to-temp-buffer "*Help*"
- (describe-vector vector))))
+ (let ((description (make-char-table 'case-table)))
+ (map-char-table
+ (function (lambda (key value)
+ (set-char-table-range
+ description key
+ (cond ((null key)
+ "case-invariant")
+ ((/= key (downcase key))
+ (concat "uppercase, matches "
+ (char-to-string (downcase key))))
+ ((/= key (upcase key))
+ (concat "lowercase, matches "
+ (char-to-string (upcase key))))
+ (t "case-invariant")))))
+ (current-case-table))
+ (save-excursion
+ (with-output-to-temp-buffer "*Help*"
+ (set-buffer standard-output)
+ (describe-vector description)
+ (help-mode)))))