;;;###autoload
(defun calc (&optional arg full-display interactive)
"The Emacs Calculator. Full documentation is listed under \"calc-mode\"."
- (interactive "P")
+ (interactive "P\ni\np")
(if arg
(unless (eq arg 0)
(calc-extensions)
(window-point full-display)
(select-window full-display))
(calc-check-defines)
- (when (and calc-said-hello
- (or (interactive-p) interactive))
+ (when (and calc-said-hello interactive)
(sit-for 2)
(message ""))
(setq calc-said-hello t)))))
;;;###autoload
-(defun full-calc ()
+(defun full-calc (&optional interactive)
"Invoke the Calculator and give it a full-sized window."
- (interactive)
- (calc nil t (interactive-p)))
+ (interactive "p")
+ (calc nil t interactive))
(defun calc-same-interface (arg)
"Invoke the Calculator using the most recent interface (calc or calc-keypad)."
(calc arg calc-full-mode t))))))
-(defun calc-quit (&optional non-fatal)
- (interactive)
+(defun calc-quit (&optional non-fatal interactive)
+ (interactive "i\np")
(and calc-standalone-flag (not non-fatal)
(save-buffers-kill-emacs nil))
(if (and (equal (buffer-name) "*Gnuplot Trail*")
(calc-edit-cancel)
(if (eq major-mode 'MacEdit-mode)
(MacEdit-cancel-edit)
- (if (and (interactive-p)
+ (if (and interactive
calc-embedded-info
(eq (current-buffer) (aref calc-embedded-info 0)))
(calc-embedded nil)
(calc-do-calc-eval str separator args))
;;;###autoload
-(defun calc-keypad ()
+(defun calc-keypad (&optional interactive)
"Invoke the Calculator in \"visual keypad\" mode.
This is most useful in the X window system.
In this mode, click on the Calc \"buttons\" using the left mouse button.
Or, position the cursor manually and do M-x calc-keypad-press."
- (interactive)
+ (interactive "p")
(calc-extensions)
- (calc-do-keypad calc-full-mode (interactive-p)))
+ (calc-do-keypad calc-full-mode interactive))
;;;###autoload
-(defun full-calc-keypad ()
+(defun full-calc-keypad (&optional interactive)
"Invoke the Calculator in full-screen \"visual keypad\" mode.
See calc-keypad for details."
- (interactive)
+ (interactive "p")
(calc-extensions)
- (calc-do-keypad t (interactive-p)))
+ (calc-do-keypad t interactive))
(defvar calc-aborted-prefix nil)
val)
-(defun calc-trail-display (flag &optional no-refresh)
- (interactive "P")
+(defun calc-trail-display (flag &optional no-refresh interactive)
+ (interactive "P\ni\np")
(let ((win (get-buffer-window (calc-trail-buffer))))
(if (setq calc-display-trail
(not (if flag (memq flag '(nil 0)) win)))
(setq overlay-arrow-string calc-trail-overlay
overlay-arrow-position calc-trail-pointer)
(or no-refresh
- (if (interactive-p)
+ (if interactive
(calc-do-refresh)
(calc-refresh))))))
(if win
(delete-window win)
(calc-wrapper
(or no-refresh
- (if (interactive-p)
+ (if interactive
(calc-do-refresh)
(calc-refresh))))))))
calc-trail-buffer)