Commit 7693a7fb authored by David Byers's avatar David Byers

Fix lyskom-make-re-case-insensitive for older emacsen

parent 124b7e74
2000-11-30 David Byers <davby@ida.liu.se>
* commands1.el (lyskom-make-re-case-insensitive): Eliminate use of
split-string since it doesn't exist in all Emacsen (and fails in
XEmacs).
2000-11-29 David Byers <davby@sen5.ida.liu.se>
* Release av 0.46.1-BETA-3
......
......@@ -1638,40 +1638,40 @@ If you are not member in the conference it will be flagged with an asterisk."
(setq lyskom-char-classes
(lyskom-compute-char-classes lyskom-collate-table)))
(let ((res nil)
(input (split-string re ""))
(input (listify-vector re))
val)
(while input
(cond
;; Copy "[]" character sets literally.
((string= (car input) "[")
((eq (car input) ?\[)
(setq res (cons "[" res))
(setq input (cdr input))
(when input ;Handle "[]asdf]" properly.
(setq res (cons (car input) res))
(setq res (cons (make-string 1 (car input)) res))
(setq input (cdr input)))
(while (and input (not (string= (car input) "]")))
(setq res (cons (car input) res))
(while (and input (not (eq (car input) ?\])))
(setq res (cons (make-string 1 (car input)) res))
(setq input (cdr input)))
(when input ;Don't forget the terminating "]".
(setq res (cons (car input) res))
(setq res (cons (make-string 1 (car input)) res))
(setq input (cdr input))))
;; Copy backslashed sequences literally.
((string= (car input) "\\")
((eq (car input) ?\\)
(setq res (cons "\\" res))
(setq input (cdr input))
(when input
(setq res (cons (car input) res))
(setq res (cons (make-string 1 (car input)) res))
(setq input (cdr input))))
;; Copy special characters literally.
((member (car input) '("(" ")" "|" "+" "*" "?"))
(setq res (cons (car input) res))
((memq (car input) '(?\( ?\) ?\| ?+ ?\* ?\?))
(setq res (cons (make-string 1 (car input)) res))
(setq input (cdr input)))
;; Create "[]" character sets for equivalent characters.
((setq val (cdr-safe (assoc (aref (car input) 0) lyskom-char-classes)))
((setq val (cdr-safe (assoc (car input) lyskom-char-classes)))
(setq res (cons "[" res))
(if (member "]" val) ;"]" must come first.
(setq res (cons "]" res)))
......@@ -1688,7 +1688,7 @@ If you are not member in the conference it will be flagged with an asterisk."
;; Copy other characters literally.
(t
(setq res (cons (car input) res))
(setq res (cons (make-string 1 (car input)) res))
(setq input (cdr input)))))
(apply 'concat (nreverse res))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment