aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2002-10-01 01:33:07 +0000
committerKenichi Handa2002-10-01 01:33:07 +0000
commitc57d134498714f3b34bd18e97455731f8a9bb0a7 (patch)
tree238f708856c949b56b585248f05b4c99aa874bd0
parent3fec4a06bb5ea8cda005cd77fc9b88d66fa1e946 (diff)
downloademacs-c57d134498714f3b34bd18e97455731f8a9bb0a7.tar.gz
emacs-c57d134498714f3b34bd18e97455731f8a9bb0a7.zip
(set-case-syntax-set-multibyte): This variable
deleted. (set-case-syntax-charset): New variable. (set-case-syntax-1): New function. (set-case-syntax-delims, set-case-syntax-pair, set-case-syntax): Call set-case-syntax-1 on arguments.
-rw-r--r--lisp/case-table.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/case-table.el b/lisp/case-table.el
index 50458353970..0c411dab7a5 100644
--- a/lisp/case-table.el
+++ b/lisp/case-table.el
@@ -27,7 +27,9 @@
27 27
28;;; Code: 28;;; Code:
29 29
30(defvar set-case-syntax-set-multibyte nil) 30;; Temporary workaround for loading latin-X.el. They must bind this
31;; variable to a charset to convert code points to characters.
32(defvar set-case-syntax-charset nil)
31 33
32(defun describe-buffer-case-table () 34(defun describe-buffer-case-table ()
33 "Describe the case table of the current buffer." 35 "Describe the case table of the current buffer."
@@ -64,12 +66,20 @@
64 (set-char-table-extra-slot copy 2 nil) 66 (set-char-table-extra-slot copy 2 nil)
65 copy)) 67 copy))
66 68
69(defun set-case-syntax-1 (code)
70 (if (and (charsetp set-case-syntax-charset)
71 (< code 256))
72 (decode-char set-case-syntax-charset code)
73 code))
74
67(defun set-case-syntax-delims (l r table) 75(defun set-case-syntax-delims (l r table)
68 "Make characters L and R a matching pair of non-case-converting delimiters. 76 "Make characters L and R a matching pair of non-case-converting delimiters.
69This sets the entries for L and R in TABLE, which is a string 77This sets the entries for L and R in TABLE, which is a string
70that will be used as the downcase part of a case table. 78that will be used as the downcase part of a case table.
71It also modifies `standard-syntax-table' to 79It also modifies `standard-syntax-table' to
72indicate left and right delimiters." 80indicate left and right delimiters."
81 (setq l (set-case-syntax-1 l))
82 (setq r (set-case-syntax-1 r))
73 (aset table l l) 83 (aset table l l)
74 (aset table r r) 84 (aset table r r)
75 ;; Clear out the extra slots so that they will be 85 ;; Clear out the extra slots so that they will be
@@ -88,6 +98,8 @@ This sets the entries for characters UC and LC in TABLE, which is a string
88that will be used as the downcase part of a case table. 98that will be used as the downcase part of a case table.
89It also modifies `standard-syntax-table' to give them the syntax of 99It also modifies `standard-syntax-table' to give them the syntax of
90word constituents." 100word constituents."
101 (setq uc (set-case-syntax-1 uc))
102 (setq lc (set-case-syntax-1 lc))
91 (aset table uc lc) 103 (aset table uc lc)
92 (aset table lc lc) 104 (aset table lc lc)
93 (set-char-table-extra-slot table 0 nil) 105 (set-char-table-extra-slot table 0 nil)
@@ -102,6 +114,7 @@ This sets the entry for character C in TABLE, which is a string
102that will be used as the downcase part of a case table. 114that will be used as the downcase part of a case table.
103It also modifies `standard-syntax-table'. 115It also modifies `standard-syntax-table'.
104SYNTAX should be \" \", \"w\", \".\" or \"_\"." 116SYNTAX should be \" \", \"w\", \".\" or \"_\"."
117 (setq c (set-case-syntax-1 c))
105 (aset table c c) 118 (aset table c c)
106 (set-char-table-extra-slot table 0 nil) 119 (set-char-table-extra-slot table 0 nil)
107 (set-char-table-extra-slot table 1 nil) 120 (set-char-table-extra-slot table 1 nil)