;;; ange-ftp.el --- transparent FTP support for GNU Emacs
-;; Copyright (C) 1989-1996, 1998, 2000-2014 Free Software Foundation,
+;; Copyright (C) 1989-1996, 1998, 2000-2016 Free Software Foundation,
;; Inc.
;; Author: Andy Norman (ange@hplb.hpl.hp.com)
;;
;; "^$*$ *"
;;
-;; 9) Set the variable ange-ftp-gateway-program-interactive to 't' to let
+;; 9) Set the variable ange-ftp-gateway-program-interactive to t to let
;; ange-ftp know that it has to "hand-hold" the login to the gateway
;; machine.
;;
'("\\`/\\(\\([^/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4))
"Format of a fully expanded remote file name.
-This is a list of the form \(REGEXP HOST USER NAME\),
+This is a list of the form \(REGEXP HOST USER NAME),
where REGEXP is a regular expression matching
the full remote name, and HOST, USER, and NAME are the numbers of
parenthesized expressions in REGEXP for the components (in that order)."
(defun ange-ftp-message (fmt &rest args)
"Display message in echo area, but indicate if truncated.
Args are as in `message': a format string, plus arguments to be formatted."
- (let ((msg (apply 'format fmt args))
+ (let ((msg (apply #'format-message fmt args))
(max (window-width (minibuffer-window))))
(if noninteractive
msg
(goto-char end)))
;; Read in ~/.netrc, if one exists. If ~/.netrc file exists and has
-;; the correct permissions then extract the \`machine\', \`login\',
-;; \`password\' and \`account\' information from within.
+;; the correct permissions then extract the machine, login,
+;; password and account information from within.
(defun ange-ftp-parse-netrc ()
;; We set this before actually doing it to avoid the possibility
(signal 'file-error
(list "Opening directory"
(if (file-exists-p directory)
- "not a directory"
- "no such file or directory")
+ "Not a directory"
+ "No such file or directory")
directory))))
\f
;;;; ------------------------------------------------------------
-6)))
(if (zerop ange-ftp-xfer-size)
(ange-ftp-message "%s...%dk" ange-ftp-process-msg kbytes)
- (let ((percent (/ (* 100 kbytes) ange-ftp-xfer-size)))
+ (let ((percent (floor (* 100.0 kbytes) ange-ftp-xfer-size)))
;; cut out the redisplay of identical %-age messages.
(unless (eq percent ange-ftp-last-percent)
(setq ange-ftp-last-percent percent)
;;;; Remote file and directory listing support.
;;;; ------------------------------------------------------------
-;; Returns whether HOST's FTP server doesn't like \'ls\' or \'dir\' commands
+;; Returns whether HOST's FTP server doesn't like 'ls' or 'dir' commands
;; to take switch arguments.
(defun ange-ftp-dumb-unix-host (host)
(and host ange-ftp-dumb-unix-host-regexp
(or (file-exists-p filename)
(signal 'file-error
- (list "Copy file" "no such file or directory" filename)))
+ (list "Copy file" "No such file or directory" filename)))
;; canonicalize newname if a directory.
(if (file-directory-p newname)
FILES is a list of files to copy in the form
(from-file to-file ok-if-already-exists keep-date)
E.g.,
- (ange-ftp-copy-files-async t nil t '((\"a\" \"b\" t t) (\"c\" \"d\" t t)))"
+ (ange-ftp-copy-files-async t nil t \\='((\"a\" \"b\" t t) (\"c\" \"d\" t t)))"
(unless okay-p (error "%s: %s" 'ange-ftp-copy-files-async line))
(if files
(let* ((ff (car files))
(format "%s %s \"%s\"" ; remsh -l USER does not work well
; on a hp-ux machine I tried
remote-shell-program host command))
- (ange-ftp-message "Remote command '%s' ..." command)
+ (ange-ftp-message "Remote command `%s' ..." command)
;; Cannot call ange-ftp-real-dired-run-shell-command here as it
;; would prepend "cd default-directory" --- which bombs because
;; default-directory is in ange-ftp syntax for remote file names.
(defcustom ange-ftp-bs2000-special-prefix
"X"
- "Prefix used for filenames starting with '#' or '@'."
+ "Prefix used for filenames starting with `#' or `@'."
:group 'ange-ftp
:type 'string)