diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2011-09-10 17:15:28 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-09-10 17:15:28 -0400 |
commit | 3199b96fc585576ffb2ced6542a2bc2d6172f510 (patch) | |
tree | 6f74f43a90022b2a0973688356159f9452f38e7d /lisp/mail | |
parent | 919a69aa0814937507f12851bdd277cb279faf6f (diff) | |
download | emacs-3199b96fc585576ffb2ced6542a2bc2d6172f510.tar.gz emacs-3199b96fc585576ffb2ced6542a2bc2d6172f510.tar.bz2 emacs-3199b96fc585576ffb2ced6542a2bc2d6172f510.zip |
Fix various uses of display-buffer and pop-to-buffer
to avoid using special-display-* and same-window-* variables.
* lisp/buff-menu.el (Buffer-menu-switch-other-window): Use second arg
of display-buffer.
(Buffer-menu-2-window): Use switch-to-buffer-other-window.
* lisp/replace.el (occur-mode-goto-occurrence)
(occur-mode-display-occurrence) Use second arg of pop-to-buffer
and display-buffer.
* lisp/window.el (display-buffer-alist): Add *Python*.
* lisp/mail/reporter.el (reporter-submit-bug-report): Use second arg of
display-buffer.
* lisp/mail/sendmail.el (sendmail-user-agent-compose): Don't bind the
special-display and same-window variables.
(mail-other-window): Use switch-to-buffer-other-window.
(mail-other-frame): USe switch-to-buffer-other-frame.
* lisp/progmodes/gdb-mi.el (gdb-frame-gdb-buffer): Use
display-buffer-other-frame.
(gdb-display-gdb-buffer): Use pop-to-buffer.
* lisp/progmodes/gud.el (gud-goto-info): Use info-other-window.
* lisp/progmodes/python.el: Don't set same-window-buffer-names.
* lisp/textmodes/bibtex.el (bibtex-search-entry): Use switch-to-buffer.
Diffstat (limited to 'lisp/mail')
-rw-r--r-- | lisp/mail/reporter.el | 9 | ||||
-rw-r--r-- | lisp/mail/sendmail.el | 20 |
2 files changed, 7 insertions, 22 deletions
diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el index 45700d4d60d..6c5448aca83 100644 --- a/lisp/mail/reporter.el +++ b/lisp/mail/reporter.el @@ -332,12 +332,11 @@ mail-sending package is used for editing and sending the message." hookvar) ;; do the work (require 'sendmail) + ;; Just in case the original buffer is not visible now, bring it + ;; back somewhere + (display-buffer reporter-eval-buffer) ;; If mailbuf did not get made visible before, make it visible now. - (let (same-window-buffer-names same-window-regexps) - (pop-to-buffer mailbuf) - ;; Just in case the original buffer is not visible now, bring it - ;; back somewhere - (and pop-up-windows (display-buffer reporter-eval-buffer))) + (pop-to-buffer mailbuf) (goto-char (point-min)) (mail-position-on-field "to") (insert address) diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 4dc96176256..6e5c9a6b257 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -565,11 +565,7 @@ To change your decision later, customize `send-mail-function'.\n") send-actions return-action &rest ignored) (if switch-function - (let ((special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (funcall switch-function "*mail*"))) + (funcall switch-function "*mail*")) (let ((cc (cdr (assoc-string "cc" other-headers t))) (in-reply-to (cdr (assoc-string "in-reply-to" other-headers t))) (body (cdr (assoc-string "body" other-headers t)))) @@ -1966,24 +1962,14 @@ you can move to one of them and type C-c C-c to recover that one." (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) - (special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (pop-to-buffer "*mail*")) + (switch-to-buffer-other-window "*mail*") (mail noerase to subject in-reply-to cc replybuffer sendactions)) ;;;###autoload (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) - (special-display-buffer-names nil) - (special-display-regexps nil) - (same-window-buffer-names nil) - (same-window-regexps nil)) - (pop-to-buffer "*mail*")) + (switch-to-buffer-other-frame "*mail*") (mail noerase to subject in-reply-to cc replybuffer sendactions)) ;; Do not add anything but external entries on this page. |