aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2002-05-30 01:04:15 +0000
committerMiles Bader2002-05-30 01:04:15 +0000
commit1501f4f67e794ba6d23281c930a7147b41564dea (patch)
tree86cfa03002bd7424ddbc43f2b26b9b96c21c964a
parent2530ceaf86398db3086a46518bddf9bebe7fc35f (diff)
downloademacs-1501f4f67e794ba6d23281c930a7147b41564dea.tar.gz
emacs-1501f4f67e794ba6d23281c930a7147b41564dea.zip
(calc-show-banner): New variable.
(calc-refresh): Only show banner if `calc-show-banner' is non-nil. (calc-mode-var-list): Add `calc-show-banner'.
-rw-r--r--lisp/calc/calc.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 290ac5c963c..44889159abe 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -249,6 +249,9 @@ This can safely be nil as long as the Calc files are on the load-path.")
249;; Entries are 3-lists: Formula, Height (in lines), Selection (or nil). 249;; Entries are 3-lists: Formula, Height (in lines), Selection (or nil).
250(defvar calc-stack '((top-of-stack 1 nil))) 250(defvar calc-stack '((top-of-stack 1 nil)))
251 251
252(defvar calc-show-banner t
253 "*If non-nil, show a friendly greeting above the stack.")
254
252;; Index into calc-stack of "top" of stack. 255;; Index into calc-stack of "top" of stack.
253;; This is 1 unless calc-truncate-stack has been used. 256;; This is 1 unless calc-truncate-stack has been used.
254;;(defvar calc-stack-top 1) 257;;(defvar calc-stack-top 1)
@@ -581,7 +584,8 @@ This can safely be nil as long as the Calc files are on the load-path.")
581 (calc-gnuplot-geometry nil) 584 (calc-gnuplot-geometry nil)
582 (calc-graph-default-resolution 15) 585 (calc-graph-default-resolution 15)
583 (calc-graph-default-resolution-3d 5) 586 (calc-graph-default-resolution-3d 5)
584 (calc-invocation-macro nil))) 587 (calc-invocation-macro nil)
588 (calc-show-banner t)))
585 589
586(defconst calc-local-var-list '(calc-stack 590(defconst calc-local-var-list '(calc-stack
587 calc-stack-top 591 calc-stack-top
@@ -1702,10 +1706,12 @@ See calc-keypad for details."
1702 (setq calc-any-selections nil 1706 (setq calc-any-selections nil
1703 calc-any-evaltos nil) 1707 calc-any-evaltos nil)
1704 (erase-buffer) 1708 (erase-buffer)
1705 (insert "--- Emacs Calculator Mode ---\n") 1709 (when calc-show-banner
1710 (insert "--- Emacs Calculator Mode ---\n"))
1706 (while thing 1711 (while thing
1707 (goto-char (point-min)) 1712 (goto-char (point-min))
1708 (forward-line 1) 1713 (when calc-show-banner
1714 (forward-line 1))
1709 (insert (math-format-stack-value (car thing)) "\n") 1715 (insert (math-format-stack-value (car thing)) "\n")
1710 (setq thing (cdr thing))) 1716 (setq thing (cdr thing)))
1711 (calc-renumber-stack) 1717 (calc-renumber-stack)