;;; todo-mode.el --- major mode for editing TODO list files
-;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1999, 2001-2012 Free Software Foundation, Inc.
;; Author: Oliver Seidel <privat@os10000.net>
;; Maintainer: Stephen Berman <stephen.berman@gmx.net>
;; TODO is a major mode for EMACS which offers functionality to
;; treat most lines in one buffer as a list of items one has to
;; do. There are facilities to add new items, which are
-;; categorised, to edit or even delete items from the buffer.
+;; categorized, to edit or even delete items from the buffer.
;; The buffer contents are currently compatible with the diary,
;; so that the list of todo-items will show up in the FANCY diary
;; mode.
;;
;; The TODO list file has a special format and some auxiliary
;; information, which will be added by the todo-show function if
-;; it attempts to visit an un-initialised file. Hence it is
+;; it attempts to visit an un-initialized file. Hence it is
;; recommended to use the todo-show function for the first time,
-;; in order to initialise the file, but it is not necessary
+;; in order to initialize the file, but it is not necessary
;; afterwards.
;;
;; As these commands are quite long to type, I would recommend
;; the addition of two bindings to your to your global keymap. I
-;; personally have the following in my initialisation file:
+;; personally have the following in my initialization file:
;;
;; (global-set-key "\C-ct" 'todo-show) ; switch to TODO buffer
;; (global-set-key "\C-ci" 'todo-insert-item) ; insert new item
(unless (zerop (buffer-size buf))
(and (null todo-categories)
(null todo-cats)
- (error "Error in %s: File is non-empty but contains no category"
+ (error "Error in %s: File is non-empty but contains no category"
todo-file-do)))
(unless cat (setq cat (read-from-minibuffer prompt)))
(with-current-buffer buf
;; As calendar reads .todo-do before todo-mode is loaded.
;;;###autoload
-(defun todo-mode ()
- "Major mode for editing TODO lists.
-
-\\{todo-mode-map}"
- (interactive)
- (kill-all-local-variables)
- (setq major-mode 'todo-mode)
- (setq mode-name "TODO")
- (use-local-map todo-mode-map)
- (easy-menu-add todo-menu)
- (run-mode-hooks 'todo-mode-hook))
+(define-derived-mode todo-mode nil "TODO"
+ "Major mode for editing TODO lists."
+ (easy-menu-add todo-menu))
(defvar date)
(defvar entry)
(provide 'todo-mode)
-;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497
;;; todo-mode.el ends here