diff options
| author | Richard M. Stallman | 1997-07-25 00:55:06 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-25 00:55:06 +0000 |
| commit | 1402211d73ec1f8a766c930947b5462e8b22ff52 (patch) | |
| tree | 308e60d3e6b34b112bf30d2ff1be9aec66437de7 | |
| parent | 5e32e1197aa6848132a04c1b8c799ba58a0f4f32 (diff) | |
| download | emacs-1402211d73ec1f8a766c930947b5462e8b22ff52.tar.gz emacs-1402211d73ec1f8a766c930947b5462e8b22ff52.zip | |
Customized.
Doc fixes.
| -rw-r--r-- | lisp/ange-ftp.el | 287 |
1 files changed, 197 insertions, 90 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 8ad412f3331..6760dba5cb9 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el | |||
| @@ -626,13 +626,22 @@ | |||
| 626 | ;;;; User customization variables. | 626 | ;;;; User customization variables. |
| 627 | ;;;; ------------------------------------------------------------ | 627 | ;;;; ------------------------------------------------------------ |
| 628 | 628 | ||
| 629 | (defvar ange-ftp-name-format | 629 | (defgroup ange-ftp nil |
| 630 | "Accessing remote files and directories using FTP | ||
| 631 | made as simple and transparent as possible." | ||
| 632 | :group 'files | ||
| 633 | :prefix "ange-ftp-") | ||
| 634 | |||
| 635 | (defcustom ange-ftp-name-format | ||
| 630 | '("^/\\(\\([^@/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4)) | 636 | '("^/\\(\\([^@/:]*\\)@\\)?\\([^@/:]*[^@/:.]\\):\\(.*\\)" . (3 2 4)) |
| 631 | "*Format of a fully expanded remote file name. | 637 | "*Format of a fully expanded remote file name. |
| 638 | |||
| 632 | This is a list of the form \(REGEXP HOST USER NAME\), | 639 | This is a list of the form \(REGEXP HOST USER NAME\), |
| 633 | where REGEXP is a regular expression matching | 640 | where REGEXP is a regular expression matching |
| 634 | the full remote name, and HOST, USER, and NAME are the numbers of | 641 | the full remote name, and HOST, USER, and NAME are the numbers of |
| 635 | parenthesized expressions in REGEXP for the components (in that order).") | 642 | parenthesized expressions in REGEXP for the components (in that order)." |
| 643 | :group 'ange-ftp | ||
| 644 | :type 'regexp) | ||
| 636 | 645 | ||
| 637 | ;; ange-ftp-multi-skip-msgs should only match ###-, where ### is one of | 646 | ;; ange-ftp-multi-skip-msgs should only match ###-, where ### is one of |
| 638 | ;; the number codes corresponding to ange-ftp-good-msgs or ange-ftp-fatal-msgs. | 647 | ;; the number codes corresponding to ange-ftp-good-msgs or ange-ftp-fatal-msgs. |
| @@ -652,111 +661,178 @@ parenthesized expressions in REGEXP for the components (in that order).") | |||
| 652 | ;; mode and hangs. Have it ignore 550- instead. It will then barf | 661 | ;; mode and hangs. Have it ignore 550- instead. It will then barf |
| 653 | ;; when it gets the 550 line, as it should. | 662 | ;; when it gets the 550 line, as it should. |
| 654 | 663 | ||
| 655 | (defvar ange-ftp-skip-msgs | 664 | (defcustom ange-ftp-skip-msgs |
| 656 | (concat "^200 \\(PORT\\|Port\\) \\|^331 \\|^150 \\|^350 \\|^[0-9]+ bytes \\|" | 665 | (concat "^200 \\(PORT\\|Port\\) \\|^331 \\|^150 \\|^350 \\|^[0-9]+ bytes \\|" |
| 657 | "^Connected \\|^$\\|^Remote system\\|^Using\\|^ \\|Password:\\|" | 666 | "^Connected \\|^$\\|^Remote system\\|^Using\\|^ \\|Password:\\|" |
| 658 | "^Data connection \\|" | 667 | "^Data connection \\|" |
| 659 | "^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye\\|" | 668 | "^local:\\|^Trying\\|^125 \\|^550-\\|^221 .*oodbye\\|" |
| 660 | "^227 .*[Pp]assive") | 669 | "^227 .*[Pp]assive") |
| 661 | "*Regular expression matching ftp messages that can be ignored.") | 670 | "*Regular expression matching ftp messages that can be ignored." |
| 671 | :group 'ange-ftp | ||
| 672 | :type 'regexp) | ||
| 662 | 673 | ||
| 663 | (defvar ange-ftp-fatal-msgs | 674 | (defcustom ange-ftp-fatal-msgs |
| 664 | (concat "^ftp: \\|^Not connected\\|^530 \\|^4[25]1 \\|rcmd: \\|" | 675 | (concat "^ftp: \\|^Not connected\\|^530 \\|^4[25]1 \\|rcmd: \\|" |
| 665 | "^No control connection\\|unknown host\\|^lost connection") | 676 | "^No control connection\\|unknown host\\|^lost connection") |
| 666 | "*Regular expression matching ftp messages that indicate serious errors. | 677 | "*Regular expression matching ftp messages that indicate serious errors. |
| 667 | These mean that the FTP process should (or already has) been killed.") | ||
| 668 | 678 | ||
| 669 | (defvar ange-ftp-gateway-fatal-msgs | 679 | These mean that the FTP process should (or already has) been killed." |
| 680 | :group 'ange-ftp | ||
| 681 | :type 'regexp) | ||
| 682 | |||
| 683 | (defcustom ange-ftp-gateway-fatal-msgs | ||
| 670 | "No route to host\\|Connection closed\\|No such host\\|Login incorrect" | 684 | "No route to host\\|Connection closed\\|No such host\\|Login incorrect" |
| 671 | "*Regular expression matching login failure messages from rlogin/telnet.") | 685 | "*Regular expression matching login failure messages from rlogin/telnet." |
| 686 | :group 'ange-ftp | ||
| 687 | :type 'regexp) | ||
| 672 | 688 | ||
| 673 | (defvar ange-ftp-xfer-size-msgs | 689 | (defcustom ange-ftp-xfer-size-msgs |
| 674 | "^150 .* connection for .* (\\([0-9]+\\) bytes)" | 690 | "^150 .* connection for .* (\\([0-9]+\\) bytes)" |
| 675 | "*Regular expression used to determine the number of bytes in a FTP transfer.") | 691 | "*Regular expression used to determine the number of bytes in a FTP transfer." |
| 692 | :group 'ange-ftp | ||
| 693 | :type 'regexp) | ||
| 676 | 694 | ||
| 677 | (defvar ange-ftp-tmp-name-template "/tmp/ange-ftp" | 695 | (defcustom ange-ftp-tmp-name-template "/tmp/ange-ftp" |
| 678 | "*Template used to create temporary files.") | 696 | "*Template used to create temporary files." |
| 697 | :group 'ange-ftp | ||
| 698 | :type 'directory) | ||
| 679 | 699 | ||
| 680 | (defvar ange-ftp-gateway-tmp-name-template "/tmp/ange-ftp" | 700 | (defcustom ange-ftp-gateway-tmp-name-template "/tmp/ange-ftp" |
| 681 | "*Template used to create temporary files when ftp-ing through a gateway. | 701 | "*Template used to create temporary files when ftp-ing through a gateway. |
| 702 | |||
| 682 | Files starting with this prefix need to be accessible from BOTH the local | 703 | Files starting with this prefix need to be accessible from BOTH the local |
| 683 | machine and the gateway machine, and need to have the SAME name on both | 704 | machine and the gateway machine, and need to have the SAME name on both |
| 684 | machines, that is, /tmp is probably NOT what you want, since that is rarely | 705 | machines, that is, /tmp is probably NOT what you want, since that is rarely |
| 685 | cross-mounted.") | 706 | cross-mounted." |
| 707 | :group 'ange-ftp | ||
| 708 | :type 'directory) | ||
| 686 | 709 | ||
| 687 | (defvar ange-ftp-netrc-filename "~/.netrc" | 710 | (defcustom ange-ftp-netrc-filename "~/.netrc" |
| 688 | "*File in .netrc format to search for passwords.") | 711 | "*File in .netrc format to search for passwords." |
| 712 | :group 'ange-ftp | ||
| 713 | :type 'file) | ||
| 689 | 714 | ||
| 690 | (defvar ange-ftp-disable-netrc-security-check nil | 715 | (defcustom ange-ftp-disable-netrc-security-check nil |
| 691 | "*If non-nil avoid checking permissions on the .netrc file.") | 716 | "*If non-nil avoid checking permissions on the .netrc file." |
| 717 | :group 'ange-ftp | ||
| 718 | :type 'boolean) | ||
| 692 | 719 | ||
| 693 | (defvar ange-ftp-default-user nil | 720 | (defcustom ange-ftp-default-user nil |
| 694 | "*User name to use when none is specified in a file name. | 721 | "*User name to use when none is specified in a file name. |
| 722 | |||
| 695 | If non-nil but not a string, you are prompted for the name. | 723 | If non-nil but not a string, you are prompted for the name. |
| 696 | If nil, the value of `ange-ftp-netrc-default-user' is used. | 724 | If nil, the value of `ange-ftp-netrc-default-user' is used. |
| 697 | If that is nil too, then your login name is used. | 725 | If that is nil too, then your login name is used. |
| 698 | 726 | ||
| 699 | Once a connection to a given host has been initiated, the user name | 727 | Once a connection to a given host has been initiated, the user name |
| 700 | and password information for that host are cached and re-used by | 728 | and password information for that host are cached and re-used by |
| 701 | ange-ftp. Use `ange-ftp-set-user' to change the cached values, | 729 | ange-ftp. Use \\[ange-ftp-set-user] to change the cached values, |
| 702 | since setting `ange-ftp-default-user' directly does not affect | 730 | since setting `ange-ftp-default-user' directly does not affect |
| 703 | the cached information.") | 731 | the cached information." |
| 732 | :group 'ange-ftp | ||
| 733 | :type '(choice (const :tag "Default" nil) | ||
| 734 | (const :tag "Prompt" t) | ||
| 735 | string)) | ||
| 704 | 736 | ||
| 705 | (defvar ange-ftp-netrc-default-user nil | 737 | (defcustom ange-ftp-netrc-default-user nil |
| 706 | "Alternate default user name to use when none is specified. | 738 | "Alternate default user name to use when none is specified. |
| 707 | This variable is set from the `default' command in your `.netrc' file, | ||
| 708 | if there is one.") | ||
| 709 | 739 | ||
| 710 | (defvar ange-ftp-default-password nil | 740 | This variable is set from the `default' command in your `.netrc' file, |
| 711 | "*Password to use when the user name equals `ange-ftp-default-user'.") | 741 | if there is one." |
| 712 | 742 | :group 'ange-ftp | |
| 713 | (defvar ange-ftp-default-account nil | 743 | :type '(choice (const :tag "Default" nil) |
| 714 | "*Account to use when the user name equals `ange-ftp-default-user'.") | 744 | string)) |
| 715 | 745 | ||
| 716 | (defvar ange-ftp-netrc-default-password nil | 746 | (defcustom ange-ftp-default-password nil |
| 717 | "*Password to use when the user name equals `ange-ftp-netrc-default-user'.") | 747 | "*Password to use when the user name equals `ange-ftp-default-user'." |
| 718 | 748 | :group 'ange-ftp | |
| 719 | (defvar ange-ftp-netrc-default-account nil | 749 | :type '(choice (const :tag "Default" nil) |
| 720 | "*Account to use when the user name equals `ange-ftp-netrc-default-user'.") | 750 | string)) |
| 721 | 751 | ||
| 722 | (defvar ange-ftp-generate-anonymous-password t | 752 | (defcustom ange-ftp-default-account nil |
| 753 | "*Account to use when the user name equals `ange-ftp-default-user'." | ||
| 754 | :group 'ange-ftp | ||
| 755 | :type '(choice (const :tag "Default" nil) | ||
| 756 | string)) | ||
| 757 | |||
| 758 | (defcustom ange-ftp-netrc-default-password nil | ||
| 759 | "*Password to use when the user name equals `ange-ftp-netrc-default-user'." | ||
| 760 | :group 'ange-ftp | ||
| 761 | :type '(choice (const :tag "Default" nil) | ||
| 762 | string)) | ||
| 763 | |||
| 764 | (defcustom ange-ftp-netrc-default-account nil | ||
| 765 | "*Account to use when the user name equals `ange-ftp-netrc-default-user'." | ||
| 766 | :group 'ange-ftp | ||
| 767 | :type '(choice (const :tag "Default" nil) | ||
| 768 | string)) | ||
| 769 | |||
| 770 | (defcustom ange-ftp-generate-anonymous-password t | ||
| 723 | "*If t, use value of `user-mail-address' as password for anonymous ftp. | 771 | "*If t, use value of `user-mail-address' as password for anonymous ftp. |
| 724 | If a string, then use that string as the password. | ||
| 725 | If nil, prompt the user for a password.") | ||
| 726 | 772 | ||
| 727 | (defvar ange-ftp-dumb-unix-host-regexp nil | 773 | If a string, then use that string as the password. |
| 728 | "*If non-nil, regexp matching hosts on which `dir' command lists directory.") | 774 | If nil, prompt the user for a password." |
| 729 | 775 | :group 'ange-ftp | |
| 730 | (defvar ange-ftp-binary-file-name-regexp | 776 | :type '(choice (const :tag "User address" t) |
| 777 | (const :tag "Prompt" nil) | ||
| 778 | string)) | ||
| 779 | |||
| 780 | (defcustom ange-ftp-dumb-unix-host-regexp nil | ||
| 781 | "*If non-nil, regexp matching hosts on which `dir' command lists directory." | ||
| 782 | :group 'ange-ftp | ||
| 783 | :type '(choice (const :tag "Default" nil) | ||
| 784 | string)) | ||
| 785 | |||
| 786 | (defcustom ange-ftp-binary-file-name-regexp | ||
| 731 | (concat "\\.[zZ]$\\|\\.lzh$\\|\\.arc$\\|\\.zip$\\|\\.zoo$\\|\\.tar$\\|" | 787 | (concat "\\.[zZ]$\\|\\.lzh$\\|\\.arc$\\|\\.zip$\\|\\.zoo$\\|\\.tar$\\|" |
| 732 | "\\.dvi$\\|\\.ps$\\|\\.elc$\\|TAGS$\\|\\.gif$\\|" | 788 | "\\.dvi$\\|\\.ps$\\|\\.elc$\\|TAGS$\\|\\.gif$\\|" |
| 733 | "\\.EXE\\(;[0-9]+\\)?$\\|\\.[zZ]-part-..$\\|\\.gz$\\|" | 789 | "\\.EXE\\(;[0-9]+\\)?$\\|\\.[zZ]-part-..$\\|\\.gz$\\|" |
| 734 | "\\.taz$\\|\\.tgz$") | 790 | "\\.taz$\\|\\.tgz$") |
| 735 | "*If a file matches this regexp then it is transferred in binary mode.") | 791 | "*If a file matches this regexp then it is transferred in binary mode." |
| 792 | :group 'ange-ftp | ||
| 793 | :type 'regexp) | ||
| 736 | 794 | ||
| 737 | (defvar ange-ftp-gateway-host nil | 795 | (defcustom ange-ftp-gateway-host nil |
| 738 | "*Name of host to use as gateway machine when local FTP isn't possible.") | 796 | "*Name of host to use as gateway machine when local FTP isn't possible." |
| 797 | :group 'ange-ftp | ||
| 798 | :type '(choice (const :tag "Default" nil) | ||
| 799 | string)) | ||
| 739 | 800 | ||
| 740 | (defvar ange-ftp-local-host-regexp ".*" | 801 | (defcustom ange-ftp-local-host-regexp ".*" |
| 741 | "*Regexp selecting hosts which can be reached directly with ftp. | 802 | "*Regexp selecting hosts which can be reached directly with ftp. |
| 803 | |||
| 742 | For other hosts the FTP process is started on \`ange-ftp-gateway-host\' | 804 | For other hosts the FTP process is started on \`ange-ftp-gateway-host\' |
| 743 | instead, and/or reached via \`ange-ftp-gateway-ftp-program-name\'.") | 805 | instead, and/or reached via \`ange-ftp-gateway-ftp-program-name\'." |
| 806 | :group 'ange-ftp | ||
| 807 | :type 'regexp) | ||
| 744 | 808 | ||
| 745 | (defvar ange-ftp-gateway-program-interactive nil | 809 | (defcustom ange-ftp-gateway-program-interactive nil |
| 746 | "*If non-nil then the gateway program should give a shell prompt. | 810 | "*If non-nil then the gateway program should give a shell prompt. |
| 747 | Both telnet and rlogin do something like this.") | ||
| 748 | 811 | ||
| 749 | (defvar ange-ftp-gateway-program remote-shell-program | 812 | Both telnet and rlogin do something like this." |
| 813 | :group 'ange-ftp | ||
| 814 | :type 'boolean) | ||
| 815 | |||
| 816 | (defcustom ange-ftp-gateway-program remote-shell-program | ||
| 750 | "*Name of program to spawn a shell on the gateway machine. | 817 | "*Name of program to spawn a shell on the gateway machine. |
| 751 | Valid candidates are rsh (remsh on some systems), telnet and rlogin. See | ||
| 752 | also the gateway variable above.") | ||
| 753 | 818 | ||
| 754 | (defvar ange-ftp-gateway-prompt-pattern "^[^#$%>;\n]*[#$%>;] *" | 819 | Valid candidates are rsh (remsh on some systems), telnet and rlogin. See |
| 820 | also the gateway variable above." | ||
| 821 | :group 'ange-ftp | ||
| 822 | :type '(choice (const "rsh") | ||
| 823 | (const "telnet") | ||
| 824 | (const "rlogin") | ||
| 825 | string)) | ||
| 826 | |||
| 827 | (defcustom ange-ftp-gateway-prompt-pattern "^[^#$%>;\n]*[#$%>;] *" | ||
| 755 | "*Regexp matching prompt after complete login sequence on gateway machine. | 828 | "*Regexp matching prompt after complete login sequence on gateway machine. |
| 829 | |||
| 756 | A match for this means the shell is now awaiting input. Make this regexp as | 830 | A match for this means the shell is now awaiting input. Make this regexp as |
| 757 | strict as possible; it shouldn't match *anything* at all except the user's | 831 | strict as possible; it shouldn't match *anything* at all except the user's |
| 758 | initial prompt. The above string will fail under most SUN-3's since it | 832 | initial prompt. The above string will fail under most SUN-3's since it |
| 759 | matches the login banner.") | 833 | matches the login banner." |
| 834 | :group 'ange-ftp | ||
| 835 | :type 'regexp) | ||
| 760 | 836 | ||
| 761 | (defvar ange-ftp-gateway-setup-term-command | 837 | (defvar ange-ftp-gateway-setup-term-command |
| 762 | (if (eq system-type 'hpux) | 838 | (if (eq system-type 'hpux) |
| @@ -766,55 +842,86 @@ matches the login banner.") | |||
| 766 | This command should stop the terminal from echoing each command, and | 842 | This command should stop the terminal from echoing each command, and |
| 767 | arrange to strip out trailing ^M characters.") | 843 | arrange to strip out trailing ^M characters.") |
| 768 | 844 | ||
| 769 | (defvar ange-ftp-smart-gateway nil | 845 | (defcustom ange-ftp-smart-gateway nil |
| 770 | "*Non-nil means the ftp gateway and/or the gateway ftp program is smart. | 846 | "*Non-nil means the ftp gateway and/or the gateway ftp program is smart. |
| 847 | |||
| 771 | Don't bother telnetting, etc., already connected to desired host transparently, | 848 | Don't bother telnetting, etc., already connected to desired host transparently, |
| 772 | or just issue a user@host command in case \`ange-ftp-gateway-host\' is non-nil.") | 849 | or just issue a user@host command in case \`ange-ftp-gateway-host\' is non-nil." |
| 850 | :group 'ange-ftp | ||
| 851 | :type 'boolean) | ||
| 773 | 852 | ||
| 774 | (defvar ange-ftp-smart-gateway-port "21" | 853 | (defcustom ange-ftp-smart-gateway-port "21" |
| 775 | "*Port on gateway machine to use when smart gateway is in operation.") | 854 | "*Port on gateway machine to use when smart gateway is in operation." |
| 855 | :group 'ange-ftp | ||
| 856 | :type 'integer) | ||
| 776 | 857 | ||
| 777 | (defvar ange-ftp-send-hash t | 858 | (defcustom ange-ftp-send-hash t |
| 778 | "*If non-nil, send the HASH command to the FTP client.") | 859 | "*If non-nil, send the HASH command to the FTP client." |
| 860 | :group 'ange-ftp | ||
| 861 | :type 'boolean) | ||
| 779 | 862 | ||
| 780 | (defvar ange-ftp-binary-hash-mark-size nil | 863 | (defcustom ange-ftp-binary-hash-mark-size nil |
| 781 | "*Default size, in bytes, between hash-marks when transferring a binary file. | 864 | "*Default size, in bytes, between hash-marks when transferring a binary file. |
| 782 | If NIL, this variable will be locally overridden if the FTP client outputs a | 865 | If nil, this variable will be locally overridden if the FTP client outputs a |
| 783 | suitable response to the HASH command. If non-NIL then this value takes | 866 | suitable response to the HASH command. If non-nil, this value takes |
| 784 | precedence over the local value.") | 867 | precedence over the local value." |
| 785 | 868 | :group 'ange-ftp | |
| 786 | (defvar ange-ftp-ascii-hash-mark-size 1024 | 869 | :type '(choice (const :tag "Overridden" nil) |
| 870 | integer)) | ||
| 871 | |||
| 872 | (defcustom ange-ftp-ascii-hash-mark-size 1024 | ||
| 787 | "*Default size, in bytes, between hash-marks when transferring an ASCII file. | 873 | "*Default size, in bytes, between hash-marks when transferring an ASCII file. |
| 788 | This variable is buffer-local and will be locally overridden if the FTP client | 874 | This variable is buffer-local and will be locally overridden if the FTP client |
| 789 | outputs a suitable response to the HASH command.") | 875 | outputs a suitable response to the HASH command." |
| 876 | :group 'ange-ftp | ||
| 877 | :type 'integer) | ||
| 790 | 878 | ||
| 791 | (defvar ange-ftp-process-verbose t | 879 | (defcustom ange-ftp-process-verbose t |
| 792 | "*If non-NIL then be chatty about interaction with the FTP process.") | 880 | "*If non-nil then be chatty about interaction with the FTP process." |
| 881 | :group 'ange-ftp | ||
| 882 | :type 'boolean) | ||
| 793 | 883 | ||
| 794 | (defvar ange-ftp-ftp-program-name "ftp" | 884 | (defcustom ange-ftp-ftp-program-name "ftp" |
| 795 | "*Name of FTP program to run.") | 885 | "*Name of FTP program to run." |
| 886 | :group 'ange-ftp | ||
| 887 | :type 'string) | ||
| 796 | 888 | ||
| 797 | (defvar ange-ftp-gateway-ftp-program-name "ftp" | 889 | (defcustom ange-ftp-gateway-ftp-program-name "ftp" |
| 798 | "*Name of FTP program to run when accessing non-local hosts. | 890 | "*Name of FTP program to run when accessing non-local hosts. |
| 799 | Some AT&T folks claim to use something called `pftp' here.") | ||
| 800 | 891 | ||
| 801 | (defvar ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v") | 892 | Some AT&T folks claim to use something called `pftp' here." |
| 802 | "*A list of arguments passed to the FTP program when started.") | 893 | :group 'ange-ftp |
| 894 | :type 'string) | ||
| 803 | 895 | ||
| 804 | (defvar ange-ftp-nslookup-program nil | 896 | (defcustom ange-ftp-ftp-program-args '("-i" "-n" "-g" "-v") |
| 805 | "*If non-NIL then a string naming nslookup program." ) | 897 | "*A list of arguments passed to the FTP program when started." |
| 898 | :group 'ange-ftp | ||
| 899 | :type '(repeat string)) | ||
| 806 | 900 | ||
| 807 | (defvar ange-ftp-make-backup-files () | 901 | (defcustom ange-ftp-nslookup-program nil |
| 808 | "*Non-nil means make backup files for \"magic\" remote files.") | 902 | "*If non-nil, this is a string naming the nslookup program." |
| 903 | :group 'ange-ftp | ||
| 904 | :type '(choice (const :tag "None" nil) | ||
| 905 | string)) | ||
| 809 | 906 | ||
| 810 | (defvar ange-ftp-retry-time 5 | 907 | (defcustom ange-ftp-make-backup-files () |
| 811 | "*Number of seconds to wait before retry if file or listing doesn't arrive. | 908 | "*Non-nil means make backup files for \"magic\" remote files." |
| 812 | This might need to be increased for very slow connections.") | 909 | :group 'ange-ftp |
| 910 | :type 'boolean) | ||
| 813 | 911 | ||
| 814 | (defvar ange-ftp-auto-save 0 | 912 | (defcustom ange-ftp-retry-time 5 |
| 815 | "If 1, allows ange-ftp files to be auto-saved. | 913 | "*Number of seconds to wait before retry if file or listing doesn't arrive. |
| 816 | If 0, suppresses auto-saving of ange-ftp files. | 914 | This might need to be increased for very slow connections." |
| 817 | Don't use any other value.") | 915 | :group 'ange-ftp |
| 916 | :type 'integer) | ||
| 917 | |||
| 918 | (defcustom ange-ftp-auto-save 0 | ||
| 919 | "If 1, allow ange-ftp files to be auto-saved. | ||
| 920 | If 0, inhibit auto-saving of ange-ftp files. | ||
| 921 | Don't use any other value." | ||
| 922 | :group 'ange-ftp | ||
| 923 | :type '(choice (const :tag "Suppress" 0) | ||
| 924 | (const :tag "Allow" 1))) | ||
| 818 | 925 | ||
| 819 | ;;;; ------------------------------------------------------------ | 926 | ;;;; ------------------------------------------------------------ |
| 820 | ;;;; Hash table support. | 927 | ;;;; Hash table support. |
| @@ -1712,9 +1819,9 @@ good, skip, fatal, or unknown." | |||
| 1712 | (defun ange-ftp-raw-send-cmd (proc cmd &optional msg cont nowait) | 1819 | (defun ange-ftp-raw-send-cmd (proc cmd &optional msg cont nowait) |
| 1713 | "Low-level routine to send the given ftp CMD to the ftp PROCESS. | 1820 | "Low-level routine to send the given ftp CMD to the ftp PROCESS. |
| 1714 | MSG is an optional message to output before and after the command. | 1821 | MSG is an optional message to output before and after the command. |
| 1715 | If CONT is non-NIL then it is either a function or a list of function and | 1822 | If CONT is non-nil then it is either a function or a list of function and |
| 1716 | some arguments. The function will be called when the ftp command has completed. | 1823 | some arguments. The function will be called when the ftp command has completed. |
| 1717 | If CONT is NIL then this routine will return \( RESULT . LINE \) where RESULT | 1824 | If CONT is nil then this routine will return \( RESULT . LINE \) where RESULT |
| 1718 | is whether the command was successful, and LINE is the line from the FTP | 1825 | is whether the command was successful, and LINE is the line from the FTP |
| 1719 | process that caused the command to complete. | 1826 | process that caused the command to complete. |
| 1720 | If NOWAIT is given then the routine will return immediately the command has | 1827 | If NOWAIT is given then the routine will return immediately the command has |
| @@ -2772,7 +2879,7 @@ this also returns nil." | |||
| 2772 | 2879 | ||
| 2773 | (defun ange-ftp-get-pwd (host user) | 2880 | (defun ange-ftp-get-pwd (host user) |
| 2774 | "Attempts to get the current working directory for the given HOST/USER pair. | 2881 | "Attempts to get the current working directory for the given HOST/USER pair. |
| 2775 | Returns \( DIR . LINE \) where DIR is either the directory or NIL if not found, | 2882 | Returns \( DIR . LINE \) where DIR is either the directory or nil if not found, |
| 2776 | and LINE is the relevant success or fail line from the FTP-client." | 2883 | and LINE is the relevant success or fail line from the FTP-client." |
| 2777 | (let* ((result (ange-ftp-send-cmd host user '(pwd) "Getting PWD")) | 2884 | (let* ((result (ange-ftp-send-cmd host user '(pwd) "Getting PWD")) |
| 2778 | (line (cdr result)) | 2885 | (line (cdr result)) |