*** /home/albinus/src/tramp/lisp/tramp-cache.el 2006-10-24 07:31:27.000000000 +0200 --- /home/albinus/src/tramp/lisp/tramp-cache.el.~2.20.~ 2006-08-12 15:19:30.000000000 +0200 *************** *** 1,4 **** ! ;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*- ;;; tramp-cache.el --- file information caching for Tramp ;; Copyright (C) 2000, 2005, 2006 by Free Software Foundation, Inc. --- 1,4 ---- ! ;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; byte-compile-dynamic: t; -*- ;;; tramp-cache.el --- file information caching for Tramp ;; Copyright (C) 2000, 2005, 2006 by Free Software Foundation, Inc. *************** *** 53,68 **** ;; Pacify byte-compiler. (eval-when-compile - (require 'cl) (autoload 'tramp-message "tramp") (autoload 'tramp-tramp-file-p "tramp") - ;; We cannot autoload macro `with-parsed-tramp-file-name', it - ;; results in problems of byte-compiled code. - (autoload 'tramp-dissect-file-name "tramp") (autoload 'tramp-file-name-method "tramp") (autoload 'tramp-file-name-user "tramp") (autoload 'tramp-file-name-host "tramp") (autoload 'tramp-file-name-localname "tramp") (autoload 'time-stamp-string "time-stamp")) ;;; -- Cache -- --- 53,65 ---- ;; Pacify byte-compiler. (eval-when-compile (autoload 'tramp-message "tramp") (autoload 'tramp-tramp-file-p "tramp") (autoload 'tramp-file-name-method "tramp") (autoload 'tramp-file-name-user "tramp") (autoload 'tramp-file-name-host "tramp") (autoload 'tramp-file-name-localname "tramp") + (autoload 'with-parsed-tramp-file-name "tramp") (autoload 'time-stamp-string "time-stamp")) ;;; -- Cache -- *************** *** 167,176 **** ;; have been changed outside Tramp. (defun tramp-cache-before-revert-function () "Flush all Tramp cache properties from buffer-file-name." ! (let ((bfn (buffer-file-name))) (when (and (stringp bfn) (tramp-tramp-file-p bfn)) ! (let* ((v (tramp-dissect-file-name bfn)) ! (localname (tramp-file-name-localname v))) (tramp-flush-file-property v localname))))) (add-hook 'before-revert-hook 'tramp-cache-before-revert-function) --- 164,174 ---- ;; have been changed outside Tramp. (defun tramp-cache-before-revert-function () "Flush all Tramp cache properties from buffer-file-name." ! (let ((bfn (buffer-file-name)) ! ;; Pacify byte-compiler. ! v localname) (when (and (stringp bfn) (tramp-tramp-file-p bfn)) ! (with-parsed-tramp-file-name bfn nil (tramp-flush-file-property v localname))))) (add-hook 'before-revert-hook 'tramp-cache-before-revert-function)