* calendar/todos.el: Further significant code rearrangement;
further comment revision.
(todos-mode-display): New defgroup.
(todos-prefix, todos-number-priorities)
(todos-done-separator-string, todos-done-string)
(todos-comment-string, todos-show-with-done)
(todos-mode-line-function, todos-skip-archived-categories)
(todos-highlight-item, todos-wrap-lines)
(todos-line-wrapping-function): Use it.
(todos-item-insertion): New defgroup.
(todos-include-in-diary, todos-diary-nonmarking)
(todos-nondiary-marker, todos-always-add-time-string)
(todos-use-only-highlighted-region): Use it.
(todos-forward-button, todos-backward-button): New commands.
(todos-categories-mode-map): Use them, replacing forward-button
and backward-button.
(todos-merge-category): Fix and improve implementation; handle
archived items.
(todos-insert-item, todos-set-date-from-calendar): Handle setting
date by calling todos-insert-item-from-calendar.
(todos-delete-item): Fix overlay handling.
(todos-move-item): Highlight item to be moved.
(todos-item-undo): Handle marked items.
(todos-insert-item-from-calendar): Rewrite using
todos-date-from-calendar.
* calendar/todos.el (todos-item-undo): Fix restoration on
cancelling; use buffer-substring-no-properties; comment out code
removing mark overlay; fix insertion of undone items; display any
remaining done items.
* calendar/todos.el: Further code rearrangement; further new and
revised comments.
(todos-reevaluate-filelist-defcustoms): Rename from
todos-reevaluate-defcustoms and adjust callers.
(todos-date-pattern, todos-nondiary-start, todos-nondiary-end)
(todos-date-string-start, todos-done-string-start)
(todos-item-start): Change from defvar to defconst.
(todos-set-top-priorities): Use read-number and simplify.
(todos-insert-item): Check whether date-type argument is a string.
(todos-set-date-from-calendar): Check whether
todos-date-from-calendar is a string; simplify cond clause.
(todos-archive-done-item, todos-unarchive-items):
Use buffer-substring-no-properties.
* calendar/todos.el (todos-undo-item-omit-comment): New defcustom.
(todos-item-undo): Use it.
(todos-allcats-file, todos-all-categories-alist): New variables.
(todos-all-categories-alist): New function.
(todos-jump-to-any-category): New command.
(todos-move-item): Remove mark overlays from buffer items were
moved from; update todos-categories-with-marks,
* calendar/todos.el (todos-copy-item): New command.
(todos-insertion-map): Add key binding for it.
* calendar/todos.el: Fixes to todos-move-item and some of its
subroutines.
(todos-move-item): When there are marked items, point need not be
on an item; remove obsolete use of todos-add-category, since this
is now already done in todos-read-category; fix typo.
(todos-diary-item-p): Exclude empty lines.
(todos-read-category): Restore point and narrowing after adding
new category, to avoid moving to beginning of file when moving
marked items to a new category.
(todos-set-item-priority): Prompt for priority only when the
category has at least one todo item; only use non-nil priority to
calculate insertion location.
(todos-read-category): Don't reset todos-categories when a new
category is added due to todos-move-item or todos-jump-to-item.
* calendar/todos.el (todos-move-item): If user quits before
completing movement, restore display of initial category; If item
is moved to end of target category, make sure the items above it
are displayed in the window.
* calendar/todos.el (todos-define-insertion-command):
Let generated insertion commands accept a prefix argument.
* calendar/todos.el (todos-forward-category): Fix typo.
Started working on configure.ac for MSYS build.
Merge from trunk.
configure.ac done, not tested yet.
configure runs to the end, need to analyze differences vs config.nt.
Merge from trunk.
Minor fixes and improvements in configure.ac.
Merge from trunk.
Fixed configure.ac and headers in nt/inc.  Emulated functions not handled yet.
Conclude what can be done about headers, macros, and compiler switches.
What is left is missing and replaced functions provided by Emacs.
Fix regex searches for beginning of category.

* calendar/todos.el (todos-make-categories-list)
(todos-convert-legacy-files, todos-jump-to-item)
(todos-move-category, todos-merge-category)
(todos-archive-done-item, todos-unarchive-items): Include end of
line in regex searches for beginning of category, in order not to
get a category whose name contains the searched for category name.
* calendar/todos.el (todos-show): Fix a comment.
(todos-add-category): Prompt for a new category if passed category
is the empty string, not nil.