diff options
| author | Kenichi Handa | 2002-03-01 02:01:36 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-03-01 02:01:36 +0000 |
| commit | 6466bb34d95d45b9409fb7a7e1956981c0e16aec (patch) | |
| tree | 04d392bc4d8c7745974863c0d492e18b56230f29 | |
| parent | 47351009e6397b8e2db50586d8227afb6787b5b3 (diff) | |
| download | emacs-6466bb34d95d45b9409fb7a7e1956981c0e16aec.tar.gz emacs-6466bb34d95d45b9409fb7a7e1956981c0e16aec.zip | |
(regexp-opt-charset): Adjusted for the
change of map-char-table.
| -rw-r--r-- | lisp/emacs-lisp/regexp-opt.el | 14 |
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." | |||
| 258 | (map-char-table | 258 | (map-char-table |
| 259 | (lambda (c v) | 259 | (lambda (c v) |
| 260 | (when v | 260 | (when v |
| 261 | (if (= (1- c) end) (setq end c) | 261 | (if (consp c) |
| 262 | (if (> end (+ start 2)) | 262 | (if (= (1- (car c)) end) (setq end (cdr c)) |
| 263 | (if (> end (+ start 2)) | ||
| 264 | (setq charset (format "%s%c-%c" charset start end)) | ||
| 265 | (while (>= end start) | ||
| 266 | (setq charset (format "%s%c" charset start)) | ||
| 267 | (incf start))) | ||
| 268 | (setq start (car c) end (cdr c))) | ||
| 269 | (if (= (1- c) end) (setq end c) | ||
| 270 | (if (> end (+ start 2)) | ||
| 263 | (setq charset (format "%s%c-%c" charset start end)) | 271 | (setq charset (format "%s%c-%c" charset start end)) |
| 264 | (while (>= end start) | 272 | (while (>= end start) |
| 265 | (setq charset (format "%s%c" charset start)) | 273 | (setq charset (format "%s%c" charset start)) |
| 266 | (incf start))) | 274 | (incf start))) |
| 267 | (setq start c end c)))) | 275 | (setq start c end c))))) |
| 268 | charmap) | 276 | charmap) |
| 269 | (when (>= end start) | 277 | (when (>= end start) |
| 270 | (if (> end (+ start 2)) | 278 | (if (> end (+ start 2)) |