aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-03-27 06:29:16 +0000
committerRichard M. Stallman1993-03-27 06:29:16 +0000
commit8db3f421f42d7a6f58bb2f453faf8b7e8e1dd9e8 (patch)
tree3f42fb1df79bbd4215003f32989f1e594179670a
parent3f5ed7e4374378921328093c7625720f74ea5351 (diff)
downloademacs-8db3f421f42d7a6f58bb2f453faf8b7e8e1dd9e8.tar.gz
emacs-8db3f421f42d7a6f58bb2f453faf8b7e8e1dd9e8.zip
(set-case-syntax-delims, set-case-syntax-pair, set-case-syntax):
Do not set the standard case table. Reintroduce arg (now named TABLE) which gives a downcase string to set.
-rw-r--r--lisp/case-table.el40
1 files changed, 14 insertions, 26 deletions
diff --git a/lisp/case-table.el b/lisp/case-table.el
index f355f0da0cb..ad6fbfa3963 100644
--- a/lisp/case-table.el
+++ b/lisp/case-table.el
@@ -54,17 +54,14 @@
54 (describe-vector vector)))) 54 (describe-vector vector))))
55 55
56;;;###autoload 56;;;###autoload
57(defun set-case-syntax-delims (l r) 57(defun set-case-syntax-delims (l r table)
58 "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.
59This sets the entries for L and R in the standard case table. 59This sets the entries for L and R in TABLE, which is a string
60that will be used as the downcase part of a case table.
60It also modifies `standard-syntax-table', and `text-mode-syntax-table' to 61It also modifies `standard-syntax-table', and `text-mode-syntax-table' to
61indicate left and right delimiters." 62indicate left and right delimiters."
62 (aset (car (cdr (standard-case-table))) l l) 63 (aset table l l)
63 (aset (car (cdr (standard-case-table))) r r) 64 (aset 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))
68 (modify-syntax-entry l (concat "(" (char-to-string r) " ") 65 (modify-syntax-entry l (concat "(" (char-to-string r) " ")
69 (standard-syntax-table)) 66 (standard-syntax-table))
70 (modify-syntax-entry l (concat "(" (char-to-string r) " ") 67 (modify-syntax-entry l (concat "(" (char-to-string r) " ")
@@ -75,36 +72,27 @@ indicate left and right delimiters."
75 text-mode-syntax-table)) 72 text-mode-syntax-table))
76 73
77;;;###autoload 74;;;###autoload
78(defun set-case-syntax-pair (uc lc) 75(defun set-case-syntax-pair (uc lc table)
79 "Make characters UC and LC a pair of inter-case-converting letters. 76 "Make characters UC and LC a pair of inter-case-converting letters.
80This sets the entries for characters UC and LC in the standard case table. 77This sets the entries for characters UC and LC in TABLE, which is a string
78that will be used as the downcase part of a case table.
81It also modifies `standard-syntax-table' and `text-mode-syntax-table' 79It also modifies `standard-syntax-table' and `text-mode-syntax-table'
82to indicate an (uppercase, lowercase) pair of letters." 80to indicate an (uppercase, lowercase) pair of letters."
83 (aset (car (cdr (standard-case-table))) lc uc) 81 (aset table uc lc)
84 (aset (car (cdr (standard-case-table))) uc uc) 82 (aset table lc lc)
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))
91 (modify-syntax-entry lc "w " (standard-syntax-table)) 83 (modify-syntax-entry lc "w " (standard-syntax-table))
92 (modify-syntax-entry lc "w " text-mode-syntax-table) 84 (modify-syntax-entry lc "w " text-mode-syntax-table)
93 (modify-syntax-entry uc "w " (standard-syntax-table)) 85 (modify-syntax-entry uc "w " (standard-syntax-table))
94 (modify-syntax-entry uc "w " text-mode-syntax-table)) 86 (modify-syntax-entry uc "w " text-mode-syntax-table))
95 87
96;;;###autoload 88;;;###autoload
97(defun set-case-syntax (c syntax) 89(defun set-case-syntax (c syntax table)
98 "Make characters C case-invariant with syntax SYNTAX. 90 "Make characters C case-invariant with syntax SYNTAX.
99This sets the entries for character C in the standard case table. 91This sets the entries for character C in TABLE, which is a string
92that will be used as the downcase part of a case table.
100It also modifies `standard-syntax-table' and `text-mode-syntax-table'. 93It also modifies `standard-syntax-table' and `text-mode-syntax-table'.
101SYNTAX should be \" \", \"w\", \".\" or \"_\"." 94SYNTAX should be \" \", \"w\", \".\" or \"_\"."
102 (aset (car (cdr (standard-case-table))) c c) 95 (aset 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))
108 (modify-syntax-entry c syntax (standard-syntax-table)) 96 (modify-syntax-entry c syntax (standard-syntax-table))
109 (modify-syntax-entry c syntax text-mode-syntax-table)) 97 (modify-syntax-entry c syntax text-mode-syntax-table))
110 98