diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2008-11-05 22:12:21 +0000 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2008-11-05 22:12:21 +0000 |
commit | a2baa908022e3459e12eb4c7ce701f8391cf06c2 (patch) | |
tree | cae74ea2ac8e66eacfabea495b5eac66a703b119 /lisp/calc | |
parent | d9bf544c71f035dde7522bcc355c63974cd9f5c0 (diff) | |
download | emacs-a2baa908022e3459e12eb4c7ce701f8391cf06c2.tar.gz |
(calc-quit): Use `window-full-width-p' to check window width.
Diffstat (limited to 'lisp/calc')
-rw-r--r-- | lisp/calc/calc.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 4c6375b1183..395ac8fe975 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -1424,9 +1424,12 @@ commands given here will actually operate on the *Calculator* stack." (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 |