aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Seidel1997-12-03 12:18:20 +0000
committerOliver Seidel1997-12-03 12:18:20 +0000
commit6b04f517ce06dbf5284b0bd803fd46fae9754773 (patch)
tree4eb4e1f896a4d504ec6304dd7effe04ae9140947
parentd04f50310af5a829d7120e0d4dd3581669322e39 (diff)
downloademacs-6b04f517ce06dbf5284b0bd803fd46fae9754773.tar.gz
emacs-6b04f517ce06dbf5284b0bd803fd46fae9754773.zip
Added category patch by Michael R Cook <mcook@cognex.com>.
-rw-r--r--lisp/calendar/todo-mode.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 8032a13da47..bf1ff1a4d4b 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Oliver.Seidel@cl.cam.ac.uk (was valid on Aug 2, 1997) 5;; Author: Oliver.Seidel@cl.cam.ac.uk (was valid on Aug 2, 1997)
6;; Created: 2 Aug 1997 6;; Created: 2 Aug 1997
7;; Version: $Id: todo-mode.el,v 1.30 1997/10/28 21:59:48 os10000 Exp os10000 $ 7;; Version: $Id: todo-mode.el,v 1.31 1997/10/28 22:16:24 os10000 Exp os10000 $
8;; Keywords: Categorised TODO list editor, todo-mode 8;; Keywords: Categorised TODO list editor, todo-mode
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -96,7 +96,7 @@
96;; 96;;
97;; Which version of todo-mode.el does this documentation refer to? 97;; Which version of todo-mode.el does this documentation refer to?
98;; 98;;
99;; $Id: todo-mode.el,v 1.30 1997/10/28 21:59:48 os10000 Exp os10000 $ 99;; $Id: todo-mode.el,v 1.31 1997/10/28 22:16:24 os10000 Exp os10000 $
100;; 100;;
101;; Pre-Requisites 101;; Pre-Requisites
102;; 102;;
@@ -267,6 +267,12 @@
267;;; Change Log: 267;;; Change Log:
268 268
269;; $Log: todo-mode.el,v $ 269;; $Log: todo-mode.el,v $
270;; Revision 1.31 1997/10/28 22:16:24 os10000
271;; Three insertion options:
272;; i without prefix: ask for category, do binary insertion
273;; i with prefix: do binary insertion in current category
274;; uppercase I: insert directly under cursor
275;;
270;; Revision 1.30 1997/10/28 21:59:48 os10000 276;; Revision 1.30 1997/10/28 21:59:48 os10000
271;; Improved documentation, fixed insertion with prefix. 277;; Improved documentation, fixed insertion with prefix.
272;; 278;;
@@ -731,7 +737,7 @@ Use `todo-categories' instead.")
731;;;### autoload 737;;;### autoload
732(defun todo-add-category (cat) 738(defun todo-add-category (cat)
733 "Add new category CAT to the TODO list." 739 "Add new category CAT to the TODO list."
734 (interactive) 740 (interactive "sCategory: ")
735 (save-window-excursion 741 (save-window-excursion
736 (setq todo-categories (cons cat todo-categories)) 742 (setq todo-categories (cons cat todo-categories))
737 (find-file todo-file-do) 743 (find-file todo-file-do)
@@ -891,7 +897,7 @@ category."
891 " " 897 " "
892 "\n\t") 898 "\n\t")
893 "(" (nth todo-category-number todo-categories) ": " 899 "(" (nth todo-category-number todo-categories) ": "
894 comment ")\n"))) 900 comment ")")))
895 (goto-char (todo-item-start)) 901 (goto-char (todo-item-start))
896 (let ((temp-point (point))) 902 (let ((temp-point (point)))
897 (if (looking-at (regexp-quote todo-prefix)) 903 (if (looking-at (regexp-quote todo-prefix))
@@ -899,7 +905,7 @@ category."
899 ;; Standard prefix -> timestamp 905 ;; Standard prefix -> timestamp
900 ;; Else prefix non-standard item start with timestamp 906 ;; Else prefix non-standard item start with timestamp
901 (insert (time-stamp-string))) 907 (insert (time-stamp-string)))
902 (append-to-file temp-point (todo-item-end) todo-file-done) 908 (append-to-file temp-point (1+ (todo-item-end)) todo-file-done)
903 (delete-region temp-point (1+ (todo-item-end)))) 909 (delete-region temp-point (1+ (todo-item-end))))
904 (todo-backward-item) 910 (todo-backward-item)
905 (message "")) 911 (message ""))