diff options
| author | Stefan Monnier | 2002-09-11 20:23:56 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-09-11 20:23:56 +0000 |
| commit | 27c079eb305c2aea36a903204fc4be663a7ec726 (patch) | |
| tree | 4950534865a23a3f0ed62eb96792f6afa2de035c | |
| parent | f372494111e32d5e310e79f8c62d5ea203c87d46 (diff) | |
| download | emacs-27c079eb305c2aea36a903204fc4be663a7ec726.tar.gz emacs-27c079eb305c2aea36a903204fc4be663a7ec726.zip | |
(define-mail-user-agent): Moved from simple.el.
| -rw-r--r-- | lisp/subr.el | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 5242ebbbd15..dc16ed3dbce 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -2189,7 +2189,7 @@ clone should be incorporated in the clone." | |||
| 2189 | ;;(overlay-put ol2 'face 'underline) | 2189 | ;;(overlay-put ol2 'face 'underline) |
| 2190 | (overlay-put ol2 'evaporate t) | 2190 | (overlay-put ol2 'evaporate t) |
| 2191 | (overlay-put ol2 'text-clones dups))) | 2191 | (overlay-put ol2 'text-clones dups))) |
| 2192 | 2192 | ||
| 2193 | (defun play-sound (sound) | 2193 | (defun play-sound (sound) |
| 2194 | "SOUND is a list of the form `(sound KEYWORD VALUE...)'. | 2194 | "SOUND is a list of the form `(sound KEYWORD VALUE...)'. |
| 2195 | The following keywords are recognized: | 2195 | The following keywords are recognized: |
| @@ -2211,4 +2211,39 @@ a system-dependent default device name is used." | |||
| 2211 | (error "This Emacs binary lacks sound support")) | 2211 | (error "This Emacs binary lacks sound support")) |
| 2212 | (play-sound-internal sound)) | 2212 | (play-sound-internal sound)) |
| 2213 | 2213 | ||
| 2214 | (defun define-mail-user-agent (symbol composefunc sendfunc | ||
| 2215 | &optional abortfunc hookvar) | ||
| 2216 | "Define a symbol to identify a mail-sending package for `mail-user-agent'. | ||
| 2217 | |||
| 2218 | SYMBOL can be any Lisp symbol. Its function definition and/or | ||
| 2219 | value as a variable do not matter for this usage; we use only certain | ||
| 2220 | properties on its property list, to encode the rest of the arguments. | ||
| 2221 | |||
| 2222 | COMPOSEFUNC is program callable function that composes an outgoing | ||
| 2223 | mail message buffer. This function should set up the basics of the | ||
| 2224 | buffer without requiring user interaction. It should populate the | ||
| 2225 | standard mail headers, leaving the `to:' and `subject:' headers blank | ||
| 2226 | by default. | ||
| 2227 | |||
| 2228 | COMPOSEFUNC should accept several optional arguments--the same | ||
| 2229 | arguments that `compose-mail' takes. See that function's documentation. | ||
| 2230 | |||
| 2231 | SENDFUNC is the command a user would run to send the message. | ||
| 2232 | |||
| 2233 | Optional ABORTFUNC is the command a user would run to abort the | ||
| 2234 | message. For mail packages that don't have a separate abort function, | ||
| 2235 | this can be `kill-buffer' (the equivalent of omitting this argument). | ||
| 2236 | |||
| 2237 | Optional HOOKVAR is a hook variable that gets run before the message | ||
| 2238 | is actually sent. Callers that use the `mail-user-agent' may | ||
| 2239 | install a hook function temporarily on this hook variable. | ||
| 2240 | If HOOKVAR is nil, `mail-send-hook' is used. | ||
| 2241 | |||
| 2242 | The properties used on SYMBOL are `composefunc', `sendfunc', | ||
| 2243 | `abortfunc', and `hookvar'." | ||
| 2244 | (put symbol 'composefunc composefunc) | ||
| 2245 | (put symbol 'sendfunc sendfunc) | ||
| 2246 | (put symbol 'abortfunc (or abortfunc 'kill-buffer)) | ||
| 2247 | (put symbol 'hookvar (or hookvar 'mail-send-hook))) | ||
| 2248 | |||
| 2214 | ;;; subr.el ends here | 2249 | ;;; subr.el ends here |