* lisp/net/shr.el (shr-count):
* lisp/progmodes/idlwave.el (idlwave-count-memq): Use seq-count.
(idlwave-count-eq): Use seq-count. Make obsolete, as it is unused.
columns))
(defun shr-count (dom elem)
- (let ((i 0))
- (dolist (sub (dom-children dom))
- (when (and (not (stringp sub))
- (eq (dom-tag sub) elem))
- (setq i (1+ i))))
- i))
+ (seq-count (lambda (x)
+ (and (not (stringp sub))
+ (eq (dom-tag sub) elem)))
+ (dom-children dom)))
(defun shr-max-columns (dom)
(let ((max 0)
(defun idlwave-count-eq (elt list)
"How often is ELT in LIST?"
- (length (delq nil (mapcar (lambda (x) (eq x elt)) list))))
+ (declare (obsolete nil "30.1"))
+ (seq-count (lambda (x) (eq x elt)) list))
(defun idlwave-count-memq (elt alist)
"How often is ELT a key in ALIST?"
- (length (delq nil (mapcar (lambda (x) (eq (car x) elt)) alist))))
+ (seq-count (lambda (x) (eq (car x) elt)) alist))
(defun idlwave-syslib-p (file)
"Non-nil if FILE is in the system library."