Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bbn!gateway!DINO.BBN.COM!kanderso From: kanderso@DINO.BBN.COM Newsgroups: comp.emacs Subject: Re: apply, mapcar, lack of setenv Message-ID: <40832@bbn.COM> Date: 2 Jun 89 15:24:19 GMT References: Sender: news@bbn.COM Organization: BBN news/mail gateway Lines: 9 In most lisps you can't apply things like 'or or 'and because the are special forms, not functions. Here is a recursive function that may do what you want. you could also use while. (defun setenv (name new environment) (if (null environment) environment (if (= (string-match (format "%s=" name) (car environment)) 0) (cons (format "%s=%s" name new) (cdr environment)) (cons (car environment) (setenv name new (cdr environment))))))