]> git.eshelyaron.com Git - emacs.git/commitdiff
(calc-embedded-preserve-modes): New function.
authorJay Belanger <jay.p.belanger@gmail.com>
Sun, 8 May 2005 04:58:38 +0000 (04:58 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Sun, 8 May 2005 04:58:38 +0000 (04:58 +0000)
lisp/calc/calc-embed.el

index 4f45419c136dc5798638b36182afa2b3caf69d9f..6b94cd0af0cef20a6e890c31aed2ddd57359ee42 100644 (file)
           (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*"))