aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2004-10-26 19:05:53 +0000
committerJay Belanger2004-10-26 19:05:53 +0000
commit577e1b74916feeb561f3fac1a5cacdfc957e964c (patch)
treeac02046feb7e3eb6e5c209692981f3165a6709c6
parent4cf9f027a1107b10f9bda998ddcf35eb84471c05 (diff)
downloademacs-577e1b74916feeb561f3fac1a5cacdfc957e964c.tar.gz
emacs-577e1b74916feeb561f3fac1a5cacdfc957e964c.zip
(calc,full-calc, calc-quit, calc-keypad, full-calc-keypad)
(calc-trail-display): Use an extra argument instead of `interactive-p'.
-rw-r--r--lisp/calc/calc.el37
1 files changed, 18 insertions, 19 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index c1669f78f08..4ace5fb6780 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1142,7 +1142,7 @@ commands given here will actually operate on the *Calculator* stack."
1142;;;###autoload 1142;;;###autoload
1143(defun calc (&optional arg full-display interactive) 1143(defun calc (&optional arg full-display interactive)
1144 "The Emacs Calculator. Full documentation is listed under \"calc-mode\"." 1144 "The Emacs Calculator. Full documentation is listed under \"calc-mode\"."
1145 (interactive "P") 1145 (interactive "P\ni\np")
1146 (if arg 1146 (if arg
1147 (unless (eq arg 0) 1147 (unless (eq arg 0)
1148 (calc-extensions) 1148 (calc-extensions)
@@ -1188,17 +1188,16 @@ commands given here will actually operate on the *Calculator* stack."
1188 (window-point full-display) 1188 (window-point full-display)
1189 (select-window full-display)) 1189 (select-window full-display))
1190 (calc-check-defines) 1190 (calc-check-defines)
1191 (when (and calc-said-hello 1191 (when (and calc-said-hello interactive)
1192 (or (interactive-p) interactive))
1193 (sit-for 2) 1192 (sit-for 2)
1194 (message "")) 1193 (message ""))
1195 (setq calc-said-hello t))))) 1194 (setq calc-said-hello t)))))
1196 1195
1197;;;###autoload 1196;;;###autoload
1198(defun full-calc () 1197(defun full-calc (&optional interactive)
1199 "Invoke the Calculator and give it a full-sized window." 1198 "Invoke the Calculator and give it a full-sized window."
1200 (interactive) 1199 (interactive "p")
1201 (calc nil t (interactive-p))) 1200 (calc nil t interactive))
1202 1201
1203(defun calc-same-interface (arg) 1202(defun calc-same-interface (arg)
1204 "Invoke the Calculator using the most recent interface (calc or calc-keypad)." 1203 "Invoke the Calculator using the most recent interface (calc or calc-keypad)."
@@ -1215,8 +1214,8 @@ commands given here will actually operate on the *Calculator* stack."
1215 (calc arg calc-full-mode t)))))) 1214 (calc arg calc-full-mode t))))))
1216 1215
1217 1216
1218(defun calc-quit (&optional non-fatal) 1217(defun calc-quit (&optional non-fatal interactive)
1219 (interactive) 1218 (interactive "i\np")
1220 (and calc-standalone-flag (not non-fatal) 1219 (and calc-standalone-flag (not non-fatal)
1221 (save-buffers-kill-emacs nil)) 1220 (save-buffers-kill-emacs nil))
1222 (if (and (equal (buffer-name) "*Gnuplot Trail*") 1221 (if (and (equal (buffer-name) "*Gnuplot Trail*")
@@ -1226,7 +1225,7 @@ commands given here will actually operate on the *Calculator* stack."
1226 (calc-edit-cancel) 1225 (calc-edit-cancel)
1227 (if (eq major-mode 'MacEdit-mode) 1226 (if (eq major-mode 'MacEdit-mode)
1228 (MacEdit-cancel-edit) 1227 (MacEdit-cancel-edit)
1229 (if (and (interactive-p) 1228 (if (and interactive
1230 calc-embedded-info 1229 calc-embedded-info
1231 (eq (current-buffer) (aref calc-embedded-info 0))) 1230 (eq (current-buffer) (aref calc-embedded-info 0)))
1232 (calc-embedded nil) 1231 (calc-embedded nil)
@@ -1266,22 +1265,22 @@ or a list containing a character position and an error message in string form."
1266 (calc-do-calc-eval str separator args)) 1265 (calc-do-calc-eval str separator args))
1267 1266
1268;;;###autoload 1267;;;###autoload
1269(defun calc-keypad () 1268(defun calc-keypad (&optional interactive)
1270 "Invoke the Calculator in \"visual keypad\" mode. 1269 "Invoke the Calculator in \"visual keypad\" mode.
1271This is most useful in the X window system. 1270This is most useful in the X window system.
1272In this mode, click on the Calc \"buttons\" using the left mouse button. 1271In this mode, click on the Calc \"buttons\" using the left mouse button.
1273Or, position the cursor manually and do M-x calc-keypad-press." 1272Or, position the cursor manually and do M-x calc-keypad-press."
1274 (interactive) 1273 (interactive "p")
1275 (calc-extensions) 1274 (calc-extensions)
1276 (calc-do-keypad calc-full-mode (interactive-p))) 1275 (calc-do-keypad calc-full-mode interactive))
1277 1276
1278;;;###autoload 1277;;;###autoload
1279(defun full-calc-keypad () 1278(defun full-calc-keypad (&optional interactive)
1280 "Invoke the Calculator in full-screen \"visual keypad\" mode. 1279 "Invoke the Calculator in full-screen \"visual keypad\" mode.
1281See calc-keypad for details." 1280See calc-keypad for details."
1282 (interactive) 1281 (interactive "p")
1283 (calc-extensions) 1282 (calc-extensions)
1284 (calc-do-keypad t (interactive-p))) 1283 (calc-do-keypad t interactive))
1285 1284
1286 1285
1287(defvar calc-aborted-prefix nil) 1286(defvar calc-aborted-prefix nil)
@@ -1802,8 +1801,8 @@ If mouse is pressed in Calc window, push cut buffer contents onto the stack."
1802 val) 1801 val)
1803 1802
1804 1803
1805(defun calc-trail-display (flag &optional no-refresh) 1804(defun calc-trail-display (flag &optional no-refresh interactive)
1806 (interactive "P") 1805 (interactive "P\ni\np")
1807 (let ((win (get-buffer-window (calc-trail-buffer)))) 1806 (let ((win (get-buffer-window (calc-trail-buffer))))
1808 (if (setq calc-display-trail 1807 (if (setq calc-display-trail
1809 (not (if flag (memq flag '(nil 0)) win))) 1808 (not (if flag (memq flag '(nil 0)) win)))
@@ -1817,7 +1816,7 @@ If mouse is pressed in Calc window, push cut buffer contents onto the stack."
1817 (setq overlay-arrow-string calc-trail-overlay 1816 (setq overlay-arrow-string calc-trail-overlay
1818 overlay-arrow-position calc-trail-pointer) 1817 overlay-arrow-position calc-trail-pointer)
1819 (or no-refresh 1818 (or no-refresh
1820 (if (interactive-p) 1819 (if interactive
1821 (calc-do-refresh) 1820 (calc-do-refresh)
1822 (calc-refresh)))))) 1821 (calc-refresh))))))
1823 (if win 1822 (if win
@@ -1825,7 +1824,7 @@ If mouse is pressed in Calc window, push cut buffer contents onto the stack."
1825 (delete-window win) 1824 (delete-window win)
1826 (calc-wrapper 1825 (calc-wrapper
1827 (or no-refresh 1826 (or no-refresh
1828 (if (interactive-p) 1827 (if interactive
1829 (calc-do-refresh) 1828 (calc-do-refresh)
1830 (calc-refresh)))))))) 1829 (calc-refresh))))))))
1831 calc-trail-buffer) 1830 calc-trail-buffer)