From f405d1f5e5f2efdc1253e2e64c6b25ebec9ac1c5 Mon Sep 17 00:00:00 2001 From: Jay Belanger Date: Sun, 2 Jan 2005 07:22:44 +0000 Subject: [PATCH] (calc-edit-mode): Add a spacer line to the header. (calc-edit-finish, calc-show-edit-buffer): Handle the spacer line in the header. --- lisp/calc/calc-yank.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 4c7d41e0f76..ccb9a19ae51 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -467,7 +467,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (insert (or title title "Calc Edit Mode. ") "Press `C-c C-c'" (if allow-ret "" " or RET") - " to finish, `C-x k RET' to cancel.\n"))) + " to finish, `C-x k RET' to cancel.\n\n"))) (put 'calc-edit-mode 'mode-class 'special) (defun calc-show-edit-buffer () @@ -485,7 +485,7 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (delete-window win)))) (set-buffer-modified-p nil) (goto-char (point-min)) - (forward-line 1))) + (forward-line 2))) (defun calc-edit-return () (interactive) @@ -522,6 +522,8 @@ To cancel the edit, simply kill the *Calc Edit* buffer." (goto-char (point-min)) (when (looking-at "Calc Edit\\|Editing ") (forward-line 1)) + (if (looking-at "^ *$") + (forward-line 1)) (if (buffer-modified-p) (eval calc-edit-handler)) (if one-window -- 2.39.5