[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104661: * net/tramp-cache.el (top):
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104661: * net/tramp-cache.el (top): Don't load the persistency file when |
Date: |
Tue, 21 Jun 2011 21:51:26 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104661
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Tue 2011-06-21 21:51:26 +0200
message:
* net/tramp-cache.el (top): Don't load the persistency file when
"emacs -Q" has been called.
modified:
lisp/ChangeLog
lisp/net/tramp-cache.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-06-21 18:45:36 +0000
+++ b/lisp/ChangeLog 2011-06-21 19:51:26 +0000
@@ -1,3 +1,8 @@
+2011-06-21 Michael Albinus <address@hidden>
+
+ * net/tramp-cache.el (top): Don't load the persistency file when
+ "emacs -Q" has been called.
+
2011-06-21 Tim Harper <address@hidden>
* term/ns-win.el (ns-initialize-window-system): set
=== modified file 'lisp/net/tramp-cache.el'
--- a/lisp/net/tramp-cache.el 2011-05-23 17:57:17 +0000
+++ b/lisp/net/tramp-cache.el 2011-06-21 19:51:26 +0000
@@ -177,9 +177,9 @@
(tramp-message vec 8 "%s" directory)
(maphash
(lambda (key value)
- (when (and (stringp (tramp-file-name-localname key))
- (string-match directory (tramp-file-name-localname key)))
- (remhash key tramp-cache-data)))
+ (when (and (stringp (tramp-file-name-localname key))
+ (string-match directory (tramp-file-name-localname key)))
+ (remhash key tramp-cache-data)))
tramp-cache-data)))
;; Reverting or killing a buffer should also flush file properties.
@@ -200,12 +200,12 @@
(add-hook 'kill-buffer-hook 'tramp-flush-file-function)
(add-hook 'tramp-cache-unload-hook
(lambda ()
- (remove-hook 'before-revert-hook
- 'tramp-flush-file-function)
- (remove-hook 'eshell-pre-command-hook
- 'tramp-flush-file-function)
- (remove-hook 'kill-buffer-hook
- 'tramp-flush-file-function)))
+ (remove-hook 'before-revert-hook
+ 'tramp-flush-file-function)
+ (remove-hook 'eshell-pre-command-hook
+ 'tramp-flush-file-function)
+ (remove-hook 'kill-buffer-hook
+ 'tramp-flush-file-function)))
;;; -- Properties --
@@ -290,17 +290,17 @@
(let (result)
(maphash
(lambda (key value)
- (let ((tmp (format
- "(%s %s)"
- (if (processp key)
- (prin1-to-string (prin1-to-string key))
- (prin1-to-string key))
- (if (hash-table-p value)
- (tramp-cache-print value)
- (if (bufferp value)
- (prin1-to-string (prin1-to-string value))
- (prin1-to-string value))))))
- (setq result (if result (concat result " " tmp) tmp))))
+ (let ((tmp (format
+ "(%s %s)"
+ (if (processp key)
+ (prin1-to-string (prin1-to-string key))
+ (prin1-to-string key))
+ (if (hash-table-p value)
+ (tramp-cache-print value)
+ (if (bufferp value)
+ (prin1-to-string (prin1-to-string value))
+ (prin1-to-string value))))))
+ (setq result (if result (concat result " " tmp) tmp))))
table)
result)))
@@ -310,8 +310,8 @@
(let (result)
(maphash
(lambda (key value)
- (when (and (vectorp key) (null (aref key 3)))
- (add-to-list 'result key)))
+ (when (and (vectorp key) (null (aref key 3)))
+ (add-to-list 'result key)))
tramp-cache-data)
result))
@@ -327,12 +327,12 @@
;; Remove temporary data.
(maphash
(lambda (key value)
- (if (and (vectorp key) (not (tramp-file-name-localname key)))
- (progn
- (remhash "process-name" value)
- (remhash "process-buffer" value)
- (remhash "first-password-request" value))
- (remhash key cache)))
+ (if (and (vectorp key) (not (tramp-file-name-localname key)))
+ (progn
+ (remhash "process-name" value)
+ (remhash "process-buffer" value)
+ (remhash "first-password-request" value))
+ (remhash key cache)))
cache)
;; Dump it.
(with-temp-buffer
@@ -357,8 +357,8 @@
(add-hook 'kill-emacs-hook 'tramp-dump-connection-properties))
(add-hook 'tramp-cache-unload-hook
(lambda ()
- (remove-hook 'kill-emacs-hook
- 'tramp-dump-connection-properties)))
+ (remove-hook 'kill-emacs-hook
+ 'tramp-dump-connection-properties)))
;;;###tramp-autoload
(defun tramp-parse-connection-properties (method)
@@ -368,18 +368,22 @@
(let (res)
(maphash
(lambda (key value)
- (if (and (vectorp key)
- (string-equal method (tramp-file-name-method key))
- (not (tramp-file-name-localname key)))
- (push (list (tramp-file-name-user key)
- (tramp-file-name-host key))
- res)))
+ (if (and (vectorp key)
+ (string-equal method (tramp-file-name-method key))
+ (not (tramp-file-name-localname key)))
+ (push (list (tramp-file-name-user key)
+ (tramp-file-name-host key))
+ res)))
tramp-cache-data)
res))
;; Read persistent connection history.
(when (and (stringp tramp-persistency-file-name)
- (zerop (hash-table-count tramp-cache-data)))
+ (zerop (hash-table-count tramp-cache-data))
+ ;; When "emacs -Q" has been called, both variables are nil.
+ ;; We do not load the persistency file then, in order to
+ ;; have a clean test environment.
+ (or init-file-user site-run-file))
(condition-case err
(with-temp-buffer
(insert-file-contents tramp-persistency-file-name)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104661: * net/tramp-cache.el (top): Don't load the persistency file when,
Michael Albinus <=