comparison lisp/calendar/todo-mode.el @ 91327:606f2d163a64

Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-312
author Miles Bader <miles@gnu.org>
date Wed, 09 Jan 2008 01:21:15 +0000
parents 53108e6cea98 0c4a74c24677
children
comparison
equal deleted inserted replaced
91326:b1a63d7fa09c 91327:606f2d163a64
1 ;;; todo-mode.el --- major mode for editing TODO list files 1 ;;; todo-mode.el --- major mode for editing TODO list files
2 2
3 ;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007 3 ;; Copyright (C) 1997, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4 ;; Free Software Foundation, Inc. 4 ;; Free Software Foundation, Inc.
5 5
6 ;; Author: Oliver Seidel <os10000@seidel-space.de> 6 ;; Author: Oliver Seidel <os10000@seidel-space.de>
7 ;; [Not clear the above works, July 2000] 7 ;; [Not clear the above works, July 2000]
8 ;; Created: 2 Aug 1997 8 ;; Created: 2 Aug 1997
590 "Insert new TODO list entry. 590 "Insert new TODO list entry.
591 With a prefix argument solicit the category, otherwise use the current 591 With a prefix argument solicit the category, otherwise use the current
592 category." 592 category."
593 (interactive "P") 593 (interactive "P")
594 (save-excursion 594 (save-excursion
595 (if (not (string-equal mode-name "TODO")) (todo-show)) 595 (if (not (derived-mode-p 'todo-mode)) (todo-show))
596 (let* ((new-item (concat todo-prefix " " 596 (let* ((new-item (concat todo-prefix " "
597 (read-from-minibuffer 597 (read-from-minibuffer
598 "New TODO entry: " 598 "New TODO entry: "
599 (if todo-entry-prefix-function 599 (if todo-entry-prefix-function
600 (funcall todo-entry-prefix-function))))) 600 (funcall todo-entry-prefix-function)))))
613 613
614 (defun todo-insert-item-here () 614 (defun todo-insert-item-here ()
615 "Insert new TODO list entry under the cursor." 615 "Insert new TODO list entry under the cursor."
616 (interactive "") 616 (interactive "")
617 (save-excursion 617 (save-excursion
618 (if (not (string-equal mode-name "TODO")) (todo-show)) 618 (if (not (derived-mode-p 'todo-mode)) (todo-show))
619 (let* ((new-item (concat todo-prefix " " 619 (let* ((new-item (concat todo-prefix " "
620 (read-from-minibuffer 620 (read-from-minibuffer
621 "New TODO entry: " 621 "New TODO entry: "
622 (if todo-entry-prefix-function 622 (if todo-entry-prefix-function
623 (funcall todo-entry-prefix-function)))))) 623 (funcall todo-entry-prefix-function))))))
957 (todo-mode) 957 (todo-mode)
958 (todo-add-category "Todo")) 958 (todo-add-category "Todo"))
959 959
960 (provide 'todo-mode) 960 (provide 'todo-mode)
961 961
962 ;;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497 962 ;; arch-tag: 6fd91be5-776e-4464-a109-da4ea0e4e497
963 ;;; todo-mode.el ends here 963 ;;; todo-mode.el ends here