diff options
Diffstat (limited to 'lisp/calc')
| -rw-r--r-- | lisp/calc/calc-prog.el | 3 | ||||
| -rw-r--r-- | lisp/calc/calc-yank.el | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 30a06a2aa00..156bf4cd0db 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -139,6 +139,7 @@ "calc-")))) (let* ((kmap (calc-user-key-map)) (old (assq key kmap))) + ;; FIXME: Why not (define-key kmap (vector key) func)? (if old (setcdr old func) (setcdr kmap (cons (cons key func) (cdr kmap)))))))) @@ -322,6 +323,7 @@ (if key (let* ((kmap (calc-user-key-map)) (old (assq key kmap))) + ;; FIXME: Why not (define-key kmap (vector key) cmd)? (if old (setcdr old cmd) (setcdr kmap (cons (cons key cmd) (cdr kmap))))))) @@ -467,6 +469,7 @@ (format "z%c" key))))) (let* ((kmap (calc-user-key-map)) (old (assq key kmap))) + ;; FIXME: Why not (define-key kmap (vector key) func)? (if old (setcdr old cmd) (setcdr kmap (cons (cons key cmd) (cdr kmap)))))))) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 8d182372cfb..9781d4174f5 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -143,10 +143,7 @@ TEXT and CALCVAL are the TEXT and internal structure of stack entries.") "Set the contents of the Calc register REGISTER to (TEXT . CALCVAL), as well as set the contents of the Emacs register REGISTER to TEXT." (set-register register text) - (let ((aelt (assq register calc-register-alist))) - (if aelt - (setcdr aelt (cons text calcval)) - (push (cons register (cons text calcval)) calc-register-alist)))) + (setf (alist-get register calc-register-alist) (cons text calcval))) (defun calc-get-register (reg) "Return the CALCVAL portion of the contents of the Calc register REG, |
