aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Seidel1997-10-14 22:22:35 +0000
committerOliver Seidel1997-10-14 22:22:35 +0000
commit2186b97448f7dfff2f472fee68b016dfdd9c4ac8 (patch)
treef6840b10e17b4ff8d2c0fa547e4cf78e7fdfdbf7
parentdb77d785fd3b53227e9f1c3036b4e2bc0deaa7b6 (diff)
downloademacs-2186b97448f7dfff2f472fee68b016dfdd9c4ac8.tar.gz
emacs-2186b97448f7dfff2f472fee68b016dfdd9c4ac8.zip
Added string-split (which I stole from ediff-util), changed
pop-to-buffer to switch-to-buffer and added message on how to exit the multi-line-edit mode.
-rw-r--r--lisp/calendar/todo-mode.el42
1 files changed, 40 insertions, 2 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index b469d8c8386..3494c9b2de9 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -4,7 +4,7 @@
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.13 1997/08/19 14:00:36 seidel Exp os10000 $ 7;; Version: $Id: todo-mode.el,v 1.14 1997/10/09 09:24:50 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.
@@ -225,6 +225,26 @@
225;;; Change Log: 225;;; Change Log:
226 226
227;; $Log: todo-mode.el,v $ 227;; $Log: todo-mode.el,v $
228;; Revision 1.14 1997/10/09 09:24:50 os10000
229;; Harald Meland <harald.meland@usit.uio.no> asked for
230;; the latest version, got 1.13, and returned this.
231;; He writes:
232;;
233;; Thanks a lot for the new version of todo-mode.el. As you will see I
234;; have messed it up a bit, hopefully for the better -- I don't like
235;; short, cryptic names for variables and functions, so I renamed most of
236;; them, and `defalias'ed the old function names. I hope you don't mind
237;; too much, I just kinda couldn't stop myself.
238;;
239;; Additionally, I included some support for multiline entries, cleaned
240;; up (IMHO :) a lot of the code, included completion-support for which
241;; category to install a new entry in, and possibly some other changes I
242;; can't remember :)
243;;
244;; It's getting rather late, and I have just done some preliminary
245;; testing on whether all of this really works, but so far it looks
246;; good.
247;;
228;; Revision 1.13 1997/08/19 14:00:36 seidel 248;; Revision 1.13 1997/08/19 14:00:36 seidel
229;; - changed name to todo-mode 249;; - changed name to todo-mode
230;; - fixed menu descriptions 250;; - fixed menu descriptions
@@ -407,8 +427,9 @@ For details see the variable `time-stamp-format'.")
407 "Set up a buffer for editing a multiline TODO list entry." 427 "Set up a buffer for editing a multiline TODO list entry."
408 (interactive) 428 (interactive)
409 (let ((buffer-name (generate-new-buffer-name todo-edit-buffer))) 429 (let ((buffer-name (generate-new-buffer-name todo-edit-buffer)))
410 (pop-to-buffer (make-indirect-buffer (file-name-nondirectory todo-file-do) 430 (switch-to-buffer (make-indirect-buffer (file-name-nondirectory todo-file-do)
411 buffer-name)) 431 buffer-name))
432 (message "To exit, simply kill this buffer and return to list.")
412 (todo-edit-mode) 433 (todo-edit-mode)
413 (narrow-to-region (todo-item-start) (todo-item-end)))) 434 (narrow-to-region (todo-item-start) (todo-item-end))))
414 435
@@ -605,6 +626,23 @@ For details see the variable `time-stamp-format'.")
605 (end-of-line) 626 (end-of-line)
606 (point)))) 627 (point))))
607 628
629;; splits at a white space, returns a list
630(if (not (fboundp 'split-string))
631 (defun split-string (string regex)
632 (let ((start 0)
633 (result '())
634 substr)
635 (while (string-match regex string start)
636 (let ((match (string-match regex string start)))
637 (setq substr (substring string start match))
638 (if (> (length substr) 0)
639 (setq result (cons substr result)))
640 (setq start (match-end 0))))
641 (setq substr (substring string start nil))
642 (if (> (length substr) 0)
643 (setq result (cons substr result)))
644 (nreverse result))))
645
608;; --------------------------------------------------------------------------- 646;; ---------------------------------------------------------------------------
609 647
610(easy-menu-define todo-menu todo-mode-map "Todo Menu" 648(easy-menu-define todo-menu todo-mode-map "Todo Menu"