# HG changeset patch # User Richard M. Stallman # Date 893827449 0 # Node ID 1173cfe8b7bd382074e7798723646711398cf6af # Parent f1df0fd84e42a32c7fa5b1c060034be002496e92 (ange-ftp-real-expand-file-name-actual): Locally bind old-name, new-name, final, drive-letter. diff -r f1df0fd84e42 -r 1173cfe8b7bd lisp/ange-ftp.el --- a/lisp/ange-ftp.el Wed Apr 29 05:22:19 1998 +0000 +++ b/lisp/ange-ftp.el Wed Apr 29 05:24:09 1998 +0000 @@ -5676,17 +5676,18 @@ ;; If a drive letter has been added, remote it. Otherwise, if the drive ;; letter existed before, leave it. (defun ange-ftp-real-expand-file-name-actual (&rest args) - (setq old-name (car args)) - (setq new-name (ange-ftp-run-real-handler 'expand-file-name args)) - (setq drive-letter (substring new-name 0 2)) - ;; I'd like to distill the following lines into one (if) statement - ;; removing the need for the temp final variable - (setq final new-name) - (if (not (equal (substring old-name 0 1) "~")) - (if (or (< (length old-name) 2) - (not (string-match "/[a-zA-Z]:" old-name))) - (setq final (substring new-name 2)))) - final) + (let (old-name new-name final drive-letter) + (setq old-name (car args)) + (setq new-name (ange-ftp-run-real-handler 'expand-file-name args)) + (setq drive-letter (substring new-name 0 2)) + ;; I'd like to distill the following lines into one (if) statement + ;; removing the need for the temp final variable + (setq final new-name) + (if (not (equal (substring old-name 0 1) "~")) + (if (or (< (length old-name) 2) + (not (string-match "/[a-zA-Z]:" old-name))) + (setq final (substring new-name 2)))) + final)) ;;;; ------------------------------------------------------------