]> git.eshelyaron.com Git - emacs.git/commitdiff
(regexp-opt-charset): Adjusted for the
authorKenichi Handa <handa@m17n.org>
Fri, 1 Mar 2002 02:01:36 +0000 (02:01 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 1 Mar 2002 02:01:36 +0000 (02:01 +0000)
change of map-char-table.

lisp/emacs-lisp/regexp-opt.el

index e46ad2ca3e58ff292281b5afa8560c8728df42d4..63253ed0e676be86a6592470913c4f1eb12906d9 100644 (file)
@@ -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))