summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-03-25 20:49:23 +0000
committerRichard M. Stallman <rms@gnu.org>1995-03-25 20:49:23 +0000
commit67a6988bf8c6af8778f062e640efe71f57a866ca (patch)
tree86e52cd6cdbda2a30140dd43500839297830307f /lisp
parent35b12ec0fb20bb64dd6434f6b17af34e03783209 (diff)
downloademacs-67a6988bf8c6af8778f062e640efe71f57a866ca.tar.gz
emacs-67a6988bf8c6af8778f062e640efe71f57a866ca.tar.bz2
emacs-67a6988bf8c6af8778f062e640efe71f57a866ca.zip
(mail): Use pop-to-buffer.
(same-window-buffer-names): Add *mail*. (mail-other-window, mail-other-frame): Bind to nil same-window-buffer-names, special-display-buffer-names, and ...regexps.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mail/sendmail.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 633b7f4d3e2..8e2a7bc5bb8 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -964,7 +964,7 @@ The seventh argument ACTIONS is a list of actions to take
;;; (file-exists-p buffer-auto-save-file-name))
;;; (message "Auto save file for draft message exists; consider M-x mail-recover"))
;;; t))
- (switch-to-buffer "*mail*")
+ (pop-to-buffer "*mail*")
(if (file-exists-p (expand-file-name "~/"))
(setq default-directory (expand-file-name "~/")))
(auto-save-mode auto-save-default)
@@ -1003,7 +1003,11 @@ The seventh argument ACTIONS is a list of actions to take
(defun mail-other-window (&optional noerase to subject in-reply-to cc replybuffer sendactions)
"Like `mail' command, but display mail buffer in another window."
(interactive "P")
- (let ((pop-up-windows t))
+ (let ((pop-up-windows t)
+ (special-display-buffer-names nil)
+ (special-display-regexps nil)
+ (same-window-buffer-names nil)
+ (same-window-regexps nil))
(pop-to-buffer "*mail*"))
(mail noerase to subject in-reply-to cc replybuffer sendactions))
@@ -1011,7 +1015,11 @@ The seventh argument ACTIONS is a list of actions to take
(defun mail-other-frame (&optional noerase to subject in-reply-to cc replybuffer sendactions)
"Like `mail' command, but display mail buffer in another frame."
(interactive "P")
- (let ((pop-up-frames t))
+ (let ((pop-up-frames t)
+ (special-display-buffer-names nil)
+ (special-display-regexps nil)
+ (same-window-buffer-names nil)
+ (same-window-regexps nil))
(pop-to-buffer "*mail*"))
(mail noerase to subject in-reply-to cc replybuffer sendactions))
@@ -1021,6 +1029,8 @@ The seventh argument ACTIONS is a list of actions to take
;;;###autoload (define-key ctl-x-4-map "m" 'mail-other-window)
;;;###autoload (define-key ctl-x-5-map "m" 'mail-other-frame)
+;;;###autoload (add-hook 'same-window-buffer-names "*mail*")
+
;;; Do not add anything but external entries on this page.
(provide 'sendmail)