changeset 49575:336c18b62203

(calculator): Don't use the minibuffer even in electric mode; use a private buffer and display it in the minibuffer window using `set-window-buffer'.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 03 Feb 2003 16:30:27 +0000
parents e4bf575fd91c
children 873d790b25eb
files lisp/calculator.el
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calculator.el	Mon Feb 03 15:00:57 2003 +0000
+++ b/lisp/calculator.el	Mon Feb 03 16:30:27 2003 +0000
@@ -668,14 +668,13 @@
            ;; don't change this since it is a customization variable,
            ;; its set function will add any new operators
            (calculator-add-operators calculator-user-operators)))
+  (setq calculator-buffer (get-buffer-create "*calculator*"))
   (if calculator-electric-mode
     (save-window-excursion
       (progn (require 'electric) (message nil)) ; hide load message
       (let (old-g-map old-l-map (echo-keystrokes 0)
             (garbage-collection-messages nil)) ; no gc msg when electric
-        ;; strange behavior in FSF: doesn't always select correct
-        ;; minibuffer.  I have no idea how to fix this
-        (setq calculator-buffer (window-buffer (minibuffer-window)))
+        (set-window-buffer (minibuffer-window) calculator-buffer)
         (select-window (minibuffer-window))
         (calculator-reset)
         (calculator-update-display)
@@ -697,7 +696,6 @@
           (use-local-map old-l-map)
           (use-global-map old-g-map))))
     (progn
-      (setq calculator-buffer (get-buffer-create "*calculator*"))
       (cond
         ((not (get-buffer-window calculator-buffer))
          (let ((split-window-keep-point nil)