# HG changeset patch # User Jay Belanger # Date 1225923021 0 # Node ID b0dc8618a59742778567222f5284a2edc1734ce5 # Parent 6620e11a4f76f916f4978b726a4a2fce3ec00fcd (calc-quit): Use `window-full-width-p' to check window width. diff -r 6620e11a4f76 -r b0dc8618a597 lisp/calc/calc.el --- a/lisp/calc/calc.el Wed Nov 05 21:16:17 2008 +0000 +++ b/lisp/calc/calc.el Wed Nov 05 22:10:21 2008 +0000 @@ -1424,9 +1424,12 @@ (win (get-buffer-window (current-buffer))) (kbuf (get-buffer "*Calc Keypad*"))) (delete-windows-on (calc-trail-buffer)) + ;; The next few lines will set `calc-window-height' so that the + ;; next time Calc is called, the window will be the same size + ;; as the current window. (if (and win (< (window-height win) (1- (frame-height))) - (= (window-width win) (frame-width)) ; avoid calc-keypad + (window-full-width-p win) ; avoid calc-keypad (not (get-buffer-window "*Calc Keypad*"))) (setq calc-window-height (- (window-height win) 2))) (progn