aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-05-23 18:23:31 +0000
committerRichard M. Stallman1997-05-23 18:23:31 +0000
commitc9e83877851bb4ebe80bf2ed3d2fba393345af98 (patch)
treed316bf239482d67f2b829b3cc95fdc7aae295326
parentf5e52cd3037bfb261c7346ec9f6ca79f9f23eb89 (diff)
downloademacs-c9e83877851bb4ebe80bf2ed3d2fba393345af98.tar.gz
emacs-c9e83877851bb4ebe80bf2ed3d2fba393345af98.zip
(set-case-syntax-1): New function.
(set-case-syntax-delims): Use set-case-syntax-1. (set-case-syntax-pair, set-case-syntax): Likewise.
-rw-r--r--lisp/case-table.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/case-table.el b/lisp/case-table.el
index d34cdc37db9..5f5e6699b95 100644
--- a/lisp/case-table.el
+++ b/lisp/case-table.el
@@ -71,6 +71,12 @@
71 (set-char-table-extra-slot copy 2 nil) 71 (set-char-table-extra-slot copy 2 nil)
72 copy)) 72 copy))
73 73
74(defsubst set-case-syntax-1 (char)
75 "Offset CHAR by `set-case-syntax-offset' if CHAR is a non-ASCII 8-bit char."
76 (if (and (>= char 128) (< char 256))
77 (+ char set-case-syntax-offset)
78 char))
79
74;;;###autoload 80;;;###autoload
75(defun set-case-syntax-delims (l r table) 81(defun set-case-syntax-delims (l r table)
76 "Make characters L and R a matching pair of non-case-converting delimiters. 82 "Make characters L and R a matching pair of non-case-converting delimiters.
@@ -78,8 +84,8 @@ This sets the entries for L and R in TABLE, which is a string
78that will be used as the downcase part of a case table. 84that will be used as the downcase part of a case table.
79It also modifies `standard-syntax-table' to 85It also modifies `standard-syntax-table' to
80indicate left and right delimiters." 86indicate left and right delimiters."
81 (setq l (+ set-case-syntax-offset l)) 87 (setq l (set-case-syntax-1 l))
82 (setq r (+ set-case-syntax-offset r)) 88 (setq r (set-case-syntax-1 r))
83 (aset table l l) 89 (aset table l l)
84 (aset table r r) 90 (aset table r r)
85 ;; Clear out the extra slots so that they will be 91 ;; Clear out the extra slots so that they will be
@@ -99,8 +105,8 @@ This sets the entries for characters UC and LC in TABLE, which is a string
99that will be used as the downcase part of a case table. 105that will be used as the downcase part of a case table.
100It also modifies `standard-syntax-table' to give them the syntax of 106It also modifies `standard-syntax-table' to give them the syntax of
101word constituents." 107word constituents."
102 (setq uc (+ set-case-syntax-offset uc)) 108 (setq uc (set-case-syntax-1 uc))
103 (setq lc (+ set-case-syntax-offset lc)) 109 (setq lc (set-case-syntax-1 lc))
104 (aset table uc lc) 110 (aset table uc lc)
105 (aset table lc lc) 111 (aset table lc lc)
106 (set-char-table-extra-slot table 0 nil) 112 (set-char-table-extra-slot table 0 nil)
@@ -116,7 +122,7 @@ This sets the entry for character C in TABLE, which is a string
116that will be used as the downcase part of a case table. 122that will be used as the downcase part of a case table.
117It also modifies `standard-syntax-table'. 123It also modifies `standard-syntax-table'.
118SYNTAX should be \" \", \"w\", \".\" or \"_\"." 124SYNTAX should be \" \", \"w\", \".\" or \"_\"."
119 (setq c (+ set-case-syntax-offset c)) 125 (setq c (set-case-syntax-1 c))
120 (aset table c c) 126 (aset table c c)
121 (set-char-table-extra-slot table 0 nil) 127 (set-char-table-extra-slot table 0 nil)
122 (set-char-table-extra-slot table 1 nil) 128 (set-char-table-extra-slot table 1 nil)