aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Seidel1997-08-04 16:18:45 +0000
committerOliver Seidel1997-08-04 16:18:45 +0000
commit8cdc3b3d9d28e6d451db3f02e2344d31f42ef388 (patch)
tree0300c7627a872e4cab2dcff8f4db0f9d32877ae1
parent4029fd9a3fe0aa75d625de8cd21a74fca5704d73 (diff)
downloademacs-8cdc3b3d9d28e6d451db3f02e2344d31f42ef388.tar.gz
emacs-8cdc3b3d9d28e6d451db3f02e2344d31f42ef388.zip
Added Raise/Lower item.
-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 @@
6;; please contact (address) O Seidel, Lessingstr 8, Eschborn, FRG 6;; please contact (address) O Seidel, Lessingstr 8, Eschborn, FRG
7;; (e-mail ) Oliver.Seidel@cl.cam.ac.uk (2 Aug 1997) 7;; (e-mail ) Oliver.Seidel@cl.cam.ac.uk (2 Aug 1997)
8 8
9;; $Id: todomode.el,v 1.2 1997/08/03 12:15:28 os10000 Exp os10000 $ 9;; $Id: todomode.el,v 1.3 1997/08/03 12:47:26 os10000 Exp os10000 $
10;; 10;;
11;; $Log: todomode.el,v $ 11;; $Log: todomode.el,v $
12;; Revision 1.3 1997/08/03 12:47:26 os10000
13;; Cleaned up variables, prefix and cursor position.
14;;
12;; Revision 1.2 1997/08/03 12:15:28 os10000 15;; Revision 1.2 1997/08/03 12:15:28 os10000
13;; It appears to work. 16;; It appears to work.
14;; 17;;
@@ -32,6 +35,8 @@
32;; e to edit the current entry 35;; e to edit the current entry
33;; i to insert a new entry 36;; i to insert a new entry
34;; k to kill the current entry 37;; k to kill the current entry
38;; r raise current entryk's priority
39;; l lower the current entry's priority
35;; f to file the current entry, including a 40;; f to file the current entry, including a
36;; comment and timestamp 41;; comment and timestamp
37;; 42;;
@@ -75,6 +80,8 @@
75(define-key todo-mode-map "e" 'todo-cmd-edit) 80(define-key todo-mode-map "e" 'todo-cmd-edit)
76(define-key todo-mode-map "i" 'todo-cmd-inst) 81(define-key todo-mode-map "i" 'todo-cmd-inst)
77(define-key todo-mode-map "k" 'todo-cmd-kill) 82(define-key todo-mode-map "k" 'todo-cmd-kill)
83(define-key todo-mode-map "r" 'todo-cmd-rais)
84(define-key todo-mode-map "l" 'todo-cmd-lowr)
78(define-key todo-mode-map "f" 'todo-cmd-file) 85(define-key todo-mode-map "f" 'todo-cmd-file)
79 86
80(defun todo-cmd-prev () "Select previous entry." 87(defun todo-cmd-prev () "Select previous entry."
@@ -167,6 +174,38 @@
167 (message "") 174 (message "")
168 ) 175 )
169 176
177(defun todo-cmd-rais () "Raise priority of current entry."
178 (interactive)
179 (if (> (count-lines (point-min) (point-max)) 0)
180 (progn
181 (setq todo-entry (todo-line))
182 (delete-region todo-begin (+ 1 todo-end))
183 (forward-line -1)
184 (insert (concat todo-entry "\n"))
185 (forward-char -1)
186 )
187 (message "No entry to raise.")
188 )
189 (beginning-of-line nil)
190 (message "")
191 )
192
193(defun todo-cmd-lowr () "Lower priority of current entry."
194 (interactive)
195 (if (> (count-lines (point-min) (point-max)) 0)
196 (progn
197 (setq todo-entry (todo-line))
198 (delete-region todo-begin (+ 1 todo-end))
199 (forward-line 1)
200 (insert (concat todo-entry "\n"))
201 (forward-char -1)
202 )
203 (message "No entry to raise.")
204 )
205 (beginning-of-line nil)
206 (message "")
207 )
208
170(defun todo-cmd-file () "File away the current todo list entry." 209(defun todo-cmd-file () "File away the current todo list entry."
171 (interactive) 210 (interactive)
172 (if (> (count-lines (point-min) (point-max)) 0) 211 (if (> (count-lines (point-min) (point-max)) 0)