comparison lisp/modes/sendmail.el @ 32:e04119814345 r19-15b99

Import from CVS: tag r19-15b99
author cvs
date Mon, 13 Aug 2007 08:52:56 +0200
parents d95e72db5c07
children 1a767b41a199
comparison
equal deleted inserted replaced
31:b9328a10c56c 32:e04119814345
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'.
840 (insert-buffer-substring buffer) 864 (insert-buffer-substring buffer)
841 (insert "\n\C-_")) 865 (insert "\n\C-_"))
842 (narrow-to-region b e) 866 (narrow-to-region b e)
843 (rmail-maybe-set-message-counters)))) 867 (rmail-maybe-set-message-counters))))
844 868
845 ;;; Load VM into the compilation environment but not the load environment.
846 (eval-when-compile 869 (eval-when-compile
847 (or (and (boundp 'loading-vm-kludge) loading-vm-kludge) 870 (require 'vm-misc))
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_))))