# HG changeset patch # User Stefan Monnier # Date 1255826809 0 # Node ID 1165f7844d0a627169b1f7a2a1243a27413c0e91 # Parent 82e88f8838d48b8a6723b96503a681219b8282da (ange-ftp-file-size): Use unwind-protect. diff -r 82e88f8838d4 -r 1165f7844d0a lisp/ChangeLog --- a/lisp/ChangeLog Sun Oct 18 00:34:47 2009 +0000 +++ b/lisp/ChangeLog Sun Oct 18 00:46:49 2009 +0000 @@ -1,3 +1,7 @@ +2009-10-18 Stefan Monnier + + * net/ange-ftp.el (ange-ftp-file-size): Use unwind-protect. + 2009-10-18 Glenn Morris * Makefile.in (compile-last): Ensure GREP_OPTIONS is null before calling diff -r 82e88f8838d4 -r 1165f7844d0a lisp/net/ange-ftp.el --- a/lisp/net/ange-ftp.el Sun Oct 18 00:34:47 2009 +0000 +++ b/lisp/net/ange-ftp.el Sun Oct 18 00:46:49 2009 +0000 @@ -3570,10 +3570,11 @@ ;; Transfer complete" before the "213 SIZE". Let's skip ;; that. (ange-ftp-skip-msgs (concat ange-ftp-skip-msgs "\\|^226")) - (res (prog2 - (unless ascii-mode - (ange-ftp-set-binary-mode host user)) - (ange-ftp-send-cmd host user (list 'quote "size" name)) + (res (unwind-protect + (progn + (unless ascii-mode + (ange-ftp-set-binary-mode host user)) + (ange-ftp-send-cmd host user (list 'quote "size" name))) (unless ascii-mode (ange-ftp-set-ascii-mode host user)))) (line (cdr res)))