Function: read-envvar-name
read-envvar-name is a byte-compiled function defined in env.el.gz.
Signature
(read-envvar-name PROMPT &optional MUSTMATCH)
Documentation
Read and return an environment variable name string, prompting with PROMPT.
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.
Source Code
;; Defined in /usr/src/emacs/lisp/env.el.gz
(defun read-envvar-name (prompt &optional mustmatch)
"Read and return an environment variable name string, prompting with PROMPT.
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 (lambda (enventry)
(let ((str (substring enventry 0
(string-search "=" enventry))))
(if (multibyte-string-p str)
(decode-coding-string
str locale-coding-system t)
str)))
(append process-environment
;;(frame-environment)
))
nil mustmatch nil 'read-envvar-name-history))