aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-01-13 03:25:05 +0000
committerRichard M. Stallman1997-01-13 03:25:05 +0000
commit3fda54a2a27f6779d4a7a916dd0aa588c79dcd20 (patch)
treee2bece501aa155c186f67d0f42225ff92af17ffb
parent2260964759e460d08809f7f2b2b50e209f96d148 (diff)
downloademacs-3fda54a2a27f6779d4a7a916dd0aa588c79dcd20.tar.gz
emacs-3fda54a2a27f6779d4a7a916dd0aa588c79dcd20.zip
Rename args PATHNAME to FILENAME in various functions.
(mh-mhn-compose-insertion): New arg ATTRIBUTES and change the interactive spec to read it.
-rw-r--r--lisp/mail/mh-mime.el46
1 files changed, 25 insertions, 21 deletions
diff --git a/lisp/mail/mh-mime.el b/lisp/mail/mh-mime.el
index dcb12b5588b..5c715878ebd 100644
--- a/lisp/mail/mh-mime.el
+++ b/lisp/mail/mh-mime.el
@@ -28,7 +28,7 @@
28 28
29;;; Change Log: 29;;; Change Log:
30 30
31;; $Id: mh-mime.el,v 1.5 1995/11/03 02:29:49 kwzh Exp erik $ 31;; $Id: mh-mime.el,v 1.6 1996/01/14 07:34:30 erik Exp rms $
32 32
33;;; Code: 33;;; Code:
34 34
@@ -66,20 +66,24 @@ MH profile.")
66 ("video/mpeg")) 66 ("video/mpeg"))
67 "Legal MIME content types. See documentation for \\[mh-edit-mhn].") 67 "Legal MIME content types. See documentation for \\[mh-edit-mhn].")
68 68
69(defun mh-mhn-compose-insertion (pathname type description) 69(defun mh-mhn-compose-insertion (filename type description attributes)
70 "Add a directive to insert a MIME message part from a file. 70 "Add a directive to insert a MIME message part from a file.
71This is the typical way to insert non-text parts in a message. 71This is the typical way to insert non-text parts in a message.
72Arguments are PATHNAME, which tells where to find the file, TYPE, the 72Arguments are FILENAME, which tells where to find the file, TYPE, the
73MIME content type, and DESCRIPTION, a line of text for the 73MIME content type, and DESCRIPTION, a line of text for the
74Content-description header. See also \\[mh-edit-mhn]." 74Content-description header. See also \\[mh-edit-mhn]."
75 (interactive (list 75 (interactive (let ((filename (read-file-name "Insert contents of: ")))
76 (read-file-name "Insert contents of: ") 76 (list
77 (completing-read "Content-type: " 77 filename
78 (completing-read "Content-type: "
78 mh-mime-content-types nil nil nil) 79 mh-mime-content-types nil nil nil)
79 (read-string "Content-description: "))) 80 (read-string "Content-description: ")
80 (mh-mhn-compose-type pathname type description)) 81 (read-string "Content-Attributes: "
82 (concat "name="
83 (file-name-nondirectory filename))))))
84 (mh-mhn-compose-type filename type description attributes ))
81 85
82(defun mh-mhn-compose-type (pathname type 86(defun mh-mhn-compose-type (filename type
83 &optional description attributes comment) 87 &optional description attributes comment)
84 (beginning-of-line) 88 (beginning-of-line)
85 (insert "#" type) 89 (insert "#" type)
@@ -90,45 +94,45 @@ Content-description header. See also \\[mh-edit-mhn]."
90 (insert " [") 94 (insert " [")
91 (and description 95 (and description
92 (insert description)) 96 (insert description))
93 (insert "] " (expand-file-name pathname)) 97 (insert "] " (expand-file-name filename))
94 (insert "\n")) 98 (insert "\n"))
95 99
96 100
97(defun mh-mhn-compose-anon-ftp (host pathname type description) 101(defun mh-mhn-compose-anon-ftp (host filename type description)
98 "Add a directive for a MIME anonymous ftp external body part. 102 "Add a directive for a MIME anonymous ftp external body part.
99This directive tells MH to include a reference to a 103This directive tells MH to include a reference to a
100message/external-body part retrievable by anonymous FTP. Arguments 104message/external-body part retrievable by anonymous FTP. Arguments
101are HOST and PATHNAME, which tell where to find the file, TYPE, the 105are HOST and FILENAME, which tell where to find the file, TYPE, the
102MIME content type, and DESCRIPTION, a line of text for the 106MIME content type, and DESCRIPTION, a line of text for the
103Content-description header. See also \\[mh-edit-mhn]." 107Content-description header. See also \\[mh-edit-mhn]."
104 (interactive (list 108 (interactive (list
105 (read-string "Remote host: ") 109 (read-string "Remote host: ")
106 (read-string "Remote pathname: ") 110 (read-string "Remote filename: ")
107 (completing-read "External Content-type: " 111 (completing-read "External Content-type: "
108 mh-mime-content-types nil nil nil) 112 mh-mime-content-types nil nil nil)
109 (read-string "External Content-description: "))) 113 (read-string "External Content-description: ")))
110 (mh-mhn-compose-external-type "anon-ftp" host pathname 114 (mh-mhn-compose-external-type "anon-ftp" host filename
111 type description)) 115 type description))
112 116
113(defun mh-mhn-compose-external-compressed-tar (host pathname description) 117(defun mh-mhn-compose-external-compressed-tar (host filename description)
114 "Add a directive to include a MIME reference to a compressed tar file. 118 "Add a directive to include a MIME reference to a compressed tar file.
115The file should be available via anonymous ftp. This directive 119The file should be available via anonymous ftp. This directive
116tells MH to include a reference to a message/external-body part. 120tells MH to include a reference to a message/external-body part.
117Arguments are HOST and PATHNAME, which tell where to find the file, and 121Arguments are HOST and FILENAME, which tell where to find the file, and
118DESCRIPTION, a line of text for the Content-description header. 122DESCRIPTION, a line of text for the Content-description header.
119See also \\[mh-edit-mhn]." 123See also \\[mh-edit-mhn]."
120 (interactive (list 124 (interactive (list
121 (read-string "Remote host: ") 125 (read-string "Remote host: ")
122 (read-string "Remote pathname: ") 126 (read-string "Remote filename: ")
123 (read-string "Tar file Content-description: "))) 127 (read-string "Tar file Content-description: ")))
124 (mh-mhn-compose-external-type "anon-ftp" host pathname 128 (mh-mhn-compose-external-type "anon-ftp" host filename
125 "application/octet-stream" 129 "application/octet-stream"
126 description 130 description
127 "type=tar; conversions=x-compress" 131 "type=tar; conversions=x-compress"
128 "mode=image")) 132 "mode=image"))
129 133
130 134
131(defun mh-mhn-compose-external-type (access-type host pathname type 135(defun mh-mhn-compose-external-type (access-type host filename type
132 &optional description 136 &optional description
133 attributes extra-params comment) 137 attributes extra-params comment)
134 (beginning-of-line) 138 (beginning-of-line)
@@ -143,8 +147,8 @@ See also \\[mh-edit-mhn]."
143 (insert "] ") 147 (insert "] ")
144 (insert "access-type=" access-type "; ") 148 (insert "access-type=" access-type "; ")
145 (insert "site=" host) 149 (insert "site=" host)
146 (insert "; name=" (file-name-nondirectory pathname)) 150 (insert "; name=" (file-name-nondirectory filename))
147 (insert "; directory=\"" (file-name-directory pathname) "\"") 151 (insert "; directory=\"" (file-name-directory filename) "\"")
148 (and extra-params 152 (and extra-params
149 (insert "; " extra-params)) 153 (insert "; " extra-params))
150 (insert "\n")) 154 (insert "\n"))