aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-03-27 06:19:51 +0000
committerRichard M. Stallman1993-03-27 06:19:51 +0000
commit3f5ed7e4374378921328093c7625720f74ea5351 (patch)
treec1a6afb8b4bc160f7ccefa26d8c2b025fc5f770c
parentc34beca9541463bc8cc1aad6e4d295ef210fc81d (diff)
downloademacs-3f5ed7e4374378921328093c7625720f74ea5351.tar.gz
emacs-3f5ed7e4374378921328093c7625720f74ea5351.zip
Add autoloads.
(set-case-syntax-delims, set-case-syntax-pair, set-case-syntax): Delete arg STRING--always set the standard case table. Be more thorough about doing that, and arrange to recompute the equivalence and canonicalize parts of the table.
-rw-r--r--lisp/case-table.el47
1 files changed, 33 insertions, 14 deletions
diff --git a/lisp/case-table.el b/lisp/case-table.el
index c9fb8efad7f..f355f0da0cb 100644
--- a/lisp/case-table.el
+++ b/lisp/case-table.el
@@ -33,6 +33,7 @@
33 33
34;;; Code: 34;;; Code:
35 35
36;;;###autoload
36(defun describe-buffer-case-table () 37(defun describe-buffer-case-table ()
37 "Describe the case table of the current buffer." 38 "Describe the case table of the current buffer."
38 (interactive) 39 (interactive)
@@ -52,13 +53,18 @@
52 (with-output-to-temp-buffer "*Help*" 53 (with-output-to-temp-buffer "*Help*"
53 (describe-vector vector)))) 54 (describe-vector vector))))
54 55
55(defun set-case-syntax-delims (l r string) 56;;;###autoload
57(defun set-case-syntax-delims (l r)
56 "Make characters L and R a matching pair of non-case-converting delimiters. 58 "Make characters L and R a matching pair of non-case-converting delimiters.
57Sets the entries for L and R in STRING, which is a downcasing table. 59This sets the entries for L and R in the standard case table.
58Also modifies `standard-syntax-table', and `text-mode-syntax-table' to 60It also modifies `standard-syntax-table', and `text-mode-syntax-table' to
59indicate left and right delimiters." 61indicate left and right delimiters."
60 (aset string l l) 62 (aset (car (cdr (standard-case-table))) l l)
61 (aset string r r) 63 (aset (car (cdr (standard-case-table))) r r)
64 ;; Recompute the equivalence and canonicalize tables.
65 (set-standard-case-table (list (car (standard-case-table))
66 (nth 1 (standard-case-table))
67 nil nil))
62 (modify-syntax-entry l (concat "(" (char-to-string r) " ") 68 (modify-syntax-entry l (concat "(" (char-to-string r) " ")
63 (standard-syntax-table)) 69 (standard-syntax-table))
64 (modify-syntax-entry l (concat "(" (char-to-string r) " ") 70 (modify-syntax-entry l (concat "(" (char-to-string r) " ")
@@ -68,24 +74,37 @@ indicate left and right delimiters."
68 (modify-syntax-entry r (concat ")" (char-to-string l) " ") 74 (modify-syntax-entry r (concat ")" (char-to-string l) " ")
69 text-mode-syntax-table)) 75 text-mode-syntax-table))
70 76
71(defun set-case-syntax-pair (uc lc string) 77;;;###autoload
78(defun set-case-syntax-pair (uc lc)
72 "Make characters UC and LC a pair of inter-case-converting letters. 79 "Make characters UC and LC a pair of inter-case-converting letters.
73Sets the entries for characters UC and LC in STRING, which is a downcasing table. 80This sets the entries for characters UC and LC in the standard case table.
74Also modify `standard-syntax-table' and `text-mode-syntax-table' to indicate an 81It also modifies `standard-syntax-table' and `text-mode-syntax-table'
75(uppercase, lowercase) pair of letters." 82to indicate an (uppercase, lowercase) pair of letters."
76 (aset string uc lc)
77 (aset (car (cdr (standard-case-table))) lc uc) 83 (aset (car (cdr (standard-case-table))) lc uc)
84 (aset (car (cdr (standard-case-table))) uc uc)
85 (aset (car (standard-case-table)) uc lc)
86 (aset (car (standard-case-table)) lc lc)
87 ;; Recompute the equivalence and canonicalize tables.
88 (set-standard-case-table (list (car (standard-case-table))
89 (nth 1 (standard-case-table))
90 nil nil))
78 (modify-syntax-entry lc "w " (standard-syntax-table)) 91 (modify-syntax-entry lc "w " (standard-syntax-table))
79 (modify-syntax-entry lc "w " text-mode-syntax-table) 92 (modify-syntax-entry lc "w " text-mode-syntax-table)
80 (modify-syntax-entry uc "w " (standard-syntax-table)) 93 (modify-syntax-entry uc "w " (standard-syntax-table))
81 (modify-syntax-entry uc "w " text-mode-syntax-table)) 94 (modify-syntax-entry uc "w " text-mode-syntax-table))
82 95
83(defun set-case-syntax (c syntax string) 96;;;###autoload
97(defun set-case-syntax (c syntax)
84 "Make characters C case-invariant with syntax SYNTAX. 98 "Make characters C case-invariant with syntax SYNTAX.
85Sets the entries for character C in STRING, which is the downcasing table. 99This sets the entries for character C in the standard case table.
86Also modify `standard-syntax-table' and `text-mode-syntax-table'. 100It also modifies `standard-syntax-table' and `text-mode-syntax-table'.
87SYNTAX should be \" \", \"w\", \".\" or \"_\"." 101SYNTAX should be \" \", \"w\", \".\" or \"_\"."
88 (aset string c c) 102 (aset (car (cdr (standard-case-table))) c c)
103 (aset (car (standard-case-table)) c c)
104 ;; Recompute the equivalence and canonicalize tables.
105 (set-standard-case-table (list (car (standard-case-table))
106 (nth 1 (standard-case-table))
107 nil nil))
89 (modify-syntax-entry c syntax (standard-syntax-table)) 108 (modify-syntax-entry c syntax (standard-syntax-table))
90 (modify-syntax-entry c syntax text-mode-syntax-table)) 109 (modify-syntax-entry c syntax text-mode-syntax-table))
91 110