aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-12-02 03:05:14 +0000
committerGlenn Morris2009-12-02 03:05:14 +0000
commit60f2013c9e40863431d689bc5daec234bd29fbff (patch)
tree96bad854a8b1c8004182b63c0268900aab3a15d0
parentc920f2224517843a163dcfedcca1d548de2808b9 (diff)
downloademacs-60f2013c9e40863431d689bc5daec234bd29fbff.tar.gz
emacs-60f2013c9e40863431d689bc5daec234bd29fbff.zip
Replace all pop-to-buffer calls with rmail-pop-to-buffer, to prevent
horizontal splits.
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/mail/rmailsum.el32
2 files changed, 18 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 47e7fb22f79..7c9eacbfe4f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,8 @@
2 2
3 * mail/rmail.el (rmail-pop-to-buffer): New function. (Bug#2282) 3 * mail/rmail.el (rmail-pop-to-buffer): New function. (Bug#2282)
4 (rmail-select-summary): Use rmail-pop-to-buffer. 4 (rmail-select-summary): Use rmail-pop-to-buffer.
5 * mail/rmailsum.el: Replace all pop-to-buffer calls with
6 rmail-pop-to-buffer, to prevent horizontal splits.
5 7
6 * calendar/diary-lib.el (diary-list-entries): Replace superfluous 8 * calendar/diary-lib.el (diary-list-entries): Replace superfluous
7 save-excursion with save-current-buffer. 9 save-excursion with save-current-buffer.
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 8aeee4fa7ad..b818709291b 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -230,13 +230,13 @@ nil for FUNCTION means all messages."
230 (progn 230 (progn
231 (split-window (selected-window) rmail-summary-window-size) 231 (split-window (selected-window) rmail-summary-window-size)
232 (select-window (next-window (frame-first-window))) 232 (select-window (next-window (frame-first-window)))
233 (pop-to-buffer rmail-summary-buffer) 233 (rmail-pop-to-buffer rmail-summary-buffer)
234 ;; If pop-to-buffer did not use that window, delete that 234 ;; If pop-to-buffer did not use that window, delete that
235 ;; window. (This can happen if it uses another frame.) 235 ;; window. (This can happen if it uses another frame.)
236 (if (not (eq rmail-summary-buffer 236 (if (not (eq rmail-summary-buffer
237 (window-buffer (frame-first-window)))) 237 (window-buffer (frame-first-window))))
238 (delete-other-windows))) 238 (delete-other-windows)))
239 (pop-to-buffer rmail-summary-buffer)) 239 (rmail-pop-to-buffer rmail-summary-buffer))
240 (set-buffer rmail-buffer) 240 (set-buffer rmail-buffer)
241 ;; This is how rmail makes the summary buffer reappear. 241 ;; This is how rmail makes the summary buffer reappear.
242 ;; We do this here to make the window the proper size. 242 ;; We do this here to make the window the proper size.
@@ -796,12 +796,12 @@ Optional prefix ARG means undelete ARG previous messages."
796 (rmail-summary-goto-msg) 796 (rmail-summary-goto-msg)
797 (if rmail-enable-mime 797 (if rmail-enable-mime
798 (set-buffer rmail-buffer) 798 (set-buffer rmail-buffer)
799 (pop-to-buffer rmail-buffer)) 799 (rmail-pop-to-buffer rmail-buffer))
800 (and (rmail-message-deleted-p rmail-current-message) 800 (and (rmail-message-deleted-p rmail-current-message)
801 (rmail-undelete-previous-message)) 801 (rmail-undelete-previous-message))
802 (if rmail-enable-mime 802 (if rmail-enable-mime
803 (pop-to-buffer rmail-buffer)) 803 (rmail-pop-to-buffer rmail-buffer))
804 (pop-to-buffer rmail-summary-buffer)) 804 (rmail-pop-to-buffer rmail-summary-buffer))
805 (t (goto-char opoint)))))) 805 (t (goto-char opoint))))))
806 806
807(defun rmail-summary-undelete-many (&optional n) 807(defun rmail-summary-undelete-many (&optional n)
@@ -1234,7 +1234,7 @@ Returns non-nil if message N was found."
1234 (unless skip-rmail 1234 (unless skip-rmail
1235 (let ((selwin (selected-window))) 1235 (let ((selwin (selected-window)))
1236 (unwind-protect 1236 (unwind-protect
1237 (progn (pop-to-buffer buf) 1237 (progn (rmail-pop-to-buffer buf)
1238 (rmail-show-message n)) 1238 (rmail-show-message n))
1239 (select-window selwin) 1239 (select-window selwin)
1240 ;; The actions above can alter the current buffer. Preserve it. 1240 ;; The actions above can alter the current buffer. Preserve it.
@@ -1333,12 +1333,12 @@ Position it according to WHERE which can be BEG or END"
1333 (let ((buffer rmail-buffer)) 1333 (let ((buffer rmail-buffer))
1334 (split-window (selected-window) rmail-summary-window-size) 1334 (split-window (selected-window) rmail-summary-window-size)
1335 (select-window (frame-first-window)) 1335 (select-window (frame-first-window))
1336 (pop-to-buffer rmail-buffer) 1336 (rmail-pop-to-buffer rmail-buffer)
1337 ;; If pop-to-buffer did not use that window, delete that 1337 ;; If pop-to-buffer did not use that window, delete that
1338 ;; window. (This can happen if it uses another frame.) 1338 ;; window. (This can happen if it uses another frame.)
1339 (or (eq buffer (window-buffer (next-window (frame-first-window)))) 1339 (or (eq buffer (window-buffer (next-window (frame-first-window))))
1340 (delete-other-windows))) 1340 (delete-other-windows)))
1341 (pop-to-buffer rmail-buffer)) 1341 (rmail-pop-to-buffer rmail-buffer))
1342 (cond 1342 (cond
1343 ((eq where 'BEG) 1343 ((eq where 'BEG)
1344 (goto-char (point-min)) 1344 (goto-char (point-min))
@@ -1347,7 +1347,7 @@ Position it according to WHERE which can be BEG or END"
1347 (goto-char (point-max)) 1347 (goto-char (point-max))
1348 (recenter (1- (window-height)))) 1348 (recenter (1- (window-height))))
1349 ) 1349 )
1350 (pop-to-buffer rmail-summary-buffer)) 1350 (rmail-pop-to-buffer rmail-summary-buffer))
1351 1351
1352(defun rmail-summary-bury () 1352(defun rmail-summary-bury ()
1353 "Bury the Rmail buffer and the Rmail summary buffer." 1353 "Bury the Rmail buffer and the Rmail summary buffer."
@@ -1376,7 +1376,7 @@ Position it according to WHERE which can be BEG or END"
1376 (if (not (eq (selected-window) (next-window nil 'no-minibuf))) 1376 (if (not (eq (selected-window) (next-window nil 'no-minibuf)))
1377 (delete-window)) 1377 (delete-window))
1378 ;; Switch windows to the rmail buffer, or switch to it in this window. 1378 ;; Switch windows to the rmail buffer, or switch to it in this window.
1379 (pop-to-buffer local-rmail-buffer))) 1379 (rmail-pop-to-buffer local-rmail-buffer)))
1380 1380
1381(defun rmail-summary-expunge () 1381(defun rmail-summary-expunge ()
1382 "Actually erase all deleted messages and recompute summary headers." 1382 "Actually erase all deleted messages and recompute summary headers."
@@ -1417,7 +1417,7 @@ argument says to read a file name and use that file as the inbox."
1417 "Run Rmail on file FILENAME." 1417 "Run Rmail on file FILENAME."
1418 (interactive "FRun rmail on RMAIL file: ") 1418 (interactive "FRun rmail on RMAIL file: ")
1419 ;; We switch windows here, then display the other Rmail file there. 1419 ;; We switch windows here, then display the other Rmail file there.
1420 (pop-to-buffer rmail-buffer) 1420 (rmail-pop-to-buffer rmail-buffer)
1421 (rmail filename)) 1421 (rmail filename))
1422 1422
1423(defun rmail-summary-first-message () 1423(defun rmail-summary-first-message ()
@@ -1450,7 +1450,7 @@ argument says to read a file name and use that file as the inbox."
1450(defun rmail-summary-edit-current-message () 1450(defun rmail-summary-edit-current-message ()
1451 "Edit the contents of this message." 1451 "Edit the contents of this message."
1452 (interactive) 1452 (interactive)
1453 (pop-to-buffer rmail-buffer) 1453 (rmail-pop-to-buffer rmail-buffer)
1454 (rmail-edit-current-message) 1454 (rmail-edit-current-message)
1455 (use-local-map rmail-summary-edit-map)) 1455 (use-local-map rmail-summary-edit-map))
1456 1456
@@ -1458,14 +1458,14 @@ argument says to read a file name and use that file as the inbox."
1458 "Finish editing message, then go back to Rmail summary buffer." 1458 "Finish editing message, then go back to Rmail summary buffer."
1459 (interactive) 1459 (interactive)
1460 (rmail-cease-edit) 1460 (rmail-cease-edit)
1461 (pop-to-buffer rmail-summary-buffer)) 1461 (rmail-pop-to-buffer rmail-summary-buffer))
1462 1462
1463(defun rmail-summary-abort-edit () 1463(defun rmail-summary-abort-edit ()
1464 "Abort edit of current message; restore original contents. 1464 "Abort edit of current message; restore original contents.
1465Go back to summary buffer." 1465Go back to summary buffer."
1466 (interactive) 1466 (interactive)
1467 (rmail-abort-edit) 1467 (rmail-abort-edit)
1468 (pop-to-buffer rmail-summary-buffer)) 1468 (rmail-pop-to-buffer rmail-summary-buffer))
1469 1469
1470(defun rmail-summary-search-backward (regexp &optional n) 1470(defun rmail-summary-search-backward (regexp &optional n)
1471 "Show message containing next match for REGEXP. 1471 "Show message containing next match for REGEXP.
@@ -1524,7 +1524,7 @@ Interactively, empty argument means use same regexp used last time."
1524 (selwin (selected-window))) 1524 (selwin (selected-window)))
1525 (unwind-protect 1525 (unwind-protect
1526 (progn 1526 (progn
1527 (pop-to-buffer rmail-buffer) 1527 (rmail-pop-to-buffer rmail-buffer)
1528 (rmail-search regexp n)) 1528 (rmail-search regexp n))
1529 (select-window selwin) 1529 (select-window selwin)
1530 (set-buffer buffer)))) 1530 (set-buffer buffer))))
@@ -1826,7 +1826,7 @@ the summary is only showing a subset of messages."
1826 (require 'rmailsort) 1826 (require 'rmailsort)
1827 (let ((selwin (selected-window))) 1827 (let ((selwin (selected-window)))
1828 (unwind-protect 1828 (unwind-protect
1829 (progn (pop-to-buffer rmail-buffer) 1829 (progn (rmail-pop-to-buffer rmail-buffer)
1830 (funcall sortfun reverse)) 1830 (funcall sortfun reverse))
1831 (select-window selwin)))) 1831 (select-window selwin))))
1832 1832