Commit 971571b9 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

entered into RCS

parent 35a4d143
;;; setenv.el --- functions to manipulate environment variables.
;;; Copyright Free Software Foundation 1991
;; Maintainer: FSF
;; Last-Modified: 16 Mar 1992
;; Keywords: extensions
;;; Copyright Free Software Foundation 1991
;;; This file is part of GNU Emacs.
;;; GNU Emacs is free software; you can redistribute it and/or modify
......@@ -28,9 +27,10 @@
"Set the value of the environment variable named VARIABLE to VALUE.
VARIABLE and VALUE should both be strings.
This function works by modifying process-environment."
(interactive "sSet environment variable: \nsSet %s to value: ")
(if (string-match "=" variable)
(error "name of environment variable contains an '=' character")
(let ((pattern (concat "^" (regexp-quote (concat variable "="))))
(error "Environment variable name contains `='")
(let ((pattern (concat "\\`" (regexp-quote (concat variable "="))))
(scan process-environment))
(while scan
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment