diff options
| author | Stefan Monnier | 2017-12-28 14:13:10 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2017-12-28 14:13:10 -0500 |
| commit | 65bc9c6219a9a8ee8377509da312eeef34fc3eda (patch) | |
| tree | 7e6f8c95a89470e170a4e094a4ba60d62f82c635 | |
| parent | 57c291f2c7a2685fe0c4eeae961bfad5b9fdfee5 (diff) | |
| download | emacs-65bc9c6219a9a8ee8377509da312eeef34fc3eda.tar.gz emacs-65bc9c6219a9a8ee8377509da312eeef34fc3eda.zip | |
* lisp/net/ange-ftp.el: Use lexical-binding
| -rw-r--r-- | lisp/net/ange-ftp.el | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 57e4de9cb8d..d23539234a7 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; ange-ftp.el --- transparent FTP support for GNU Emacs | 1 | ;;; ange-ftp.el --- transparent FTP support for GNU Emacs -*- lexical-binding:t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1989-1996, 1998, 2000-2017 Free Software Foundation, | 3 | ;; Copyright (C) 1989-1996, 1998, 2000-2017 Free Software Foundation, |
| 4 | ;; Inc. | 4 | ;; Inc. |
| @@ -1168,7 +1168,7 @@ only return the directory part of FILE." | |||
| 1168 | (ange-ftp-parse-netrc) | 1168 | (ange-ftp-parse-netrc) |
| 1169 | (catch 'found-one | 1169 | (catch 'found-one |
| 1170 | (maphash | 1170 | (maphash |
| 1171 | (lambda (host val) | 1171 | (lambda (host _val) |
| 1172 | (if (ange-ftp-lookup-passwd host user) (throw 'found-one host))) | 1172 | (if (ange-ftp-lookup-passwd host user) (throw 'found-one host))) |
| 1173 | ange-ftp-user-hashtable) | 1173 | ange-ftp-user-hashtable) |
| 1174 | (save-match-data | 1174 | (save-match-data |
| @@ -1399,14 +1399,14 @@ only return the directory part of FILE." | |||
| 1399 | (save-match-data | 1399 | (save-match-data |
| 1400 | (let (res) | 1400 | (let (res) |
| 1401 | (maphash | 1401 | (maphash |
| 1402 | (lambda (key value) | 1402 | (lambda (key _value) |
| 1403 | (if (string-match "\\`[^/]*\\(/\\).*\\'" key) | 1403 | (if (string-match "\\`[^/]*\\(/\\).*\\'" key) |
| 1404 | (let ((host (substring key 0 (match-beginning 1))) | 1404 | (let ((host (substring key 0 (match-beginning 1))) |
| 1405 | (user (substring key (match-end 1)))) | 1405 | (user (substring key (match-end 1)))) |
| 1406 | (push (concat user "@" host ":") res)))) | 1406 | (push (concat user "@" host ":") res)))) |
| 1407 | ange-ftp-passwd-hashtable) | 1407 | ange-ftp-passwd-hashtable) |
| 1408 | (maphash | 1408 | (maphash |
| 1409 | (lambda (host user) (push (concat host ":") res)) | 1409 | (lambda (host _user) (push (concat host ":") res)) |
| 1410 | ange-ftp-user-hashtable) | 1410 | ange-ftp-user-hashtable) |
| 1411 | (or res (list nil))))) | 1411 | (or res (list nil))))) |
| 1412 | 1412 | ||
| @@ -1684,7 +1684,7 @@ good, skip, fatal, or unknown." | |||
| 1684 | ange-ftp-process-result | 1684 | ange-ftp-process-result |
| 1685 | ange-ftp-process-result-line))))))) | 1685 | ange-ftp-process-result-line))))))) |
| 1686 | 1686 | ||
| 1687 | (defun ange-ftp-process-sentinel (proc str) | 1687 | (defun ange-ftp-process-sentinel (proc _str) |
| 1688 | "When FTP process changes state, nuke all file-entries in cache." | 1688 | "When FTP process changes state, nuke all file-entries in cache." |
| 1689 | (let ((name (process-name proc))) | 1689 | (let ((name (process-name proc))) |
| 1690 | (when (string-match "\\*ftp \\([^@]+\\)@\\([^*]+\\)\\*" name) | 1690 | (when (string-match "\\*ftp \\([^@]+\\)@\\([^*]+\\)\\*" name) |
| @@ -1733,7 +1733,7 @@ good, skip, fatal, or unknown." | |||
| 1733 | (defvar ange-ftp-gwp-running t) | 1733 | (defvar ange-ftp-gwp-running t) |
| 1734 | (defvar ange-ftp-gwp-status nil) | 1734 | (defvar ange-ftp-gwp-status nil) |
| 1735 | 1735 | ||
| 1736 | (defun ange-ftp-gwp-sentinel (proc str) | 1736 | (defun ange-ftp-gwp-sentinel (_proc _str) |
| 1737 | (setq ange-ftp-gwp-running nil)) | 1737 | (setq ange-ftp-gwp-running nil)) |
| 1738 | 1738 | ||
| 1739 | (defun ange-ftp-gwp-filter (proc str) | 1739 | (defun ange-ftp-gwp-filter (proc str) |
| @@ -3445,9 +3445,9 @@ system TYPE.") | |||
| 3445 | (let ((part (ange-ftp-get-file-part file)) | 3445 | (let ((part (ange-ftp-get-file-part file)) |
| 3446 | (files (ange-ftp-get-files (file-name-directory file)))) | 3446 | (files (ange-ftp-get-files (file-name-directory file)))) |
| 3447 | (if (ange-ftp-hash-entry-exists-p part files) | 3447 | (if (ange-ftp-hash-entry-exists-p part files) |
| 3448 | (let ((host (nth 0 parsed)) | 3448 | (let (;; (host (nth 0 parsed)) |
| 3449 | (user (nth 1 parsed)) | 3449 | ;; (user (nth 1 parsed)) |
| 3450 | (name (nth 2 parsed)) | 3450 | ;; (name (nth 2 parsed)) |
| 3451 | (dirp (gethash part files)) | 3451 | (dirp (gethash part files)) |
| 3452 | (inode (gethash file ange-ftp-inodes-hashtable))) | 3452 | (inode (gethash file ange-ftp-inodes-hashtable))) |
| 3453 | (unless inode | 3453 | (unless inode |
| @@ -3833,7 +3833,7 @@ so return the size on the remote host exactly. See RFC 3659." | |||
| 3833 | (ange-ftp-call-cont cont result line))) | 3833 | (ange-ftp-call-cont cont result line))) |
| 3834 | 3834 | ||
| 3835 | (defun ange-ftp-copy-file (filename newname &optional ok-if-already-exists | 3835 | (defun ange-ftp-copy-file (filename newname &optional ok-if-already-exists |
| 3836 | keep-date preserve-uid-gid | 3836 | keep-date _preserve-uid-gid |
| 3837 | _preserve-selinux-context) | 3837 | _preserve-selinux-context) |
| 3838 | (interactive "fCopy file: \nFCopy %s to file: \np") | 3838 | (interactive "fCopy file: \nFCopy %s to file: \np") |
| 3839 | (ange-ftp-copy-file-internal filename | 3839 | (ange-ftp-copy-file-internal filename |
| @@ -5207,7 +5207,7 @@ Other orders of $ and _ seem to all work just fine.") | |||
| 5207 | ";\\([0-9]+\\)$")) | 5207 | ";\\([0-9]+\\)$")) |
| 5208 | (version 0)) | 5208 | (version 0)) |
| 5209 | (maphash | 5209 | (maphash |
| 5210 | (lambda (name val) | 5210 | (lambda (name _val) |
| 5211 | (and (string-match regexp name) | 5211 | (and (string-match regexp name) |
| 5212 | (setq version | 5212 | (setq version |
| 5213 | (max version | 5213 | (max version |