Mercurial > emacs
comparison lisp/emacs-lisp/sregex.el @ 84904:e2e245301b8c
(sregex--char-aux): Use `mapc' rather than `mapcar'.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Wed, 26 Sep 2007 00:15:54 +0000 |
parents | 935157c0b596 |
children | 107ccd98fa12 bdb3fe0ba9fa |
comparison
equal
deleted
inserted
replaced
84903:a164ccfc4d79 | 84904:e2e245301b8c |
---|---|
563 (defun sregex--char-aux (complement args) | 563 (defun sregex--char-aux (complement args) |
564 ;; regex-opt does the same, we should join effort. | 564 ;; regex-opt does the same, we should join effort. |
565 (let ((chars (make-bool-vector 256 nil))) ; Yeah, right! | 565 (let ((chars (make-bool-vector 256 nil))) ; Yeah, right! |
566 (dolist (arg args) | 566 (dolist (arg args) |
567 (cond ((integerp arg) (aset chars arg t)) | 567 (cond ((integerp arg) (aset chars arg t)) |
568 ((stringp arg) (mapcar (lambda (c) (aset chars c t)) arg)) | 568 ((stringp arg) (mapc (lambda (c) (aset chars c t)) arg)) |
569 ((consp arg) | 569 ((consp arg) |
570 (let ((start (car arg)) | 570 (let ((start (car arg)) |
571 (end (cdr arg))) | 571 (end (cdr arg))) |
572 (when (> start end) | 572 (when (> start end) |
573 (let ((tmp start)) (setq start end) (setq end tmp))) | 573 (let ((tmp start)) (setq start end) (setq end tmp))) |