changeset 30889:5f9c434a6e88

(calculator): Add :version. (calculator): Use two lines for calculator window if `modeline' face is boxed.
author Dave Love <fx@gnu.org>
date Wed, 16 Aug 2000 21:24:00 +0000
parents e559f0aa6b2d
children 7bd10623068c
files lisp/calculator.el
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calculator.el	Wed Aug 16 21:05:37 2000 +0000
+++ b/lisp/calculator.el	Wed Aug 16 21:24:00 2000 +0000
@@ -51,6 +51,7 @@
 (defgroup calculator nil
   "Simple pocket calculator."
   :prefix "calculator"
+  :version "21.1"
   :group 'tools
   :group 'convenience)
 
@@ -155,8 +156,8 @@
 
 Examples:
 
-* A very simple one, adding a postfix \"x-to-y\" convertion keys, using
-  `t' as a prefix key:
+* A very simple one, adding a postfix \"x-to-y\" conversion keys, using
+  t as a prefix key:
 
   (setq calculator-user-operators
         '((\"tf\" cl-to-fr (+ 32 (/ (* X 9) 5)) 1)
@@ -631,7 +632,14 @@
                   (let ((split-window-keep-point nil)
                         (window-min-height 2))
                     (select-window
-                     (split-window-vertically (- (window-height) 2)))
+		     ;; Maybe leave two lines for our window because
+		     ;; of the normal `raised' modeline in Emacs 21.
+                     (split-window-vertically 
+		      (- (window-height)
+			 (if (plist-get (face-attr-construct 'modeline)
+					:box)
+			     3
+			   2))))
                     (switch-to-buffer
                      (get-buffer-create "*calculator*"))))))
       (set-buffer calculator-buffer)