-;; todo-mode.el -- Major mode for editing TODO list files
+;;; todo-mode.el --- major mode for editing TODO list files
-;; Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
;; Author: Oliver Seidel <os10000@seidel-space.de>
;; [Not clear the above works, July 2000]
;; Created: 2 Aug 1997
-;; Version: $Id: todo-mode.el,v 1.1 1999/05/12 11:49:30 fx Exp fx $
;; Keywords: calendar, todo
;; This file is part of GNU Emacs.
;; extensions that are not explicitly listed in the above quick
;; installation.
;;
-;; Version
-;;
-;; Which version of todo-mode.el does this documentation refer to?
-;;
-;; $Id: todo-mode.el,v 1.1 1999/05/12 11:49:30 fx Exp fx $
-;;
;; Pre-Requisites
;;
;; This package will require the following packages to be
;;; Code:
+(require 'time-stamp)
+
+
;; User-configurable variables:
(defgroup todo nil
"Maintain a list of todo items."
+ :link '(emacs-commentary-link "todo-mode")
+ :version "21.1"
:group 'calendar)
(defcustom todo-prefix "*/*"
:type 'string
:group 'todo)
-(autoload 'time-stamp-string "time-stamp")
-
(defun todo-entry-timestamp-initials ()
"Prepend timestamp and your initials to the head of a TODO entry."
(let ((time-stamp-format todo-time-string-format))
(defun todo-save ()
"Save the TODO list."
(interactive)
- (save-buffer)
- (if todo-save-top-priorities-too (todo-save-top-priorities))
- )
+ (save-excursion
+ (save-restriction
+ (save-buffer)))
+ (if todo-save-top-priorities-too (todo-save-top-priorities)))
(defalias 'todo-cmd-save 'todo-save)
(defun todo-quit ()
(todo-edit-mode)
(narrow-to-region (todo-item-start) (todo-item-end))))
-;;;### autoload
+;;;###autoload
(defun todo-add-category (cat)
"Add new category CAT to the TODO list."
(interactive "sCategory: ")
todo-prefix todo-category-sep)))
0)
-;;;### autoload
+;;;###autoload
(defun todo-add-item-non-interactively (new-item category)
"Insert NEW-ITEM in TODO list as a new entry in CATEGORY."
(save-excursion
(todo-save)
(message "")))
-;;;### autoload
+;;;###autoload
(defun todo-insert-item (arg)
"Insert new TODO list entry.
With a prefix argument solicit the category, otherwise use the current
(defalias 'todo-cmd-inst 'todo-insert-item)
-;;;### autoload
(defun todo-insert-item-here ()
"Insert new TODO list entry under the cursor."
(interactive "")
(or nof-priorities (setq nof-priorities todo-show-priorities))
(if (listp nof-priorities) ;universal argument
(setq nof-priorities (car nof-priorities)))
- (let ((todo-print-buffer-name "*Tmp*")
+ (let ((todo-print-buffer-name todo-tmp-buffer-name)
;;(todo-print-category-number 0)
(todo-category-break (if category-pr-page "\f" ""))
(cat-end
(copy-to-buffer todo-print-buffer-name (point-min) (point-max))
(set-buffer todo-print-buffer-name)
(goto-char (point-min))
- (if (re-search-forward (regexp-quote todo-header) nil t)
- (progn
- (beginning-of-line 1)
- (kill-line))) ;Remove mode line
+ (when (re-search-forward (regexp-quote todo-header) nil t)
+ (beginning-of-line 1)
+ (delete-region (point) (line-end-position)))
(while (re-search-forward ;Find category start
(regexp-quote (concat todo-prefix todo-category-beg))
nil t)
(message "Type C-x 1 to remove %s window. M-C-v to scroll the help."
todo-print-buffer-name)))
-;;;###autoload
(defun todo-save-top-priorities (&optional nof-priorities)
"Save top priorities for each category in `todo-file-top'.
))
;; As calendar reads .todo-do before todo-mode is loaded.
-;;;### autoload
+;;;###autoload
(defun todo-mode ()
"Major mode for editing TODO lists.
(defvar entry))
;; Read about this function in the setup instructions above!
-;;;### autoload
+;;;###autoload
(defun todo-cp ()
"Make a diary entry appear only in the current date's diary."
(if (equal (calendar-current-date) date)
\\{todo-edit-mode-map}")
-;;;### autoload
+;;;###autoload
(defun todo-show ()
"Show TODO list."
(interactive)
(provide 'todo-mode)
+;;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497
;;; todo-mode.el ends here