Mercurial > hg > xemacs-beta
comparison lisp/simple.el @ 2768:feeb145e30f4
[xemacs-hg @ 2005-05-10 17:35:57 by aidan]
Warn that sendmail-user-agent sucks, on first use, but stick to using it.
author | aidan |
---|---|
date | Tue, 10 May 2005 17:36:05 +0000 |
parents | 139afe9fb2ee |
children | 0a759f4c4225 |
comparison
equal
deleted
inserted
replaced
2767:61af3ea9da02 | 2768:feeb145e30f4 |
---|---|
3304 ;; mail composition code ;; | 3304 ;; mail composition code ;; |
3305 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 3305 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
3306 | 3306 |
3307 ;; BEGIN SYNCHED WITH FSF 21.2. | 3307 ;; BEGIN SYNCHED WITH FSF 21.2. |
3308 | 3308 |
3309 (defcustom mail-user-agent 'sendmail-user-agent | 3309 (defcustom mail-user-agent 'xemacs-default-mail-user-agent |
3310 "*Your preference for a mail composition package. | 3310 "*Your preference for a mail composition package. |
3311 Various Emacs Lisp packages (e.g. Reporter) require you to compose an | 3311 Various Emacs Lisp packages (e.g. Reporter) require you to compose an |
3312 outgoing email message. This variable lets you specify which | 3312 outgoing email message. This variable lets you specify which |
3313 mail-sending package you prefer. | 3313 mail-sending package you prefer. |
3314 | 3314 |
3315 Valid values include: | 3315 Valid values may include: |
3316 | 3316 |
3317 `sendmail-user-agent' -- use the default Emacs Mail package. | 3317 `vm-user-agent' -- use Kyle Jones' VM, as documented in the `(vm)' |
3318 See Info node `(emacs)Sending Mail'. | 3318 Info node. Compatible with `sendmail-user-agent' |
3319 and can handle attachments and non-ASCII content, | |
3320 which the former can't. | |
3321 `sendmail-user-agent' -- use the default, bare-bones, Emacs Mail | |
3322 package. See Info node `(xemacs)Sending Mail'. | |
3319 `mh-e-user-agent' -- use the Emacs interface to the MH mail system. | 3323 `mh-e-user-agent' -- use the Emacs interface to the MH mail system. |
3320 See Info node `(mh-e)'. | 3324 See Info node `(mh-e)'. |
3321 `message-user-agent' -- use the Gnus Message package. | 3325 `message-user-agent' -- use the Gnus Message package. |
3322 See Info node `(message)'. | 3326 See Info node `(message)'. |
3323 `gnus-user-agent' -- like `message-user-agent', but with Gnus | 3327 `gnus-user-agent' -- like `message-user-agent', but with Gnus |
3324 paraphernalia, particularly the Gcc: header for | 3328 paraphernalia, particularly the Gcc: header for |
3325 archiving. | 3329 archiving. |
3326 | 3330 |
3331 If you examine the value of this variable before setting it or composing a | |
3332 mail, it will have another value, `xemacs-default-mail-user-agent'--this is to | |
3333 allow XEmacs to suggest that you use another email client instead of | |
3334 `sendmail-user-agent'. The latter, while part of the base XEmacs Lisp code, | |
3335 and very lightweight, doesn't support MIME, a considerable disadvantage | |
3336 today. | |
3337 | |
3327 Additional valid symbols may be available; check with the author of | 3338 Additional valid symbols may be available; check with the author of |
3328 your package for details. The function should return non-nil if it | 3339 your package for details. The function should return non-nil if it |
3329 succeeds. | 3340 succeeds. |
3330 | 3341 |
3331 See also `read-mail-command' concerning reading mail." | 3342 See also `read-mail-command' concerning reading mail." |
3332 :type '(radio (function-item :tag "Default Emacs mail" | 3343 :type '(radio (function-item :tag "VM mail package" |
3344 :format "%t\n" | |
3345 vm-user-agent) | |
3346 (function-item :tag "Bare-bones Emacs mail" | |
3333 :format "%t\n" | 3347 :format "%t\n" |
3334 sendmail-user-agent) | 3348 sendmail-user-agent) |
3335 (function-item :tag "Emacs interface to MH" | 3349 (function-item :tag "Emacs interface to MH" |
3336 :format "%t\n" | 3350 :format "%t\n" |
3337 mh-e-user-agent) | 3351 mh-e-user-agent) |
3377 (put symbol 'composefunc composefunc) | 3391 (put symbol 'composefunc composefunc) |
3378 (put symbol 'sendfunc sendfunc) | 3392 (put symbol 'sendfunc sendfunc) |
3379 (put symbol 'abortfunc (or abortfunc 'kill-buffer)) | 3393 (put symbol 'abortfunc (or abortfunc 'kill-buffer)) |
3380 (put symbol 'hookvar (or hookvar 'mail-send-hook))) | 3394 (put symbol 'hookvar (or hookvar 'mail-send-hook))) |
3381 | 3395 |
3396 (define-mail-user-agent 'vm-user-agent | |
3397 'vm-compose-mail | |
3398 'vm-mail-send-and-exit) | |
3399 | |
3382 (define-mail-user-agent 'sendmail-user-agent | 3400 (define-mail-user-agent 'sendmail-user-agent |
3383 'sendmail-user-agent-compose 'mail-send-and-exit) | 3401 'sendmail-user-agent-compose 'mail-send-and-exit) |
3402 | |
3403 ;; Recent GNU sendmail.el does have MIME support, but it's buggy (as of | |
3404 ;; 2005-05-01.) For example, if you FCC to a file more than once with | |
3405 ;; different coding systems, your non-ASCII data will get | |
3406 ;; trashed. quoted-printable encoding isn't done by default, attachments | |
3407 ;; just add a line: | |
3408 ;; | |
3409 ;; ===File /path/to/file/here================= | |
3410 ;; | |
3411 ;; the file's contents, | |
3412 ;; | |
3413 ;; =========================================== | |
3414 ;; | |
3415 ;; and hope for the best. Not code we want to use, IMO. | |
3416 | |
3417 (defun xemacs-default-composefunc (&rest args) | |
3418 "Warn that the default mail-reading package is heinously underfeatured; | |
3419 compose a mail using it, all the same. " | |
3420 (warn " | |
3421 | |
3422 Defaulting to the GNU Emacs-derived `sendmail.el' mail client. This facility, | |
3423 while part of base XEmacs, is heinously underfeatured, and not going to get | |
3424 better in the medium term. We include it so that bug reports work without | |
3425 packages; we suggest that you choose and/or install one of the other mail | |
3426 clients from packages if you're doing something other than M-x | |
3427 report-xemacs-bug , or even if you are reporting bugs regularly. | |
3428 | |
3429 To choose a package from those installed, click on \"Options\" -> | |
3430 \"Internet\" -> \"Compose Mail With ...\" and decide on one from the | |
3431 list. Gnus and VM are full-featured and have active user communities. | |
3432 | |
3433 To disable this warning and stick with the old behavior, you can explicitly | |
3434 initialize `mail-user-agent' to 'sendmail-user-agent . ") | |
3435 (setq mail-user-agent 'sendmail-user-agent) | |
3436 (apply (get 'sendmail-user-agent 'composefunc) args)) | |
3437 | |
3438 | |
3439 (defun xemacs-default-sendfunc (&rest args) | |
3440 "Set `mail-user-agent' to `sendmail-user-agent'; call the send function | |
3441 associated with that package, passing it the supplied arguments. " | |
3442 (setq mail-user-agent 'sendmail-user-agent) | |
3443 (apply (get 'sendmail-user-agent 'sendfunc) args)) | |
3444 | |
3445 (define-mail-user-agent 'xemacs-default-mail-user-agent | |
3446 'xemacs-default-composefunc 'xemacs-default-sendfunc) | |
3384 | 3447 |
3385 (define-mail-user-agent 'message-user-agent | 3448 (define-mail-user-agent 'message-user-agent |
3386 'message-mail 'message-send-and-exit | 3449 'message-mail 'message-send-and-exit |
3387 'message-kill-buffer 'message-send-hook) | 3450 'message-kill-buffer 'message-send-hook) |
3388 | 3451 |