emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calc/calc-embed.el


From: Colin Walters
Subject: [Emacs-diffs] Changes to emacs/lisp/calc/calc-embed.el
Date: Mon, 19 Nov 2001 02:32:58 -0500

Index: emacs/lisp/calc/calc-embed.el
diff -u emacs/lisp/calc/calc-embed.el:1.3 emacs/lisp/calc/calc-embed.el:1.4
--- emacs/lisp/calc/calc-embed.el:1.3   Wed Nov 14 04:02:55 2001
+++ emacs/lisp/calc/calc-embed.el       Mon Nov 19 02:32:58 2001
@@ -1,6 +1,9 @@
-;; Calculator for GNU Emacs, part II [calc-embed.el]
+;;; calc-embed.el --- embed Calc in a buffer
+
 ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
-;; Written by Dave Gillespie, address@hidden
+
+;; Author: David Gillespie <address@hidden>
+;; Maintainer: Colin Walters <address@hidden>
 
 ;; This file is part of GNU Emacs.
 
@@ -19,7 +22,9 @@
 ;; file named COPYING.  Among other things, the copyright notice
 ;; and this notice must be preserved on all copies.
 
+;;; Commentary:
 
+;;; Code:
 
 ;; This file is autoloaded from calc-ext.el.
 (require 'calc-ext)
@@ -28,38 +33,23 @@
 
 (defun calc-Need-calc-embed () nil)
 
-
 (defun calc-show-plain (n)
   (interactive "P")
   (calc-wrapper
    (calc-set-command-flag 'renum-stack)
    (message (if (calc-change-mode 'calc-show-plain n nil t)
-               "Including \"plain\" formulas in Calc Embedded mode."
-             "Omitting \"plain\" formulas in Calc Embedded mode."))))
-
-
-
+               "Including \"plain\" formulas in Calc Embedded mode"
+             "Omitting \"plain\" formulas in Calc Embedded mode"))))
 
-;;; Things to do for Embedded Mode:
-;;; 
-;;;  Detect and strip off unexpected labels during reading.
-;;;
-;;;  Get calc-grab-region to use math-read-big-expr.
-;;;  If calc-show-plain, main body should have only righthand side of => expr.
-;;;  Handle tabs that have crept into embedded formulas.
-;;;  After "switching to new formula", home cursor to that formula.
-;;;  Do something like \evalto ... \to for \gets operators.
-;;;
 
-
 (defvar calc-embedded-modes nil)
 (defvar calc-embedded-globals nil)
 (defvar calc-embedded-active nil)
-
+(defvar calc-embedded-all-active nil)
 (make-variable-buffer-local 'calc-embedded-all-active)
+(defvar calc-embedded-some-active nil)
 (make-variable-buffer-local 'calc-embedded-some-active)
 
-
 (defvar calc-embedded-open-formula 
"\\`\\|^\n\\|\\$\\$?\\|\\\\\\[\\|^\\\\begin.*\n\\|address@hidden|^\\.EQ.*\n\\|\\\\(\\|^%\n\\|^\\.\\\\\"\n"
   "*A regular expression for the opening delimiter of a formula used by
 calc-embedded.")
@@ -162,6 +152,7 @@
 ;;; thrown away when a buffer changes major modes.
 
 
+(defvar calc-embedded-quiet nil)
 (defun calc-do-embedded (arg end obeg oend)
   (if calc-embedded-info
 
@@ -195,7 +186,7 @@
               (use-local-map (nth 1 mode))
               (set-buffer-modified-p (buffer-modified-p))
               (or calc-embedded-quiet
-                  (message "Back to %s mode." mode-name))))
+                  (message "Back to %s mode" mode-name))))
 
            (t
             (if (buffer-name (aref calc-embedded-info 0))
@@ -246,12 +237,11 @@
       (setq calc-no-refresh-evaltos nil)
       (and chg calc-any-evaltos (calc-wrapper (calc-refresh-evaltos)))
       (or (eq calc-embedded-quiet t)
-         (message "Embedded Calc mode enabled.  %s to return to normal."
+         (message "Embedded Calc mode enabled; %s to return to normal"
                   (if calc-embedded-quiet
                       "Type `M-# x'"
                     "Give this command again")))))
   (scroll-down 0))    ; fix a bug which occurs when truncate-lines is changed.
-(setq calc-embedded-quiet nil)
 
 
 (defun calc-embedded-select (arg)
@@ -335,7 +325,7 @@
       (calc-embedded-forget))
   (calc-find-globals)
   (if (< (prefix-numeric-value arg) 0)
-      (message "Deactivating %s for Calc Embedded mode." (buffer-name))
+      (message "Deactivating %s for Calc Embedded mode" (buffer-name))
     (message "Activating %s for Calc Embedded mode..." (buffer-name))
     (save-excursion
       (let* ((active (assq (current-buffer) calc-embedded-active))
@@ -1002,6 +992,7 @@
 
 ;;; These are hooks called by the main part of Calc.
 
+(defvar calc-embedded-no-reselect nil)
 (defun calc-embedded-select-buffer ()
   (if (eq (current-buffer) (aref calc-embedded-info 0))
       (let ((info calc-embedded-info)
@@ -1031,7 +1022,6 @@
        (forward-char (min horiz
                           (- (point-max) (point)))))
     (calc-select-buffer)))
-(setq calc-embedded-no-reselect nil)
 
 (defun calc-embedded-finish-command ()
   (let ((buf (current-buffer))
@@ -1206,12 +1196,9 @@
                         (calc-embedded-update (car p) 14 t nil)))
                    (setcdr (car bp) (delq (car p) (cdr (car bp))))
                    (message
-                    "(Tried to recompute but formula was changed or 
missing.)"))))
+                    "(Tried to recompute but formula was changed or 
missing)"))))
            (setq p (cdr p))))
        (setq bp (if buf nil (cdr bp))))
       (or first calc-embedded-quiet (message "")))))
 
 ;;; calc-embed.el ends here
-
-
-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]