From ec878460aa362c2229d4fd5bbb25ebff805ea798 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 8 May 2005 04:58:38 +0000 Subject: [PATCH] (calc-embedded-preserve-modes): New function. --- lisp/calc/calc-embed.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index 4f45419c136..6b94cd0af0c 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -148,6 +148,15 @@ (setq calc-embedded-original-modes (cons lang modes))) (setq calc-embedded-original-modes nil)))) +(defun calc-embedded-preserve-modes () + "Preserve the current modes when leaving embedded mode." + (interactive) + (if calc-embedded-info + (progn + (calc-embedded-save-original-modes) + (message "Current modes will be preserved when leaving embedded mode.")) + (message "Not in embedded mode."))) + (defun calc-embedded-restore-original-modes () "Restore the original Calc modes when leaving embedded mode." (let ((calcbuf (get-buffer "*Calculator*")) -- 2.39.2