Don't quote lambda expressions with `quote'.
[bpt/emacs.git] / lisp / net / tramp-cache.el
index 8a6e9ab..e3e6264 100644 (file)
@@ -1,7 +1,6 @@
 ;;; tramp-cache.el --- file information caching for Tramp
 
-;; Copyright (C) 2000, 2005, 2006, 2007, 2008, 2009,
-;;   2010 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2005-2011 Free Software Foundation, Inc.
 
 ;; Author: Daniel Pittman <daniel@inanna.danann.net>
 ;;         Michael Albinus <michael.albinus@gmx.de>
@@ -34,7 +33,7 @@
 ;; - localname is NIL.  This are reusable properties.  Examples:
 ;;   "remote-shell" identifies the POSIX shell to be called on the
 ;;   remote host, or "perl" is the command to be called on the remote
-;;   host, when starting a Perl script.  These properties are saved in
+;;   host when starting a Perl script.  These properties are saved in
 ;;   the file `tramp-persistency-file-name'.
 ;;
 ;; - localname is a string.  This are temporary properties, which are
@@ -177,7 +176,7 @@ Remove also properties of all files in subdirectories."
                    'directory-file-name (list directory))))
   (tramp-message vec 8 "%s" directory)
     (maphash
-     '(lambda (key value)
+     (lambda (key value)
        (when (and (stringp (tramp-file-name-localname key))
                   (string-match directory (tramp-file-name-localname key)))
          (remhash key tramp-cache-data)))
@@ -200,7 +199,7 @@ Remove also properties of all files in subdirectories."
 (add-hook 'eshell-pre-command-hook 'tramp-flush-file-function)
 (add-hook 'kill-buffer-hook 'tramp-flush-file-function)
 (add-hook 'tramp-cache-unload-hook
-         '(lambda ()
+         (lambda ()
             (remove-hook 'before-revert-hook
                          'tramp-flush-file-function)
             (remove-hook 'eshell-pre-command-hook
@@ -290,7 +289,7 @@ KEY identifies the connection, it is either a process or a vector."
   (when (hash-table-p table)
     (let (result)
       (maphash
-       '(lambda (key value)
+       (lambda (key value)
          (let ((tmp (format
                      "(%s %s)"
                      (if (processp key)
@@ -310,7 +309,7 @@ KEY identifies the connection, it is either a process or a vector."
   "Return a list of all known connection vectors according to `tramp-cache'."
     (let (result)
       (maphash
-       '(lambda (key value)
+       (lambda (key value)
          (when (and (vectorp key) (null (aref key 3)))
            (add-to-list 'result key)))
        tramp-cache-data)
@@ -327,7 +326,7 @@ KEY identifies the connection, it is either a process or a vector."
       (let ((cache (copy-hash-table tramp-cache-data)))
        ;; Remove temporary data.
        (maphash
-        '(lambda (key value)
+        (lambda (key value)
            (if (and (vectorp key) (not (tramp-file-name-localname key)))
                (progn
                  (remhash "process-name" value)
@@ -354,9 +353,10 @@ KEY identifies the connection, it is either a process or a vector."
          (write-region
           (point-min) (point-max) tramp-persistency-file-name))))))
 
-(add-hook 'kill-emacs-hook 'tramp-dump-connection-properties)
+(unless noninteractive
+  (add-hook 'kill-emacs-hook 'tramp-dump-connection-properties))
 (add-hook 'tramp-cache-unload-hook
-         '(lambda ()
+         (lambda ()
             (remove-hook 'kill-emacs-hook
                          'tramp-dump-connection-properties)))
 
@@ -367,7 +367,7 @@ This function is added always in `tramp-get-completion-function'
 for all methods.  Resulting data are derived from connection history."
   (let (res)
     (maphash
-     '(lambda (key value)
+     (lambda (key value)
        (if (and (vectorp key)
                 (string-equal method (tramp-file-name-method key))
                 (not (tramp-file-name-localname key)))