/[emacs]/emacs/lisp/net/tramp-smb.el
ViewVC logotype

Diff of /emacs/lisp/net/tramp-smb.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by lute, Mon Jul 4 17:10:37 2005 UTC revision 1.21 by albinus, Sun Aug 7 15:42:42 2005 UTC
# Line 46  Line 46 
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."
# Line 598  Catches errors for shares like \"C$/\", Line 593  Catches errors for shares like \"C$/\",
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))
# Line 616  Catches errors for shares like \"C$/\", Line 604  Catches errors for shares like \"C$/\",
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
# Line 636  Catches errors for shares like \"C$/\", Line 621  Catches errors for shares like \"C$/\",
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
# Line 1000  Returns nil if an error message has appe Line 982  Returns nil if an error message has appe
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))

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26