diff options
| author | Erik Naggum | 1995-10-28 05:42:48 +0000 |
|---|---|---|
| committer | Erik Naggum | 1995-10-28 05:42:48 +0000 |
| commit | d87b3b339015045ef1ba63bc8d156b47d4e10252 (patch) | |
| tree | aebbf2443d8c4a88c2719bd00e622b4cb1e08de9 | |
| parent | e48e5617b02aedccf3022fefed1b3cf79fce7681 (diff) | |
| download | emacs-d87b3b339015045ef1ba63bc8d156b47d4e10252.tar.gz emacs-d87b3b339015045ef1ba63bc8d156b47d4e10252.zip | |
(ange-ftp-ftp-name,ange-ftp-replace-name-component): Use posix-string-match
for complex regexp in `ange-ftp-name-format'.
(ange-ftp-process-sentinel): Quote final * in buffer name match.
| -rw-r--r-- | lisp/ange-ftp.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 5e427b7126e..cd43215632e 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el | |||
| @@ -1276,7 +1276,7 @@ Optional DEFAULT is password to start with." | |||
| 1276 | (setq ange-ftp-ftp-name-arg name | 1276 | (setq ange-ftp-ftp-name-arg name |
| 1277 | ange-ftp-ftp-name-res | 1277 | ange-ftp-ftp-name-res |
| 1278 | (save-match-data | 1278 | (save-match-data |
| 1279 | (if (string-match (car ange-ftp-name-format) name) | 1279 | (if (posix-string-match (car ange-ftp-name-format) name) |
| 1280 | (let* ((ns (cdr ange-ftp-name-format)) | 1280 | (let* ((ns (cdr ange-ftp-name-format)) |
| 1281 | (host (ange-ftp-ftp-name-component 0 ns name)) | 1281 | (host (ange-ftp-ftp-name-component 0 ns name)) |
| 1282 | (user (ange-ftp-ftp-name-component 1 ns name)) | 1282 | (user (ange-ftp-ftp-name-component 1 ns name)) |
| @@ -1290,7 +1290,7 @@ Optional DEFAULT is password to start with." | |||
| 1290 | ;; replace the name component with NAME. | 1290 | ;; replace the name component with NAME. |
| 1291 | (defun ange-ftp-replace-name-component (fullname name) | 1291 | (defun ange-ftp-replace-name-component (fullname name) |
| 1292 | (save-match-data | 1292 | (save-match-data |
| 1293 | (if (string-match (car ange-ftp-name-format) fullname) | 1293 | (if (posix-string-match (car ange-ftp-name-format) fullname) |
| 1294 | (let* ((ns (cdr ange-ftp-name-format)) | 1294 | (let* ((ns (cdr ange-ftp-name-format)) |
| 1295 | (elt (nth 2 ns))) | 1295 | (elt (nth 2 ns))) |
| 1296 | (concat (substring fullname 0 (match-beginning elt)) | 1296 | (concat (substring fullname 0 (match-beginning elt)) |
| @@ -1523,7 +1523,7 @@ good, skip, fatal, or unknown." | |||
| 1523 | (defun ange-ftp-process-sentinel (proc str) | 1523 | (defun ange-ftp-process-sentinel (proc str) |
| 1524 | "When ftp process changes state, nuke all file-entries in cache." | 1524 | "When ftp process changes state, nuke all file-entries in cache." |
| 1525 | (let ((name (process-name proc))) | 1525 | (let ((name (process-name proc))) |
| 1526 | (if (string-match "\\*ftp \\([^@]+\\)@\\([^*]+\\)*" name) | 1526 | (if (string-match "\\*ftp \\([^@]+\\)@\\([^*]+\\)\\*" name) |
| 1527 | (let ((user (substring name (match-beginning 1) (match-end 1))) | 1527 | (let ((user (substring name (match-beginning 1) (match-end 1))) |
| 1528 | (host (substring name (match-beginning 2) (match-end 2)))) | 1528 | (host (substring name (match-beginning 2) (match-end 2)))) |
| 1529 | (ange-ftp-wipe-file-entries host user)))) | 1529 | (ange-ftp-wipe-file-entries host user)))) |