aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calc
diff options
context:
space:
mode:
authorKaroly Lorentey2004-10-31 02:05:24 +0000
committerKaroly Lorentey2004-10-31 02:05:24 +0000
commite0bc17abe6979d607e8de4684dddb96e53c60065 (patch)
treeb7cb7bc5df9f12138937fd958cdf4b9c2d19ee3a /lisp/calc
parentf158167a84475d5fc41931531406821e6413afd7 (diff)
parent707994d2626cf0f01c3ece4028d73835068d64dc (diff)
downloademacs-e0bc17abe6979d607e8de4684dddb96e53c60065.tar.gz
emacs-e0bc17abe6979d607e8de4684dddb96e53c60065.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-639 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-641 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-642 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-643 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-644 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-645 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-646 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-647 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-648 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-649 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-650 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-651 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-652 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-59 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-60 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-61 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-62 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-63 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-263
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-incom.el3
-rw-r--r--lisp/calc/calc-misc.el6
-rw-r--r--lisp/calc/calc-rewr.el6
-rw-r--r--lisp/calc/calc.el37
4 files changed, 26 insertions, 26 deletions
diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el
index b8bb7ab4f9a..7dc7f08b4bd 100644
--- a/lisp/calc/calc-incom.el
+++ b/lisp/calc/calc-incom.el
@@ -183,7 +183,8 @@
183 (if calc-prev-prev-char 183 (if calc-prev-prev-char
184 (calcDigit-nondigit) 184 (calcDigit-nondigit)
185 (setq calc-digit-value nil) 185 (setq calc-digit-value nil)
186 (erase-buffer) 186 (let ((inhibit-read-only t))
187 (erase-buffer))
187 (exit-minibuffer))) 188 (exit-minibuffer)))
188 ;; just ignore extra decimal point, anticipating ".." 189 ;; just ignore extra decimal point, anticipating ".."
189 (delete-backward-char 1))) 190 (delete-backward-char 1)))
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index c01d37e6848..159b1ee3178 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -130,9 +130,9 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)."
130 "Now using full screen for Calc" 130 "Now using full screen for Calc"
131 "Now using partial screen for Calc")))) 131 "Now using partial screen for Calc"))))
132 132
133(defun calc-other-window () 133(defun calc-other-window (&optional interactive)
134 "Invoke the Calculator in another window." 134 "Invoke the Calculator in another window."
135 (interactive) 135 (interactive "p")
136 (if (memq major-mode '(calc-mode calc-trail-mode)) 136 (if (memq major-mode '(calc-mode calc-trail-mode))
137 (progn 137 (progn
138 (other-window 1) 138 (other-window 1)
@@ -141,7 +141,7 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)."
141 (if (get-buffer-window "*Calculator*") 141 (if (get-buffer-window "*Calculator*")
142 (calc-quit) 142 (calc-quit)
143 (let ((win (selected-window))) 143 (let ((win (selected-window)))
144 (calc nil win (interactive-p)))))) 144 (calc nil win interactive)))))
145 145
146(defun another-calc () 146(defun another-calc ()
147 "Create another, independent Calculator buffer." 147 "Create another, independent Calculator buffer."
diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el
index 51cffb753fc..47b48bd88d8 100644
--- a/lisp/calc/calc-rewr.el
+++ b/lisp/calc/calc-rewr.el
@@ -143,15 +143,15 @@
143 (calc-pop-push-record-list n "rwrt" (list expr))) 143 (calc-pop-push-record-list n "rwrt" (list expr)))
144 (calc-handle-whys))) 144 (calc-handle-whys)))
145 145
146(defun calc-match (pat) 146(defun calc-match (pat &optional interactive)
147 (interactive "sPattern: \n") 147 (interactive "sPattern: \np")
148 (calc-slow-wrapper 148 (calc-slow-wrapper
149 (let (n expr) 149 (let (n expr)
150 (if (or (null pat) (equal pat "") (equal pat "$")) 150 (if (or (null pat) (equal pat "") (equal pat "$"))
151 (setq expr (calc-top-n 2) 151 (setq expr (calc-top-n 2)
152 pat (calc-top-n 1) 152 pat (calc-top-n 1)
153 n 2) 153 n 2)
154 (if (interactive-p) (setq calc-previous-alg-entry pat)) 154 (if interactive (setq calc-previous-alg-entry pat))
155 (setq pat (if (stringp pat) (math-read-expr pat) pat)) 155 (setq pat (if (stringp pat) (math-read-expr pat) pat))
156 (if (eq (car-safe pat) 'error) 156 (if (eq (car-safe pat) 'error)
157 (error "Bad format in expression: %s" (nth 1 pat))) 157 (error "Bad format in expression: %s" (nth 1 pat)))
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)