changeset 88401:8eba780a3a36

(regexp-opt-charset): Adjusted for the change of map-char-table.
author Kenichi Handa <handa@m17n.org>
date Fri, 01 Mar 2002 02:01:36 +0000
parents 014f40eb1c88
children 3e3e42664df2
files lisp/emacs-lisp/regexp-opt.el
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/regexp-opt.el	Fri Mar 01 02:00:58 2002 +0000
+++ b/lisp/emacs-lisp/regexp-opt.el	Fri Mar 01 02:01:36 2002 +0000
@@ -258,13 +258,21 @@
     (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))