]> code.delx.au - gnu-emacs/blobdiff - lisp/env.el
* tramp.texi (top) [xxx, yyy, trampfn]: Provide two versions of
[gnu-emacs] / lisp / env.el
index 8d8bebe09ba20aa24a79790b0cf7d9091efb0588..9e3aed95f8a4aa8699ab2e3b791077eba43677f6 100644 (file)
@@ -1,10 +1,10 @@
 ;;; env.el --- functions to manipulate environment variables
 
-;; Copyright (C) 1991, 1994, 2000, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1994, 2000-2013 Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: processes, unix
+;; Package: emacs
 
 ;; This file is part of GNU Emacs.
 
@@ -34,8 +34,6 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
-
 ;; History list for environment variable names.
 (defvar read-envvar-name-history nil)
 
@@ -198,14 +196,15 @@ in the environment list of the selected frame."
                                    (encode-coding-string
                                     variable locale-coding-system)
                                  variable)
-                               frame)))
+                               (and frame
+                                    (assq 'environment
+                                          (frame-parameters frame))))))
     (if (and enable-multibyte-characters value)
        (setq value (decode-coding-string value locale-coding-system)))
-    (when (interactive-p)
+    (when (called-interactively-p 'interactive)
       (message "%s" (if value value "Not set")))
     value))
 
 (provide 'env)
 
-;; arch-tag: b7d6a8f7-bc81-46db-8e39-8d721d4ed0b8
 ;;; env.el ends here