From 02c1bd081b9fb5f8fc59bd7c14bd89c58736bd91 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 5 Oct 2000 23:47:14 +0000 Subject: [PATCH] (compile-collect-regexps): Use dolist and push. --- lisp/progmodes/compile.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 44556d8185f..77bf8bf0ad0 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1987,11 +1987,8 @@ An error message with no file name and no file name has been seen earlier")) ;; Add elements to variable compilation-regexps that is bound in ;; compilation-parse-errors. (and (not (eq this t)) - (while this - (setq compilation-regexps - (cons (cons (car (car this)) (cons type (cdr (car this)))) - compilation-regexps)) - (setq this (cdr this))))) + (dolist (el this) + (push (cons (car el) (cons type (cdr el))) compilation-regexps)))) (defun compile-buffer-substring (index) "Get substring matched by INDEXth subexpression." -- 2.39.2