Hi there,
I'd like to synch our implementation of `file-remote-p' with GNU Emacs's
(I know Michael suggested this years ago---sorry for dropping the ball).
I'd like to adopt the recent changes in the function's argument
conventions (additional `identification' and `connected' parameters).
Could the attached patch (which simply copies the function from the
latest Tramp to ours) be approved and/or committed?
2008-01-03 Michael Sperber <mike(a)xemacs.org>
* lisp/tramp.el (tramp-handle-file-remote-p): Synch with latest
Tramp, to support the latest changes in argument conventions.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
Index: lisp/tramp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/tramp/lisp/tramp.el,v
retrieving revision 1.42
diff -u -r1.42 tramp.el
--- lisp/tramp.el 28 May 2007 10:53:37 -0000 1.42
+++ lisp/tramp.el 3 Jan 2008 08:24:56 -0000
@@ -3868,11 +3868,19 @@
(t (error "Wrong method specification for `%s'" method)))
tmpfil)))
-(defun tramp-handle-file-remote-p (filename)
- "Like `file-remote-p' for tramp files."
+(defun tramp-handle-file-remote-p (filename &optional identification connected)
+ "Like `file-remote-p' for Tramp files."
(when (tramp-tramp-file-p filename)
(with-parsed-tramp-file-name filename nil
- (vector multi-method method user host ""))))
+ (and (or (not connected)
+ (let ((p (tramp-get-connection-process v)))
+ (and p (processp p) (memq (process-status p) '(run open)))))
+ (cond
+ ((eq identification 'method) method)
+ ((eq identification 'user) user)
+ ((eq identification 'host) host)
+ ((eq identification 'localname) localname)
+ (t (tramp-make-tramp-file-name method user host "")))))))
(defun tramp-handle-insert-file-contents
(filename &optional visit beg end replace)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches