summaryrefslogtreecommitdiff
path: root/lisp/calendar/todo-mode.el
diff options
context:
space:
mode:
authorOliver Seidel <os10000@seidel-space.de>1997-08-04 16:18:45 +0000
committerOliver Seidel <os10000@seidel-space.de>1997-08-04 16:18:45 +0000
commitf885bd0c7242e12bb1d569bf74d8aad54c6d5219 (patch)
tree78f8e4dc483d5da7328b27c84622892f5714c112 /lisp/calendar/todo-mode.el
parent16fb13f635329c3cd36a4387e112a0848d551b84 (diff)
downloademacs-f885bd0c7242e12bb1d569bf74d8aad54c6d5219.tar.gz
Added Raise/Lower item.
Diffstat (limited to 'lisp/calendar/todo-mode.el')
-rw-r--r--lisp/calendar/todo-mode.el41
1 files changed, 40 insertions, 1 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 6c30f45f73f..4fedb4e4ac8 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -6,9 +6,12 @@
;; please contact (address) O Seidel, Lessingstr 8, Eschborn, FRG
;; (e-mail ) Oliver.Seidel@cl.cam.ac.uk (2 Aug 1997)
-;; $Id: todomode.el,v 1.2 1997/08/03 12:15:28 os10000 Exp os10000 $
+;; $Id: todomode.el,v 1.3 1997/08/03 12:47:26 os10000 Exp os10000 $
;;
;; $Log: todomode.el,v $
+;; Revision 1.3 1997/08/03 12:47:26 os10000
+;; Cleaned up variables, prefix and cursor position.
+;;
;; Revision 1.2 1997/08/03 12:15:28 os10000
;; It appears to work.
;;
@@ -32,6 +35,8 @@
;; e to edit the current entry
;; i to insert a new entry
;; k to kill the current entry
+;; r raise current entryk's priority
+;; l lower the current entry's priority
;; f to file the current entry, including a
;; comment and timestamp
;;
@@ -75,6 +80,8 @@
(define-key todo-mode-map "e" 'todo-cmd-edit)
(define-key todo-mode-map "i" 'todo-cmd-inst)
(define-key todo-mode-map "k" 'todo-cmd-kill)
+(define-key todo-mode-map "r" 'todo-cmd-rais)
+(define-key todo-mode-map "l" 'todo-cmd-lowr)
(define-key todo-mode-map "f" 'todo-cmd-file)
(defun todo-cmd-prev () "Select previous entry."
@@ -167,6 +174,38 @@
(message "")
)
+(defun todo-cmd-rais () "Raise priority of current entry."
+ (interactive)
+ (if (> (count-lines (point-min) (point-max)) 0)
+ (progn
+ (setq todo-entry (todo-line))
+ (delete-region todo-begin (+ 1 todo-end))
+ (forward-line -1)
+ (insert (concat todo-entry "\n"))
+ (forward-char -1)
+ )
+ (message "No entry to raise.")
+ )
+ (beginning-of-line nil)
+ (message "")
+ )
+
+(defun todo-cmd-lowr () "Lower priority of current entry."
+ (interactive)
+ (if (> (count-lines (point-min) (point-max)) 0)
+ (progn
+ (setq todo-entry (todo-line))
+ (delete-region todo-begin (+ 1 todo-end))
+ (forward-line 1)
+ (insert (concat todo-entry "\n"))
+ (forward-char -1)
+ )
+ (message "No entry to raise.")
+ )
+ (beginning-of-line nil)
+ (message "")
+ )
+
(defun todo-cmd-file () "File away the current todo list entry."
(interactive)
(if (> (count-lines (point-min) (point-max)) 0)