comparison lisp/case-table.el @ 2386:ded35864afbe

(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.
author Richard M. Stallman <rms@gnu.org>
date Sat, 27 Mar 1993 06:29:16 +0000
parents 416abb820252
children d4b85bbedee8
comparison
equal deleted inserted replaced
2385:416abb820252 2386:ded35864afbe
52 (setq i (1+ i))) 52 (setq i (1+ i)))
53 (with-output-to-temp-buffer "*Help*" 53 (with-output-to-temp-buffer "*Help*"
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.
59 This sets the entries for L and R in the standard case table. 59 This sets the entries for L and R in TABLE, which is a string
60 that will be used as the downcase part of a case table.
60 It also modifies `standard-syntax-table', and `text-mode-syntax-table' to 61 It also modifies `standard-syntax-table', and `text-mode-syntax-table' to
61 indicate left and right delimiters." 62 indicate 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) " ")
71 text-mode-syntax-table) 68 text-mode-syntax-table)
72 (modify-syntax-entry r (concat ")" (char-to-string l) " ") 69 (modify-syntax-entry r (concat ")" (char-to-string l) " ")
73 (standard-syntax-table)) 70 (standard-syntax-table))
74 (modify-syntax-entry r (concat ")" (char-to-string l) " ") 71 (modify-syntax-entry r (concat ")" (char-to-string l) " ")
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.
80 This sets the entries for characters UC and LC in the standard case table. 77 This sets the entries for characters UC and LC in TABLE, which is a string
78 that will be used as the downcase part of a case table.
81 It also modifies `standard-syntax-table' and `text-mode-syntax-table' 79 It also modifies `standard-syntax-table' and `text-mode-syntax-table'
82 to indicate an (uppercase, lowercase) pair of letters." 80 to 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.
99 This sets the entries for character C in the standard case table. 91 This sets the entries for character C in TABLE, which is a string
92 that will be used as the downcase part of a case table.
100 It also modifies `standard-syntax-table' and `text-mode-syntax-table'. 93 It also modifies `standard-syntax-table' and `text-mode-syntax-table'.
101 SYNTAX should be \" \", \"w\", \".\" or \"_\"." 94 SYNTAX 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
111 (provide 'case-table) 99 (provide 'case-table)
112 100