]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/regexp-opt.el
Merge from emacs--devo--0
[gnu-emacs] / lisp / emacs-lisp / regexp-opt.el
index 34cd97775dcc888598b6a74ec08c7be2b7dfcbc0..9f75578e09dea570cd7128c1309edd444ebcf99b 100644 (file)
@@ -263,13 +263,21 @@ This means the number of non-shy regexp grouping constructs
     (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))