Mercurial > emacs
changeset 59232:6841983190b8
(calc-edit-mode): Mention C-cC-c as the way to finish, C-xk as the way
to cancel the edit. Add cancel routine to kill-buffer-hook.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Fri, 31 Dec 2004 05:59:44 +0000 |
parents | 39d1282c0854 |
children | 1b8fc7489fa8 |
files | lisp/calc/calc-yank.el |
diffstat | 1 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calc/calc-yank.el Fri Dec 31 05:58:44 2004 +0000 +++ b/lisp/calc/calc-yank.el Fri Dec 31 05:59:44 2004 +0000 @@ -460,16 +460,14 @@ (make-local-variable 'calc-allow-ret) (setq calc-allow-ret allow-ret) (erase-buffer) + (add-hook 'kill-buffer-hook (lambda () + (let ((calc-edit-handler nil)) + (calc-edit-finish t)) + (message "(Cancelled)")) t t) (insert (or title title "Calc Edit Mode") - ". Press " - (if (eq (lookup-key (current-global-map) "\e#") 'calc-dispatch) - "M-# M-# or C-c C-c" - (if allow-ret "C-c C-c" "RET")) - " to finish, " - (if (eq (lookup-key (current-global-map) "\e#") 'calc-dispatch) - "M-# x" - "C-x k RET") - " to cancel.\n"))) + ". Press `C-c C-c'" + (if allow-ret "" " or RET") + " to finish, `C-x k RET' to cancel.\n"))) (put 'calc-edit-mode 'mode-class 'special) (defun calc-show-edit-buffer ()