Mercurial > emacs
diff lisp/calc/calc.el @ 59228:30ee5fc56ad0
(calc-same-interface, calc-quit): Remove obsolete MacEdit code.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Fri, 31 Dec 2004 03:29:25 +0000 |
parents | a26862f74305 |
children | d736a1979b98 95879cc1ed20 |
line wrap: on
line diff
--- a/lisp/calc/calc.el Fri Dec 31 00:00:42 2004 +0000 +++ b/lisp/calc/calc.el Fri Dec 31 03:29:25 2004 +0000 @@ -1167,12 +1167,9 @@ (exit-recursive-edit) (if (eq major-mode 'calc-edit-mode) (calc-edit-finish arg) - (if (eq major-mode 'MacEdit-mode) - (MacEdit-finish-edit) - (if calc-was-keypad-mode - (calc-keypad) - (calc arg calc-full-mode t)))))) - + (if calc-was-keypad-mode + (calc-keypad) + (calc arg calc-full-mode t))))) (defun calc-quit (&optional non-fatal interactive) (interactive "i\np") @@ -1183,33 +1180,31 @@ (exit-recursive-edit)) (if (eq major-mode 'calc-edit-mode) (calc-edit-cancel) - (if (eq major-mode 'MacEdit-mode) - (MacEdit-cancel-edit) - (if (and interactive - calc-embedded-info - (eq (current-buffer) (aref calc-embedded-info 0))) - (calc-embedded nil) - (unless (eq major-mode 'calc-mode) - (calc-create-buffer)) - (run-hooks 'calc-end-hook) - (setq calc-undo-list nil calc-redo-list nil) - (mapcar (function (lambda (v) (set-default v (symbol-value v)))) - calc-local-var-list) - (let ((buf (current-buffer)) - (win (get-buffer-window (current-buffer))) - (kbuf (get-buffer "*Calc Keypad*"))) - (delete-windows-on (calc-trail-buffer)) - (if (and win - (< (window-height win) (1- (frame-height))) - (= (window-width win) (frame-width)) ; avoid calc-keypad - (not (get-buffer-window "*Calc Keypad*"))) - (setq calc-window-height (- (window-height win) 2))) - (progn - (delete-windows-on buf) - (delete-windows-on kbuf)) - (bury-buffer buf) - (bury-buffer calc-trail-buffer) - (and kbuf (bury-buffer kbuf))))))) + (if (and interactive + calc-embedded-info + (eq (current-buffer) (aref calc-embedded-info 0))) + (calc-embedded nil) + (unless (eq major-mode 'calc-mode) + (calc-create-buffer)) + (run-hooks 'calc-end-hook) + (setq calc-undo-list nil calc-redo-list nil) + (mapcar (function (lambda (v) (set-default v (symbol-value v)))) + calc-local-var-list) + (let ((buf (current-buffer)) + (win (get-buffer-window (current-buffer))) + (kbuf (get-buffer "*Calc Keypad*"))) + (delete-windows-on (calc-trail-buffer)) + (if (and win + (< (window-height win) (1- (frame-height))) + (= (window-width win) (frame-width)) ; avoid calc-keypad + (not (get-buffer-window "*Calc Keypad*"))) + (setq calc-window-height (- (window-height win) 2))) + (progn + (delete-windows-on buf) + (delete-windows-on kbuf)) + (bury-buffer buf) + (bury-buffer calc-trail-buffer) + (and kbuf (bury-buffer kbuf)))))) ;;;###autoload (defun quick-calc ()