mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
calc/calc-prog.el
calc/calc-graph.el calc/calc-map.el: Change `arglist' to `math-arglist' throughout.
This commit is contained in:
parent
a10c414934
commit
26d82c3ad3
4 changed files with 45 additions and 39 deletions
|
|
@ -171,17 +171,17 @@
|
|||
(interactive)
|
||||
(calc-wrapper
|
||||
(let* ((form (calc-top 1))
|
||||
(arglist nil)
|
||||
(math-arglist nil)
|
||||
(is-lambda (and (eq (car-safe form) 'calcFunc-lambda)
|
||||
(>= (length form) 2)))
|
||||
odef key keyname cmd cmd-base cmd-base-default
|
||||
func calc-user-formula-alist is-symb)
|
||||
(if is-lambda
|
||||
(setq arglist (mapcar (function (lambda (x) (nth 1 x)))
|
||||
(setq math-arglist (mapcar (function (lambda (x) (nth 1 x)))
|
||||
(nreverse (cdr (reverse (cdr form)))))
|
||||
form (nth (1- (length form)) form))
|
||||
(calc-default-formula-arglist form)
|
||||
(setq arglist (sort arglist 'string-lessp)))
|
||||
(setq math-arglist (sort math-arglist 'string-lessp)))
|
||||
(message "Define user key: z-")
|
||||
(setq key (read-char))
|
||||
(if (= (calc-user-function-classify key) 0)
|
||||
|
|
@ -267,17 +267,17 @@
|
|||
(format "%05d" (% (random) 10000)))))))
|
||||
|
||||
(if is-lambda
|
||||
(setq calc-user-formula-alist arglist)
|
||||
(setq calc-user-formula-alist math-arglist)
|
||||
(while
|
||||
(progn
|
||||
(setq calc-user-formula-alist
|
||||
(read-from-minibuffer "Function argument list: "
|
||||
(if arglist
|
||||
(prin1-to-string arglist)
|
||||
(if math-arglist
|
||||
(prin1-to-string math-arglist)
|
||||
"()")
|
||||
minibuffer-local-map
|
||||
t))
|
||||
(and (not (calc-subsetp calc-user-formula-alist arglist))
|
||||
(and (not (calc-subsetp calc-user-formula-alist math-arglist))
|
||||
(not (y-or-n-p
|
||||
"Okay for arguments that don't appear in formula to be ignored? "))))))
|
||||
(setq is-symb (and calc-user-formula-alist
|
||||
|
|
@ -328,14 +328,14 @@
|
|||
(setcdr kmap (cons (cons key cmd) (cdr kmap)))))))
|
||||
(message "")))
|
||||
|
||||
(defvar arglist) ; dynamically bound in all callers
|
||||
(defvar math-arglist) ; dynamically bound in all callers
|
||||
(defun calc-default-formula-arglist (form)
|
||||
(if (consp form)
|
||||
(if (eq (car form) 'var)
|
||||
(if (or (memq (nth 1 form) arglist)
|
||||
(if (or (memq (nth 1 form) math-arglist)
|
||||
(math-const-var form))
|
||||
()
|
||||
(setq arglist (cons (nth 1 form) arglist)))
|
||||
(setq math-arglist (cons (nth 1 form) math-arglist)))
|
||||
(calc-default-formula-arglist-step (cdr form)))))
|
||||
|
||||
(defun calc-default-formula-arglist-step (l)
|
||||
|
|
@ -394,23 +394,23 @@
|
|||
(intern (concat "calcFunc-" x))))))))
|
||||
(comps (get func 'math-compose-forms))
|
||||
entry entry2
|
||||
(arglist nil)
|
||||
(math-arglist nil)
|
||||
(calc-user-formula-alist nil))
|
||||
(if (math-zerop comp)
|
||||
(if (setq entry (assq calc-language comps))
|
||||
(put func 'math-compose-forms (delq entry comps)))
|
||||
(calc-default-formula-arglist comp)
|
||||
(setq arglist (sort arglist 'string-lessp))
|
||||
(setq math-arglist (sort math-arglist 'string-lessp))
|
||||
(while
|
||||
(progn
|
||||
(setq calc-user-formula-alist
|
||||
(read-from-minibuffer "Composition argument list: "
|
||||
(if arglist
|
||||
(prin1-to-string arglist)
|
||||
(if math-arglist
|
||||
(prin1-to-string math-arglist)
|
||||
"()")
|
||||
minibuffer-local-map
|
||||
t))
|
||||
(and (not (calc-subsetp calc-user-formula-alist arglist))
|
||||
(and (not (calc-subsetp calc-user-formula-alist math-arglist))
|
||||
(y-or-n-p
|
||||
"Okay for arguments that don't appear in formula to be invisible? "))))
|
||||
(or (setq entry (assq calc-language comps))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue