aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Belanger2004-12-31 05:59:44 +0000
committerJay Belanger2004-12-31 05:59:44 +0000
commitdcbdf5730b516d6057312ff1b66c49daa159d988 (patch)
tree27c4abc6d3e03823724c31293117a6d0e6887af9
parent7c31514af1d2e6ef93b262f82a9c2fddb85d41a9 (diff)
downloademacs-dcbdf5730b516d6057312ff1b66c49daa159d988.tar.gz
emacs-dcbdf5730b516d6057312ff1b66c49daa159d988.zip
(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.
-rw-r--r--lisp/calc/calc-yank.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el
index 0470abca536..2fdfab6c6f4 100644
--- a/lisp/calc/calc-yank.el
+++ b/lisp/calc/calc-yank.el
@@ -460,16 +460,14 @@ To cancel the edit, simply kill the *Calc Edit* buffer."
460 (make-local-variable 'calc-allow-ret) 460 (make-local-variable 'calc-allow-ret)
461 (setq calc-allow-ret allow-ret) 461 (setq calc-allow-ret allow-ret)
462 (erase-buffer) 462 (erase-buffer)
463 (add-hook 'kill-buffer-hook (lambda ()
464 (let ((calc-edit-handler nil))
465 (calc-edit-finish t))
466 (message "(Cancelled)")) t t)
463 (insert (or title title "Calc Edit Mode") 467 (insert (or title title "Calc Edit Mode")
464 ". Press " 468 ". Press `C-c C-c'"
465 (if (eq (lookup-key (current-global-map) "\e#") 'calc-dispatch) 469 (if allow-ret "" " or RET")
466 "M-# M-# or C-c C-c" 470 " to finish, `C-x k RET' to cancel.\n")))
467 (if allow-ret "C-c C-c" "RET"))
468 " to finish, "
469 (if (eq (lookup-key (current-global-map) "\e#") 'calc-dispatch)
470 "M-# x"
471 "C-x k RET")
472 " to cancel.\n")))
473(put 'calc-edit-mode 'mode-class 'special) 471(put 'calc-edit-mode 'mode-class 'special)
474 472
475(defun calc-show-edit-buffer () 473(defun calc-show-edit-buffer ()