*** emacs/lisp/calendar/todo-mode.el.~1.72.~ 2009-01-09 11:48:58.000000000 +0100 --- emacs/lisp/calendar/todo-mode.el 2009-01-20 21:30:15.000000000 +0100 *************** *** 610,625 **** (defalias 'todo-cmd-inst 'todo-insert-item) (defun todo-insert-item-here () ! "Insert new TODO list entry under the cursor." ! (interactive "") ! (save-excursion ! (if (not (derived-mode-p 'todo-mode)) (todo-show)) ! (let* ((new-item (concat todo-prefix " " ! (read-from-minibuffer ! "New TODO entry: " ! (if todo-entry-prefix-function ! (funcall todo-entry-prefix-function)))))) ! (insert (concat new-item "\n"))))) (defun todo-more-important-p (line) "Ask whether entry is more important than the one at LINE." --- 610,629 ---- (defalias 'todo-cmd-inst 'todo-insert-item) (defun todo-insert-item-here () ! "Insert a new TODO list entry directly above the entry at point. ! If point is on an empty line, insert the entry there." ! (interactive) ! (if (not (derived-mode-p 'todo-mode)) (todo-show)) ! (let ((new-item (concat todo-prefix " " ! (read-from-minibuffer ! "New TODO entry: " ! (if todo-entry-prefix-function ! (funcall todo-entry-prefix-function)))))) ! (unless (and (bolp) (eolp)) (goto-char (todo-item-start))) ! (insert (concat new-item "\n")) ! (backward-char) ! ;; put point at start of new entry ! (goto-char (todo-item-start)))) (defun todo-more-important-p (line) "Ask whether entry is more important than the one at LINE."