Mercurial > emacs
comparison lisp/calendar/todo-mode.el @ 24500:1e30ade63ed3
Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> on 18.Mar.99 writes that I
should remove the single space between ### and autoload. And now I
have.
author | Oliver Seidel <os10000@seidel-space.de> |
---|---|
date | Thu, 18 Mar 1999 08:53:48 +0000 |
parents | ea1ab7f25110 |
children | 71c05fbebaba |
comparison
equal
deleted
inserted
replaced
24499:e5b719c6fd51 | 24500:1e30ade63ed3 |
---|---|
2 | 2 |
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1997 Free Software Foundation, Inc. |
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.35 1998/09/29 18:20:36 os10000 Exp os10000 $ | 7 ;; Version: $Id: todo-mode.el,v 1.36 1999/03/17 11:10:29 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. |
11 | 11 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
115 ;; | 115 ;; |
116 ;; Version | 116 ;; Version |
117 ;; | 117 ;; |
118 ;; Which version of todo-mode.el does this documentation refer to? | 118 ;; Which version of todo-mode.el does this documentation refer to? |
119 ;; | 119 ;; |
120 ;; $Id: todo-mode.el,v 1.35 1998/09/29 18:20:36 os10000 Exp os10000 $ | 120 ;; $Id: todo-mode.el,v 1.36 1999/03/17 11:10:29 os10000 Exp os10000 $ |
121 ;; | 121 ;; |
122 ;; Pre-Requisites | 122 ;; Pre-Requisites |
123 ;; | 123 ;; |
124 ;; This package will require the following packages to be | 124 ;; This package will require the following packages to be |
125 ;; available on the load-path: | 125 ;; available on the load-path: |
290 ;; --------------------------------------------------------------------------- | 290 ;; --------------------------------------------------------------------------- |
291 | 291 |
292 ;;; Change Log: | 292 ;;; Change Log: |
293 | 293 |
294 ;; $Log: todo-mode.el,v $ | 294 ;; $Log: todo-mode.el,v $ |
295 ;; Revision 1.36 1999/03/17 11:10:29 os10000 | |
296 ;; Alastair Burt <alastair.burt@dfki.de> sent in a patch on 17.Mar.98 | |
297 ;; which removes duplicates from the category list and saves the buffer | |
298 ;; after category addition. Thanks. | |
299 ;; | |
300 ;; Uwe Brauer <oub@sunma4.mat.ucm.es> sent in a request on 3.Apr.98 to | |
301 ;; implement a "move-between-categories" function. I haven't done that | |
302 ;; yet. Thanks. | |
303 ;; | |
304 ;; "Edward S. Hirgelt" <ehirgelt@directinterfaces.com> fixed a problem | |
305 ;; with multi-line editing 29.Oct.98. Thanks. | |
306 ;; | |
307 ;; tom <tom@pixelpark.com> sent in a replacement for the outmoded | |
308 ;; time-format that I had been using on 13.Nov.98. Thanks. | |
309 ;; | |
310 ;; Jerome Thebert <thebertj@felixstowe.rms.slb.com> sent in a binding to | |
311 ;; show/hide continuation lines using the space bar on 11.Jan.99. | |
312 ;; Instead of leaving it as a hook, I integrated it. Thanks. | |
313 ;; | |
314 ;; Sorry again to everybody. I sat on your patches for a year. | |
315 ;; | |
295 ;; Revision 1.35 1998/09/29 18:20:36 os10000 | 316 ;; Revision 1.35 1998/09/29 18:20:36 os10000 |
296 ;; Alex Schroeder startup description added. | 317 ;; Alex Schroeder startup description added. |
297 ;; | 318 ;; |
298 ;; Revision 1.34 1998/01/12 11:43:22 os10000 | 319 ;; Revision 1.34 1998/01/12 11:43:22 os10000 |
299 ;; Added patch from Don Hejna <djhejna@oasis.ambit.com>. | 320 ;; Added patch from Don Hejna <djhejna@oasis.ambit.com>. |
784 (find-buffer-visiting todo-file-do) buffer-name)) | 805 (find-buffer-visiting todo-file-do) buffer-name)) |
785 (message "To exit, simply kill this buffer and return to list.") | 806 (message "To exit, simply kill this buffer and return to list.") |
786 (todo-edit-mode) | 807 (todo-edit-mode) |
787 (narrow-to-region (todo-item-start) (todo-item-end)))) | 808 (narrow-to-region (todo-item-start) (todo-item-end)))) |
788 | 809 |
789 ;;;### autoload | 810 ;;;###autoload |
790 (defun todo-add-category (cat) | 811 (defun todo-add-category (cat) |
791 "Add new category CAT to the TODO list." | 812 "Add new category CAT to the TODO list." |
792 (interactive "sCategory: ") | 813 (interactive "sCategory: ") |
793 (save-window-excursion | 814 (save-window-excursion |
794 (pushnew cat todo-categories) | 815 (pushnew cat todo-categories) |
809 todo-category-end | 830 todo-category-end |
810 todo-prefix todo-category-sep)) | 831 todo-prefix todo-category-sep)) |
811 (save-buffer)) | 832 (save-buffer)) |
812 0) | 833 0) |
813 | 834 |
814 ;;;### autoload | 835 ;;;###autoload |
815 (defun todo-add-item-non-interactively (new-item category) | 836 (defun todo-add-item-non-interactively (new-item category) |
816 "Insert NEW-ITEM in TODO list as a new entry in CATEGORY." | 837 "Insert NEW-ITEM in TODO list as a new entry in CATEGORY." |
817 (save-excursion | 838 (save-excursion |
818 (todo-show)) | 839 (todo-show)) |
819 (save-excursion | 840 (save-excursion |
845 (todo-forward-category) | 866 (todo-forward-category) |
846 (todo-backward-category)) | 867 (todo-backward-category)) |
847 (todo-save) | 868 (todo-save) |
848 (message ""))) | 869 (message ""))) |
849 | 870 |
850 ;;;### autoload | 871 ;;;###autoload |
851 (defun todo-insert-item (ARG) | 872 (defun todo-insert-item (ARG) |
852 "Insert new TODO list entry. | 873 "Insert new TODO list entry. |
853 With a prefix argument solicit the category, otherwise use the current | 874 With a prefix argument solicit the category, otherwise use the current |
854 category." | 875 category." |
855 (interactive "P") | 876 (interactive "P") |
872 (todo-category-alist) nil nil nil history)))) | 893 (todo-category-alist) nil nil nil history)))) |
873 (todo-add-item-non-interactively new-item category)))) | 894 (todo-add-item-non-interactively new-item category)))) |
874 | 895 |
875 (defalias 'todo-cmd-inst 'todo-insert-item) | 896 (defalias 'todo-cmd-inst 'todo-insert-item) |
876 | 897 |
877 ;;;### autoload | 898 ;;;###autoload |
878 (defun todo-insert-item-here () | 899 (defun todo-insert-item-here () |
879 "Insert new TODO list entry under the cursor." | 900 "Insert new TODO list entry under the cursor." |
880 (interactive "") | 901 (interactive "") |
881 (save-excursion | 902 (save-excursion |
882 (if (not (string-equal mode-name "TODO")) (todo-show)) | 903 (if (not (string-equal mode-name "TODO")) (todo-show)) |
1200 "---" | 1221 "---" |
1201 ["Quit" todo-quit t] | 1222 ["Quit" todo-quit t] |
1202 )) | 1223 )) |
1203 | 1224 |
1204 ;; As calendar reads .todo-do before todo-mode is loaded. | 1225 ;; As calendar reads .todo-do before todo-mode is loaded. |
1205 ;;;### autoload | 1226 ;;;###autoload |
1206 (defun todo-mode () "Major mode for editing TODO lists.\n\n\\{todo-mode-map}" | 1227 (defun todo-mode () "Major mode for editing TODO lists.\n\n\\{todo-mode-map}" |
1207 (interactive) | 1228 (interactive) |
1208 (setq major-mode 'todo-mode) | 1229 (setq major-mode 'todo-mode) |
1209 (setq mode-name "TODO") | 1230 (setq mode-name "TODO") |
1210 (use-local-map todo-mode-map) | 1231 (use-local-map todo-mode-map) |
1216 (hide-other) | 1237 (hide-other) |
1217 (auto-fill-mode 1) | 1238 (auto-fill-mode 1) |
1218 (run-hooks 'todo-mode-hook)) | 1239 (run-hooks 'todo-mode-hook)) |
1219 | 1240 |
1220 ;; Read about this function in the setup instructions above! | 1241 ;; Read about this function in the setup instructions above! |
1221 ;;;### autoload | 1242 ;;;###autoload |
1222 (defun todo-cp () | 1243 (defun todo-cp () |
1223 "Make a diary entry appear only in the current date's diary" | 1244 "Make a diary entry appear only in the current date's diary" |
1224 (if (equal (calendar-current-date) date) | 1245 (if (equal (calendar-current-date) date) |
1225 entry | 1246 entry |
1226 nil)) | 1247 nil)) |
1230 (text-mode) | 1251 (text-mode) |
1231 (setq major-mode 'todo-edit-mode) | 1252 (setq major-mode 'todo-edit-mode) |
1232 (setq mode-name "TODO Edit") | 1253 (setq mode-name "TODO Edit") |
1233 (run-hooks 'todo-edit-mode-hook)) | 1254 (run-hooks 'todo-edit-mode-hook)) |
1234 | 1255 |
1235 ;;;### autoload | 1256 ;;;###autoload |
1236 (defun todo-show () "Show TODO list." | 1257 (defun todo-show () "Show TODO list." |
1237 (interactive) | 1258 (interactive) |
1238 (if (file-exists-p todo-file-do) | 1259 (if (file-exists-p todo-file-do) |
1239 (find-file todo-file-do) | 1260 (find-file todo-file-do) |
1240 (todo-initial-setup)) | 1261 (todo-initial-setup)) |