summaryrefslogtreecommitdiff
path: root/lisp/calc/calc.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2002-05-30 01:04:15 +0000
committerMiles Bader <miles@gnu.org>2002-05-30 01:04:15 +0000
commit1501f4f67e794ba6d23281c930a7147b41564dea (patch)
tree86cfa03002bd7424ddbc43f2b26b9b96c21c964a /lisp/calc/calc.el
parent2530ceaf86398db3086a46518bddf9bebe7fc35f (diff)
downloademacs-1501f4f67e794ba6d23281c930a7147b41564dea.tar.gz
(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'.
Diffstat (limited to 'lisp/calc/calc.el')
-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.")
;; Entries are 3-lists: Formula, Height (in lines), Selection (or nil).
(defvar calc-stack '((top-of-stack 1 nil)))
+(defvar calc-show-banner t
+ "*If non-nil, show a friendly greeting above the stack.")
+
;; Index into calc-stack of "top" of stack.
;; This is 1 unless calc-truncate-stack has been used.
;;(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.")
(calc-gnuplot-geometry nil)
(calc-graph-default-resolution 15)
(calc-graph-default-resolution-3d 5)
- (calc-invocation-macro nil)))
+ (calc-invocation-macro nil)
+ (calc-show-banner t)))
(defconst calc-local-var-list '(calc-stack
calc-stack-top
@@ -1702,10 +1706,12 @@ See calc-keypad for details."
(setq calc-any-selections nil
calc-any-evaltos nil)
(erase-buffer)
- (insert "--- Emacs Calculator Mode ---\n")
+ (when calc-show-banner
+ (insert "--- Emacs Calculator Mode ---\n"))
(while thing
(goto-char (point-min))
- (forward-line 1)
+ (when calc-show-banner
+ (forward-line 1))
(insert (math-format-stack-value (car thing)) "\n")
(setq thing (cdr thing)))
(calc-renumber-stack)