emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mail/sendmail.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/mail/sendmail.el
Date: Mon, 12 Sep 2005 17:58:22 -0400

Index: emacs/lisp/mail/sendmail.el
diff -c emacs/lisp/mail/sendmail.el:1.290 emacs/lisp/mail/sendmail.el:1.291
*** emacs/lisp/mail/sendmail.el:1.290   Fri Sep  9 12:33:21 2005
--- emacs/lisp/mail/sendmail.el Mon Sep 12 21:58:21 2005
***************
*** 1591,1598 ****
  The normal hook `mail-setup-hook' is run after the message is
  initialized.  It can add more default fields to the message.
  
! When calling from a program, the first argument if non-nil says
! not to erase the existing contents of the `*mail*' buffer.
  
  The second through fifth arguments,
   TO, SUBJECT, IN-REPLY-TO and CC, specify if non-nil
--- 1591,1603 ----
  The normal hook `mail-setup-hook' is run after the message is
  initialized.  It can add more default fields to the message.
  
! The first argument, NOERASE, determines what to do when there is
! an existing modified `*mail*' buffer.  If NOERASE is nil, the
! existing mail buffer is used, and the user is prompted whether to
! keep the old contents or to erase them.  If NOERASE has the value
! `new', a new mail buffer will be created instead of using the old
! one.  Any other non-nil value means to always select the old
! buffer without erasing the contents.
  
  The second through fifth arguments,
   TO, SUBJECT, IN-REPLY-TO and CC, specify if non-nil
***************
*** 1649,1655 ****
  ;;;              (file-exists-p buffer-auto-save-file-name))
  ;;;         (message "Auto save file for draft message exists; consider M-x 
mail-recover"))
  ;;;          t))
!   (pop-to-buffer "*mail*")
    ;; Avoid danger that the auto-save file can't be written.
    (let ((dir (expand-file-name
              (file-name-as-directory mail-default-directory))))
--- 1654,1664 ----
  ;;;              (file-exists-p buffer-auto-save-file-name))
  ;;;         (message "Auto save file for draft message exists; consider M-x 
mail-recover"))
  ;;;          t))
! 
!   (if (eq noerase 'new)
!       (pop-to-buffer (generate-new-buffer "*mail*"))
!     (pop-to-buffer "*mail*"))
! 
    ;; Avoid danger that the auto-save file can't be written.
    (let ((dir (expand-file-name
              (file-name-as-directory mail-default-directory))))
***************
*** 1664,1670 ****
    ;; (in case the user has actually visited a file *mail*).
  ;  (set-visited-file-name nil)
    (let (initialized)
!     (and (not noerase)
         (if buffer-file-name
             (if (buffer-modified-p)
                 (when (y-or-n-p "Buffer has unsaved changes; reinitialize it 
and discard them? ")
--- 1673,1680 ----
    ;; (in case the user has actually visited a file *mail*).
  ;  (set-visited-file-name nil)
    (let (initialized)
!     (and (or (not noerase)
!            (eq noerase 'new))
         (if buffer-file-name
             (if (buffer-modified-p)
                 (when (y-or-n-p "Buffer has unsaved changes; reinitialize it 
and discard them? ")




reply via email to

[Prev in Thread] Current Thread [Next in Thread]