diff options
| author | Dave Love | 1998-10-14 18:18:52 +0000 |
|---|---|---|
| committer | Dave Love | 1998-10-14 18:18:52 +0000 |
| commit | 7218b1d448e442e26031f4fe890b980c52bb9ca0 (patch) | |
| tree | f87071522fdb95200ab2833b5810432d336de879 | |
| parent | 46d4d7bffa7d7840432f1cda4e642be96992b781 (diff) | |
| download | emacs-7218b1d448e442e26031f4fe890b980c52bb9ca0.tar.gz emacs-7218b1d448e442e26031f4fe890b980c52bb9ca0.zip | |
(ange-ftp-read-passwd): Function deleted.
(ange-ftp-set-passwd): Use read-passwd, not ange-ftp-read-passwd.
(ange-ftp-get-passwd, ange-ftp-set-account): Likewise.
| -rw-r--r-- | lisp/ange-ftp.el | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 33199d66cbe..08b9759b7e6 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el | |||
| @@ -1128,29 +1128,6 @@ only return the directory part of FILE." | |||
| 1128 | ;;;; Password support. | 1128 | ;;;; Password support. |
| 1129 | ;;;; ------------------------------------------------------------ | 1129 | ;;;; ------------------------------------------------------------ |
| 1130 | 1130 | ||
| 1131 | (defun ange-ftp-read-passwd (prompt &optional default) | ||
| 1132 | "Read a password, echoing `.' for each character typed. | ||
| 1133 | End with RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. | ||
| 1134 | Optional DEFAULT is password to start with." | ||
| 1135 | (let ((pass nil) | ||
| 1136 | (c 0) | ||
| 1137 | (echo-keystrokes 0) | ||
| 1138 | (cursor-in-echo-area t)) | ||
| 1139 | (while (progn (message "%s%s" | ||
| 1140 | prompt | ||
| 1141 | (make-string (length pass) ?.)) | ||
| 1142 | (setq c (read-char)) | ||
| 1143 | (and (/= c ?\r) (/= c ?\n) (/= c ?\e))) | ||
| 1144 | (if (= c ?\C-u) | ||
| 1145 | (setq pass "") | ||
| 1146 | (if (and (/= c ?\b) (/= c ?\177)) | ||
| 1147 | (setq pass (concat pass (char-to-string c))) | ||
| 1148 | (if (> (length pass) 0) | ||
| 1149 | (setq pass (substring pass 0 -1)))))) | ||
| 1150 | (message "") | ||
| 1151 | (ange-ftp-repaint-minibuffer) | ||
| 1152 | (or pass default ""))) | ||
| 1153 | |||
| 1154 | (defmacro ange-ftp-generate-passwd-key (host user) | 1131 | (defmacro ange-ftp-generate-passwd-key (host user) |
| 1155 | (` (concat (downcase (, host)) "/" (, user)))) | 1132 | (` (concat (downcase (, host)) "/" (, user)))) |
| 1156 | 1133 | ||
| @@ -1162,7 +1139,7 @@ Optional DEFAULT is password to start with." | |||
| 1162 | "For a given HOST and USER, set or change the associated PASSWORD." | 1139 | "For a given HOST and USER, set or change the associated PASSWORD." |
| 1163 | (interactive (list (read-string "Host: ") | 1140 | (interactive (list (read-string "Host: ") |
| 1164 | (read-string "User: ") | 1141 | (read-string "User: ") |
| 1165 | (ange-ftp-read-passwd "Password: "))) | 1142 | (read-passwd "Password: "))) |
| 1166 | (ange-ftp-put-hash-entry (ange-ftp-generate-passwd-key host user) | 1143 | (ange-ftp-put-hash-entry (ange-ftp-generate-passwd-key host user) |
| 1167 | passwd | 1144 | passwd |
| 1168 | ange-ftp-passwd-hashtable)) | 1145 | ange-ftp-passwd-hashtable)) |
| @@ -1225,13 +1202,14 @@ Optional DEFAULT is password to start with." | |||
| 1225 | 1202 | ||
| 1226 | ;; found another machine with the same user. | 1203 | ;; found another machine with the same user. |
| 1227 | ;; Try that account. | 1204 | ;; Try that account. |
| 1228 | (ange-ftp-read-passwd | 1205 | (read-passwd |
| 1229 | (format "passwd for %s@%s (default same as %s@%s): " | 1206 | (format "passwd for %s@%s (default same as %s@%s): " |
| 1230 | user host user other) | 1207 | user host user other) |
| 1208 | nil | ||
| 1231 | (ange-ftp-lookup-passwd other user)) | 1209 | (ange-ftp-lookup-passwd other user)) |
| 1232 | 1210 | ||
| 1233 | ;; I give up. Ask the user for the password. | 1211 | ;; I give up. Ask the user for the password. |
| 1234 | (ange-ftp-read-passwd | 1212 | (read-passwd |
| 1235 | (format "Password for %s@%s: " user host))))) | 1213 | (format "Password for %s@%s: " user host))))) |
| 1236 | (ange-ftp-set-passwd host user passwd) | 1214 | (ange-ftp-set-passwd host user passwd) |
| 1237 | passwd)))) | 1215 | passwd)))) |
| @@ -1249,7 +1227,7 @@ Optional DEFAULT is password to start with." | |||
| 1249 | "For a given HOST and USER, set or change the associated ACCOUNT password." | 1227 | "For a given HOST and USER, set or change the associated ACCOUNT password." |
| 1250 | (interactive (list (read-string "Host: ") | 1228 | (interactive (list (read-string "Host: ") |
| 1251 | (read-string "User: ") | 1229 | (read-string "User: ") |
| 1252 | (ange-ftp-read-passwd "Account password: "))) | 1230 | (read-passwd "Account password: "))) |
| 1253 | (ange-ftp-put-hash-entry (ange-ftp-generate-passwd-key host user) | 1231 | (ange-ftp-put-hash-entry (ange-ftp-generate-passwd-key host user) |
| 1254 | account | 1232 | account |
| 1255 | ange-ftp-account-hashtable)) | 1233 | ange-ftp-account-hashtable)) |