Mercurial > hg > xemacs-beta
comparison lisp/modes/sendmail.el @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | 56c54cf7c5b6 |
children | fe104dbd9147 |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
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 ;; We trust the user if he has already customized `user-mail-address'. | |
294 (defcustom query-user-mail-address (and (not mail-host-address) | |
295 (not user-mail-address)) | |
296 "If non-nil, prompt the user for his mail address." | |
297 :group 'message | |
298 :type 'boolean) | |
299 | |
300 ;;;###autoload | |
301 (defun user-mail-address () | |
302 "Query the user for his mail address, unless it is already known." | |
303 (interactive) | |
304 (when (and (not noninteractive) query-user-mail-address) | |
305 (let ((addr (or user-mail-address | |
306 (concat (user-login-name) "@" | |
307 (or mail-host-address | |
308 (system-name)))))) | |
309 (setq user-mail-address | |
310 (read-string "Your mail address? " (cons addr 0))) | |
311 (setq query-user-mail-address nil) | |
312 ;; TODO: Run sanity check from Gnus here. | |
313 (when (y-or-n-p "Save address for future sessions? ") | |
314 (put 'user-mail-address 'saved-value | |
315 (list user-mail-address)) | |
316 (put 'query-user-mail-address 'saved-value '(nil)) | |
317 (require 'cus-edit) | |
318 (custom-save-all)))) | |
319 (if user-mail-address | |
320 user-mail-address | |
321 (setq user-mail-address (concat (user-login-name) "@" | |
322 (or mail-host-address | |
323 (system-name)))))) | |
324 | 288 |
325 (defun mail-setup (to subject in-reply-to cc replybuffer actions) | 289 (defun mail-setup (to subject in-reply-to cc replybuffer actions) |
326 (or mail-default-reply-to | 290 (or mail-default-reply-to |
327 (setq mail-default-reply-to (getenv "REPLYTO"))) | 291 (setq mail-default-reply-to (getenv "REPLYTO"))) |
328 ;Removed. See `mail-abbrevs.el'. | 292 ;Removed. See `mail-abbrevs.el'. |
876 (insert-buffer-substring buffer) | 840 (insert-buffer-substring buffer) |
877 (insert "\n\C-_")) | 841 (insert "\n\C-_")) |
878 (narrow-to-region b e) | 842 (narrow-to-region b e) |
879 (rmail-maybe-set-message-counters)))) | 843 (rmail-maybe-set-message-counters)))) |
880 | 844 |
845 ;;; Load VM into the compilation environment but not the load environment. | |
881 (eval-when-compile | 846 (eval-when-compile |
882 (require 'vm-misc)) | 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)))) | |
883 | 852 |
884 (defun mail-do-fcc-vm-internal (buffer) | 853 (defun mail-do-fcc-vm-internal (buffer) |
885 (or (eq major-mode 'vm-mode) (error "this only works in vm-mode")) | 854 (or (eq major-mode 'vm-mode) (error "this only works in vm-mode")) |
886 (let ((buffer-read-only nil) | 855 (let ((buffer-read-only nil) |
887 (foreign-folder-p (not (eq vm-folder-type 'From_)))) | 856 (foreign-folder-p (not (eq vm-folder-type 'From_)))) |
1003 (beginning-of-line) | 972 (beginning-of-line) |
1004 (skip-chars-backward "\n") | 973 (skip-chars-backward "\n") |
1005 t) | 974 t) |
1006 (or soft | 975 (or soft |
1007 (progn (goto-char end) | 976 (progn (goto-char end) |
1008 (insert field ": \n") | 977 ;; #### FSF has the next two clauses reversed. |
1009 (forward-char -1))) | 978 ;; which is correct? |
979 (skip-chars-backward "\n") | |
980 (insert "\n" field ": "))) | |
1010 nil))) | 981 nil))) |
1011 | 982 |
1012 (defun mail-text () | 983 (defun mail-text () |
1013 "Move point to beginning of message text." | 984 "Move point to beginning of message text." |
1014 (interactive) | 985 (interactive) |
1268 (pop-to-buffer "*mail*")) | 1239 (pop-to-buffer "*mail*")) |
1269 (mail noerase to subject in-reply-to cc replybuffer sendactions)) | 1240 (mail noerase to subject in-reply-to cc replybuffer sendactions)) |
1270 | 1241 |
1271 ;;; Do not execute these when sendmail.el is loaded, | 1242 ;;; Do not execute these when sendmail.el is loaded, |
1272 ;;; only in loaddefs.el. | 1243 ;;; only in loaddefs.el. |
1273 ;;; Do not autoload, this package is obsolete. -sb | |
1274 ;;;###autoload (define-key ctl-x-map "m" 'mail) | 1244 ;;;###autoload (define-key ctl-x-map "m" 'mail) |
1275 ;;;###autoload (define-key ctl-x-4-map "m" 'mail-other-window) | 1245 ;;;###autoload (define-key ctl-x-4-map "m" 'mail-other-window) |
1276 ;;;###autoload (define-key ctl-x-5-map "m" 'mail-other-frame) | 1246 ;;;###autoload (define-key ctl-x-5-map "m" 'mail-other-frame) |
1277 | 1247 |
1278 ;;;###autoload (add-hook 'same-window-buffer-names "*mail*") | 1248 ;;;###autoload (add-hook 'same-window-buffer-names "*mail*") |