diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-01-04 00:01:58 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2021-01-04 00:01:58 -0500 |
commit | 535a25164b5d656874b06fcc3a81f1bbd39b442a (patch) | |
tree | 161535df29802a4145c6a8b8a2c04805d8bc6681 /lisp/calc/calc-sel.el | |
parent | d8d223e7ef1d5ad2768662d114767f35601a0e87 (diff) | |
download | emacs-535a25164b5d656874b06fcc3a81f1bbd39b442a.tar.gz emacs-535a25164b5d656874b06fcc3a81f1bbd39b442a.tar.bz2 emacs-535a25164b5d656874b06fcc3a81f1bbd39b442a.zip |
* lisp/calc/calc-yank.el (calc-edit-mode): Make it into a proper major mode
Also make `calc-edit-handler` hold a function instead of an expression.
(calc-original-buffer, calc-return-buffer, calc-one-window)
(calc-edit-handler, calc-restore-trail, calc-allow-ret)
(calc-edit-top): Give them a default value.
(calc--edit-mode): New function extracted from old `calc-edit-mode`.
(calc-edit-return, calc-edit-finish): Don't need to test `boundp` any more.
(calc-edit-finish): Allow `calc-edit-handler` to be a function.
(calc-edit, calc-alg-edit):
* lisp/calc/calc-prog.el (calc-edit-user-syntax, calc-user-define-edit):
* lisp/calc/calc-embed.el (calc-embedded-edit):
* lisp/calc/calc-sel.el (calc-edit-selection):
* lisp/calc/calc-store.el (calc-edit-variable):
Use `calc--edit-mode` and make first arg into a function.
* lisp/calc/calc-ext.el (calc-init-extensions): Autoload `calc--edit-mode`
instead of `calc-edit-mode`.
Diffstat (limited to 'lisp/calc/calc-sel.el')
-rw-r--r-- | lisp/calc/calc-sel.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el index e6c6337f969..2b317ac3696 100644 --- a/lisp/calc/calc-sel.el +++ b/lisp/calc/calc-sel.el @@ -675,12 +675,12 @@ (entry (calc-top num 'entry)) (expr (car entry)) (sel (or (calc-auto-selection entry) expr)) - ) ;; alg - (let ((str (math-showing-full-precision - (math-format-nice-expr sel (frame-width))))) - (calc-edit-mode (list 'calc-finish-selection-edit - num (list 'quote sel) calc-sel-reselect)) - (insert str "\n")))) + ;; alg + (str (math-showing-full-precision + (math-format-nice-expr sel (frame-width)))) + (csr calc-sel-reselect)) + (calc--edit-mode (lambda () (calc-finish-selection-edit num sel csr))) + (insert str "\n"))) (calc-show-edit-buffer)) (defvar calc-original-buffer) |