changeset 45578:73f6b3b88ae9

(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'.
author Miles Bader <miles@gnu.org>
date Thu, 30 May 2002 01:04:15 +0000
parents 30f1ddc50732
children eb535b77722f
files lisp/calc/calc.el
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calc/calc.el	Wed May 29 18:58:38 2002 +0000
+++ b/lisp/calc/calc.el	Thu May 30 01:04:15 2002 +0000
@@ -249,6 +249,9 @@
 ;; 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 @@
 			       (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 @@
 	 (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)