Mercurial > hg > xemacs-beta
comparison lisp/modes/sendmail.el @ 110:fe104dbd9147 r20-1b7
Import from CVS: tag r20-1b7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:19:45 +0200 |
parents | 131b0175ea99 |
children | 8619ce7e4c50 |
comparison
equal
deleted
inserted
replaced
109:e183fc049578 | 110:fe104dbd9147 |
---|---|
283 ;(defun sendmail-synch-aliases () | 283 ;(defun sendmail-synch-aliases () |
284 ; (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) | 284 ; (let ((modtime (nth 5 (file-attributes mail-personal-alias-file)))) |
285 ; (or (equal mail-alias-modtime modtime) | 285 ; (or (equal mail-alias-modtime modtime) |
286 ; (setq mail-alias-modtime modtime | 286 ; (setq mail-alias-modtime modtime |
287 ; mail-aliases t)))) | 287 ; mail-aliases t)))) |
288 | |
289 ;; Courtesy of Per Abrahamsen <abraham@dina.kvl.dk> in an attempt to make | |
290 ;; Emacs and XEmacs less stupid about default mail addresses. | |
291 | |
292 ;; We trust the administrator if he has set `mail-host-address'. | |
293 (defcustom query-user-mail-address (not mail-host-address) | |
294 "If non-nil, prompt the user for his mail address." | |
295 :group 'message | |
296 :type 'boolean) | |
297 | |
298 (defun user-mail-address () | |
299 "Query the user for his mail address, unless it is already known." | |
300 (interactive) | |
301 (when query-user-mail-address | |
302 (setq user-mail-address | |
303 (read-string "Your mail address? " (cons user-mail-address 0))) | |
304 (setq query-user-mail-address nil) | |
305 ;; TODO: Run sanity check from Gnus here. | |
306 (when (y-or-n-p "Save address for future sessions? ") | |
307 (put 'user-mail-address 'saved-value | |
308 (list user-mail-address)) | |
309 (put 'query-user-mail-address 'saved-value '(nil)) | |
310 (custom-save-all))) | |
311 user-mail-address) | |
288 | 312 |
289 (defun mail-setup (to subject in-reply-to cc replybuffer actions) | 313 (defun mail-setup (to subject in-reply-to cc replybuffer actions) |
290 (or mail-default-reply-to | 314 (or mail-default-reply-to |
291 (setq mail-default-reply-to (getenv "REPLYTO"))) | 315 (setq mail-default-reply-to (getenv "REPLYTO"))) |
292 ;Removed. See `mail-abbrevs.el'. | 316 ;Removed. See `mail-abbrevs.el'. |
821 (forward-word -1) ; skip back over zone | 845 (forward-word -1) ; skip back over zone |
822 (delete-region (point-min) (point)) ; nuke beginning to zone | 846 (delete-region (point-min) (point)) ; nuke beginning to zone |
823 (setq mail-do-fcc-cached-timezone | 847 (setq mail-do-fcc-cached-timezone |
824 (buffer-substring (point-min) (1- (point-max))))))))) | 848 (buffer-substring (point-min) (1- (point-max))))))))) |
825 | 849 |
850 (eval-when-compile | |
851 (require 'vm-misc)) | |
852 | |
826 (defun mail-do-fcc-rmail-internal (buffer) | 853 (defun mail-do-fcc-rmail-internal (buffer) |
827 (or (eq major-mode 'rmail-mode) (error "this only works in rmail-mode")) | 854 (or (eq major-mode 'rmail-mode) (error "this only works in rmail-mode")) |
828 (let ((b (point-min)) | 855 (let ((b (point-min)) |
829 (e (point-max)) | 856 (e (point-max)) |
830 (buffer-read-only nil)) | 857 (buffer-read-only nil)) |
839 (insert "\^L\n0, unseen,,\n*** EOOH ***") | 866 (insert "\^L\n0, unseen,,\n*** EOOH ***") |
840 (insert-buffer-substring buffer) | 867 (insert-buffer-substring buffer) |
841 (insert "\n\C-_")) | 868 (insert "\n\C-_")) |
842 (narrow-to-region b e) | 869 (narrow-to-region b e) |
843 (rmail-maybe-set-message-counters)))) | 870 (rmail-maybe-set-message-counters)))) |
844 | |
845 ;;; Load VM into the compilation environment but not the load environment. | |
846 (eval-when-compile | |
847 (or (and (boundp 'loading-vm-kludge) loading-vm-kludge) | |
848 ;; nastiness to avoid circular provide/require dependency nonsense | |
849 (fboundp 'vm-spool-files) | |
850 (let ((loading-vm-kludge t)) | |
851 (require 'vm)))) | |
852 | 871 |
853 (defun mail-do-fcc-vm-internal (buffer) | 872 (defun mail-do-fcc-vm-internal (buffer) |
854 (or (eq major-mode 'vm-mode) (error "this only works in vm-mode")) | 873 (or (eq major-mode 'vm-mode) (error "this only works in vm-mode")) |
855 (let ((buffer-read-only nil) | 874 (let ((buffer-read-only nil) |
856 (foreign-folder-p (not (eq vm-folder-type 'From_)))) | 875 (foreign-folder-p (not (eq vm-folder-type 'From_)))) |