From 1966902e99987255c65029cf205258580dbc0c5e Mon Sep 17 00:00:00 2001 From: Oliver Seidel Date: Tue, 28 Oct 1997 21:59:48 +0000 Subject: Improved documentation, fixed insertion with prefix. --- lisp/calendar/todo-mode.el | 52 +++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 5275c9e436..08f061dc53 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -4,7 +4,7 @@ ;; Author: Oliver.Seidel@cl.cam.ac.uk (was valid on Aug 2, 1997) ;; Created: 2 Aug 1997 -;; Version: $Id: todo-mode.el,v 1.28 1997/10/28 21:37:05 os10000 Exp os10000 $ +;; Version: $Id: todo-mode.el,v 1.29 1997/10/28 21:47:12 os10000 Exp os10000 $ ;; Keywords: Categorised TODO list editor, todo-mode ;; This file is part of GNU Emacs. @@ -96,7 +96,7 @@ ;; ;; Which version of todo-mode.el does this documentation refer to? ;; -;; $Id: todo-mode.el,v 1.28 1997/10/28 21:37:05 os10000 Exp os10000 $ +;; $Id: todo-mode.el,v 1.29 1997/10/28 21:47:12 os10000 Exp os10000 $ ;; ;; Pre-Requisites ;; @@ -117,9 +117,11 @@ ;; d to file the current entry, including a ;; comment and timestamp ;; e to edit the current entry +;; E to edit a multi-line entry ;; f to file the current entry, including a ;; comment and timestamp ;; i to insert a new entry +;; I to insert a new entry at current cursor position ;; j jump to category ;; k to kill the current entry ;; l to lower the current entry's priority @@ -265,6 +267,10 @@ ;;; Change Log: ;; $Log: todo-mode.el,v $ +;; Revision 1.29 1997/10/28 21:47:12 os10000 +;; Implemented "insert-under-cursor" as suggested by +;; Kai Grossjohann . +;; ;; Revision 1.28 1997/10/28 21:37:05 os10000 ;; Incorporated simplifying suggestions from ;; Carsten Dominik . @@ -614,9 +620,9 @@ Use `todo-categories' instead.") (suppress-keymap map t) (define-key map "+" 'todo-forward-category) (define-key map "-" 'todo-backward-category) + (define-key map "d" 'todo-file-item) ;done/delete (define-key map "e" 'todo-edit-item) (define-key map "E" 'todo-edit-multiline) - (define-key map "d" 'todo-file-item) ;done/delete (define-key map "f" 'todo-file-item) (define-key map "i" 'todo-insert-item) (define-key map "I" 'todo-insert-item-here) @@ -786,23 +792,23 @@ With a prefix argument solicit the category, otherwise use the current category." (interactive "P") (save-excursion - (todo-show) - (let* ((new-item (concat todo-prefix " " - (read-from-minibuffer - "New TODO entry: " - (if todo-entry-prefix-function - (funcall todo-entry-prefix-function))))) - (categories todo-categories) - (history (cons 'categories (1+ todo-category-number))) - (current-category (nth todo-category-number todo-categories)) - (category - (if ARG - current-category + (if (not (string-equal mode-name "TODO")) (todo-show)) + (let* ((new-item (concat todo-prefix " " + (read-from-minibuffer + "New TODO entry: " + (if todo-entry-prefix-function + (funcall todo-entry-prefix-function))))) + (categories todo-categories) + (history (cons 'categories (1+ todo-category-number))) + (current-category (nth todo-category-number todo-categories)) + (category + (if ARG + current-category (completing-read - (concat "Category [" - current-category "]: ") - (todo-category-alist) nil nil nil history)))) - (todo-add-item-non-interactively new-item category ARG)))) + (concat "Category [" + current-category "]: ") + (todo-category-alist) nil nil nil history)))) + (todo-add-item-non-interactively new-item category ARG)))) (defalias 'todo-cmd-inst 'todo-insert-item) @@ -810,13 +816,7 @@ category." (defun todo-insert-item-here () "Insert new TODO list entry under the cursor." (interactive) - (save-excursion - (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"))))) + (todo-insert-item t)) (defun todo-more-important-p (line) "Ask whether entry is more important than the one at LINE." -- cgit v1.2.3