• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/calc/

Lines Matching +refs:calc +refs:append

0 ;;; calc-misc.el --- miscellaneous functions for Calc
30 ;; This file is autoloaded from calc.el.
32 (require 'calc)
33 (require 'calc-macs)
35 (defun calc-dispatch-help (arg)
39 C calc. Start the Calculator in a window at the bottom of the screen.
40 O calc-other-window. Start the Calculator but don't select its window.
41 B calc-big-or-small. Control whether to use the full Emacs screen for Calc.
42 Q quick-calc. Use the Calculator in the minibuffer.
43 K calc-keypad. Start the Calculator in keypad mode (X window system only).
44 E calc-embedded. Use the Calculator on a formula in this editing buffer.
45 J calc-embedded-select. Like E, but select appropriate half of => or :=.
46 W calc-embedded-word. Like E, but activate a single word, i.e., a number.
47 Z calc-user-invocation. Invoke Calc in the way you defined with `Z I' cmd.
48 X calc-quit. Turn Calc off.
51 G calc-grab-region. Grab the region defined by mark and point into Calc.
52 R calc-grab-rectangle. Grab the rectangle defined by mark, point into Calc.
53 : calc-grab-sum-down. Grab a rectangle and sum the columns.
54 _ calc-grab-sum-across. Grab a rectangle and sum the rows.
55 Y calc-copy-to-buffer. Copy a value from the stack into the editing buffer.
58 A calc-embedded-activate. Find and activate all :='s and =>'s in buffer.
59 D calc-embedded-duplicate. Make a copy of this formula and select it.
60 F calc-embedded-new-formula. Insert a new formula at current point.
61 N calc-embedded-next. Advance cursor to next known formula in buffer.
62 P calc-embedded-previous. Advance cursor to previous known formula.
63 U calc-embedded-update-formula. Re-evaluate formula at point.
64 ` calc-embedded-edit. Use calc-edit to edit formula at point.
67 I calc-info. Read the Calculator manual in the Emacs Info system.
68 T calc-tutorial. Run the Calculator Tutorial using the Emacs Info system.
69 S calc-summary. Read the Summary from the Calculator manual in Info.
72 L calc-load-everything. Load all parts of the Calculator into memory.
74 0 (zero) calc-reset. Reset Calc stack and modes to default state.
80 (calc-check-defines)
81 (if calc-dispatch-help
84 (describe-function 'calc-dispatch-help)
92 (memq (car (setq key (calc-read-key t)))
99 (calc-unread-command (cdr key))))))
100 (calc-do-dispatch nil))
101 (let ((calc-dispatch-help t))
102 (calc-do-dispatch arg))))
105 (defun calc-big-or-small (arg)
112 (setq calc-full-mode
116 (setq calc-full-mode (if arg
118 (not calc-full-mode)))
121 (calc-quit)
122 (calc-do-keypad calc-full-mode nil))
125 (calc-quit)
126 (calc nil calc-full-mode nil))))
127 (message (if calc-full-mode
131 (defun calc-other-window (&optional interactive)
134 (if (memq major-mode '(calc-mode calc-trail-mode))
137 (if (memq major-mode '(calc-mode calc-trail-mode))
140 (calc-quit)
142 (calc nil win interactive)))))
144 (defun another-calc ()
147 (if (eq major-mode 'calc-mode)
150 (set-default v (symbol-value v)))) calc-local-var-list))
153 (calc-mode))
155 (defun calc-info ()
161 (defun calc-info-goto-node (node)
167 (defun calc-tutorial ()
171 (calc-quit))
172 (calc-info-goto-node "Interactive Tutorial")
173 (calc-other-window)
176 (defun calc-info-summary ()
179 (calc-info-goto-node "Summary"))
181 (defun calc-help ()
183 (let ((msgs (append
205 calc-version)))))
206 (if calc-full-help-flag
208 (if (or calc-inverse-flag calc-hyperbolic-flag)
209 (if calc-inverse-flag
210 (if calc-hyperbolic-flag
211 (calc-inv-hyp-prefix-help)
212 (calc-inverse-prefix-help))
213 (calc-hyperbolic-prefix-help))
214 (setq calc-help-phase
216 (% (1+ calc-help-phase) (1+ (length msgs)))
218 (let ((msg (nth calc-help-phase msgs)))
233 ;; The variable calc-last-why-command is set in calc-do-handly-whys
234 ;; and used in calc-why (in calc-stuff.el).
235 (defvar calc-last-why-command)
237 (defun calc-do-handle-whys ()
238 (setq calc-why (sort calc-next-why
242 calc-next-why nil)
243 (if (and calc-why (or (eq calc-auto-why t)
244 (and (eq (car (car calc-why)) '*)
245 calc-auto-why)))
247 (require 'calc-ext)
248 (calc-explain-why (car calc-why)
249 (if (eq calc-auto-why t)
250 (cdr calc-why)
251 (if calc-auto-why
252 (eq (car (nth 1 calc-why)) '*))))
253 (setq calc-last-why-command this-command)
254 (calc-clear-command-flag 'clear-message))))
256 (defun calc-record-why (&rest stuff)
270 (setq calc-next-why (cons stuff calc-next-why))
284 (defun calc-roll-down-stack (n &optional m)
286 (calc-roll-up-stack (- n) m)
287 (if (or (= n 0) (> n (calc-stack-size))) (setq n (calc-stack-size)))
291 (if (and calc-any-selections
292 (not calc-use-selections))
293 (calc-roll-down-with-selections n m)
294 (calc-pop-push-list n
295 (append (calc-top-list m 1)
296 (calc-top-list (- n m) (1+ m))))))))
298 (defun calc-roll-up-stack (n &optional m)
300 (calc-roll-down-stack (- n) m)
301 (if (or (= n 0) (> n (calc-stack-size))) (setq n (calc-stack-size)))
305 (if (and calc-any-selections
306 (not calc-use-selections))
307 (calc-roll-up-with-selections n m)
308 (calc-pop-push-list n
309 (append (calc-top-list (- n m) 1)
310 (calc-top-list m (- n m -1))))))))
313 (defun calc-do-refresh ()
314 (if calc-hyperbolic-flag
316 (setq calc-display-dirty t)
318 (calc-refresh)
322 (defun calc-record-list (vals &optional prefix)
326 (calc-record (car vals) prefix)
331 (defun calc-last-args-stub (arg)
333 (require 'calc-ext)
334 (calc-last-args arg))
337 (defun calc-power (arg)
339 (calc-slow-wrapper
340 (if (and (featurep 'calc-ext)
341 (calc-is-inverse))
342 (calc-binary-op "root" 'calcFunc-nroot arg nil nil)
343 (calc-binary-op "^" 'calcFunc-pow arg nil nil '^))))
345 (defun calc-mod (arg)
347 (calc-slow-wrapper
348 (calc-binary-op "%" 'calcFunc-mod arg nil nil '%)))
350 (defun calc-inv (arg)
352 (calc-slow-wrapper
353 (calc-unary-op "inv" 'calcFunc-inv arg)))
355 (defun calc-percent ()
357 (calc-slow-wrapper
358 (calc-pop-push-record-list
359 1 "%" (list (list 'calcFunc-percent (calc-top-n 1))))))
362 (defun calc-over (n)
365 (calc-enter (- (prefix-numeric-value n)))
366 (calc-enter -2)))
369 (defun calc-pop-above (n)
372 (calc-pop (- (prefix-numeric-value n)))
373 (calc-pop -2)))
375 (defun calc-roll-down (n)
377 (calc-wrapper
380 (calc-roll-down-stack 2))
382 (calc-roll-down-stack nn))
384 (calc-pop-push-list (calc-stack-size)
386 (calc-top-list (calc-stack-size)))))
388 (calc-roll-down-stack (calc-stack-size) (- nn)))))))
390 (defun calc-roll-up (n)
392 (calc-wrapper
395 (calc-roll-up-stack 3))
397 (calc-roll-up-stack nn))
399 (calc-pop-push-list (calc-stack-size)
401 (calc-top-list (calc-stack-size)))))
403 (calc-roll-up-stack (calc-stack-size) (- nn)))))))
410 (defun calc-num-prefix-name (n)
417 (defun calc-missing-key (n)
418 "This is a placeholder for a command which needs to be loaded from calc-ext.
419 When this key is used, calc-ext (the Calculator extensions module) will be
422 (require 'calc-ext)
424 (message "%s%c-" (calc-num-prefix-name n) last-command-char))
425 (calc-unread-command)
428 (defun calc-shift-Y-prefix-help ()
430 (require 'calc-ext)
431 (calc-do-prefix-help calc-Y-help-msgs "other" ?Y))
438 (if (calc-minibuffer-contains "[-+]?\\(1[1-9]\\|[2-9][0-9]\\)#.*")
446 (defun calc-temp-minibuffer-message (m)
469 (require 'calc-ext)
472 (append (if (and (math-vectorp v1)
590 (calc-record-why option p a)
592 (calc-record-why p a)))
599 ;; math-trunc-fancy in calc-arith.el, which is called by math-trunc.
603 (require 'calc-ext)
610 (t (require 'calc-ext)
617 ;; math-floor-fancy in calc-arith.el, which is called by math-floor.
621 (require 'calc-ext)
629 (t (require 'calc-ext)
645 (require 'calc-ext)
651 (require 'calc-arith)
659 (calc-set-command-flag 'clear-message)
678 (t (require 'calc-ext)
691 (require 'calc-ext)
699 (require 'calc-ext)
707 (require 'calc-ext)
752 (defun report-calc-bug ()
757 (reporter-submit-bug-report calc-bug-address "Calc" '(calc-version)
763 (defalias 'calc-report-bug 'report-calc-bug)
765 (provide 'calc-misc)
768 ;;; calc-misc.el ends here