-;; 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, 2002, 2003, 2004, 2005, 2006
+;; 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.44 2000/11/22 22:51:33 fx Exp $
;; Keywords: calendar, todo
;; This file is part of GNU Emacs.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;; ---------------------------------------------------------------------------
;; 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.44 2000/11/22 22:51:33 fx Exp $
-;;
;; Pre-Requisites
;;
;; This package will require the following packages to be
;;; Code:
+(require 'time-stamp)
+
+
;; User-configurable variables:
(defgroup todo nil
lower bound will coincide at the end of the loop and you will insert
your item just before that point. If you set the threshhold to,
e.g. 8, it will stop as soon as the window size drops below that
-amount and will insert the item in the approximate centre of that
+amount and will insert the item in the approximate center of that
window."
:type 'integer
:group 'todo)
: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 ()
(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)
\\{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-hooks 'todo-mode-hook))
+ (run-mode-hooks 'todo-mode-hook))
(eval-when-compile
(defvar date)
(provide 'todo-mode)
+;;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497
;;; todo-mode.el ends here