changeset 78466:99b67eaf3990

(2C-two-columns, 2C-merge): Use window-full-width-p instead of comparing frame-width and window-width.
author Martin Rudalics <rudalics@gmx.at>
date Wed, 08 Aug 2007 06:01:52 +0000
parents b8c25f200566
children 16226bbcdcd9
files lisp/textmodes/two-column.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/two-column.el	Wed Aug 08 05:57:54 2007 +0000
+++ b/lisp/textmodes/two-column.el	Wed Aug 08 06:01:52 2007 +0000
@@ -347,8 +347,8 @@
 first and the associated buffer to its right."
   (interactive "P")
   ;; first go to full width, so that we can certainly split into two windows
-  (if (< (window-width) (frame-width))
-      (enlarge-window 99999 t))
+  (unless (window-full-width-p)
+    (enlarge-window 99999 t))
   (split-window-horizontally
    (max window-min-width (min 2C-window-width
 			      (- (frame-width) window-min-width))))
@@ -533,8 +533,8 @@
 	  (insert 2C-separator string))
 	(next-line 1)			; add one if necessary
 	(set-buffer b2))))
-  (if (< (window-width) (frame-width))
-      (enlarge-window 99999 t)))
+  (unless (window-full-width-p)
+    (enlarge-window 99999 t)))
 
 ;;;;; utility functions ;;;;;