27 |
|
|
28 |
;;; Code: |
;;; Code: |
29 |
|
|
30 |
(defvar set-case-syntax-set-multibyte nil) |
;; 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) |
33 |
|
|
34 |
(defun describe-buffer-case-table () |
(defun describe-buffer-case-table () |
35 |
"Describe the case table of the current buffer." |
"Describe the case table of the current buffer." |
66 |
(set-char-table-extra-slot copy 2 nil) |
(set-char-table-extra-slot copy 2 nil) |
67 |
copy)) |
copy)) |
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 |
|
|
75 |
(defun set-case-syntax-delims (l r table) |
(defun set-case-syntax-delims (l r table) |
76 |
"Make characters L and R a matching pair of non-case-converting delimiters. |
"Make characters L and R a matching pair of non-case-converting delimiters. |
77 |
This sets the entries for L and R in TABLE, which is a string |
This sets the entries for L and R in TABLE, which is a string |
78 |
that will be used as the downcase part of a case table. |
that will be used as the downcase part of a case table. |
79 |
It also modifies `standard-syntax-table' to |
It also modifies `standard-syntax-table' to |
80 |
indicate left and right delimiters." |
indicate left and right delimiters." |
81 |
|
(setq l (set-case-syntax-1 l)) |
82 |
|
(setq r (set-case-syntax-1 r)) |
83 |
(aset table l l) |
(aset table l l) |
84 |
(aset table r r) |
(aset table r r) |
85 |
;; Clear out the extra slots so that they will be |
;; Clear out the extra slots so that they will be |
98 |
that will be used as the downcase part of a case table. |
that will be used as the downcase part of a case table. |
99 |
It also modifies `standard-syntax-table' to give them the syntax of |
It also modifies `standard-syntax-table' to give them the syntax of |
100 |
word constituents." |
word constituents." |
101 |
|
(setq uc (set-case-syntax-1 uc)) |
102 |
|
(setq lc (set-case-syntax-1 lc)) |
103 |
(aset table uc lc) |
(aset table uc lc) |
104 |
(aset table lc lc) |
(aset table lc lc) |
105 |
(set-char-table-extra-slot table 0 nil) |
(set-char-table-extra-slot table 0 nil) |
114 |
that will be used as the downcase part of a case table. |
that will be used as the downcase part of a case table. |
115 |
It also modifies `standard-syntax-table'. |
It also modifies `standard-syntax-table'. |
116 |
SYNTAX should be \" \", \"w\", \".\" or \"_\"." |
SYNTAX should be \" \", \"w\", \".\" or \"_\"." |
117 |
|
(setq c (set-case-syntax-1 c)) |
118 |
(aset table c c) |
(aset table c c) |
119 |
(set-char-table-extra-slot table 0 nil) |
(set-char-table-extra-slot table 0 nil) |
120 |
(set-char-table-extra-slot table 1 nil) |
(set-char-table-extra-slot table 1 nil) |