diff options
| author | Kenichi Handa | 2002-10-01 01:33:07 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-10-01 01:33:07 +0000 |
| commit | c57d134498714f3b34bd18e97455731f8a9bb0a7 (patch) | |
| tree | 238f708856c949b56b585248f05b4c99aa874bd0 | |
| parent | 3fec4a06bb5ea8cda005cd77fc9b88d66fa1e946 (diff) | |
| download | emacs-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.el | 15 |
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. |
| 69 | This sets the entries for L and R in TABLE, which is a string | 77 | This sets the entries for L and R in TABLE, which is a string |
| 70 | that will be used as the downcase part of a case table. | 78 | that will be used as the downcase part of a case table. |
| 71 | It also modifies `standard-syntax-table' to | 79 | It also modifies `standard-syntax-table' to |
| 72 | indicate left and right delimiters." | 80 | indicate 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 | |||
| 88 | that will be used as the downcase part of a case table. | 98 | that will be used as the downcase part of a case table. |
| 89 | It also modifies `standard-syntax-table' to give them the syntax of | 99 | It also modifies `standard-syntax-table' to give them the syntax of |
| 90 | word constituents." | 100 | word 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 | |||
| 102 | that will be used as the downcase part of a case table. | 114 | that will be used as the downcase part of a case table. |
| 103 | It also modifies `standard-syntax-table'. | 115 | It also modifies `standard-syntax-table'. |
| 104 | SYNTAX should be \" \", \"w\", \".\" or \"_\"." | 116 | SYNTAX 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) |