diff options
| author | Stephen Berman | 2013-06-18 19:44:01 +0200 |
|---|---|---|
| committer | Stephen Berman | 2013-06-18 19:44:01 +0200 |
| commit | 857b9748a7e765e752b6651df7bbb99b957b7b59 (patch) | |
| tree | 1d50c04fb63fb34e4b3bc795e5405f071b7ab923 | |
| parent | a8f4bb83612b049d32a9fe4c30807e92c00d9baa (diff) | |
| download | emacs-857b9748a7e765e752b6651df7bbb99b957b7b59.tar.gz emacs-857b9748a7e765e752b6651df7bbb99b957b7b59.zip | |
* todos.el: Reinstate current copyright dates and original
todo-mode.el author. Add reference in commentary to legacy file
format conversion command.
(todos-legacy-date-time-regexp): Rename from
todos-todo-mode-date-time-regexp and adjust uses.
| -rw-r--r-- | lisp/calendar/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/calendar/todos.el | 27 |
2 files changed, 23 insertions, 12 deletions
diff --git a/lisp/calendar/ChangeLog b/lisp/calendar/ChangeLog index fa62f8bdac4..63a1ca71295 100644 --- a/lisp/calendar/ChangeLog +++ b/lisp/calendar/ChangeLog | |||
| @@ -1,5 +1,13 @@ | |||
| 1 | 2013-06-18 Stephen Berman <stephen.berman@gmx.net> | 1 | 2013-06-18 Stephen Berman <stephen.berman@gmx.net> |
| 2 | 2 | ||
| 3 | * todos.el: Reinstate current copyright dates and original | ||
| 4 | todo-mode.el author. Add reference in commentary to legacy file | ||
| 5 | format conversion command. | ||
| 6 | (todos-legacy-date-time-regexp): Rename from | ||
| 7 | todos-todo-mode-date-time-regexp and adjust uses. | ||
| 8 | |||
| 9 | 2013-06-18 Stephen Berman <stephen.berman@gmx.net> | ||
| 10 | |||
| 3 | * todos.el (todos-diary-goto-entry): Add item locating code from | 11 | * todos.el (todos-diary-goto-entry): Add item locating code from |
| 4 | diary-goto-entry. Add it at the top-level to override the latter | 12 | diary-goto-entry. Add it at the top-level to override the latter |
| 5 | function. | 13 | function. |
diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index 6964494a4d8..f96dc97f4c8 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el | |||
| @@ -1,11 +1,13 @@ | |||
| 1 | ;;; todos.el --- facilities for making and maintaining todo lists | 1 | ;;; todos.el --- facilities for making and maintaining todo lists |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2013 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 1999, 2001-2013 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Stephen Berman <stephen.berman@gmx.net> | 5 | ;; Author: Oliver Seidel <privat@os10000.net> |
| 6 | ;; Stephen Berman <stephen.berman@gmx.net> | ||
| 7 | ;; Maintainer: Stephen Berman <stephen.berman@gmx.net> | ||
| 6 | ;; Keywords: calendar, todo | 8 | ;; Keywords: calendar, todo |
| 7 | 9 | ||
| 8 | ;; This file is [not yet] part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 9 | 11 | ||
| 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify | 12 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
| 11 | ;; it under the terms of the GNU General Public License as published by | 13 | ;; it under the terms of the GNU General Public License as published by |
| @@ -61,9 +63,10 @@ | |||
| 61 | 63 | ||
| 62 | ;; This package is a new version of Oliver Seidel's todo-mode.el. | 64 | ;; This package is a new version of Oliver Seidel's todo-mode.el. |
| 63 | ;; While it retains the same basic organization and handling of todo | 65 | ;; While it retains the same basic organization and handling of todo |
| 64 | ;; lists and the basic UI, it significantly extends these, adds many | 66 | ;; lists and the basic UI, it significantly extends these and adds |
| 65 | ;; features, changes much of the internals and reimplements almost all | 67 | ;; many features. This also required making changes to the internals, |
| 66 | ;; of the code. | 68 | ;; including the file format. To convert files in the old format to |
| 69 | ;; the new format, use the command `todos-convert-legacy-files'. | ||
| 67 | 70 | ||
| 68 | ;;; Code: | 71 | ;;; Code: |
| 69 | 72 | ||
| @@ -4446,7 +4449,7 @@ otherwise, send it to the default printer." | |||
| 4446 | ;;; Legacy Todo mode files | 4449 | ;;; Legacy Todo mode files |
| 4447 | ;; ----------------------------------------------------------------------------- | 4450 | ;; ----------------------------------------------------------------------------- |
| 4448 | 4451 | ||
| 4449 | (defcustom todos-todo-mode-date-time-regexp | 4452 | (defcustom todos-legacy-date-time-regexp |
| 4450 | (concat "\\(?1:[0-9]\\{4\\}\\)-\\(?2:[0-9]\\{2\\}\\)-" | 4453 | (concat "\\(?1:[0-9]\\{4\\}\\)-\\(?2:[0-9]\\{2\\}\\)-" |
| 4451 | "\\(?3:[0-9]\\{2\\}\\) \\(?4:[0-9]\\{2\\}:[0-9]\\{2\\}\\)") | 4454 | "\\(?3:[0-9]\\{2\\}\\) \\(?4:[0-9]\\{2\\}:[0-9]\\{2\\}\\)") |
| 4452 | "Regexp matching legacy todo-mode.el item date-time strings. | 4455 | "Regexp matching legacy todo-mode.el item date-time strings. |
| @@ -4479,7 +4482,7 @@ Helper function for `todos-convert-legacy-files'." | |||
| 4479 | The files `todo-file-do' and `todo-file-done' are converted and | 4482 | The files `todo-file-do' and `todo-file-done' are converted and |
| 4480 | saved (the latter as a Todos Archive file) with a new name in | 4483 | saved (the latter as a Todos Archive file) with a new name in |
| 4481 | `todos-directory'. See also the documentation string of | 4484 | `todos-directory'. See also the documentation string of |
| 4482 | `todos-todo-mode-date-time-regexp' for further details." | 4485 | `todos-legacy-date-time-regexp' for further details." |
| 4483 | (interactive) | 4486 | (interactive) |
| 4484 | (eval-when-compile (require 'todo-mode)) | 4487 | (eval-when-compile (require 'todo-mode)) |
| 4485 | ;; Convert `todo-file-do'. | 4488 | ;; Convert `todo-file-do'. |
| @@ -4504,7 +4507,7 @@ saved (the latter as a Todos Archive file) with a new name in | |||
| 4504 | todo-category-sep))) | 4507 | todo-category-sep))) |
| 4505 | (replace-match todos-category-done)) | 4508 | (replace-match todos-category-done)) |
| 4506 | ((looking-at (concat (regexp-quote todo-prefix) " " | 4509 | ((looking-at (concat (regexp-quote todo-prefix) " " |
| 4507 | todos-todo-mode-date-time-regexp " " | 4510 | todos-legacy-date-time-regexp " " |
| 4508 | (regexp-quote todo-initials) ":")) | 4511 | (regexp-quote todo-initials) ":")) |
| 4509 | (todos-convert-legacy-date-time))) | 4512 | (todos-convert-legacy-date-time))) |
| 4510 | (forward-line)) | 4513 | (forward-line)) |
| @@ -4527,7 +4530,7 @@ saved (the latter as a Todos Archive file) with a new name in | |||
| 4527 | (end (make-marker)) | 4530 | (end (make-marker)) |
| 4528 | cat cats comment item) | 4531 | cat cats comment item) |
| 4529 | (while (not (eobp)) | 4532 | (while (not (eobp)) |
| 4530 | (when (looking-at todos-todo-mode-date-time-regexp) | 4533 | (when (looking-at todos-legacy-date-time-regexp) |
| 4531 | (set-marker beg (point)) | 4534 | (set-marker beg (point)) |
| 4532 | (todos-convert-legacy-date-time) | 4535 | (todos-convert-legacy-date-time) |
| 4533 | (set-marker end (point)) | 4536 | (set-marker end (point)) |
| @@ -4536,13 +4539,13 @@ saved (the latter as a Todos Archive file) with a new name in | |||
| 4536 | (goto-char end) | 4539 | (goto-char end) |
| 4537 | (insert "]") | 4540 | (insert "]") |
| 4538 | (forward-char) | 4541 | (forward-char) |
| 4539 | (when (looking-at todos-todo-mode-date-time-regexp) | 4542 | (when (looking-at todos-legacy-date-time-regexp) |
| 4540 | (todos-convert-legacy-date-time)) | 4543 | (todos-convert-legacy-date-time)) |
| 4541 | (when (looking-at (concat " " | 4544 | (when (looking-at (concat " " |
| 4542 | (regexp-quote todo-initials) ":")) | 4545 | (regexp-quote todo-initials) ":")) |
| 4543 | (replace-match ""))) | 4546 | (replace-match ""))) |
| 4544 | (if (re-search-forward | 4547 | (if (re-search-forward |
| 4545 | (concat "^" todos-todo-mode-date-time-regexp) nil t) | 4548 | (concat "^" todos-legacy-date-time-regexp) nil t) |
| 4546 | (goto-char (match-beginning 0)) | 4549 | (goto-char (match-beginning 0)) |
| 4547 | (goto-char (point-max))) | 4550 | (goto-char (point-max))) |
| 4548 | (backward-char) | 4551 | (backward-char) |