aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2002-09-11 20:23:56 +0000
committerStefan Monnier2002-09-11 20:23:56 +0000
commit27c079eb305c2aea36a903204fc4be663a7ec726 (patch)
tree4950534865a23a3f0ed62eb96792f6afa2de035c
parentf372494111e32d5e310e79f8c62d5ea203c87d46 (diff)
downloademacs-27c079eb305c2aea36a903204fc4be663a7ec726.tar.gz
emacs-27c079eb305c2aea36a903204fc4be663a7ec726.zip
(define-mail-user-agent): Moved from simple.el.
-rw-r--r--lisp/subr.el37
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...)'.
2195The following keywords are recognized: 2195The 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
2218SYMBOL can be any Lisp symbol. Its function definition and/or
2219value as a variable do not matter for this usage; we use only certain
2220properties on its property list, to encode the rest of the arguments.
2221
2222COMPOSEFUNC is program callable function that composes an outgoing
2223mail message buffer. This function should set up the basics of the
2224buffer without requiring user interaction. It should populate the
2225standard mail headers, leaving the `to:' and `subject:' headers blank
2226by default.
2227
2228COMPOSEFUNC should accept several optional arguments--the same
2229arguments that `compose-mail' takes. See that function's documentation.
2230
2231SENDFUNC is the command a user would run to send the message.
2232
2233Optional ABORTFUNC is the command a user would run to abort the
2234message. For mail packages that don't have a separate abort function,
2235this can be `kill-buffer' (the equivalent of omitting this argument).
2236
2237Optional HOOKVAR is a hook variable that gets run before the message
2238is actually sent. Callers that use the `mail-user-agent' may
2239install a hook function temporarily on this hook variable.
2240If HOOKVAR is nil, `mail-send-hook' is used.
2241
2242The 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