mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Remove obsolete MacEdit code.
(calc-macro-edit-algebraic, calc-macro-edit-variable) (calc-macro-edit-variable-2, calc-macro-edit-quick-digit): Remove functions.
This commit is contained in:
parent
c84eeafa02
commit
c760c1eebd
1 changed files with 0 additions and 122 deletions
|
|
@ -787,128 +787,6 @@
|
|||
(setcar mac str))))
|
||||
(setcdr def str))))
|
||||
|
||||
;;; The following are hooks into the MacEdit package from macedit.el.
|
||||
(put 'calc-execute-extended-command 'MacEdit-print
|
||||
(function (lambda ()
|
||||
(setq macro-str (concat "\excalc-" macro-str)))))
|
||||
|
||||
(put 'calcDigit-start 'MacEdit-print
|
||||
(function (lambda ()
|
||||
(if calc-algebraic-mode
|
||||
(calc-macro-edit-algebraic)
|
||||
(MacEdit-unread-chars key-last)
|
||||
(let ((str "")
|
||||
(min-bsp 0)
|
||||
ch last)
|
||||
(while (and (setq ch (MacEdit-read-char))
|
||||
(or (and (>= ch ?0) (<= ch ?9))
|
||||
(memq ch '(?\. ?e ?\_ ?n ?\: ?\# ?M
|
||||
?o ?h ?\@ ?\"))
|
||||
(and (memq ch '(?\' ?m ?s))
|
||||
(string-match "[@oh]" str))
|
||||
(and (or (and (>= ch ?a) (<= ch ?z))
|
||||
(and (>= ch ?A) (<= ch ?Z)))
|
||||
(string-match
|
||||
"^[-+]?\\(1[1-9]\\|[2-9][0-9]\\)#"
|
||||
str))
|
||||
(and (memq ch '(?\177 ?\C-h))
|
||||
(> (length str) 0))
|
||||
(and (memq ch '(?+ ?-))
|
||||
(> (length str) 0)
|
||||
(eq (aref str (1- (length str)))
|
||||
?e))))
|
||||
(if (or (and (>= ch ?0) (<= ch ?9))
|
||||
(and (or (not (memq ch '(?\177 ?\C-h)))
|
||||
(<= (length str) min-bsp))
|
||||
(setq min-bsp (1+ (length str)))))
|
||||
(setq str (concat str (char-to-string ch)))
|
||||
(setq str (substring str 0 -1))))
|
||||
(if (memq ch '(32 10 13))
|
||||
(setq str (concat str (char-to-string ch)))
|
||||
(MacEdit-unread-chars ch))
|
||||
(insert "type \"")
|
||||
(MacEdit-insert-string str)
|
||||
(insert "\"\n"))))))
|
||||
|
||||
(defun calc-macro-edit-algebraic ()
|
||||
(MacEdit-unread-chars key-last)
|
||||
(let ((str "")
|
||||
(min-bsp 0))
|
||||
(while (progn
|
||||
(MacEdit-lookup-key calc-alg-ent-map)
|
||||
(or (and (memq key-symbol '(self-insert-command
|
||||
calcAlg-previous))
|
||||
(< (length str) 60))
|
||||
(memq key-symbol
|
||||
'(backward-delete-char
|
||||
delete-backward-char
|
||||
backward-delete-char-untabify))
|
||||
(eq key-last 9)))
|
||||
(setq macro-str (substring macro-str (length key-str)))
|
||||
(if (or (eq key-symbol 'self-insert-command)
|
||||
(and (or (not (memq key-symbol '(backward-delete-char
|
||||
delete-backward-char
|
||||
backward-delete-char-untabify)))
|
||||
(<= (length str) min-bsp))
|
||||
(setq min-bsp (+ (length str) (length key-str)))))
|
||||
(setq str (concat str key-str))
|
||||
(setq str (substring str 0 -1))))
|
||||
(if (memq key-last '(10 13))
|
||||
(setq str (concat str key-str)
|
||||
macro-str (substring macro-str (length key-str))))
|
||||
(if (> (length str) 0)
|
||||
(progn
|
||||
(insert "type \"")
|
||||
(MacEdit-insert-string str)
|
||||
(insert "\"\n")))))
|
||||
(put 'calc-algebraic-entry 'MacEdit-print 'calc-macro-edit-algebraic)
|
||||
(put 'calc-auto-algebraic-entry 'MacEdit-print 'calc-macro-edit-algebraic)
|
||||
|
||||
(defun calc-macro-edit-variable (&optional no-cmd)
|
||||
(let ((str "") ch)
|
||||
(or no-cmd (insert (symbol-name key-symbol) "\n"))
|
||||
(if (memq (MacEdit-peek-char) '(?\+ ?\- ?\* ?\/ ?^ ?\|))
|
||||
(setq str (char-to-string (MacEdit-read-char))))
|
||||
(if (and (setq ch (MacEdit-peek-char))
|
||||
(>= ch ?0) (<= ch ?9))
|
||||
(insert "type \"" str
|
||||
(char-to-string (MacEdit-read-char)) "\"\n")
|
||||
(if (> (length str) 0)
|
||||
(insert "type \"" str "\"\n"))
|
||||
(MacEdit-read-argument))))
|
||||
(put 'calc-store 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-into 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-neg 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-plus 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-minus 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-times 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-div 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-power 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-concat 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-inv 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-decr 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-incr 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-store-exchange 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-unstore 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-recall 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-let 'MacEdit-print 'calc-macro-edit-variable)
|
||||
(put 'calc-permanent-variable 'MacEdit-print 'calc-macro-edit-variable)
|
||||
|
||||
(defun calc-macro-edit-variable-2 ()
|
||||
(calc-macro-edit-variable)
|
||||
(calc-macro-edit-variable t))
|
||||
(put 'calc-copy-variable 'MacEdit-print 'calc-macro-edit-variable-2)
|
||||
(put 'calc-declare-variable 'MacEdit-print 'calc-macro-edit-variable-2)
|
||||
|
||||
(defun calc-macro-edit-quick-digit ()
|
||||
(insert "type \"" key-str "\" # " (symbol-name key-symbol) "\n"))
|
||||
(put 'calc-store-quick 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
(put 'calc-store-into-quick 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
(put 'calc-recall-quick 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
(put 'calc-select-part 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
(put 'calc-clean-num 'MacEdit-print 'calc-macro-edit-quick-digit)
|
||||
|
||||
|
||||
(defun calc-finish-formula-edit (func)
|
||||
(let ((buf (current-buffer))
|
||||
(str (buffer-substring (point) (point-max)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue