46 |
(defalias 'warnings 'identity) ; Pacify Emacs byte-compiler |
(defalias 'warnings 'identity) ; Pacify Emacs byte-compiler |
47 |
(byte-compiler-options (warnings (- unused-vars)))))) |
(byte-compiler-options (warnings (- unused-vars)))))) |
48 |
|
|
|
;; XEmacs byte-compiler raises warning abouts `last-coding-system-used'. |
|
|
(eval-when-compile |
|
|
(unless (boundp 'last-coding-system-used) |
|
|
(defvar last-coding-system-used nil))) |
|
|
|
|
49 |
;; Define SMB method ... |
;; Define SMB method ... |
50 |
(defcustom tramp-smb-method "smb" |
(defcustom tramp-smb-method "smb" |
51 |
"*Method to connect SAMBA and M$ SMB servers." |
"*Method to connect SAMBA and M$ SMB servers." |
593 |
(let ((share (tramp-smb-get-share localname)) |
(let ((share (tramp-smb-get-share localname)) |
594 |
(file (tramp-smb-get-localname localname t)) |
(file (tramp-smb-get-localname localname t)) |
595 |
(curbuf (current-buffer)) |
(curbuf (current-buffer)) |
|
;; We use this to save the value of `last-coding-system-used' |
|
|
;; after writing the tmp file. At the end of the function, |
|
|
;; we set `last-coding-system-used' to this saved value. |
|
|
;; This way, any intermediary coding systems used while |
|
|
;; talking to the remote shell or suchlike won't hose this |
|
|
;; variable. This approach was snarfed from ange-ftp.el. |
|
|
coding-system-used |
|
596 |
tmpfil) |
tmpfil) |
597 |
;; Write region into a tmp file. |
;; Write region into a tmp file. |
598 |
(setq tmpfil (tramp-make-temp-file)) |
(setq tmpfil (tramp-make-temp-file)) |
604 |
(if confirm ; don't pass this arg unless defined for backward compat. |
(if confirm ; don't pass this arg unless defined for backward compat. |
605 |
(list start end tmpfil append 'no-message lockname confirm) |
(list start end tmpfil append 'no-message lockname confirm) |
606 |
(list start end tmpfil append 'no-message lockname))) |
(list start end tmpfil append 'no-message lockname))) |
|
;; Now, `last-coding-system-used' has the right value. Remember it. |
|
|
(when (boundp 'last-coding-system-used) |
|
|
(setq coding-system-used last-coding-system-used)) |
|
607 |
|
|
608 |
(tramp-smb-maybe-open-connection user host share) |
(tramp-smb-maybe-open-connection user host share) |
609 |
(tramp-message-for-buffer |
(tramp-message-for-buffer |
621 |
(error "Buffer has changed from `%s' to `%s'" |
(error "Buffer has changed from `%s' to `%s'" |
622 |
curbuf (current-buffer))) |
curbuf (current-buffer))) |
623 |
(when (eq visit t) |
(when (eq visit t) |
624 |
(set-visited-file-modtime)) |
(set-visited-file-modtime)))))) |
|
;; Make `last-coding-system-used' have the right value. |
|
|
(when (boundp 'last-coding-system-used) |
|
|
(setq last-coding-system-used coding-system-used)))))) |
|
625 |
|
|
626 |
|
|
627 |
;; Internal file name functions |
;; Internal file name functions |
982 |
(while (and (not found) (not err)) |
(while (and (not found) (not err)) |
983 |
|
|
984 |
;; Accept pending output. |
;; Accept pending output. |
985 |
(accept-process-output proc) |
(tramp-accept-process-output proc) |
986 |
|
|
987 |
;; Search for prompt. |
;; Search for prompt. |
988 |
(goto-char (point-min)) |
(goto-char (point-min)) |