diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2007-09-30 16:43:07 +0000 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2007-09-30 16:43:07 +0000 |
commit | 9e6ab520d0265c2077a1842171c995862b2d9dd8 (patch) | |
tree | c9134b3456e0b1444adcbfba49f2e2ba9c3dbdb3 /lisp/net/tramp-smb.el | |
parent | 2e55c9864d2125afabe16d5052403923f74794cd (diff) | |
download | emacs-9e6ab520d0265c2077a1842171c995862b2d9dd8.tar.gz emacs-9e6ab520d0265c2077a1842171c995862b2d9dd8.tar.bz2 emacs-9e6ab520d0265c2077a1842171c995862b2d9dd8.zip |
* net/tramp-compat.el: New file.
* net/tramp.el:
* net/tramp-fish.el:
* net/tramp-smb.el:
* net/tramp-uu.el:
* net/trampver.el: Move compatibility code to tramp-compat.el.
Apply `mapc' instead of `mapcar' when the code needs side effects
only. Move utf-8 coding cookie to the second line.
Diffstat (limited to 'lisp/net/tramp-smb.el')
-rw-r--r-- | lisp/net/tramp-smb.el | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index c7ea3a12163..c9d709ff08a 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -30,15 +30,12 @@ (require 'tramp) (require 'tramp-cache) +(require 'tramp-compat) ;; Pacify byte-compiler -(eval-when-compile (require 'custom)) - -;; Avoid byte-compiler warnings if the byte-compiler supports this. -;; Currently, XEmacs supports this. (eval-when-compile - (when (featurep 'xemacs) - (byte-compiler-options (warnings (- unused-vars))))) + (require 'cl) + (require 'custom)) ;; Define SMB method ... (defcustom tramp-smb-method "smb" @@ -763,7 +760,7 @@ If SHARE is result, entries are of type dir. Otherwise, shares are listed. Result is the list (LOCALNAME MODE SIZE MTIME)." ;; We are called from `tramp-smb-get-file-entries', which sets the ;; current buffer. - (let ((line (buffer-substring (point) (tramp-line-end-position))) + (let ((line (buffer-substring (point) (tramp-compat-line-end-position))) localname mode size month day hour min sec year mtime) (if (not share) @@ -891,7 +888,7 @@ connection if a previous connection has died for some reason." (when (and p (processp p)) (delete-process p)) (unless (let ((default-directory - (tramp-temporary-file-directory))) + (tramp-compat-temporary-file-directory))) (executable-find tramp-smb-program)) (error "Cannot find command %s in %s" tramp-smb-program exec-path)) @@ -930,7 +927,8 @@ connection if a previous connection has died for some reason." (let* ((coding-system-for-read nil) (process-connection-type tramp-process-connection-type) - (p (let ((default-directory (tramp-temporary-file-directory))) + (p (let ((default-directory + (tramp-compat-temporary-file-directory))) (apply #'start-process (tramp-buffer-name vec) (tramp-get-buffer vec) tramp-smb-program args)))) |