(read_avail_input): Don't generate SIGHUP of aix386;
[bpt/emacs.git] / lisp / case-table.el
index f355f0d..8160ede 100644 (file)
@@ -4,7 +4,7 @@
 
 ;; Author: Howard Gayle
 ;; Maintainer: FSF
-;; Keywords: i14n
+;; Keywords: i18n
 
 ;; This file is part of GNU Emacs.
 
@@ -39,9 +39,9 @@
   (interactive)
   (let ((vector (make-vector 256 nil))
        (case-table (current-case-table))
-       (i 0))
-    (while (< i 256)
-      (aset vector 
+       (ch 0))
+    (while (< ch 256)
+      (aset vector ch
            (cond ((/= ch (downcase ch))
                   (concat "uppercase, matches "
                           (text-char-description (downcase 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))))
+      (setq ch (1+ ch)))
+    (save-excursion
+     (with-output-to-temp-buffer "*Help*"
+       (set-buffer standard-output)
+       (describe-vector vector)))))
 
 ;;;###autoload
-(defun set-case-syntax-delims (l r)
+(defun set-case-syntax-delims (l r table)
   "Make characters L and R a matching pair of non-case-converting delimiters.
-This sets the entries for L and R in the standard case table.
+This sets the entries for L and R in TABLE, which is a string
+that will be used as the downcase part of a case table.
 It also modifies `standard-syntax-table', and `text-mode-syntax-table' to
 indicate left and right delimiters."
-  (aset (car (cdr (standard-case-table))) l l)
-  (aset (car (cdr (standard-case-table))) r r)
-  ;; Recompute the equivalence and canonicalize tables.
-  (set-standard-case-table (list (car (standard-case-table))
-                                (nth 1 (standard-case-table))
-                                nil nil))
+  (aset table l l)
+  (aset table r r)
   (modify-syntax-entry l (concat "(" (char-to-string r) "  ")
                       (standard-syntax-table))
   (modify-syntax-entry l (concat "(" (char-to-string r) "  ")
@@ -75,36 +74,27 @@ indicate left and right delimiters."
                       text-mode-syntax-table))
 
 ;;;###autoload
-(defun set-case-syntax-pair (uc lc)
+(defun set-case-syntax-pair (uc lc table)
   "Make characters UC and LC a pair of inter-case-converting letters.
-This sets the entries for characters UC and LC in the standard case table.
+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' and `text-mode-syntax-table'
 to indicate an (uppercase, lowercase) pair of letters."
-  (aset (car (cdr (standard-case-table))) lc uc)
-  (aset (car (cdr (standard-case-table))) uc uc)
-  (aset (car (standard-case-table)) uc lc)
-  (aset (car (standard-case-table)) lc lc)
-  ;; Recompute the equivalence and canonicalize tables.
-  (set-standard-case-table (list (car (standard-case-table))
-                                (nth 1 (standard-case-table))
-                                nil nil))
+  (aset table uc lc)
+  (aset table lc lc)
   (modify-syntax-entry lc "w   " (standard-syntax-table))
   (modify-syntax-entry lc "w   " text-mode-syntax-table)
   (modify-syntax-entry uc "w   " (standard-syntax-table))
   (modify-syntax-entry uc "w   " text-mode-syntax-table))
 
 ;;;###autoload
-(defun set-case-syntax (c syntax)
+(defun set-case-syntax (c syntax table)
   "Make characters C case-invariant with syntax SYNTAX.
-This sets the entries for character C in the standard case table.
+This sets the entries for character C in TABLE, which is a string
+that will be used as the downcase part of a case table.
 It also modifies `standard-syntax-table' and `text-mode-syntax-table'.
 SYNTAX should be \" \", \"w\", \".\" or \"_\"."
-  (aset (car (cdr (standard-case-table))) c c)
-  (aset (car (standard-case-table)) c c)
-  ;; Recompute the equivalence and canonicalize tables.
-  (set-standard-case-table (list (car (standard-case-table))
-                                (nth 1 (standard-case-table))
-                                nil nil))
+  (aset table c c)
   (modify-syntax-entry c syntax (standard-syntax-table))
   (modify-syntax-entry c syntax text-mode-syntax-table))