不要な関数を削除
@@ -6,40 +6,11 @@ | ||
6 | 6 | `(let ((it ,exp)) |
7 | 7 | (if it ,then ,else))) |
8 | 8 | |
9 | -(defmacro muffle-warn (&body body) | |
10 | - `(locally | |
11 | - #+SBCL (declare (sb-ext:muffle-conditions sb-ext:compiler-note)) | |
12 | - ,@body)) | |
13 | - | |
14 | -(defmacro each-char-code ((code string &key return (start 0) end) &body body) | |
15 | - (let ((i (gensym))) | |
16 | - `(do* ((,i ,start (1+ ,i)) | |
17 | - (,code #1=(char-code (char ,string ,i)) #1#)) | |
18 | - ((>= ,i ,(or end `(length ,string))) ,return) | |
19 | - (declare (array-index ,i)) | |
20 | - ,@body))) | |
21 | - | |
22 | 9 | (defmacro each-code ((code charseq &key return) &body body) |
23 | 10 | `(charseq:each (#1=#:char ,charseq ,return) |
24 | 11 | (let ((,code (char-code #1#))) |
25 | 12 | ,@body))) |
26 | 13 | |
27 | -(defun to-simple-characters (source start end) | |
28 | - (let ((dist (make-array (- end start) :element-type 'character))) | |
29 | - (loop FOR i FROM start BELOW end | |
30 | - FOR j FROM 0 DO | |
31 | - (setf (aref dist j) (muffle-warn (aref source i)))) | |
32 | - dist)) | |
33 | - | |
34 | -;; TODO: delete | |
35 | -(defmacro ensure-simple-characters ((s start end) &body body) | |
36 | - `(multiple-value-bind (,s ,start ,end) | |
37 | - (etypecase ,s | |
38 | - (simple-characters (values ,s ,start ,end)) | |
39 | - (string (values (to-simple-characters ,s ,start ,end) 0 (- ,end ,start)))) | |
40 | - (declare (simple-characters ,s)) | |
41 | - ,@body)) | |
42 | - | |
43 | 14 | (defmacro defconst-onceonly (name value &optional doc) |
44 | 15 | `(defconstant ,name (if (boundp ',name) (symbol-value ',name) ,value) |
45 | 16 | ,@(when doc (list doc)))) |