aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes/two-column.el
diff options
context:
space:
mode:
authorMartin Rudalics <[email protected]>2007-08-08 06:04:51 +0000
committerMartin Rudalics <[email protected]>2007-08-08 06:04:51 +0000
commiteaccbbd3c4e79e6618deda679dbb7a710ce2c9c6 (patch)
tree13f30a4ac0a29ea127832685e3007787e1dfdb9f /lisp/textmodes/two-column.el
parent0dad3dfecc893cb8807154f8d6e5559e922ddc72 (diff)
(2C-two-columns, 2C-merge): Use window-full-width-p instead of comparing
frame-width and window-width.
Diffstat (limited to 'lisp/textmodes/two-column.el')
-rw-r--r--lisp/textmodes/two-column.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 2568b53fe3..eebd1923b6 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -347,8 +347,8 @@ When called again, restores the screen layout with the current buffer
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 @@ off trailing spaces with \\[delete-trailing-whitespace]."
(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 ;;;;;