From: Kai Gro?j. <ka...@us...> - 2002-01-22 07:39:08
|
Update of /cvsroot/tramp/tramp/lisp In directory usw-pr-cvs1:/tmp/cvs-serv26890/tramp/lisp Modified Files: ChangeLog tramp.el Log Message: (tramp-handle-insert-file-contents): Use tramp-message-for-buffer, not tramp-message. (tramp-message): Prefix all messages with "tramp:". Index: ChangeLog =================================================================== RCS file: /cvsroot/tramp/tramp/lisp/ChangeLog,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -d -r2.77 -r2.78 *** ChangeLog 2002/01/22 07:34:03 2.77 --- ChangeLog 2002/01/22 07:39:06 2.78 *************** *** 4,7 **** --- 4,10 ---- `last-coding-system-used' in a way that works even if the variable is not defined. + (tramp-handle-insert-file-contents): Use + tramp-message-for-buffer, not tramp-message. + (tramp-message): Prefix all messages with "tramp:". 2002-01-21 Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> Index: tramp.el =================================================================== RCS file: /cvsroot/tramp/tramp/lisp/tramp.el,v retrieving revision 2.79 retrieving revision 2.80 diff -C2 -d -r2.79 -r2.80 *** tramp.el 2002/01/22 07:34:03 2.79 --- tramp.el 2002/01/22 07:39:06 2.80 *************** *** 1210,1219 **** This function expects to be called from the tramp buffer only!" (when (<= level tramp-verbose) ! (apply #'message fmt-string args) (when tramp-debug-buffer (save-excursion (set-buffer ! (tramp-get-debug-buffer tramp-current-multi-method tramp-current-method ! tramp-current-user tramp-current-host)) (goto-char (point-max)) (tramp-insert-with-face --- 1210,1220 ---- This function expects to be called from the tramp buffer only!" (when (<= level tramp-verbose) ! (apply #'message (concat "tramp: " fmt-string) args) (when tramp-debug-buffer (save-excursion (set-buffer ! (tramp-get-debug-buffer ! tramp-current-multi-method tramp-current-method ! tramp-current-user tramp-current-host)) (goto-char (point-max)) (tramp-insert-with-face *************** *** 2418,2422 **** (cond ((tramp-get-rcp-program multi-method method) ;; Use tramp-like program for file transfer. ! (tramp-message 5 "Fetching %s to tmp file %s..." filename tmpfil) (save-excursion (set-buffer trampbuf) (erase-buffer)) (unless (equal 0 --- 2419,2425 ---- (cond ((tramp-get-rcp-program multi-method method) ;; Use tramp-like program for file transfer. ! (tramp-message-for-buffer ! multi-method method user host ! 5 "Fetching %s to tmp file %s..." filename tmpfil) (save-excursion (set-buffer trampbuf) (erase-buffer)) (unless (equal 0 *************** *** 2505,2538 **** (barf-if-buffer-read-only) (setq filename (expand-file-name filename)) ! (if (not (tramp-handle-file-exists-p filename)) ! (progn ! (when visit ! (setq buffer-file-name filename) ! (set-visited-file-modtime) ! (set-buffer-modified-p nil)) ! (signal 'file-error ! (format "File `%s' not found on remote host" filename)) ! (list (tramp-handle-expand-file-name filename) 0)) ! (let ((local-copy (tramp-handle-file-local-copy filename)) ! (coding-system-used nil) ! (result nil)) ! (when visit ! (setq buffer-file-name filename) ! (set-visited-file-modtime) ! (set-buffer-modified-p nil)) ! (tramp-message 9 "Inserting local temp file `%s'..." local-copy) ! (setq result ! (tramp-run-real-handler 'insert-file-contents ! (list local-copy nil beg end replace))) ! (tramp-message 9 "last coding system used was %s" last-coding-system-used) ! ;; Now `last-coding-system-used' has right value. Remember it. ! (when (boundp 'last-coding-system-used) ! (setq coding-system-used last-coding-system-used)) ! (tramp-message 9 "Inserting local temp file `%s'...done" local-copy) ! (delete-file local-copy) ! (when (boundp 'last-coding-system-used) ! (setq last-coding-system-used coding-system-used)) ! (list (expand-file-name filename) ! (second result))))) ;; CCC grok APPEND, LOCKNAME, CONFIRM --- 2508,2551 ---- (barf-if-buffer-read-only) (setq filename (expand-file-name filename)) ! (let* ((v (tramp-dissect-file-name (tramp-handle-expand-file-name filename))) ! (multi-method (tramp-file-name-multi-method v)) ! (method (tramp-file-name-method v)) ! (user (tramp-file-name-user v)) ! (host (tramp-file-name-host v)) ! (path (tramp-file-name-path v))) ! (if (not (tramp-handle-file-exists-p filename)) ! (progn ! (when visit ! (setq buffer-file-name filename) ! (set-visited-file-modtime) ! (set-buffer-modified-p nil)) ! (signal 'file-error ! (format "File `%s' not found on remote host" filename)) ! (list (tramp-handle-expand-file-name filename) 0)) ! (let ((local-copy (tramp-handle-file-local-copy filename)) ! (coding-system-used nil) ! (result nil)) ! (when visit ! (setq buffer-file-name filename) ! (set-visited-file-modtime) ! (set-buffer-modified-p nil)) ! (tramp-message-for-buffer ! multi-method method user host ! 9 "Inserting local temp file `%s'..." local-copy) ! (setq result ! (tramp-run-real-handler 'insert-file-contents ! (list local-copy nil beg end replace))) ! (tramp-message-for-buffer ! multi-method method user host ! 9 "last coding system used was %s" last-coding-system-used) ! ;; Now `last-coding-system-used' has right value. Remember it. ! (when (boundp 'last-coding-system-used) ! (setq coding-system-used last-coding-system-used)) ! (tramp-message 9 "Inserting local temp file `%s'...done" local-copy) ! (delete-file local-copy) ! (when (boundp 'last-coding-system-used) ! (setq last-coding-system-used coding-system-used)) ! (list (expand-file-name filename) ! (second result)))))) ;; CCC grok APPEND, LOCKNAME, CONFIRM |