diff options
Diffstat (limited to 'lisp/calc/calc.el')
-rw-r--r-- | lisp/calc/calc.el | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 171f7711324..6c21430b1b3 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -412,7 +412,7 @@ and deleted by `calc-pop'." (defcustom calc-undo-length 100 "The number of undo steps that will be preserved when Calc is quit." - :type 'integer) + :type 'natnum) (defcustom calc-highlight-selections-with-faces nil "If non-nil, use a separate face to indicate selected sub-formulas. @@ -439,6 +439,14 @@ to be identified as that note." :version "24.1" :type 'string) +(defcustom calc-kill-line-numbering t + "If non-nil, calculator kills include any line numbering. + +This option does not affect calc kill and copy commands which +operate on the region, such as `calc-copy-region-as-kill'." + :version "29.1" + :type 'boolean) + (defvar math-format-date-cache) ; calc-forms.el (defface calc-nonselected-face @@ -494,7 +502,7 @@ This setting only applies to floats in normal display mode.") (defmacro defcalcmodevar (var defval &optional doc) "Declare VAR as a Calc variable, with default value DEFVAL and doc-string DOC. The variable VAR will be added to `calc-mode-var-list'." - (declare (doc-string 3)) + (declare (doc-string 3) (indent defun)) `(progn (defvar ,var ,defval ,doc) (add-to-list 'calc-mode-var-list (list (quote ,var) ,defval)))) @@ -1375,7 +1383,7 @@ Notations: 3.14e6 3.14 * 10^6 LONG is a desired text for a wide window, SHORT is a desired abbreviated text, and width is the buffer width, which will be -some fraction of the 'parent' window width (At the time of +some fraction of the \"parent\" window width (At the time of writing, 2/3 for calc, 1/3 for trail). The optional FUDGE is a trial-and-error adjustment number for the edge-cases at the border of the two cases." @@ -1621,7 +1629,8 @@ See calc-keypad for details." (stringp (nth 1 err)) (string-match "max-specpdl-size\\|max-lisp-eval-depth" (nth 1 err))) - (error "Computation got stuck or ran too long. Type `M' to increase the limit") + (error (substitute-command-keys + "Computation got stuck or ran too long. Type \\`M' to increase the limit")) (setq calc-aborted-prefix nil) (signal (car err) (cdr err))))) (when calc-aborted-prefix @@ -1950,12 +1959,8 @@ See calc-keypad for details." (or n (setq n 1)) (or m (setq m 1)) (calc-check-stack (+ n m -1)) - (and (> n 0) - (let ((top (copy-sequence (nthcdr (+ m calc-stack-top -1) - calc-stack)))) - (setcdr (nthcdr (1- n) top) nil) - (nreverse - (mapcar (lambda (x) (calc-get-stack-element x sel-mode)) top))))) + (nreverse (mapcar (lambda (x) (calc-get-stack-element x sel-mode)) + (take n (nthcdr (+ m calc-stack-top -1) calc-stack))))) (defun calc-top-list-n (&optional n m sel-mode) (mapcar #'math-check-complete @@ -2282,9 +2287,7 @@ the United States." ((and (null n) (eq (car-safe top) 'incomplete) (> (length top) (if (eq (nth 1 top) 'intv) 3 2))) - (calc-pop-push-list 1 (let ((tt (copy-sequence top))) - (setcdr (nthcdr (- (length tt) 2) tt) nil) - (list tt)))) + (calc-pop-push-list 1 (list (butlast top)))) ((< nn 0) (if (and calc-any-selections (calc-top-selected 1 (- nn))) @@ -3439,7 +3442,7 @@ The prefix `calcFunc-' is added to the specified name to get the actual Lisp function name. See Info node `(calc)Defining Functions'." - (declare (doc-string 3)) ;; FIXME: Edebug spec? + (declare (doc-string 3) (indent defun)) ;; FIXME: Edebug spec? (require 'calc-ext) (math-do-defmath func args body)) |