diff options
| author | Richard M. Stallman | 1992-09-19 21:46:00 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1992-09-19 21:46:00 +0000 |
| commit | 55badf85bbc018b5f19dacf0d78419e2384f3cfc (patch) | |
| tree | 714abc2e910426ca69bc2b31aab94803585380d9 | |
| parent | 69b57d353ee48569ab82c7a1efa623709c09f55e (diff) | |
| download | emacs-55badf85bbc018b5f19dacf0d78419e2384f3cfc.tar.gz emacs-55badf85bbc018b5f19dacf0d78419e2384f3cfc.zip | |
entered into RCS
| -rw-r--r-- | lisp/ange-ftp.el | 17 | ||||
| -rw-r--r-- | lisp/vms-patch.el | 79 |
2 files changed, 85 insertions, 11 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el index 34e24e8ceda..ba0b2a40016 100644 --- a/lisp/ange-ftp.el +++ b/lisp/ange-ftp.el | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;; -*-Emacs-Lisp-*- | 1 | ;; -*-Emacs-Lisp-*- |
| 2 | ;;; This needs to be changed to use comint as the mode for the FTP buffer. | 2 | ;;; ??? Waiting for papers from several people. |
| 3 | ;; Description: transparent FTP support for GNU Emacs | 3 | ;; Description: transparent FTP support for GNU Emacs |
| 4 | 4 | ||
| 5 | ;;; Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. | 5 | ;;; Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. |
| @@ -60,12 +60,13 @@ | |||
| 60 | 60 | ||
| 61 | ;;; Passwords for user "anonymous": | 61 | ;;; Passwords for user "anonymous": |
| 62 | ;;; | 62 | ;;; |
| 63 | ;;; Passwords for the user "anonymous" (or "ftp") are handled specially. The | 63 | ;;; Passwords for the user "anonymous" (or "ftp") are handled |
| 64 | ;;; variable `ange-ftp-generate-anonymous-password' controls what happens: if | 64 | ;;; specially. The variable `ange-ftp-generate-anonymous-password' |
| 65 | ;;; the value of this variable is a string, then this is used as the password; | 65 | ;;; controls what happens: if the value of this variable is a string, |
| 66 | ;;; if non-nil, then a password is created from the name of the user and the | 66 | ;;; then this is used as the password; if non-nil (the default), then |
| 67 | ;;; hostname of the machine on which GNU Emacs is running; if nil (the | 67 | ;;; a password is created from the name of the user and the hostname |
| 68 | ;;; default) then the user is prompted for a password as normal. | 68 | ;;; of the machine on which GNU Emacs is running; if nil then the user |
| 69 | ;;; is prompted for a password as normal. | ||
| 69 | 70 | ||
| 70 | ;;; "Dumb" UNIX hosts: | 71 | ;;; "Dumb" UNIX hosts: |
| 71 | ;;; | 72 | ;;; |
| @@ -693,7 +694,7 @@ If non-nil but not a string, the user is prompted for the name.") | |||
| 693 | (defvar ange-ftp-default-account nil | 694 | (defvar ange-ftp-default-account nil |
| 694 | "*Account password to use when the user is the same as ange-ftp-default-user.") | 695 | "*Account password to use when the user is the same as ange-ftp-default-user.") |
| 695 | 696 | ||
| 696 | (defvar ange-ftp-generate-anonymous-password nil | 697 | (defvar ange-ftp-generate-anonymous-password t |
| 697 | "*If t, use a password of user@host when logging in as the anonymous user. | 698 | "*If t, use a password of user@host when logging in as the anonymous user. |
| 698 | If a string then use that as the password. | 699 | If a string then use that as the password. |
| 699 | If nil then prompt the user for a password.") | 700 | If nil then prompt the user for a password.") |
diff --git a/lisp/vms-patch.el b/lisp/vms-patch.el index 36e5e3caa6f..7f88e23b7fe 100644 --- a/lisp/vms-patch.el +++ b/lisp/vms-patch.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; vms-patch.el --- override parts of files.el for VMS. | 1 | ;;; vms-patch.el --- override parts of files.el for VMS. |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1986 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1986, 1992 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Maintainer: FSF | 5 | ;; Maintainer: FSF |
| 6 | ;; Keywords: vms | 6 | ;; Keywords: vms |
| @@ -71,11 +71,24 @@ FILENAME should lack slashes. | |||
| 71 | This is a separate function so your .emacs file or site-init.el can redefine it." | 71 | This is a separate function so your .emacs file or site-init.el can redefine it." |
| 72 | (string-match "^_\\$.*\\$" filename)) | 72 | (string-match "^_\\$.*\\$" filename)) |
| 73 | 73 | ||
| 74 | ;;; | ||
| 75 | ;;; This goes along with kepteditor.com which defines these logicals | ||
| 76 | ;;; If EMACS_COMMAND_ARGS is defined, it supersedes EMACS_FILE_NAME, | ||
| 77 | ;;; which is probably set up incorrectly anyway. | ||
| 78 | ;;; The function command-line-again is a kludge, but it does the job. | ||
| 79 | ;;; | ||
| 74 | (defun vms-suspend-resume-hook () | 80 | (defun vms-suspend-resume-hook () |
| 75 | "When resuming suspended Emacs, check for file to be found. | 81 | "When resuming suspended Emacs, check for file to be found. |
| 76 | If the logical name `EMACS_FILE_NAME' is defined, `find-file' that file." | 82 | If the logical name `EMACS_FILE_NAME' is defined, `find-file' that file." |
| 77 | (let ((file (vms-system-info "LOGICAL" "EMACS_FILE_NAME"))) | 83 | (let ((file (vms-system-info "LOGICAL" "EMACS_FILE_NAME")) |
| 78 | (if file (find-file file)))) | 84 | (args (vms-system-info "LOGICAL" "EMACS_COMMAND_ARGS")) |
| 85 | (line (vms-system-info "LOGICAL" "EMACS_FILE_LINE"))) | ||
| 86 | (if (not args) | ||
| 87 | (if file | ||
| 88 | (progn (find-file file) | ||
| 89 | (if line (goto-line (string-to-int line))))) | ||
| 90 | (cd (file-name-directory file)) | ||
| 91 | (vms-command-line-again)))) | ||
| 79 | 92 | ||
| 80 | (setq suspend-resume-hook 'vms-suspend-resume-hook) | 93 | (setq suspend-resume-hook 'vms-suspend-resume-hook) |
| 81 | 94 | ||
| @@ -87,6 +100,52 @@ If the logical name `EMACS_FILE_NAME' is defined, `find-file' that file." | |||
| 87 | 100 | ||
| 88 | (setq suspend-hook 'vms-suspend-hook) | 101 | (setq suspend-hook 'vms-suspend-hook) |
| 89 | 102 | ||
| 103 | ;;; | ||
| 104 | ;;; A kludge that allows reprocessing of the command line. This is mostly | ||
| 105 | ;;; to allow a spawned VMS mail process to do something reasonable when | ||
| 106 | ;;; used in conjunction with the modifications to sysdep.c that allow | ||
| 107 | ;;; Emacs to attach to a "foster" parent. | ||
| 108 | ;;; | ||
| 109 | (defun vms-command-line-again () | ||
| 110 | "Reprocess command line arguments. VMS specific. | ||
| 111 | Command line arguments are initialized from the logical EMACS_COMMAND_ARGS | ||
| 112 | which is defined by kepteditor.com. On VMS this allows attaching to a | ||
| 113 | spawned Emacs and doing things like \"emacs -l myfile.el -f doit\"" | ||
| 114 | (let* ((args (downcase (vms-system-info "LOGICAL" "EMACS_COMMAND_ARGS"))) | ||
| 115 | (command-line-args (list "emacs")) | ||
| 116 | (beg 0) | ||
| 117 | (end 0) | ||
| 118 | (len (length args)) | ||
| 119 | this-char) | ||
| 120 | (if args | ||
| 121 | (progn | ||
| 122 | ;;; replace non-printable stuff with spaces | ||
| 123 | (while (< beg (length args)) | ||
| 124 | (if (or (> 33 (setq this-char (aref args beg))) | ||
| 125 | (< 127 this-char)) | ||
| 126 | (aset args beg 32)) | ||
| 127 | (setq beg (1+ beg))) | ||
| 128 | (setq beg (1- (length args))) | ||
| 129 | (while (= 32 (aref args beg)) (setq beg (1- beg))) | ||
| 130 | (setq args (substring args 0 (1+ beg))) | ||
| 131 | (setq beg 0) | ||
| 132 | ;;; now start parsing args | ||
| 133 | (while (< beg (length args)) | ||
| 134 | (while (and (< beg (length args)) | ||
| 135 | (or (> 33 (setq this-char (aref args beg))) | ||
| 136 | (< 127 this-char)) | ||
| 137 | (setq beg (1+ beg)))) | ||
| 138 | (setq end (1+ beg)) | ||
| 139 | (while (and (< end (length args)) | ||
| 140 | (< 32 (setq this-char (aref args end))) | ||
| 141 | (> 127 this-char)) | ||
| 142 | (setq end (1+ end))) | ||
| 143 | (setq command-line-args (append | ||
| 144 | command-line-args | ||
| 145 | (list (substring args beg end)))) | ||
| 146 | (setq beg (1+ end))) | ||
| 147 | (command-line))))) | ||
| 148 | |||
| 90 | (defun vms-read-directory (dirname switches buffer) | 149 | (defun vms-read-directory (dirname switches buffer) |
| 91 | (save-excursion | 150 | (save-excursion |
| 92 | (set-buffer buffer) | 151 | (set-buffer buffer) |
| @@ -113,4 +172,18 @@ If the logical name `EMACS_FILE_NAME' is defined, `find-file' that file." | |||
| 113 | (mapconcat 'identity switches " ")) | 172 | (mapconcat 'identity switches " ")) |
| 114 | nil nil nil))) | 173 | nil nil nil))) |
| 115 | 174 | ||
| 175 | ;;; | ||
| 176 | ;;; Fuctions for using Emacs as a VMS Mail editor | ||
| 177 | ;;; | ||
| 178 | (autoload 'vms-pmail-setup "vms-pmail" | ||
| 179 | "Set up file assuming use by VMS Mail utility. | ||
| 180 | The buffer is put into text-mode, auto-save is turned off and the | ||
| 181 | following bindings are established. | ||
| 182 | |||
| 183 | \\[vms-pmail-save-and-exit] vms-pmail-save-and-exit | ||
| 184 | \\[vms-pmail-abort] vms-pmail-abort | ||
| 185 | |||
| 186 | All other Emacs commands are still available." | ||
| 187 | t) | ||
| 188 | |||
| 116 | ;;; vms-patch.el ends here | 189 | ;;; vms-patch.el ends here |