summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/regexp-opt.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2002-03-01 02:01:36 +0000
committerKenichi Handa <handa@m17n.org>2002-03-01 02:01:36 +0000
commit6466bb34d95d45b9409fb7a7e1956981c0e16aec (patch)
tree04d392bc4d8c7745974863c0d492e18b56230f29 /lisp/emacs-lisp/regexp-opt.el
parent47351009e6397b8e2db50586d8227afb6787b5b3 (diff)
downloademacs-6466bb34d95d45b9409fb7a7e1956981c0e16aec.tar.gz
(regexp-opt-charset): Adjusted for the
change of map-char-table.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
-rw-r--r--lisp/emacs-lisp/regexp-opt.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el
index e46ad2ca3e5..63253ed0e67 100644
--- a/lisp/emacs-lisp/regexp-opt.el
+++ b/lisp/emacs-lisp/regexp-opt.el
@@ -258,13 +258,21 @@ so we can use character sets rather than grouping parenthesis."
(map-char-table
(lambda (c v)
(when v
- (if (= (1- c) end) (setq end c)
- (if (> end (+ start 2))
+ (if (consp c)
+ (if (= (1- (car c)) end) (setq end (cdr c))
+ (if (> end (+ start 2))
+ (setq charset (format "%s%c-%c" charset start end))
+ (while (>= end start)
+ (setq charset (format "%s%c" charset start))
+ (incf start)))
+ (setq start (car c) end (cdr c)))
+ (if (= (1- c) end) (setq end c)
+ (if (> end (+ start 2))
(setq charset (format "%s%c-%c" charset start end))
(while (>= end start)
(setq charset (format "%s%c" charset start))
(incf start)))
- (setq start c end c))))
+ (setq start c end c)))))
charmap)
(when (>= end start)
(if (> end (+ start 2))