]> git.eshelyaron.com Git - emacs.git/commitdiff
(read-envvar-name): Special meaning for MUSTMATCH
authorRichard M. Stallman <rms@gnu.org>
Wed, 5 Oct 1994 06:29:50 +0000 (06:29 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 5 Oct 1994 06:29:50 +0000 (06:29 +0000)
neither t nor nil.
(setenv): Use that new case, when clearing a var.

lisp/env.el

index b285da4847b09d1cebd4c87b702c9559969dd90b..6a01a690d4071036b779dc10e4bc2190cd099fa7 100644 (file)
@@ -35,7 +35,8 @@
 
 (defun read-envvar-name (prompt &optional mustmatch)
   "Read environment variable name, prompting with PROMPT.
-Optional second arg MUSTMATCH, if non-nil, means require existing envvar name."
+Optional second arg MUSTMATCH, if non-nil, means require existing envvar name.
+If it is also not t, RET does not exit if it does non-null completion."
   (completing-read prompt
                   (mapcar (function
                            (lambda (enventry)
@@ -60,7 +61,7 @@ appears at the front of the history list when you type in the new value.
 This function works by modifying `process-environment'."
   (interactive
    (if current-prefix-arg
-       (list (read-envvar-name "Clear environment variable: " t) nil t)
+       (list (read-envvar-name "Clear environment variable: " 'exact) nil t)
      (let* ((var (read-envvar-name "Set environment variable: " nil))
            (oldval (getenv var))
            newval