]> code.delx.au - gnu-emacs/blobdiff - lisp/case-table.el
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-66
[gnu-emacs] / lisp / case-table.el
index aca05141040ef8641984b6ba7db64e61f538abed..71e82bcabefa078e923241347a35e9bf8a616da8 100644 (file)
 
 ;;; Commentary:
 
-;;; Code:
+;; Written by:
+;; TN/ETX/TX/UMG Howard Gayle        UUCP : seismo!enea!erix!howard
+;; Telefonaktiebolaget L M Ericsson  Phone: +46 8 719 55 65
+;; Ericsson Telecom                 Telex: 14910 ERIC S
+;; S-126 25 Stockholm                FAX  : +46 8 719 64 82
+;; Sweden
 
-(defvar set-case-syntax-set-multibyte nil)
+;;; Code:
 
 (defun describe-buffer-case-table ()
   "Describe the case table of the current buffer."
   (let ((description (make-char-table 'case-table)))
     (map-char-table
      (function (lambda (key value)
-                (aset
-                 description key
-                 (cond ((not (natnump value))
-                        "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")))))
+                (if (consp key)
+                    (set-char-table-range description key "case-invariant")
+                  (aset
+                   description key
+                   (cond ((not (natnump value))
+                          "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*"
@@ -86,10 +93,6 @@ This sets the entries for characters UC and LC in TABLE, which is a string
 that will be used as the downcase part of a case table.
 It also modifies `standard-syntax-table' to give them the syntax of
 word constituents."
-  (let ((lu (length (string-as-unibyte (string uc))))
-       (ll (length (string-as-unibyte (string lc)))))
-    (unless (= lu ll)
-      (error "Can't casify chars with different `charset-bytes' values")))
   (aset table uc lc)
   (aset table lc lc)
   (set-char-table-extra-slot table 0 nil)
@@ -112,4 +115,5 @@ SYNTAX should be \" \", \"w\", \".\" or \"_\"."
 
 (provide 'case-table)
 
+;;; arch-tag: 3c2cf885-2c9a-449a-9972-2e269191896d
 ;;; case-table.el ends here