]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/regexp-opt.el
*** empty log message ***
[gnu-emacs] / lisp / emacs-lisp / regexp-opt.el
index 11a66aa2a147b7de13bbb3762605e4673e4fccf3..c85f83e85e3067061fa8c8e7307de27635f69617 100644 (file)
@@ -277,13 +277,21 @@ in REGEXP."
     (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))