emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117057: Merge from emacs-24; up to r117058


From: Paul Eggert
Subject: [Emacs-diffs] trunk r117057: Merge from emacs-24; up to r117058
Date: Sun, 04 May 2014 19:38:15 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117057 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2014-05-04 12:37:56 -0700
message:
  Merge from emacs-24; up to r117058
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  admin/make-tarball.txt         
maketarball.txt-20091113204419-o5vbwnq5f7feedwu-2505
  configure.ac                   
configure.in-20091113204419-o5vbwnq5f7feedwu-783
  doc/emacs/ChangeLog            changelog-20091113204419-o5vbwnq5f7feedwu-6227
  doc/emacs/trouble.texi         
trouble.texi-20091113204419-o5vbwnq5f7feedwu-6279
  doc/misc/ChangeLog             changelog-20091113204419-o5vbwnq5f7feedwu-6331
  doc/misc/autotype.texi         
autotype.texi-20091113204419-o5vbwnq5f7feedwu-6289
  doc/misc/message.texi          
message.texi-20091113204419-o5vbwnq5f7feedwu-6310
  doc/misc/semantic.texi         semantic.texi-20091117210551-bqxn4u9uesl3d17a-2
  doc/misc/todo-mode.texi        todomode.texi-20130804212326-csuj921rpk9gy1gz-1
  lib-src/ChangeLog              changelog-20091113204419-o5vbwnq5f7feedwu-1608
  lib-src/emacsclient.c          
emacsclient.c-20091113204419-o5vbwnq5f7feedwu-283
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/allout-widgets.el         
alloutwidgets.el-20110216214309-bmcqbuvdcly80khi-1
  lisp/calendar/todo-mode.el     todos.el-20120911155047-0ytqo2nidwqquefa-1
  lisp/cedet/ChangeLog           changelog-20100919015713-3rbr456yray5m84f-1
  lisp/cedet/ede.el              ede.el-20091113204419-o5vbwnq5f7feedwu-11202
  lisp/cedet/semantic/bovine/c.el c.el-20091113204419-o5vbwnq5f7feedwu-11246
  lisp/cedet/semantic/ia-sb.el   iasb.el-20091113204419-o5vbwnq5f7feedwu-11283
  lisp/cedet/semantic/tag.el     tag.el-20091113204419-o5vbwnq5f7feedwu-11305
  lisp/emacs-lisp/cl-macs.el     clmacs.el-20091113204419-o5vbwnq5f7feedwu-612
  lisp/gnus/ChangeLog            changelog-20091113204419-o5vbwnq5f7feedwu-1433
  lisp/gnus/gnus-registry.el     
gnusregistry.el-20091113204419-o5vbwnq5f7feedwu-3247
  lisp/mail/rmailsum.el          
rmailsum.el-20091113204419-o5vbwnq5f7feedwu-8819
  lisp/menu-bar.el               menubar.el-20091113204419-o5vbwnq5f7feedwu-546
  lisp/minibuffer.el             
minibuffer.el-20091113204419-o5vbwnq5f7feedwu-8622
  lisp/mpc.el                    mpc.el-20091201190351-ubdosyf8lle4bzd3-10
  lisp/progmodes/gdb-mi.el       gdbmi.el-20100327132052-973a0aspo2g2bze8-1
  lisp/progmodes/js.el           js.el-20091113204419-o5vbwnq5f7feedwu-10919
  lisp/progmodes/prolog.el       prolog.el-20091113204419-o5vbwnq5f7feedwu-98
  lisp/progmodes/sh-script.el    shscript.el-20091113204419-o5vbwnq5f7feedwu-727
  lisp/progmodes/verilog-mode.el 
verilogmode.el-20091113204419-o5vbwnq5f7feedwu-8207
  lisp/textmodes/reftex-parse.el 
reftexparse.el-20091113204419-o5vbwnq5f7feedwu-1334
  lisp/url/ChangeLog             changelog-20091113204419-o5vbwnq5f7feedwu-3116
  lisp/url/url-parse.el          
urlparse.el-20091113204419-o5vbwnq5f7feedwu-3000
  lisp/vc/ediff-diff.el          
ediffdiff.el-20091113204419-o5vbwnq5f7feedwu-845
  lisp/vc/ediff-init.el          
ediffinit.el-20091113204419-o5vbwnq5f7feedwu-846
  lisp/vc/ediff-util.el          
ediffutil.el-20091113204419-o5vbwnq5f7feedwu-848
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/buffer.c                   buffer.c-20091113204419-o5vbwnq5f7feedwu-264
  src/floatfns.c                 floatfns.c-20091113204419-o5vbwnq5f7feedwu-141
  src/intervals.c                intervals.c-20091113204419-o5vbwnq5f7feedwu-519
  src/process.c                  process.c-20091113204419-o5vbwnq5f7feedwu-462
  src/profiler.c                 profiler.c-20120822062536-8tk8gghazaoi1nyq-2
  src/syswait.h                  syswait.h-20091113204419-o5vbwnq5f7feedwu-623
  src/term.c                     term.c-20091113204419-o5vbwnq5f7feedwu-220
=== modified file 'ChangeLog'
--- a/ChangeLog 2014-05-03 18:24:10 +0000
+++ b/ChangeLog 2014-05-04 19:37:56 +0000
@@ -1,3 +1,15 @@
+2014-05-04  Paul Eggert  <address@hidden>
+
+       Require ImageMagick >= 6.3.5, due to PixelSetMagickColor (Bug#17339).
+       * configure.ac (IMAGEMAGICK_MODULE): Bump prereq from 6.2.8 to 6.3.5.
+       A more-complicated fix would be to remove uses of PixelSetMagickColor,
+       introduced in ImageMagick 6.3.5 (Sept. 2007).
+
+2014-05-04  Glenn Morris  <address@hidden>
+
+       * configure.ac (LIBPNG): Consult libpng-config for the precise
+       form of "-lpng" to use.  (Bug#17339)
+
 2014-05-03  Glenn Morris  <address@hidden>
 
        * autogen.sh: If all else fails, try using pkg-config to find pkg.m4.

=== modified file 'admin/make-tarball.txt'
--- a/admin/make-tarball.txt    2014-01-17 02:11:36 +0000
+++ b/admin/make-tarball.txt    2014-05-02 19:45:17 +0000
@@ -5,6 +5,11 @@
 
 Steps to take before starting on the first pretest in any release sequence:
 
+0.  The release branch (e.g. emacs-24) should already have been made
+    and you should use it for all that follows.  Diffs from this
+    branch should be going to the emacs-diffs mailing list (see
+    admin/notes/bzr section on bzr-email plugin).
+
 1.  Decide on versions of automake and autoconf, and ensure you will
     have them available for the duration of the release process.
 
@@ -14,17 +19,15 @@
     when preparing the first pretest for a major Emacs release.)
     Commit cus-edit.el if changed.
 
+3.  Remove any old pretests from ftp://alpha.gnu.org/gnu/emacs/pretest.
+    You can use `gnupload --delete' (see below for more gnupload details).
 
 General steps (for each step, check for possible errors):
 
 1.  `bzr update' (for a bound branch), or `bzr pull'.
      bzr status   # check for locally modified files
 
-2.  Bootstrap to make 100% sure all elc files are up-to-date, and to
-    make sure that the later tagged version will bootstrap, should it be
-    necessary to check it out.
-
-3.  Regenerate the etc/AUTHORS file:
+2.  Regenerate the etc/AUTHORS file:
       M-: (require 'authors) RET
       M-x authors RET
 
@@ -39,7 +42,7 @@
     authors-ambiguous-files or authors-aliases, and repeat.
     Commit any fixes to ChangeLogs or authors.el.
 
-4.  Set the version number (M-x load-file RET admin/admin.el RET, then
+3.  Set the version number (M-x load-file RET admin/admin.el RET, then
     M-x set-version RET).  For a release, add released ChangeLog
     entries (M-x add-release-logs RET).
 
@@ -54,31 +57,37 @@
     emacs-XX.Y-rc1.tar.  If all goes well in the following week, you
     can simply rename the file and use it for the actual release.
 
-5.   autoreconf -i -I m4 --force
+4.   autoreconf -i -I m4 --force
      make bootstrap
 
      make -C etc/refcards
      make -C etc/refcards clean
 
-6.  Copy lisp/loaddefs.el to lisp/ldefs-boot.el.
+5.  Copy lisp/loaddefs.el to lisp/ldefs-boot.el.
 
     Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed
-    by M-x set-version.
+    by M-x set-version.  Use a commit log message that bzrmerge.el
+    will ignore (eg "Bump version...").
     For a release, also commit the ChangeLog files in all directories.
 
-7.  ./make-dist --snapshot --no-compress
-
-    Check the contents of the new tar with
-    admin/diff-tar-files against an older tar file.  Some old pretest
-    tarballs may be found at <ftp://alpha.gnu.org/gnu/emacs/pretest>;
-    old release tarballs are at <ftp://ftp.gnu.org/pub/gnu/emacs/>.
+    If someone else made a commit between step 1 and now,
+    you need to repeat from step 4 onwards.  (You can commit the files
+    from step 2 and 3 earlier to reduce the chance of this.)
+
+6.  ./make-dist --snapshot --no-compress
+
+    Check the contents of the new tar with admin/diff-tar-files
+    against the previous release (if this is the first pretest) or the
+    previous pretest.  If you did not make the previous pretest
+    yourself, find it at <ftp://alpha.gnu.org/gnu/emacs/pretest>.
+    Releases are of course at <ftp://ftp.gnu.org/pub/gnu/emacs/>.
 
     If this is the first pretest of a major release, just comparing
     with the previous release may overlook many new files.  You can try
     something like `find . | sort' in a clean bzr tree, and compare the
     results against the new tar contents.
 
-8.   tar -xf emacs-NEW.tar; cd emacs-NEW
+7.   tar -xf emacs-NEW.tar; cd emacs-NEW
      ./configure --prefix=/tmp/emacs && make && make install
     Use `script' or M-x compile to save the compilation log in
     compile-NEW.log and compare it against an old one.  The easiest way
@@ -87,25 +96,21 @@
     M-x ediff.  Especially check that Info files aren't built, and that
     no autotools (autoconf etc) run.
 
-9.  cd EMACS_ROOT_DIR && bzr tag TAG
+8.  cd EMACS_ROOT_DIR && bzr tag TAG
     TAG is emacs-XX.Y.ZZ for a pretest, emacs-XX.Y for a release.
 
-    Shortly before the release, cut the version branch also, and open
-    a Savannah support request asking for commits to the new branch to
-    be sent to the emacs-diffs mailing list (by default, the list
-    normally only gets commits to the trunk).
-
-10. Decide what compression schemes to offer.
+9. Decide what compression schemes to offer.
     For a release, at least gz and xz:
       gzip --best -c emacs-NEW.tar > emacs-NEW.tar.gz
       xz -c emacs-NEW.tar > emacs-NEW.tar.xz
+    For pretests, just xz is probably fine (saves bandwidth).
 
     Now you should upload the files to the GNU ftp server.  In order to
     do that, you must be registered as an Emacs maintainer and have your
     GPG key acknowledged by the ftp people.  For instructions, see
     
http://www.gnu.org/prep/maintain/html_node/Automated-Upload-Registration.html
-    The simplest method is to use the gnulib <http://www.gnu.org/s/gnulib/>
-    script "build-aux/gnupload" to upload each FILE, like this:
+    The simplest method to upload is to use the gnulib
+    <http://www.gnu.org/s/gnulib/> script "build-aux/gnupload":
 
     For a pretest:
      gnupload [--user address@hidden --to alpha.gnu.org:emacs/pretest \
@@ -136,19 +141,21 @@
     For a pretest, place the files in /incoming/alpha instead, so that
     they appear on ftp://alpha.gnu.org/.
 
-11. After five minutes, verify that the files are visible at
+10. After five minutes, verify that the files are visible at
     ftp://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, or
     ftp://ftp.gnu.org/gnu/emacs/ for a release.
 
     Download them and check the signatures.  Check they build.
 
-12. For a pretest, announce it on emacs-devel and address@hidden
-    Probably should also include the platform-testers list:
-    https://lists.gnu.org/mailman/listinfo/platform-testers
-    For a release, also announce it on address@hidden  (Probably
-    bcc the info- addresses to make it less likely that people will
-    followup on those lists.)
+11. Send an announcement to: emacs-devel, and bcc: address@hidden
+    For a pretest, also bcc: address@hidden
+    (The reason for using bcc: is to make it less likely that people
+    will followup on the wrong list.)
+    See the info-gnu-emacs mailing list archives for the form
+    of past announcements.  The first pretest announcement, and the
+    release announcement, should have more detail.
 
-13. For a release, update the Emacs homepage in the web repository.
-    Also add the new NEWS file as NEWS.xx.y.
-    Maybe regenerate the html manuals, update the FAQ, etc, etc.
+12. For a release, update the Emacs homepage in the web repository.
+    Also update history.html, and add the new NEWS file as NEWS.xx.y.
+    Regenerate the html manuals (use make-manuals from admin.el).
+    If there are new manuals, add appropriate index pages.

=== modified file 'configure.ac'
--- a/configure.ac      2014-05-03 16:27:17 +0000
+++ b/configure.ac      2014-05-04 19:37:56 +0000
@@ -2175,11 +2175,9 @@
 HAVE_IMAGEMAGICK=no
 if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test 
"${HAVE_W32}" = "yes"; then
   if test "${with_imagemagick}" != "no"; then
-    ## 6.2.8 is the earliest version known to work, but earlier versions
-    ## might work - let us know if you find one.
-    ## 6.0.7 does not work.  See bug#7955.
+    ## 6.3.5 is the earliest version known to work; see Bug#17339.
     ## 6.8.2 makes Emacs crash; see Bug#13867.
-    IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2"
+    IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2"
     EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE])
     AC_SUBST(IMAGEMAGICK_CFLAGS)
     AC_SUBST(IMAGEMAGICK_LIBS)
@@ -3051,8 +3049,15 @@
   fi
 
   if test "${HAVE_PNG}" = "yes"; then
-    AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).])
-    LIBPNG="-lpng -lz -lm"
+    AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library.])
+
+    dnl Some systems, eg NetBSD 6, only provide eg "libpng16", not "libpng".
+    lpng=`libpng-config --libs 2> /dev/null`
+    case $lpng in
+      -l*) : ;;
+      *) lpng="-lpng" ;;
+    esac
+    LIBPNG="$lpng -lz -lm"
 
     AC_CHECK_DECL(png_longjmp,
       [],
@@ -4908,7 +4913,7 @@
 echo "  Does Emacs use -ljpeg?                                  ${HAVE_JPEG}"
 echo "  Does Emacs use -ltiff?                                  ${HAVE_TIFF}"
 echo "  Does Emacs use a gif library?                           ${HAVE_GIF} 
$LIBGIF"
-echo "  Does Emacs use -lpng?                                   ${HAVE_PNG}"
+echo "  Does Emacs use a png library?                           ${HAVE_PNG} 
$LIBPNG"
 echo "  Does Emacs use -lrsvg-2?                                ${HAVE_RSVG}"
 echo "  Does Emacs use imagemagick?                             
${HAVE_IMAGEMAGICK}"
 

=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2014-05-04 00:16:58 +0000
+++ b/doc/emacs/ChangeLog       2014-05-04 19:37:56 +0000
@@ -1,3 +1,10 @@
+2014-05-04  Eli Zaretskii  <address@hidden>
+
+       * trouble.texi (Lossage, DEL Does Not Delete, Stuck Recursive)
+       (Screen Garbled, Text Garbled, After a Crash, Emergency Escape)
+       (Bug Criteria, Understanding Bug Reporting, Checklist, Service):
+       Improve indexing.
+
 2014-05-04  Leo Liu  <address@hidden>
 
        * cal-xtra.texi (Non-Gregorian Diary): Document new features for

=== modified file 'doc/emacs/trouble.texi'
--- a/doc/emacs/trouble.texi    2014-04-29 14:45:24 +0000
+++ b/doc/emacs/trouble.texi    2014-05-02 12:28:10 +0000
@@ -135,6 +135,7 @@
 
 @node Lossage
 @section Dealing with Emacs Trouble
address@hidden troubleshooting Emacs
 
   This section describes how to recognize and deal with situations in
 which Emacs does not work as you expect, such as keyboard code mixups,
@@ -158,6 +159,7 @@
 @subsection If @key{DEL} Fails to Delete
 @cindex @key{DEL} vs @key{BACKSPACE}
 @cindex @key{BACKSPACE} vs @key{DEL}
address@hidden @key{DEL} does not delete
 
   Every keyboard has a large key, usually labeled @key{BACKSPACE},
 which is ordinarily used to erase the last character that you typed.
@@ -212,6 +214,8 @@
 
 @node Stuck Recursive
 @subsection Recursive Editing Levels
address@hidden stuck in recursive editing
address@hidden recursive editing, cannot exit
 
   Recursive editing levels are important and useful features of Emacs, but
 they can seem like malfunctions if you do not understand them.
@@ -225,6 +229,9 @@
 
 @node Screen Garbled
 @subsection Garbage on the Screen
address@hidden garbled display
address@hidden display, incorrect
address@hidden screen display, wrong
 
   If the text on a text terminal looks wrong, the first thing to do is
 see whether it is wrong in the buffer.  Type @kbd{C-l} to redisplay
@@ -242,6 +249,8 @@
 
 @node Text Garbled
 @subsection Garbage in the Text
address@hidden garbled text
address@hidden buffer text garbled
 
   If @kbd{C-l} shows that the text is wrong, first type @kbd{C-h l} to
 see what commands you typed to produce the observed results.  Then try
@@ -348,6 +357,7 @@
 
 @node After a Crash
 @subsection Recovery After a Crash
address@hidden recovering crashed session
 
   If Emacs or the computer crashes, you can recover the files you were
 editing at the time of the crash from their auto-save files.  To do
@@ -394,6 +404,7 @@
 
 @node Emergency Escape
 @subsection Emergency Escape
address@hidden emergency escape
 
   On text terminals, the @dfn{emergency escape} feature suspends Emacs
 immediately if you type @kbd{C-g} a second time before Emacs can
@@ -528,6 +539,8 @@
 
 @node Bug Criteria
 @subsection When Is There a Bug
address@hidden bug criteria
address@hidden what constitutes an Emacs bug
 
   If Emacs accesses an invalid memory location (``segmentation
 fault''), or exits with an operating system error message that
@@ -580,6 +593,8 @@
 
 @node Understanding Bug Reporting
 @subsection Understanding Bug Reporting
address@hidden bug reporting
address@hidden report an Emacs bug, how to
 
 @findex emacs-version
   When you decide that there is a bug, it is important to report it
@@ -636,8 +651,8 @@
 
 @node Checklist
 @subsection Checklist for Bug Reports
-
address@hidden reporting bugs
address@hidden checklist before reporting a bug
address@hidden bug reporting, checklist
 
   Before reporting a bug, first try to see if the problem has already
 been reported (@pxref{Known Problems}).
@@ -1192,6 +1207,9 @@
 
 @node Service
 @section How To Get Help with GNU Emacs
address@hidden help in using Emacs
address@hidden help-gnu-emacs mailing list
address@hidden gnu.emacs.help newsgroup
 
 If you need help installing, using or changing GNU Emacs, there are two
 ways to find it:

=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog        2014-05-02 21:22:57 +0000
+++ b/doc/misc/ChangeLog        2014-05-04 19:37:56 +0000
@@ -1,3 +1,15 @@
+2014-05-04  Stephen Berman  <address@hidden>
+
+       * todo-mode.texi: Update, improve exposition, add cross
+       references, fix typos.
+       (Inserting New Items, Editing Item Headers and Text): Rewrite to
+       document new user interface.
+
+2014-05-04  Glenn Morris  <address@hidden>
+
+       * autotype.texi (Skeleton Language):
+       * message.texi (Header Commands): Replace `iff'.
+
 2014-05-02  Paul Eggert  <address@hidden>
 
        * vhdl-mode.texi: Add "@documentencoding UTF-8",

=== modified file 'doc/misc/autotype.texi'
--- a/doc/misc/autotype.texi    2014-01-17 02:59:24 +0000
+++ b/doc/misc/autotype.texi    2014-05-01 23:55:25 +0000
@@ -241,10 +241,10 @@
 Indent line according to major mode.  When following element is @code{_}, and
 there is a interregion that will be wrapped here, indent that interregion.
 @item @code{&}
-Logical and.  Iff preceding element moved point, i.e., usually inserted
+Logical and.  If preceding element moved point, i.e., usually inserted
 something, do following element.
 @item @code{|}
-Logical xor.  Iff preceding element didn't move point, i.e., usually inserted
+Logical xor.  If preceding element didn't move point, i.e., usually inserted
 nothing, do following element.
 @item @address@hidden
 Delete preceding number characters.  Depends on value of

=== modified file 'doc/misc/message.texi'
--- a/doc/misc/message.texi     2014-03-23 23:16:06 +0000
+++ b/doc/misc/message.texi     2014-05-04 19:37:56 +0000
@@ -748,9 +748,8 @@
 @item C-c C-f t
 @kindex C-c C-f t
 @findex message-reduce-to-to-cc
-Replace contents of @samp{To} header with contents of @samp{Cc} or
address@hidden header.  (Iff @samp{Cc} header is not present, @samp{Bcc}
-header will be used instead.)
+Replace contents of @samp{To} header with contents of @samp{Cc}
+header (or the @samp{Bcc} header, if there is no @samp{Cc} header).
 
 @item C-c C-f w
 @kindex C-c C-f w

=== modified file 'doc/misc/semantic.texi'
--- a/doc/misc/semantic.texi    2014-03-03 17:15:42 +0000
+++ b/doc/misc/semantic.texi    2014-05-01 23:55:25 +0000
@@ -611,7 +611,7 @@
 @c LocalWords: deffn deffnx defun defvar destructor's dfn diff dir
 @c LocalWords: doc docstring EDE EIEIO elisp emacsman emph enum
 @c LocalWords: eq Exp EXPANDFULL expression fn foo func funcall
address@hidden LocalWords: ia ids iff ifinfo imenu imenus init int isearch 
itemx java kbd
address@hidden LocalWords: ia ids ifinfo imenu imenus init int isearch itemx 
java kbd
 @c LocalWords: keymap keywordtable lang languagemode lexer lexing Ludlam
 @c LocalWords: menubar metaparent metaparents min minibuffer Misc mode's
 @c LocalWords: multitable NAvigaTOR noindent nomedian nonterm noselect

=== modified file 'doc/misc/todo-mode.texi'
--- a/doc/misc/todo-mode.texi   2014-01-13 22:21:32 +0000
+++ b/doc/misc/todo-mode.texi   2014-05-02 14:17:41 +0000
@@ -188,13 +188,15 @@
 @node Todo Items as Diary Entries, , Levels of Organization, Overview
 @section Todo Items as Diary Entries
 
-Each todo item is also a potential diary item: if you include a todo
-file in the Emacs diary file (@pxref{Fancy Diary Display,,, emacs}), the
-Fancy Diary display will show those todo items that are not marked with
address@hidden  This effectively augments the Emacs diary
-with categorized diary entries.  For the various options available for
-making a todo item a diary entry, see @ref{Inserting New Items} and
address@hidden Item Headers and Text}.
+You can have todo items show up in the Emacs Fancy Diary display by
+including the todo file in your diary file (@pxref{Fancy Diary
+Display,,, emacs}).  This effectively augments the Emacs diary with
+categorized diary entries.  All items in an included todo file will
+appear in the Fancy Diary display except for those that are marked
+with @code{todo-nondiary-marker}.  You can add or omit this marking
+upon creating a new todo item, or you can do so by editing an existing
+item, see @ref{Inserting New Items} and @ref{Editing Item Headers and
+Text} for details.
 
 To ensure the proper display of todo items in the Fancy Diary display,
 they must have the format of diary entries, i.e., they have to begin
@@ -245,20 +247,16 @@
 
 If you want to enter Todo mode and go directly to a specific category
 instead the first or current category in the current or default todo
-file, use the command @code{todo-jump-to-category}; @ref{Navigation}, for
-details.  You can also enter Todo mode by invoking a todo item insertion
-command; @ref{Inserting New Items}, for details.
+file, use the command @code{todo-jump-to-category}; @ref{Navigation},
+for details.  You can also enter Todo mode by invoking the command
address@hidden; @ref{Inserting New Items}, for details.
 
 The most convenient way to use these commands to enter Todo mode is to
-define global key bindings for them in your init file.  Good choices are
-for @code{todo-show} and @code{todo-jump-to-category} are @kbd{C-c t}
-and @kbd{C-c j}, since these commands are bound to @kbd{t} and @kbd{j},
-respectively, in Todo mode.  For invoking item insertion from outside of
-Todo mode, it is useful to bind @code{todo-insertion-map}, which is the
-key map containing the bindings of all Todo item insertion commands, to
address@hidden i}, since it is bound to @kbd{i} in Todo mode; to complete the
-invocation, supply the rest of the key sequence (@pxref{Inserting New
-Items}).
+define global key bindings for them in your init file.  Good choices
+are @kbd{C-c t} for @code{todo-show}, @kbd{C-c j} for
address@hidden and @kbd{C-c i} for
address@hidden, since these commands are bound to @kbd{t},
address@hidden and @kbd{i}, respectively, in Todo mode.
 
 You can also visit a Todo file via @code{find-file} or Dired, like any
 other file, and since Emacs recognizes it, the buffer will automatically
@@ -297,12 +295,12 @@
 number key.
 
 The predefined key bindings in Todo are more or less mnemonic.  As a
-rule, key sequences beginning with @kbd{C} are bound to commands
-applying to categories, sequences beginning with @kbd{F} apply to
-(non-archive) file-level commands, and those beginning with @kbd{A}
-apply to archives (a special type of Todo file; @ref{Todo Archive
-Mode}).  Todo commands applying to items, which constitute the majority,
-are bound to lower case key sequences.
+rule, key sequences beginning with @kbd{C} (capital `C', not the
+control key) are bound to commands applying to categories, sequences
+beginning with @kbd{F} apply to (non-archive) file-level commands, and
+those beginning with @kbd{A} apply to archives (a special type of Todo
+file; @ref{Todo Archive Mode}).  Todo commands applying to items,
+which constitute the majority, are bound to lower case key sequences.
 
 @node Navigation, Editing, Key Binding Conventions, Top
 @chapter Navigation
@@ -315,8 +313,8 @@
 convenient for their key bindings to be single lower case keys, even for
 navigation commands applying to categories and files.
 
-Two of the navigation commands were already mentioned in the section on
-Todo mode entry points:
+Two of the navigation commands were already mentioned in @ref{Todo
+Mode Entry Points}:
 
 @table @kbd
 
@@ -397,11 +395,17 @@
 
 Editing in Todo mode means making structural or textual changes at one
 of the levels of organization (file, category, or item).  Structural
-editing includes adding, relocating and removing, textual editing includes
-renaming files or categories and changing an item's content or date, or
-adding certain kinds of marks or tags to items.  To save changes you
-make to the current todo file, type @kbd{s} (@code{todo-save}).  Changes
-are also saved on quitting Todo mode with @kbd{q}.
+editing includes adding, relocating and removing units of information
+at a level; textual editing includes renaming files or categories and
+changing an item's content or date/time stamp, or adding certain kinds
+of marks or tags to items.  Todo mode provides commands, detailed in
+the following sections, which enable you to quickly and safely make
+changes to your todo lists, without having to worry about preserving
+the file format.
+
+To save changes you make to the current todo file,
+type @kbd{s} (@code{todo-save}).  Changes are also saved on quitting
+Todo mode with @kbd{q}.
 
 @menu
 * File Editing::
@@ -417,12 +421,12 @@
 @table @kbd
 
 @item F a
-Add a new todo file (@code{todo-add-file}).  This command prompts for a
-name and creates the file in @code{todo-directory}, adding the
+Add a new todo file (@code{todo-add-file}).  This command prompts for
+a name and creates the file in @code{todo-directory}, adding the
 @samp{.todo} extension (so you should not include the extension in the
-name you enter).  The command also prompts for the file's first category and, 
if
-option @code{todo-add-item-if-new-category} is enabled (the default),
-for that category's first item.
+name you enter).  The command also prompts for the file's first
+category and, if option @code{todo-add-item-if-new-category} is
+enabled (the default), for that category's first item.
 
 @item F r
 Rename the current todo file (@code{todo-rename-file}).  If called with
@@ -430,15 +434,15 @@
 file has an archive (@pxref{Todo Archive Mode}) or there are
 corresponding filtered items files (@pxref{Todo Filtered Items Mode}),
 this command renames these accordingly.  If there are live buffers
-visiting any of these files, the command also rename them accordingly.
+visiting any of these files, the command also renames them accordingly.
 
 @item F k
 Delete the current todo file (@code{todo-delete-file})address@hidden key
 binding of this command is mnemonic for ``kill'' to parallel the binding
 @kbd{k} for item deletion, since @kbd{d} is bound to another item
 editing command (@pxref{Done Items}).}  If the todo file has an archive
-(@pxref{Todo Archive Mode}), prompt whether to delete that as well.
-This command also kill the buffers visiting the deleted files.
+(@pxref{Todo Archive Mode}), prompt for whether to delete that as well.
+This command also kills the buffers visiting the deleted files.
 
 @item F e
 This command (@code{todo-edit-file}) changes the buffer's major mode to
@@ -458,20 +462,21 @@
 use case is to recover from a mistake, such as accidentally deleting an
 item, since this cannot be undone in Todo mode.
 
-Using @kbd{C-x C-q} to quit Todo Edit mode provides a measure of safety,
-since it runs a file format check, signaling an error if the format has
-become invalid.  However, this check cannot tell if the number of items
-changed, which could result in the file containing inconsistent
-information (see the cautionary note in @ref{Reordering Categories}, for
-more details).  For this reason @kbd{F e} should be used with caution.
+Using @kbd{C-x C-q} to quit Todo Edit mode provides a measure of
+safety, since it runs a file format check, signaling an error if the
+format has become invalid.  However, this check cannot tell if the
+number of items or categories changed, which could result in the file
+containing inconsistent information (see the cautionary note in
address@hidden Categories}, for more details).  Invoking @kbd{F e}
+displays a warning to this effect.
 @end table
 
 @node Category Editing, Item Editing, File Editing, Editing
 @section Category Editing
 
-The following commands are available for editing at the category level
-(for additional category-editing commands, which are extensions of item
-commands, @pxref{Editing Item Headers and Text}):
+The following commands are available for editing specifically at the
+category level (for two other category-editing commands, which are
+extensions of item commands, @pxref{Editing Item Headers and Text}):
 
 @table @kbd
 
@@ -519,8 +524,10 @@
 @node Item Editing, , Category Editing, Editing
 @section Item Editing
 
-Todo mode provides a wide variety of commands for adding and textually
-changing items, as well as for deleting and relocating items.
+Todo mode provides commands for adding new items as well as textually
+changing, deleting and relocating existing items.  The commands and
+associated options for adding and editing items, in particular, offer
+you a lot of flexibility to fine-tune these operations to your needs.
 
 @menu
 * Inserting New Items::
@@ -531,282 +538,388 @@
 @node  Inserting New Items, Editing Item Headers and Text, , Item Editing
 @subsection Inserting New Items
 
-There are many commands for adding new todo items.  The command names
-contain the word ``insert'' instead of ``add'' and their key bindings are
-sequences beginning with @kbd{i}.  The motivation for this terminology is
-that speaking of adding an item to a category suggests appending it to
-the top or bottom, whereas you can insert an item into the category
-anywhere, giving each new item any priority in the list.
+To add a new todo item to a category, type @kbd{i}, which is bound to
+the command @code{todo-insert-item}.
 
 @table @kbd
 
address@hidden i i
-This is the basic command for inserting new items into a category
-(@code{todo-insert-item}).  Called without a prefix argument, it prompts
-for the text of the item and its priority (a number between 1 and one
-more than the number of items already in the category), both of which
-you enter in the minibuffer, and inserts the item into the current
-category of the current todo file at the position in the list
-corresponding to the priority you chose.  Called with one prefix
address@hidden i
+This command is the entry point for inserting new items into a
+category (@code{todo-insert-item}).  It prompts for additional keys
+until reaching a complete key sequence, which specifies the insertion
+parameters you wish to apply (see below).  It then prompts for the
+text of the item, which you enter in the address@hidden
+are two insertion parameters that override prompting for and manually
+entering the new item's text, see below.}  Called with one prefix
 argument, it also prompts for a category, and called with two prefix
-arguments, it prompts for both a file and a category from that file, and
-inserts the item accordingly.  Category name completion works as with
-the navigation command @kbd{j}.
+arguments, it prompts for both a file and a category from that file,
+and inserts the item accordingly; category name completion works as
+with the navigation command @kbd{j}.  Finally, it inserts the item
+into the current or selected category of the current or selected todo
+file at the position in the list corresponding to the priority you
+choose, which also depends on the insertion parameters.
 @end table
 
-Each invocation of @kbd{i i} adds a header string to the item, which
address@hidden
+The name of this command reflects the fact that you can insert a new
+item into the category at any position, giving each new item any
+priority in the list, whereas speaking of adding an item to a category
+suggests appending it to the top or bottom.
+
+In addition to its file and category, each newly inserted todo item
+has a priority in the category and begins with a header string, which
 includes at least the current date in the same format used by
 @code{diary-insert-entry} (@pxref{Date Formats,,, emacs}).  You can
-control what other information is included in the header by customizing
-the following options:
+specify the priority and the content of the header string in two ways.
+First, you can set the following item insertion options, which apply
+on every invocation of @code{todo-insert-item}.
 
 @itemize @bullet
 
 @item
address@hidden is for automatically assigning a new item
+the highest or lowest priority in the category, if you do not
+explicitly assign it a priority on invoking @code{todo-insert-item}.
+By default, such new items are given highest priority, i.e., inserted
+at the top of the list.
+
address@hidden
 @code{todo-always-add-time-string} is for including or omitting the
-current time.  The time string is omitted by default.
+current time in the new item's header.  By default, this time string
+is omitted.
 
 @item
address@hidden is for specifying whether the item appears
-in the Fancy Diary display by adding or omitting
address@hidden  By default, new todo items are marked for
-exclusion from the diary.
address@hidden is for specifying whether the item
+appears in the Fancy Diary display (when the todo file is included in
+the Emacs diary file) by adding or omitting
address@hidden  By default, new todo items are so
+marked, thus excluded from the diary.
 
 @item
 @code{todo-diary-nonmarking} is for adding or omitting
 @code{diary-nonmarking-symbol} to items displayed in the diary, to
-control whether they are marked in the calendar (@pxref{Format of Diary
-File,,, emacs}).  By default, todo items that are diary entries are
-marked in the calendar.
+control whether they are marked in the calendar (@pxref{Format of
+Diary File,,, emacs}).  By default, todo items that are diary entries
+lack this symbol, thus are marked in the calendar.
 @end itemize
 
-Instead of always adding the same header information to a new item, you
-can use more specific insertion commands that let you decide what to
-include in the item header each time you insert a new item.  And instead
-of always being prompted to choose the new item's priority, you can
-invoke a command to insert it at the position (hence with the priority)
-of the item at point.  Finally, instead of always typing the text of the
-new item in the minibuffer, you can invoke a command that makes the
-selected region in an Emacs buffer automatically become the new item's
-text.  The following paragraphs discuss how to invoke these commands by
-typing certain key sequences.
-
-There are eight parameters of item insertion in Todo mode, six
-concerning the item header, and one each concerning its priority and its
-text.  Each unique combination of these parameters produces a different
-insertion command.  The command @kbd{i i} realizes one of these
-combinations.  For the commands that realize the remaining combinations
-it is convenient to associate each parameter with a mnemonically chosen
-key.  Then by typing certain sequences of these keys, you complete the
-insertion command invocation that realizes the specified combination.
-As with @kbd{i i}, the effect of many of these commands also depends on
-the values of the item insertion options mentioned above (see the
-examples below).
-
-Here is a list of the parameters and their associated keys, in the order
-in which you must type them when building a key sequence (this order
-roughly reflects the order in which the corresponding parts of the item
-occur in a category listing):
+Beside setting these options, for more flexibility you can also pass
+certain parameters on each invocation of @code{todo-insert-item}.
+These parameters concern not only the new item's priority and header,
+but also its textual content.  You pass these parameters by typing a
+sequence of one or more keys after the initial @kbd{i}.
+
+Here is a list of the item insertion parameters together with their
+mnemonically associated address@hidden non-mnemonic choice of
address@hidden for the parameter @samp{default} is motivated by the
+convenience of repeating the @kbd{i} used to invoke
address@hidden and descriptions of their effect in
address@hidden:
 
 @enumerate
 
 @item
address@hidden for diary (non)inclusion;
address@hidden
address@hidden for adding or omitting `diary-nonmarking-symbol';
address@hidden
address@hidden for adding the date header by clicking a date in the Emacs
-calendar, address@hidden
address@hidden for interactively entering the date header as a string of year,
-month and day number components in the minibuffer, address@hidden
address@hidden for interactively entering the date header as a weekday name in
-the minibuffer;
address@hidden
address@hidden for adding a time string to the header in the minibuffer
-(including the empty string, which amounts to omitting the time);
address@hidden
address@hidden for inserting the new item in the position of the item at point
-(``here''), address@hidden
address@hidden to use the text of the selected region as the item's text.
address@hidden (@kbd{i}): Prompt for the new item's priority
+(a number between 1 and one more than the number of items already in
+the category) and add a header string conforming to the values of the
+above options.
+
address@hidden (@kbd{p}): Make an exact copy of the item at point,
+including its header string, and prompt for its priority.  (This is
+useful for quickly making a new todo item whose text or header you
+want to differ only partly from that of an existing item: after
+inserting the copy, you can quickly edit it as needed by using
+operations described in the next section.)
+
address@hidden
address@hidden (@kbd{y}): Override the option
address@hidden; that is, add @code{todo-nondiary-marker}
+if the option is non-nil, omit this marker if the option is nil.
+
address@hidden (@kbd{k}): Override the option
address@hidden; that is, add
address@hidden if the option is non-nil, omit this
+symbol if the option is nil.  Since this symbol only applies to diary
+items, the new item is automatically marked as such, i.e., lacks
address@hidden
+
address@hidden
address@hidden (@kbd{c}): Pop up the Emacs calendar and click a date
+in it to use that date in the new todo item's header.
+
address@hidden (@kbd{d}): Prompt for entering in the minibuffer
+the year, month (with completion) and day number components of the
+header.
+
address@hidden (@kbd{n}): Prompt for entering in the minibuffer
+a weekday name as the date header instead of a year-month-day string.
+
address@hidden
address@hidden (@kbd{t}): Prompt for entering a time string in
+the minibuffer instead of automatically inserting the current time;
+however, typing @key{RET} at the prompt enters the current time if
address@hidden is non-nil, otherwise it enters the
+empty string (i.e., no time string).
+
address@hidden
address@hidden (@kbd{h}): Insert the new item in the position of
+the item at point, pushing that and all lower items in the category
+down, i.e., lowering their priority, by one.
+
address@hidden (@kbd{r}): Use the text of the selected region as the
+text of the new item, and insert this in accordance with the item
+insertion options and other parameters passed.  If the option
+`todo-use-only-highlighted-region' is non-nil, then use the region
+only when it is highlighted; otherwise, use the region regardless of
+highlighting.
 @end enumerate
 
-Each insertion command key sequence begins (disregarding prefix
-arguments) with @kbd{i}, followed by one or more of these eight keys, in
-the order listed.  But as you can see in the above table, since some of
-the insertion parameters are mutually exclusive, they occupy only five
-positions, so the complete (unprefixed) sequences are maximally six keys
-long.  Shorter sequences are also possible, since a parameter may be
-omitted.  But since the order in any key sequence is fixed, if the last
-key in the sequence could be followed by another insertion key, i.e., if
-the last key is not @kbd{h} or @kbd{r}, it has to be doubled to complete
-the sequence, otherwise it would be interpreted as a prefix sequence
-(this is why the binding for the basic item insertion command is @kbd{i
-i} and not @kbd{i}).
-
-Here are some examples of item insertion command key sequences:
-
address@hidden @bullet
-
address@hidden
address@hidden h} inserts a new item at the position of the item at point 
(pushing
-the latter down) with a header containing the current date and,
-depending on the values of the mentioned options, possibly the current
-time and diary-related markings.
address@hidden
address@hidden y h} does the same as the preceding command, except that
address@hidden is added if @code{todo-include-in-diary} is
-non-nil and omitted if that option is nil; that is, the diary key @kbd{y}
-overrides the setting of this option.
address@hidden
address@hidden y t h} does the same as the preceding command, except that it
-prompts for a time string instead of automatically inserting the
-current time; however, typing @key{RET} at the prompt returns the
-current time if @code{todo-always-add-time-string} is non-nil, otherwise
-the empty string (i.e., no time string).
address@hidden
address@hidden y t t} does the same as the preceding command, except that it
-prompts for the item's priority and inserts it accordingly.
address@hidden itemize
-
-Note that the commands whose key sequences include @kbd{y}, @kbd{k} or @kbd{t}
-reverse the effect of the options @code{todo-include-in-diary},
address@hidden and @code{todo-always-add-time-string},
-respectively, thus temporarily overriding their values.
-
-The names of the item insertion commands correspond to their key
-bindings, e.g., @kbd{i h} is bound to @code{todo-insert-item-here}, @kbd{i y 
h} to
address@hidden, etc.  But since there are so many
-combinations, instead of trying to memorize either the names or the key
-sequences, you can, as usual, just type an initial part of a key
-sequence (minimally @kbd{i}), followed by @kbd{C-h} to see the valid
-completions.
-
-An alternative to using the key @kbd{c} for choosing the item's date
-from the calendar is also available: if point is on a date in the
-calendar, typing @kbd{i t} (@code{todo-insert-item-from-calendar}) will
-prompt for a new item and its priority and insert it in the current
-category.  Like @kbd{i i} and the other item insertion commands, this
-also accepts one or two prefix arguments for choosing the category via
-minibuffer completion.  Note, however, that the key sequence @kbd{i t}
-is not defined in Todo mode but in the Calendar mode keymap.  It is a
-convenient shortcut if you happen to be using the calendar when you
-decide to make a new todo item.  (Contrast this with a command like
address@hidden c c}, which pops open the calendar after you have entered the
-item's text, and then you can choose a date from the calendar.)
-
-There is one more item insertion command, which does not derive from the
-item insertion parameters:
-
address@hidden @kbd
-
address@hidden i p
-This command (@code{todo-copy-item}) makes a complete copy of the item
-at point, including its header, prompts for its priority in the current
-category and inserts it accordingly.
address@hidden table
-
address@hidden
-This command is useful for quickly adding a todo item whose text or
-header you want to differ only partly from that of an existing item:
-after inserting the copy, you can quickly edit it as needed by using
-commands described in the next section.
+Note that the parameters are divided into five numbered groups; within
+a group, the parameters are mutually exclusive.  Hence, to build a
+complete insertion operation, you select at most one parameter from at
+least one of these groups, by typing the corresponding key.  If you
+want to apply more than one parameter, you must type the corresponding
+keys in the order of the numbered groups, subject to the following
+constraints.
+
+The keys of groups 2-4 are continuation keys, that is, each can be
+followed by a key from a following group.  If you want to finish the
+sequence with a continuation key, you must double the final key.  For
+example, @kbd{i y} is not a complete key sequence; rather, you must
+type @kbd{i y y}.
+
+By contrast, the keys of groups 1 and 5 are final keys; for example,
address@hidden i} and @kbd{i h} are complete sequences.  The reason for making
+two separate groups of the final keys is that the parameters
address@hidden and @samp{copy} cannot be combined with any other
+parameters, while @samp{here} and @samp{region} can be combined with
+any of the parameters from groups 2-4.
+
+To aid you in building item insertion key sequences, when you type an
+insertion key, this displays a prompt in the echo area showing pairs
+of the remaining possible keys and their associated parameters,
+grouped and ordered in accordance with the above list.  The initial
+prompt, after typing @kbd{i} to invoke @code{todo-insert-item}, looks
+like this:
+
address@hidden
+Press a key (so far `i'):  @{ i=>default p=>copy @} @{ y=>diary k=>nonmarking 
@} @{ c=>calendar d=>date n=>dayname @} t=>time @{ h=>here r=>region @}
address@hidden example
+
address@hidden If you now type @kbd{y}, the prompt changes to this:
+
address@hidden
+Press a key (so far `i y'):  y=>diary:GO! @{ c=>calendar d=>date n=>dayname @} 
t=>time @{ h=>here r=>region @}
address@hidden example
+
address@hidden Notice that the pair @samp{k=>nonmarking} is now absent, since it
+belongs to the same group as the selected pair @samp{y=>diary}, hence
+is no longer available for this sequence.  Since @kbd{y} is a
+continuation key, it is still available, but now the string ":GO!" is
+appended to the pair to remind you that pressing this key again will
+complete the sequence.
+
+
+
address@hidden Here are some examples of item insertion command key sequences:
+
address@hidden @itemize @bullet
+
address@hidden @item
address@hidden @kbd{i h} inserts a new item at the position of the item at 
point (pushing
address@hidden the latter down) with a header containing the current date and,
address@hidden depending on the values of the mentioned options, possibly the 
current
address@hidden time and diary-related markings.
address@hidden @item
address@hidden @kbd{i y h} does the same as the preceding command, except that
address@hidden @code{todo-nondiary-marker} is added if 
@code{todo-include-in-diary} is
address@hidden non-nil and omitted if that option is nil; that is, the diary 
key @kbd{y}
address@hidden overrides the setting of this option.
address@hidden @item
address@hidden @kbd{i y t h} does the same as the preceding command, except 
that it
address@hidden prompts for a time string instead of automatically inserting the
address@hidden current time; however, typing @key{RET} at the prompt returns the
address@hidden current time if @code{todo-always-add-time-string} is non-nil, 
otherwise
address@hidden the empty string (i.e., no time string).
address@hidden @item
address@hidden @kbd{i y t t} does the same as the preceding command, except 
that it
address@hidden prompts for the item's priority and inserts it accordingly.
address@hidden @end itemize
+
+
+An alternative to the key sequence @kbd{i c c} for choosing the item's
+date from the calendar is also available: when point is already on a
+date in the calendar, typing @kbd{i t}
+(@code{todo-insert-item-from-calendar}) prompts for a new item and its
+priority and inserts it in the current category.  This command, like
address@hidden, also accepts one or two prefix arguments for
+choosing the category via minibuffer completion.  Note, however, that
+the key sequence @kbd{i t} is not defined in Todo mode but in the
+Calendar mode keymap.  It is a convenient shortcut if you happen to be
+using the calendar when you decide to make a new todo item.  (Contrast
+this with passing the @samp{calendar} parameter, which pops open the
+calendar after you have entered the item's text, and then you can
+choose a date from the calendar.)
+
 
 @node  Editing Item Headers and Text, Relocating and Removing Items, Inserting 
New Items, Item Editing
 @subsection Editing Item Headers and Text
 
-There are a number of commands for editing an existing item's text or
-header; these commands are bound to key sequences with @kbd{e}.
-
-There are two commands for editing an item's text (and manually editing
-its header), one appropriate for short items and simple edits and one
-better suited for more complex changes or for editing lengthy items:
+To make changes to an existing item's content or header, type @kbd{e},
+which is bound to the command @code{todo-edit-item}.
 
 @table @kbd
 
address@hidden e e
-Edit the text of the current item in the minibuffer
-(@code{todo-edit-item}).  If called with a prefix argument (@kbd{C-u e
-e}), the item's header is also included in the minibuffer and so can be
-edited manually.
-
address@hidden e m
-Edit the text of the current item in a special buffer in Todo Edit mode
-(@code{todo-edit-multiline-item}).  When you have finished editing, type
address@hidden C-q} to return to Todo mode; this runs a format check to ensure
-the item is address@hidden the command @kbd{F e}
address@hidden e
+This command is the entry point for textually editing existing items
+in a category (@code{todo-edit-item}).  It prompts for additional keys
+until reaching a complete key sequence, which specifies the editing
+parameters you wish to apply (see below), and then executes the
+editing operation accordingly.
address@hidden table
+
+Here is a list of the item editing parameters together with their
+mnemonically associated keys and descriptions of their effect in
address@hidden  The list is divided into three groups, for
+reasons explained below.
+
address@hidden 1
+
address@hidden
address@hidden (@kbd{e}): Edit the text of the current item in the
+minibuffer; the item's header is omitted.
+
address@hidden (@kbd{h}): Edit the text and header of the current item
+in the minibuffer.
+
address@hidden (@kbd{m}): Edit the text of the current item in a
+special buffer in Todo Edit mode.  After editing, type @kbd{C-x C-q}
+to return to Todo address@hidden runs a format check to ensure
+the item is well-formed.  However, unlike the command @kbd{F e}
 (@pxref{File Editing}), @kbd{e m} does not expose you to the risk of
 putting the file in an inconsistent state, since it puts only the
 current item in Todo Edit mode.}
address@hidden table
-
-A number of commands are available for interactively editing all or part
-of the item header, permitting quick edits and helping avoid formatting
-errors.
-
-The following three commands are for editing any or all of the year,
-month and day components of a date header:
-
address@hidden @kbd
-
address@hidden e d t
-Successively prompt for changes to the date's year, month and
-day number, and if the option @code{todo-always-add-time-string} is
-non-nil, also for editing the time string (see also @kbd{e t} below).
-
address@hidden e d a
-Change the date to today's date.
-
address@hidden e d c
-This command pops up the Emacs calendar, and after you type @key{RET} on
-a date in the calendar makes that date the item's date.
address@hidden table
-
address@hidden
-You can also use these commands on items whose date header consists of a
-weekday name, which then changes to a header with year, month and day
-components.
-
-Each of the following three commands, in contrast to the preceding
-three, changes only a single date component and has no effect on a date
-header consisting of a weekday name:
-
address@hidden @kbd
address@hidden e d y
address@hidden e d m
address@hidden e d d
-Prompt for changing just the year, month or day number, respectively; if
-invoked with a positive or negative numeric prefix argument, directly
-increment or decrement the date component accordingly and automatically
-adjust the other date component if necessary.  For example, if the date
-string is ``January 1, 2013'', typing @kbd{- 3 e d d} results in
-``December 29, 2012''.
address@hidden table
-
address@hidden @kbd
address@hidden e d n
-Prompt for a weekday name and make it the item's date header.  Note that
-this replaces an existing date string, it does not add the day name to
-the date string.
-
address@hidden e t
-Edit just the item's time string.  A time string can be added both to a
-date string and to a weekday name.  If you type @key{RET} at the
-prompt, this omits a time string from the header, or deletes an existing
-time string.
-
address@hidden e y y
-Change the item's diary inclusion status by adding or removing
address@hidden
-
address@hidden e y k
-Change the item's diary marking status by adding or removing
address@hidden (this command has an effect only if the
-item is not marked for exclusion from the diary).
address@hidden table
-
address@hidden
-Parallel to the latter two item-level commands are the
-following category-level commands:
+
address@hidden (@kbd{y}): Change the current item's diary inclusion
+status by adding @code{todo-nondiary-marker} if the item lacks this,
+or by removing it if present.
+
address@hidden (@kbd{k}): Change the current item's calendar
+marking status by adding @code{diary-nonmarking-symbol} if the item
+lacks this, or by removing it if present. Since this symbol only
+applies to diary items, the item is automatically marked as such,
+i.e., if @code{todo-nondiary-marker} is present, it is removed.
+
address@hidden (@kbd{d}): Prompt for a final key from the second group
+of item editing parameters to edit the current item's date string.
+
address@hidden (@kbd{t}): Edit the current item's time string, if
+present; otherwise, add one.  Typing @key{RET} at the prompt enters
+the current time if @code{todo-always-add-time-string} is non-nil,
+otherwise it enters the empty string (i.e., no time string).
address@hidden enumerate
+
address@hidden
+Editing the text of a lengthy item in the minibuffer can be
+inconvenient; therefore, if you type `e e' or `e h' on an item whose
+text contains more than one logical line, the effect is the same as if
+you had typed `e m', that is, you switch a special buffer in Todo Edit
+mode.
+
+When you pass any of the parameters of the preceding group, except for
+the @samp{date} parameter, this completes the item editing invocation
+begun by typing @kbd{e}.  Pressing @kbd{d} to pass the @samp{date}
+parameter, however, prompts you with the following parameters and
+their associated keys, and pressing any of these completes the
+invocation.
+
address@hidden 2
+
address@hidden
address@hidden (@kbd{f}): Successively prompt for editing the year, month
+(with completion) and day number parts of the current item's date
+string, and, if the option @code{todo-always-add-time-string} is
+non-nil, also for editing its time string.
+
address@hidden (@kbd{c}): This pops up the Emacs calendar, and after
+you type @key{RET} on a date in the calendar makes that date the
+item's date.
+
address@hidden (@kbd{a}): Make the item's date today's date.
+
address@hidden (@kbd{n}): Prompt for a weekday name (with completion)
+and make it the item's date header.  Note that this replaces an
+existing date string, it does not add the day name to the date string.
+
address@hidden (@kbd{y}): Edit just the year component of the current
+item's date string.
+
address@hidden (@kbd{m}): Edit just the month component of the current
+item's date string (with completion).
+
address@hidden (@kbd{d}): Edit just the day number component of the
+current item's date string.
address@hidden enumerate
+
address@hidden
+With the latter three parameters you can add a positive or negative
+numeric prefix argument to the invocation: this increments or
+decrements the selected date component by the given number and
+automatically adjusts the other date components if necessary.  For
+example, if the item's date string is ``January 1, 2013'', then typing
address@hidden 3 e d d} results in ``December 29, 2012''.
+
+The first two groups of parameters apply only to todo items that are
+not marked as done (@pxref{Done Items}); the two parameters of the
+third group, in contrast, apply only to done todo items.  You cannot
+edit the text of such items, but you can edit or delete the comment
+you may have added on marking the item as done (@pxref{Done Items,
address@hidden,), or retroactively add a comment, by passing
+either of these parameters.
+
address@hidden 3
+
address@hidden
address@hidden/edit comment} (@kbd{c}): Edit the current done item's
+comment, if it has one; otherwise, prompt for and add a comment.
+
address@hidden comment} (@kbd{d}): Delete the current done item's
+comment, if it has one.
address@hidden enumerate
+
+The command @code{todo-edit-item} is sensitive to the distinction
+between not done and done todo items.  If you type @kbd{e} when point
+is on a done item, this displays the following prompt in the echo
+area:
+
address@hidden
+Press a key (so far `e'): c=>add/edit comment d=>delete comment
address@hidden example
+
address@hidden
+Only by typing @kbd{c} or @kbd{d} in response to this prompt can you
+complete the invocation.  In contrast, if you type @kbd{e} when point
+is on a non-done todo item, this displays the following prompt in the
+echo area, and you can continue or complete the invocation only by
+typing one of the listed keys:
+
address@hidden
+Press a key (so far `e'): e=>edit h=>header m=>multiline y=>diary 
k=>nonmarking d=>date t=>time
address@hidden example
+
+As noted above, passing the @samp{date} parameter does not complete
+the invocation of @code{todo-edit-item}; rather, it displays the
+following prompt, and typing any of these keys does complete the
+invocation:
+
address@hidden
+Press a key (so far `e d'): f=>full c=>calendar a=>today n=>dayname y=>year 
m=>month d=>daynum
address@hidden example
+
+In addition to the item-level invocations `e y', to change the current
+item's diary inclusion status, and `e k', to change the current item's
+calendar marking status, Todo mode also has two related category-level
+commands:
 
 @table @kbd
 
@@ -818,6 +931,21 @@
 category.
 @end table
 
address@hidden
+Like `e k', `C e k' automatically removes @code{todo-nondiary-marker}
+from all items it is present on, since only diary items can bear
address@hidden
+
+Since categories often contain a mix of items marked for diary
+inclusion and exclusion, and of the former, a mix of those to be
+marked and those not to be marked in the calendar, it is more useful
+for these category-level commands, unlike the item-level commands, not
+to be toggles, but to have the same effect on all items in the
+category, and take a prefix argument to reverse the effect.  (If you
+really want to toggle the diary-inclusion and calendar-marking status
+of all items in the category, you can do this by marking all the items
+and then invoking `e y' or `e k', @pxref{Marked Items}).
+
 @node  Relocating and Removing Items,  , Editing Item Headers and Text, Item 
Editing
 @subsection Relocating and Removing Items
 
@@ -849,10 +977,11 @@
 with that of the item directly below it (@code{todo-lower-item-priority}).
 
 @item #
-Prompt for a number and relocate the item to the corresponding position
-in the list (@code{todo-set-item-priority}).  For example, entering
address@hidden at the prompt makes the item the third in the category, i.e.,
-gives it third highest priority.  You can also pass the desired priority
+Prompt for a number and relocate the item to the corresponding
+position in the list (@code{todo-set-item-priority}).  For example,
+entering @kbd{3} at the prompt makes the item the third in the
+category, i.e., gives it third highest priority; all lower priority
+items are pushed down by one.  You can also pass the desired priority
 as a numeric prefix argument, e.g., @kbd{3 #} gives the item third
 highest priority without prompting.  (Prefix arguments have no effect
 with @kbd{r} or @kbd{l}.)
@@ -877,7 +1006,8 @@
 file, and if you affirm, the item is moved to the new category.
 @end table
 
-You delete an item, thereby permanently removing it:
+You can delete an item, thereby permanently (and, as far as Todo mode
+is concerned, irrevocably) removing it from the todo file:
 
 @table @kbd
 
@@ -918,6 +1048,7 @@
 
 @table @kbd
 
address@hidden
 @item d
 This command (@code{todo-item-done}) removes the todo item at point from
 the todo list, appends to the original header a header consisting of
@@ -954,23 +1085,30 @@
 (@code{todo-toggle-view-done-only}).
 @end table
 
-Three editing commands for done items are available:
+Since done items are meant to be a record of your finished todo items,
+you cannot apply to them the same kinds of editing operations
+available to unfinished todo items.  However, as explained in
address@hidden Item Headers and Text} and repeated below for
+convenience, you can edit or delete a done item's comment, or
+retroactively add a comment.  You can also relocate a done item, and
+you can revert its done status, making it an unfinished item again.
 
 @table @kbd
 
 @item e c
-If you type this command (@code{todo-edit-done-item-comment}) when point is
-on a done item that has a comment, you can edit the text of the
-comment.  If you invoke it with a prefix argument (@kbd{C-u e c}), the
-comment is deleted on confirmation.  If the done item does not have a
-comment, this command allows you to add one.
+Edit the current done item's comment, if it has one; otherwise, prompt
+for and add a comment.
+
address@hidden e d
+Delete the current done item's comment, if it has one.
 
 @item m
 Move the done item at point to the top of the done items section of
-another category (@code{todo-move-item}).  This is useful in case, after
-having relocated an item to its category's done items section, you
-create a category that is better suited to the content of the done item
-than its current category, so you can recategorize the done item.
+another category (@code{todo-move-item}).  This is useful in case,
+after having finished a todo item and relocated it to its category's
+done items section, you create a category that is better suited to the
+content of the done item than its current category; in other words,
+you can retroactively recategorize the done item.
 
 @item u
 If you decide the done item at point is not done after all, this command
@@ -1156,18 +1294,34 @@
 the category, but only when only the done items section is being
 displayed, i.e., after invoking @kbd{C V} or @kbd{V}.
 
-The following commands operate on marked items: @kbd{k} (deleting), @kbd{m}
-(moving to another category), @kbd{d} (moving to the done items section;
-note that @kbd{C-u d} adds the same comment to all marked items), @kbd{A d}
-(archiving), @kbd{u} (both in Todo mode for undoing a done item and in
-Todo Archive mode for unarchiving an item), as well as the commands for
-editing the item header (those beginning with the prefix @kbd{e d} as well
-as @kbd{e t}, @kbd{e y y} and @kbd{e y k}).  The item insertion, textual 
editing and
-priority changing commands do not operate on marked items.
-
-If you use @kbd{m}, @kbd{d}, @kbd{A d} or @kbd{u} on multiple noncontiguous 
marked
-items, the relocated items retain their relative order but are now
-listed consecutively en bloc.
+The following commands operate on marked items:
+
address@hidden @bullet
+
address@hidden
address@hidden (deleting)
address@hidden
address@hidden (moving to another category)
address@hidden
address@hidden (moving to the done items section; note that @kbd{C-u d} adds
+the same comment to all marked items)
address@hidden
address@hidden d} (archiving)
address@hidden
address@hidden (both in Todo mode for undoing a done item and in Todo Archive
+mode for unarchiving an item)
address@hidden
+the commands for editing the item header (those beginning with the
+prefix @kbd{e d} as well as @kbd{e t}, @kbd{e y} and @kbd{e k})
address@hidden itemize
+
address@hidden
+The item insertion, textual editing and priority changing commands do
+not operate on marked items.
+
+If you use @kbd{m}, @kbd{d}, @kbd{A d} or @kbd{u} on multiple
+noncontiguous marked items, the relocated items retain their relative
+order but are now listed consecutively en bloc.
 
 You can mark both todo and done items, but note that only @kbd{m} can apply
 to both; other commands only affect either marked todo or marked done
@@ -1177,9 +1331,9 @@
 @node Todo Categories Mode, Searching for Items, Marked Items, Top
 @chapter Todo Categories Mode
 
-It can be helpful to have a compact overview of the categories in a todo
-file and the types of items it contains; Todo provides a tabular view
-of this information.
+It can be helpful to have a compact overview of the categories in a
+todo file and the types of items it contains; the Todo package
+provides a tabular view of this information.
 
 @table @kbd
 
@@ -1251,7 +1405,7 @@
 recognize such categories by their items counts in the table---all
 columns but the archived one have counts of zero---and in addition,
 their lines in the table are also distinguished from the others by a
-different face.
+different face (@pxref{Faces}).
 
 You can navigate around the table:
 
@@ -1313,14 +1467,15 @@
 It is important to be aware that renumbering the categories does not
 change the textual order of the categories in the file.  This is
 significant if you should invoke @kbd{F e} to edit the entire file
-manually and in so doing alter the number of items in a category: this
-will make the item count shown in the table of categories of this file
-inconsistent with the actual number.  You can repair this inconsistency
-by invoking the command @code{todo-repair-categories-sexp} (which lacks
-a key binding, since it is meant to be a rarely needed rescue
-operation).  But this will revert any renumbering of the categories you
-have made, so you will have to renumber them again.  This is the reason
-why you should exercise caution when using @kbd{F e}.
+manually and in so doing alter the number of categories or the number
+of items in a category: this will make the information shown in the
+table of categories of this file inconsistent with its actual state.
+You can repair this inconsistency by invoking the command
address@hidden (which lacks a key binding, since
+it is meant to be a rarely needed rescue operation).  But this will
+revert any renumbering of the categories you have made, so you will
+have to renumber them again.  This is one reason why you should
+exercise caution when using @kbd{F e}.
 @end quotation
 
 @node Searching for Items, Todo Filtered Items Mode, Todo Categories Mode, Top
@@ -1525,7 +1680,8 @@
 
 Aside from explicitly invoking an item filtering command to display a
 saved list of items filtered by a given method from given todo files,
-there are two other ways to visit a saved file of filtered items:
+there are two other ways to visit a saved file of filtered items.  You
+can invoke a command similar to `find-file':
 
 @table @kbd
 @item F f
@@ -1533,15 +1689,13 @@
 completion (@code{todo-find-filtered-items-file}).
 @end table
 
address@hidden @bullet
address@hidden
-As with tables of categories, by customizing @code{todo-show-first} you
-can have the first invocation of @code{todo-show} for a given todo file
-display the corresponding saved file of filtered items.  If there is
-no saved filtered items list for the file, @code{todo-show} simply
-defaults to visiting the file and displaying its first category, as
-usual.
address@hidden itemize
address@hidden
+Alternatively, as with tables of categories, by customizing
address@hidden you can have the first invocation of
address@hidden for a given todo file display the corresponding saved
+file of filtered items.  If there is no saved filtered items list for
+the file, @code{todo-show} simply defaults to visiting the file and
+displaying its first category, as usual.
 
 The command @kbd{F k} (@pxref{File Editing}) is also available in Todo
 Filtered Items mode.  It deletes the current filtered items file.
@@ -1560,20 +1714,23 @@
 @node Faces, Item Prefix, , Todo Display Features
 @section Faces
 
-Each of the Todo modes uses faces to distinguish various aspects of the
-display, both structural and informational.  For example, the faces for
-the date and time strings of todo item headers by default inherit the
-attributes of the corresponding faces used by the Emacs diary; but when
-the date and time of a Todo diary item (i.e., an item lacking
address@hidden) is earlier than the current date and time,
-they are displayed in a different face.  In this way, you can readily
-recognize diary items that have ``expired'' and act accordingly (e.g.,
-by tagging them as done or by updating the deadlines).
+Each of the Todo modes uses faces to distinguish various aspects of
+the display, both structural and informational.  For example, the
+faces for the date and time strings of todo item headers
+(@code{todo-date} and @code{todo-time}, respectively) by default
+inherit the attributes of the corresponding faces used by the Emacs
+diary; but when the date and time of a Todo diary item (i.e., an item
+lacking @code{todo-nondiary-marker}) is earlier than the current date
+and time, they are displayed in a different face
+(@code{todo-diary-expired}).  In this way, you can readily recognize
+diary items that have ``expired'' and act accordingly (e.g., by
+tagging them as done or by updating the deadlines).
 
-Another example of an informational face is the face used to distinguish
-top priority items.  A third case is the face used in Todo Categories
-mode to mark rows of the table containing categories with only archived
-items.
+Another example of an informational face is the face used to
+distinguish top priority items (@code{todo-top-priority}).  A third
+case is the face used in Todo Categories mode to mark rows of the
+table containing categories with only archived items
+(@code{todo-archived-only}).
 
 The @code{todo-faces} customization group contains a complete list of
 Todo mode faces and brief descriptions of their use.
@@ -1607,15 +1764,16 @@
 @itemx N
 Toggle between displaying item numbering and displaying the
 @code{todo-prefix} string in the current Todo file (todo, archive, or
-saved virtual category of filtered items.  This command also works in
+saved virtual category of filtered items).  (This command also works in
 buffers of filtered items that have not yet been written to a file.)
 @end table
 
 In the todo items section of each Todo mode category, the item prefix
-(whether a priority number or a fixed string) of the top priority items
-(determined as specified in @pxref{Filtering Items}) is displayed in a
-different face from the prefix of the other items, so you see at a
-glance how many items in the category are top priorities.
+(whether a priority number or a fixed string) of the top priority
+items (determined as specified in @pxref{Filtering Items}) is
+displayed in a face (@code{todo-top-priority}) different from the face
+of the prefix of non-top-priority items, so you see at a glance how
+many items in the category are top priorities.
 
 @node Other Display Commands and Options, , Item Prefix, Todo Display Features
 @section Other Display Commands and Options
@@ -1635,11 +1793,12 @@
 
 @item F H
 @itemx H
-Highlight the current item if unhighlighted, or remove its highlighting.
-When item highlighting is enabled, it follows navigation by @kbd{n} or
address@hidden  If you want to have current item highlighting by default,
-enable the option @code{todo-highlight-item}.  @kbd{F H} or @kbd{H} will
-still toggle it.
+Highlight the current item (with the face @code{hl-line}) if
+unhighlighted, or remove its highlighting.  When item highlighting is
+enabled, it follows navigation by @kbd{n} or @kbd{p}.  If you want to
+have current item highlighting by default, enable the option
address@hidden  @kbd{F H} or @kbd{H} will still toggle
+it.
 @end table
 
 There are two options which affect the display of items whose content is
@@ -1675,7 +1834,7 @@
 visually separated by a line as wide as the window the buffer is
 displayed in.  You can change the appearance and width of the separator
 by customizing @code{todo-done-separator-string}; you can also change the
-face of the separator string.
+face of the separator string (@code{todo-done-sep}).
 
 There are also several options for changing the appearance in Todo
 Categories mode and Todo Filtered Items mode, beyond those mentioned
@@ -1750,7 +1909,7 @@
 (there is no key binding for it, since it shouldn't be necessary to use
 it often).  (A delicate part of the conversion concerns the customizable
 format of item date/time headers in the old-style; see the documentation
-string of @code{todo-todo-mode-date-time-regexp} for details.)
+string of @code{todo-legacy-date-time-regexp} for details.)
 
 @node GNU Free Documentation License, , Legacy Todo Mode Files, Top
 @appendix GNU Free Documentation License

=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2014-04-30 19:54:52 +0000
+++ b/lib-src/ChangeLog 2014-05-04 19:37:56 +0000
@@ -1,3 +1,8 @@
+2014-05-04  Paul Eggert  <address@hidden>
+
+       Handle systems without WCONTINUED consistently.  (Bug#15110, 17339)
+       * emacsclient.c (WCONTINUED): Move to ../src/syswait.h.
+
 2014-04-30  Glenn Morris  <address@hidden>
 
        * Makefile.in ($(DESTDIR)${archlibdir}):

=== modified file 'lib-src/emacsclient.c'
--- a/lib-src/emacsclient.c     2014-03-10 00:09:30 +0000
+++ b/lib-src/emacsclient.c     2014-05-03 20:13:10 +0000
@@ -65,10 +65,6 @@
 # define CLOSE_SOCKET close
 # define INITIALIZE()
 
-# ifndef WCONTINUED
-#  define WCONTINUED 8
-# endif
-
 #define egetenv(VAR) getenv(VAR)
 
 #endif /* !WINDOWSNT */

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-05-04 00:16:58 +0000
+++ b/lisp/ChangeLog    2014-05-04 19:37:56 +0000
@@ -1,3 +1,97 @@
+2014-05-04  Eli Zaretskii  <address@hidden>
+
+       * mail/rmailsum.el (rmail-new-summary-1): Fix a typo in a comment.
+
+2014-05-04  Stefan Monnier  <address@hidden>
+
+       * vc/ediff-diff.el (ediff-set-fine-diff-properties-in-one-buffer):
+       Use nil rather than `default' for the "default" appearance (bug#17388).
+       * vc/ediff-util.el (ediff-inferior-compare-regions)
+       (ediff-toggle-autorefine, ediff-unselect-difference): Don't use
+       a misleading `default' value when it's really a boolean.
+       * vc/ediff-init.el (ediff-set-overlay-face): Don't set help-echo if the
+       overlay is not visible.
+
+2014-05-04  Stephen Berman  <address@hidden>
+
+       * calendar/todo-mode.el (todo-edit-file): Use display-warning.
+       (todo-menu): Uncomment and update.
+
+2014-05-04  Stephen Berman  <address@hidden>
+
+       * calendar/todo-mode.el: Reimplement item editing to have the same
+       basic user interface as item insertion, and make small UI and
+       larger internal improvements to the latter.
+       (todo-insert-item): Add reference to the Todo mode user manual to
+       the documentation string.
+       (todo-insert-item--basic): Rename from todo-basic-insert-item and
+       adjust all callers.  Change signature to combine diary and
+       nonmarking arguments.  Incorporate functionality of deleted item
+       copying command and add error checking.  Remove detailed
+       descriptions of the arguments from the documentation string, since
+       this is treated in the Todo mode user manual.
+       (todo-copy-item, todo-edit-multiline-item)
+       (todo-edit-done-item-comment, todo-edit-item-header)
+       (todo-edit-item-time, todo-edit-item-date-from-calendar)
+       (todo-edit-item-date-to-today, todo-edit-item-date-day-name)
+       (todo-edit-item-date-year, todo-edit-item-date-month)
+       (todo-edit-item-date-day, todo-edit-item-diary-nonmarking):
+       Remove.
+       (todo-edit-item): Reimplement as wrapper command for
+       todo-edit-item--next-key and make it distinguish done and not done
+       todo items.
+       (todo-edit-item--text): New function, replacing old command
+       todo-edit-item and incorporating deleted commands
+       todo-edit-multiline-item and todo-edit-done-item-comment.
+       (todo-edit-item--header): Rename from todo-basic-edit-item-header.
+       Use only numeric value of prefix argument.  Remove detailed
+       descriptions of the arguments from the documentation string, since
+       this is treated in the Todo mode user manual.
+       (todo-edit-item--diary-inclusion): New function, replacing old
+       command todo-edit-item-diary-inclusion and incorporating and fixing
+       functionality of deleted command todo-edit-item-diary-nonmarking,
+       making sure to remove todo-nondiary-marker when adding
+       diary-nonmarking-symbol.
+       (todo-edit-category-diary-inclusion): Make sure to delete
+       diary-nonmarking-symbol when adding todo-nondiary-marker.
+       (todo-edit-category-diary-nonmarking): Fix indentation.
+       (todo-insert-item--parameters): Group diary and nonmarking
+       parameters together.
+       (todo-insert-item--apply-args): Adjust to signature of
+       todo-insert-item--basic and incorporate copy parameter.
+       Make small code improvements.
+       (todo-insert-item--next-param): Improve prompt and adjust it to
+       new parameter grouping.  Remove obsolete code.
+       (todo-edit-item--param-key-alist)
+       (todo-edit-item--date-param-key-alist)
+       (todo-edit-done-item--param-key-alist): New defconsts.
+       (todo-edit-item--prompt): New variable.
+       (todo-edit-item--next-key): New function.
+       (todo-key-bindings-t): Bind "e" to todo-edit-item.  Remove
+       bindings of deleted commands.
+
+2014-05-04  Leo Liu  <address@hidden>
+
+       * emacs-lisp/cl-macs.el (cl-deftype): Fix indentation.
+
+2014-05-04  Glenn Morris  <address@hidden>
+
+       * allout-widgets.el (allout-widgets-tally)
+       (allout-decorate-item-guides):
+       * menu-bar.el (menu-bar-positive-p):
+       * minibuffer.el (completion-pcm-complete-word-inserts-delimiters):
+       * progmodes/gdb-mi.el (gdbmi-same-start, gdbmi-is-number):
+       * progmodes/js.el (js--inside-param-list-p)
+       (js--inside-dojo-class-list-p, js--forward-destructuring-spec):
+       * progmodes/prolog.el (region-exists-p):
+       * progmodes/verilog-mode.el (verilog-scan-cache-ok-p):
+       * textmodes/reftex-parse.el (reftex-using-biblatex-p):
+       Doc fixes (replace `iff').
+
+2014-05-04  Stefan Monnier  <address@hidden>
+
+       * mpc.el (mpc-volume-mouse-set): Don't burp at the boundaries.
+
 2014-05-04  Leo Liu  <address@hidden>
 
        Support Chinese diary entries in calendar and diary.  (Bug#17393)

=== modified file 'lisp/allout-widgets.el'
--- a/lisp/allout-widgets.el    2014-01-01 07:43:34 +0000
+++ b/lisp/allout-widgets.el    2014-05-01 23:55:25 +0000
@@ -266,7 +266,7 @@
 (defvar allout-widgets-tally nil
   "Hash-table of existing allout widgets, for debugging.
 
-Table is maintained iff `allout-widgets-maintain-tally' is non-nil.
+Table is maintained only if `allout-widgets-maintain-tally' is non-nil.
 
 The table contents will be out of sync if any widgets are created
 or deleted while this variable is nil.")
@@ -1852,7 +1852,7 @@
 
 Optional PARENT-WIDGET is the widget for the item's parent item.
 
-Optional HAS-SUCCESSOR is true iff the item is followed by a sibling.
+Optional HAS-SUCCESSOR is true if the item is followed by a sibling.
 
 We also hide the header-prefix string.
 

=== modified file 'lisp/calendar/todo-mode.el'
--- a/lisp/calendar/todo-mode.el        2014-01-13 22:21:32 +0000
+++ b/lisp/calendar/todo-mode.el        2014-05-02 14:10:11 +0000
@@ -787,7 +787,7 @@
                  (kill-buffer)
                  (keyboard-quit)))))
          (save-excursion (todo-category-select))
-         (when add-item (todo-basic-insert-item)))
+         (when add-item (todo-insert-item--basic)))
        (setq todo-show-first show-first)
        (add-to-list 'todo-visited file)))))
 
@@ -947,7 +947,7 @@
        (todo-category-number category)
        (todo-category-select)
        (goto-char (point-min))
-       (when add-item (todo-basic-insert-item))))))
+       (when add-item (todo-insert-item--basic))))))
 
 (defun todo-next-item (&optional count)
   "Move point down to the beginning of the next item.
@@ -1216,9 +1216,19 @@
   (widen)
   (todo-edit-mode)
   (remove-overlays)
-  (message "%s" (substitute-command-keys
-                (concat "Type \\[todo-edit-quit] to check file format "
-                        "validity and return to Todo mode.\n"))))
+  (display-warning 'todo (format "\
+
+Type %s to return to Todo mode.
+
+This also runs a file format check and signals an error if
+the format has become invalid.  However, this check cannot
+tell if the number of items or categories changed, which
+could result in the file containing inconsistent information.
+You can repair this inconsistency by invoking the command
+`todo-repair-categories-sexp', but this will revert any
+renumbering of the categories you have made, so you will
+have to renumber them again (see `(todo-mode) Reordering
+Categories')." (substitute-command-keys "\\[todo-edit-quit]"))))
 
 (defun todo-add-category (&optional file cat)
   "Add a new category to a todo file.
@@ -1267,7 +1277,7 @@
            (setq todo-category-number num)
            (todo-category-select)
            (when todo-add-item-if-new-category
-             (todo-basic-insert-item)))
+             (todo-insert-item--basic)))
        num))))
 
 (defun todo-rename-category ()
@@ -1752,7 +1762,8 @@
 (defvar todo-insert-item--parameters)
 
 (defun todo-insert-item (&optional arg)
-  "Insert a new todo item into a category.
+  "Choose an item insertion operation and carry it out.
+This inserts a new todo item into a category.
 
 With no prefix argument ARG, add the item to the current
 category; with one prefix argument (`C-u'), prompt for a category
@@ -1766,117 +1777,31 @@
 combined by entering specific keys to produce different insertion
 commands.  After entering each key, a message shows which have
 already been entered and which remain available.  See
-`todo-basic-insert-item' for details of the parameters and their
-effects."
+`(todo-mode) Inserting New Items' for details of the parameters,
+their associated keys and their effects."
   (interactive "P")
   (setq todo-insert-item--keys-so-far "i")
   (todo-insert-item--next-param nil (list arg) todo-insert-item--parameters))
 
-(defun todo-basic-insert-item (&optional arg diary nonmarking date-type time
-                                   region-or-here)
-  "Insert a new todo item into a category.
-This is the function from which the generated Todo mode item
-insertion commands derive.
-
-The generated commands have mnemonic key bindings based on the
-arguments' values and their order in the command's argument list,
-as follows: (1) for DIARY `d', (2) for NONMARKING `k', (3) for
-DATE-TYPE either `c' for calendar or `d' for date or `n' for
-weekday name, (4) for TIME `t', (5) for REGION-OR-HERE either `r'
-for region or `h' for here.  Sequences of these keys are appended
-to the insertion prefix key `i'.  Keys that allow a following
-key (i.e., any but `r' or `h') must be doubled when used finally.
-For example, the command bound to the key sequence `i y h' will
-insert a new item with today's date, marked according to the
-DIARY argument described below, and with priority according to
-the HERE argument; `i y y' does the same except that the priority
-is not given by HERE but by prompting.
-
-In command invocations, ARG is passed as a prefix argument as
-follows.  With no prefix argument, add the item to the current
-category; with one prefix argument (`C-u'), prompt for a category
-from the current todo file; with two prefix arguments (`C-u C-u'),
-first prompt for a todo file, then a category in that file.  If
-a non-existing category is entered, ask whether to add it to the
-todo file; if answered affirmatively, add the category and
-insert the item there.
-
-The remaining arguments are set or left nil by the generated item
-insertion commands; their meanings are described in the follows
-paragraphs.
-
-When argument DIARY is non-nil, this overrides the intent of the
-user option `todo-include-in-diary' for this item: if
-`todo-include-in-diary' is nil, include the item in the Fancy
-Diary display, and if it is non-nil, exclude the item from the
-Fancy Diary display.  When DIARY is nil, `todo-include-in-diary'
-has its intended effect.
-
-When the item is included in the Fancy Diary display and the
-argument NONMARKING is non-nil, this overrides the intent of the
-user option `todo-diary-nonmarking' for this item: if
-`todo-diary-nonmarking' is nil, append `diary-nonmarking-symbol'
-to the item, and if it is non-nil, omit `diary-nonmarking-symbol'.
-
-The argument DATE-TYPE determines the content of the item's
-mandatory date header string and how it is added:
-- If DATE-TYPE is the symbol `calendar', the Calendar pops up and
-  when the user puts the cursor on a date and hits RET, that
-  date, in the format set by `calendar-date-display-form',
-  becomes the date in the header.
-- If DATE-TYPE is a string matching the regexp
-  `todo-date-pattern', that string becomes the date in the
-  header.  This case is for the command
-  `todo-insert-item-from-calendar' which is called from the
-  Calendar.
-- If DATE-TYPE is the symbol `date', the header contains the date
-  in the format set by `calendar-date-display-form', with year,
-  month and day individually prompted for (month with tab
-  completion).
-- If DATE-TYPE is the symbol `dayname' the header contains a
-  weekday name instead of a date, prompted for with tab
-  completion.
-- If DATE-TYPE has any other value (including nil or none) the
-  header contains the current date (in the format set by
-  `calendar-date-display-form').
-
-With non-nil argument TIME prompt for a time string, which must
-match `diary-time-regexp'.  Typing `<return>' at the prompt
-returns the current time, if the user option
-`todo-always-add-time-string' is non-nil, otherwise the empty
-string (i.e., no time string).  If TIME is absent or nil, add or
-omit the current time string according as
-`todo-always-add-time-string' is non-nil or nil, respectively.
-
-The argument REGION-OR-HERE determines the source and location of
-the new item:
-- If the REGION-OR-HERE is the symbol `here', prompt for the text of
-  the new item and, if the command was invoked with point in the todo
-  items section of the current category, give the new item the
-  priority of the item at point, lowering the latter's priority and
-  the priority of the remaining items.  If point is in the done items
-  section of the category, insert the new item as the first todo item
-  in the category.  Likewise, if the command with `here' is invoked
-  outside of the current category, jump to the chosen category and
-  insert the new item as the first item in the category.
-- If REGION-OR-HERE is the symbol `region', use the region of the
-  current buffer as the text of the new item, depending on the
-  value of user option `todo-use-only-highlighted-region': if
-  this is non-nil, then use the region only when it is
-  highlighted; otherwise, use the region regardless of
-  highlighting.  An error is signalled if there is no region in
-  the current buffer.  Prompt for the item's priority in the
-  category (an integer between 1 and one more than the number of
-  items in the category), and insert the item accordingly.
-- If REGION-OR-HERE has any other value (in particular, nil or
-  none), prompt for the text and the item's priority, and insert
-  the item accordingly."
+(defun todo-insert-item--basic (&optional arg diary-type date-type time where)
+  "Function implementing the core of `todo-insert-item'."
   ;; If invoked outside of Todo mode and there is not yet any Todo
   ;; file, initialize one.
   (if (null (funcall todo-files-function))
       (todo-show)
-    (let ((region (eq region-or-here 'region))
-         (here (eq region-or-here 'here)))
+    (let ((copy (eq where 'copy))
+         (region (eq where 'region))
+         (here (eq where 'here))
+         diary-item)
+      (when copy
+       (cond
+        ((not (eq major-mode 'todo-mode))
+         (user-error "You must be in Todo mode to copy a todo item"))
+        ((todo-done-item-p)
+         (user-error "You cannot copy a done item as a new todo item"))
+        ((looking-at "^$")
+         (user-error "Point must be on a todo item to copy it")))
+       (setq diary-item (todo-diary-item-p)))
       (when region
        (let (use-empty-active-region)
          (unless (and todo-use-only-highlighted-region (use-region-p))
@@ -1899,10 +1824,10 @@
                                         todo-default-todo-file))))))
             (cat (car cat+file))
             (file (cdr cat+file))
-            (new-item (if region
-                          (buffer-substring-no-properties
-                           (region-beginning) (region-end))
-                        (read-from-minibuffer "Todo item: ")))
+            (new-item (cond (copy (todo-item-string))
+                            (region (buffer-substring-no-properties
+                                     (region-beginning) (region-end)))
+                            (t (read-from-minibuffer "Todo item: "))))
             (date-string (cond
                           ((eq date-type 'date)
                            (todo-read-date))
@@ -1941,22 +1866,26 @@
        (let ((buffer-read-only nil)
              (called-from-outside (not (and todo-mm (equal cat ocat))))
              done-only item-added)
-         (setq new-item
-               ;; Add date, time and diary marking as required.
-               (concat (if (not (and diary (not todo-include-in-diary)))
-                           todo-nondiary-start
-                         (when (and nonmarking (not todo-diary-nonmarking))
-                           diary-nonmarking-symbol))
-                       date-string (when (and time-string ; Can be empty.
-                                              (not (zerop (length
-                                                           time-string))))
-                                     (concat " " time-string))
-                       (when (not (and diary (not todo-include-in-diary)))
-                         todo-nondiary-end)
-                       " " new-item))
-         ;; Indent newlines inserted by C-q C-j if nonspace char follows.
-         (setq new-item (replace-regexp-in-string "\\(\n\\)[^[:blank:]]"
-                                                  "\n\t" new-item nil nil 1))
+         (unless copy
+           (setq new-item
+                 ;; Add date, time and diary marking as required.
+                 (concat (if (not (and diary-type
+                                       (not todo-include-in-diary)))
+                             todo-nondiary-start
+                           (when (and (eq diary-type 'nonmarking)
+                                      (not todo-diary-nonmarking))
+                             diary-nonmarking-symbol))
+                         date-string (when (and time-string ; Can be empty.
+                                                (not (zerop (length
+                                                             time-string))))
+                                       (concat " " time-string))
+                         (when (not (and diary-type
+                                         (not todo-include-in-diary)))
+                           todo-nondiary-end)
+                         " " new-item))
+           ;; Indent newlines inserted by C-q C-j if nonspace char follows.
+           (setq new-item (replace-regexp-in-string "\\(\n\\)[^[:blank:]]"
+                                                    "\n\t" new-item nil nil 
1)))
          (unwind-protect
              (progn
                ;; Make sure the correct category is selected.  There
@@ -2010,7 +1939,8 @@
            ;; items are displayed in the window.
            (when item-added (recenter)))
          (todo-update-count 'todo 1)
-         (if (or diary todo-include-in-diary) (todo-update-count 'diary 1))
+         (when (or diary-item diary-type todo-include-in-diary)
+           (todo-update-count 'diary 1))
          (todo-update-categories-sexp))))))
 
 (defun todo-set-date-from-calendar ()
@@ -2054,21 +1984,10 @@
   (setq todo-date-from-calendar
        (calendar-date-string (calendar-cursor-to-date t) t t))
   (calendar-exit)
-  (todo-basic-insert-item arg nil nil todo-date-from-calendar))
+  (todo-insert-item--basic arg nil nil todo-date-from-calendar))
 
 (define-key calendar-mode-map "it" 'todo-insert-item-from-calendar)
 
-(defun todo-copy-item ()
-  "Copy item at point and insert the copy as a new item."
-  (interactive)
-  (unless (or (todo-done-item-p) (looking-at "^$"))
-    (let ((copy (todo-item-string))
-         (diary-item (todo-diary-item-p)))
-      (todo-set-item-priority copy (todo-current-category) t)
-      (todo-update-count 'todo 1)
-      (when diary-item (todo-update-count 'diary 1))
-      (todo-update-categories-sexp))))
-
 (defun todo-delete-item ()
   "Delete at least one item in this category.
 If there are marked items, delete all of these; otherwise, delete
@@ -2115,64 +2034,91 @@
            (todo-prefix-overlays)))
       (if ov (delete-overlay ov)))))
 
+(defvar todo-edit-item--param-key-alist)
+(defvar todo-edit-done-item--param-key-alist)
+
 (defun todo-edit-item (&optional arg)
-  "Edit the todo item at point.
-With non-nil prefix argument ARG, include the item's date/time
-header, making it also editable; otherwise, include only the item
-content.
-
-If the item consists of only one logical line, edit it in the
-minibuffer; otherwise, edit it in Todo Edit mode."
+  "Choose an editing operation for the current item and carry it out."
   (interactive "P")
-  (when (todo-item-string)
-    (let* ((opoint (point))
-          (start (todo-item-start))
-          (item-beg (progn
-                      (re-search-forward
-                       (concat todo-date-string-start todo-date-pattern
-                               "\\( " diary-time-regexp "\\)?"
-                               (regexp-quote todo-nondiary-end) "?")
-                       (line-end-position) t)
-                      (1+ (- (point) start))))
-          (header (substring (todo-item-string) 0 item-beg))
-          (item (if arg (todo-item-string)
-                  (substring (todo-item-string) item-beg)))
-          (multiline (> (length (split-string item "\n")) 1))
-          (buffer-read-only nil))
-      (if multiline
-         (todo-edit-multiline-item)
-       (let ((new (concat (if arg "" header)
-                          (read-string "Edit: " (if arg
-                                                    (cons item item-beg)
-                                                  (cons item 0))))))
-         (when arg
-           (while (not (string-match (concat todo-date-string-start
-                                             todo-date-pattern) new))
-             (setq new (read-from-minibuffer
-                        "Item must start with a date: " new))))
-         ;; Ensure lines following hard newlines are indented.
-         (setq new (replace-regexp-in-string "\\(\n\\)[^[:blank:]]"
-                                             "\n\t" new nil nil 1))
-         ;; If user moved point during editing, make sure it moves back.
-         (goto-char opoint)
-         (todo-remove-item)
-         (todo-insert-with-overlays new)
-         (move-to-column item-beg))))))
+  (cond ((todo-done-item-p)
+        (todo-edit-item--next-key todo-edit-done-item--param-key-alist))
+       ((todo-item-string)
+        (todo-edit-item--next-key todo-edit-item--param-key-alist arg))))
 
-(defun todo-edit-multiline-item ()
-  "Edit current todo item in Todo Edit mode.
-Use of newlines invokes `todo-indent' to insure compliance with
-the format of Diary entries."
-  (interactive)
-  (when (todo-item-string)
-    (let ((buf todo-edit-buffer))
-      (set-window-buffer (selected-window)
-                        (set-buffer (make-indirect-buffer (buffer-name) buf)))
-      (narrow-to-region (todo-item-start) (todo-item-end))
-      (todo-edit-mode)
-      (message "%s" (substitute-command-keys
-                    (concat "Type \\[todo-edit-quit] "
-                            "to return to Todo mode.\n"))))))
+(defun todo-edit-item--text (&optional arg)
+  "Function providing the text editing facilities of `todo-edit-item'."
+  (let* ((opoint (point))
+        (start (todo-item-start))
+        (end (save-excursion (todo-item-end)))
+        (item-beg (progn
+                    (re-search-forward
+                     (concat todo-date-string-start todo-date-pattern
+                             "\\( " diary-time-regexp "\\)?"
+                             (regexp-quote todo-nondiary-end) "?")
+                     (line-end-position) t)
+                    (1+ (- (point) start))))
+        (include-header (eq arg 'include-header))
+        (comment-edit (eq arg 'comment-edit))
+        (comment-delete (eq arg 'comment-delete))
+        (header-string (substring (todo-item-string) 0 item-beg))
+        (item (if (or include-header comment-edit comment-delete)
+                  (todo-item-string)
+                (substring (todo-item-string) item-beg)))
+        (multiline (> (length (split-string item "\n")) 1))
+        (comment (save-excursion
+                   (todo-item-start)
+                   (re-search-forward
+                    (concat " \\[" (regexp-quote todo-comment-string)
+                            ": \\([^]]+\\)\\]") end t)))
+        (prompt (if comment "Edit comment: " "Enter a comment: "))
+        (buffer-read-only nil))
+    (cond
+     ((or comment-edit comment-delete)
+      (save-excursion
+       (todo-item-start)
+       (if (re-search-forward (concat " \\[" (regexp-quote todo-comment-string)
+                                      ": \\([^]]+\\)\\]") end t)
+           (if comment-delete
+               (when (todo-y-or-n-p "Delete comment? ")
+                 (delete-region (match-beginning 0) (match-end 0)))
+             (replace-match (read-string prompt (cons (match-string 1) 1))
+                            nil nil nil 1))
+         (if comment-delete
+             (user-error "There is no comment to delete")
+           (insert " [" todo-comment-string ": "
+                   (prog1 (read-string prompt)
+                     ;; If user moved point during editing,
+                     ;; make sure it moves back.
+                     (goto-char opoint)
+                     (todo-item-end))
+                     "]")))))
+     ((or multiline (eq arg 'multiline))
+      (let ((buf todo-edit-buffer))
+       (set-window-buffer (selected-window)
+                          (set-buffer (make-indirect-buffer (buffer-name) 
buf)))
+       (narrow-to-region (todo-item-start) (todo-item-end))
+       (todo-edit-mode)
+       (message "%s" (substitute-command-keys
+                      (concat "Type \\[todo-edit-quit] "
+                              "to return to Todo mode.\n")))))
+     (t
+      (let ((new (concat (if include-header "" header-string)
+                         (read-string "Edit: " (if include-header
+                                                   (cons item item-beg)
+                                                 (cons item 0))))))
+        (when include-header
+          (while (not (string-match (concat todo-date-string-start
+                                            todo-date-pattern) new))
+            (setq new (read-from-minibuffer
+                       "Item must start with a date: " new))))
+        ;; Ensure lines following hard newlines are indented.
+        (setq new (replace-regexp-in-string "\\(\n\\)[^[:blank:]]"
+                                            "\n\t" new nil nil 1))
+        ;; If user moved point during editing, make sure it moves back.
+        (goto-char opoint)
+        (todo-remove-item)
+        (todo-insert-with-overlays new)
+        (move-to-column item-beg))))))
 
 (defun todo-edit-quit ()
   "Return from Todo Edit mode to Todo mode.
@@ -2225,35 +2171,15 @@
        (todo-category-select)
        (goto-char (point-min))))))
 
-(defun todo-basic-edit-item-header (what &optional inc)
-  "Function underlying commands to edit item date/time header.
-
-The argument WHAT (passed by invoking commands) specifies what
-part of the header to edit; possible values are these symbols:
-`date', to edit the year, month, and day of the date string;
-`time', to edit just the time string; `calendar', to select the
-date from the Calendar; `today', to set the date to today's date;
-`dayname', to set the date string to the name of a day or to
-change the day name; and `year', `month' or `day', to edit only
-these respective parts of the date string (`day' is the number of
-the given day of the month, and `month' is either the name of the
-given month or its number, depending on the value of
-`calendar-date-display-form').
-
-The optional argument INC is a positive or negative integer
-\(passed by invoking commands as a numerical prefix argument)
-that in conjunction with the WHAT values `year', `month' or
-`day', increments or decrements the specified date string
-component by the specified number of suitable units, i.e., years,
-months, or days, with automatic adjustment of the other date
-string components as necessary.
-
-If there are marked items, apply the same edit to all of these;
-otherwise, edit just the item at point."
+(defun todo-edit-item--header (what &optional inc)
+  "Function providing header editing facilities of `todo-edit-item'."
   (let* ((cat (todo-current-category))
         (marked (assoc cat todo-categories-with-marks))
         (first t)
         (todo-date-from-calendar t)
+        ;; INC must be an integer, but users could pass it via
+        ;; `todo-edit-item' as e.g. `-' or `C-u'.
+        (inc (prefix-numeric-value inc))
         (buffer-read-only nil)
         ndate ntime year monthname month day
         dayname)       ; Needed by calendar-date-display-form.
@@ -2372,7 +2298,8 @@
                           ((or (string= omonth "*") (string= omonthname "*"))
                            (setq dd (+ dd inc))
                            (if (> dd 31)
-                               (user-error "A month cannot have more than 31 
days")
+                               (user-error
+                                "A month cannot have more than 31 days")
                              (number-to-string dd)))
                           ;; Increment or decrement day by INC,
                           ;; adjusting month and year if necessary
@@ -2414,65 +2341,8 @@
              (todo-forward-item)
            (goto-char (point-max))))))))
 
-(defun todo-edit-item-header ()
-  "Interactively edit at least the date of item's date/time header.
-If user option `todo-always-add-time-string' is non-nil, also
-edit item's time string."
-  (interactive)
-  (todo-basic-edit-item-header 'date)
-  (when todo-always-add-time-string
-    (todo-edit-item-time)))
-
-(defun todo-edit-item-time ()
-  "Interactively edit the time string of item's date/time header."
-  (interactive)
-  (todo-basic-edit-item-header 'time))
-
-(defun todo-edit-item-date-from-calendar ()
-  "Interactively edit item's date using the Calendar."
-  (interactive)
-  (todo-basic-edit-item-header 'calendar))
-
-(defun todo-edit-item-date-to-today ()
-  "Set item's date to today's date."
-  (interactive)
-  (todo-basic-edit-item-header 'today))
-
-(defun todo-edit-item-date-day-name ()
-  "Replace item's date with the name of a day of the week."
-  (interactive)
-  (todo-basic-edit-item-header 'dayname))
-
-(defun todo-edit-item-date-year (&optional inc)
-  "Interactively edit the year of item's date string.
-With prefix argument INC a positive or negative integer,
-increment or decrement the year by INC."
-  (interactive "p")
-  (todo-basic-edit-item-header 'year inc))
-
-(defun todo-edit-item-date-month (&optional inc)
-  "Interactively edit the month of item's date string.
-With prefix argument INC a positive or negative integer,
-increment or decrement the month by INC."
-  (interactive "p")
-  (todo-basic-edit-item-header 'month inc))
-
-(defun todo-edit-item-date-day (&optional inc)
-  "Interactively edit the day of the month of item's date string.
-With prefix argument INC a positive or negative integer,
-increment or decrement the day by INC."
-  (interactive "p")
-  (todo-basic-edit-item-header 'day inc))
-
-(defun todo-edit-item-diary-inclusion ()
-  "Change diary status of one or more todo items in this category.
-That is, insert `todo-nondiary-marker' if the candidate items
-lack this marking; otherwise, remove it.
-
-If there are marked todo items, change the diary status of all
-and only these, otherwise change the diary status of the item at
-point."
-  (interactive)
+(defun todo-edit-item--diary-inclusion (&optional nonmarking)
+  "Function providing diary marking facilities of `todo-edit-item'."
   (let ((buffer-read-only)
        (marked (assoc (todo-current-category)
                       todo-categories-with-marks)))
@@ -2488,17 +2358,30 @@
                     (end (save-excursion
                            (or (todo-time-string-matcher lim)
                                (todo-date-string-matcher lim)))))
-               (if (looking-at (regexp-quote todo-nondiary-start))
-                   (progn
-                     (replace-match "")
-                     (search-forward todo-nondiary-end (1+ end) t)
-                     (replace-match "")
-                     (todo-update-count 'diary 1))
-                 (when end
-                   (insert todo-nondiary-start)
-                   (goto-char (1+ end))
-                   (insert todo-nondiary-end)
-                   (todo-update-count 'diary -1)))))
+               (if nonmarking
+                   (if (looking-at (regexp-quote diary-nonmarking-symbol))
+                       (replace-match "")
+                     (when (looking-at (regexp-quote todo-nondiary-start))
+                       (save-excursion
+                         (replace-match "")
+                         (search-forward todo-nondiary-end (1+ end) t)
+                         (replace-match "")
+                         (todo-update-count 'diary 1)))
+                     (insert diary-nonmarking-symbol))
+                 (if (looking-at (regexp-quote todo-nondiary-start))
+                     (progn
+                       (replace-match "")
+                       (search-forward todo-nondiary-end (1+ end) t)
+                       (replace-match "")
+                       (todo-update-count 'diary 1))
+                   (when end
+                     (when (looking-at (regexp-quote diary-nonmarking-symbol))
+                       (replace-match "")
+                       (setq end (1- end))) ; Since we deleted nonmarking 
symbol.
+                     (insert todo-nondiary-start)
+                     (goto-char (1+ end))
+                     (insert todo-nondiary-end)
+                     (todo-update-count 'diary -1))))))
            (unless marked (throw 'stop nil))
            (todo-forward-item)))))
     (todo-update-categories-sexp)))
@@ -2524,6 +2407,9 @@
                              (todo-date-string-matcher lim)))))
              (if arg
                  (unless (looking-at (regexp-quote todo-nondiary-start))
+                   (when (looking-at (regexp-quote diary-nonmarking-symbol))
+                     (replace-match "")
+                     (setq end (1- end))) ; Since we deleted nonmarking symbol.
                    (insert todo-nondiary-start)
                    (goto-char (1+ end))
                    (insert todo-nondiary-end))
@@ -2538,33 +2424,6 @@
                                    (- todo-count diary-count))))
        (todo-update-categories-sexp)))))
 
-(defun todo-edit-item-diary-nonmarking ()
-  "Change non-marking of one or more diary items in this category.
-That is, insert `diary-nonmarking-symbol' if the candidate items
-lack this marking; otherwise, remove it.
-
-If there are marked todo items, change the non-marking status of
-all and only these, otherwise change the non-marking status of
-the item at point."
-  (interactive)
-  (let ((buffer-read-only)
-       (marked (assoc (todo-current-category)
-                      todo-categories-with-marks)))
-    (catch 'stop
-      (save-excursion
-       (when marked (goto-char (point-min)))
-       (while (not (eobp))
-         (if (todo-done-item-p)
-             (throw 'stop (message "Done items cannot be edited"))
-           (unless (and marked (not (todo-marked-item-p)))
-             (todo-item-start)
-             (unless (looking-at (regexp-quote todo-nondiary-start))
-               (if (looking-at (regexp-quote diary-nonmarking-symbol))
-                   (replace-match "")
-                 (insert diary-nonmarking-symbol))))
-           (unless marked (throw 'stop nil))
-           (todo-forward-item)))))))
-
 (defun todo-edit-category-diary-nonmarking (arg)
   "Add `diary-nonmarking-symbol' to all diary items in this category.
 With prefix ARG, remove `diary-nonmarking-symbol' from all diary
@@ -2574,16 +2433,16 @@
     (goto-char (point-min))
     (let (buffer-read-only)
       (catch 'stop
-      (while (not (eobp))
-       (if (todo-done-item-p)          ; We've gone too far.
-           (throw 'stop nil)
-         (unless (looking-at (regexp-quote todo-nondiary-start))
-           (if arg
-               (when (looking-at (regexp-quote diary-nonmarking-symbol))
-                 (replace-match ""))
-             (unless (looking-at (regexp-quote diary-nonmarking-symbol))
-               (insert diary-nonmarking-symbol))))
-       (todo-forward-item)))))))
+       (while (not (eobp))
+         (if (todo-done-item-p)                ; We've gone too far.
+             (throw 'stop nil)
+           (unless (looking-at (regexp-quote todo-nondiary-start))
+             (if arg
+                 (when (looking-at (regexp-quote diary-nonmarking-symbol))
+                   (replace-match ""))
+               (unless (looking-at (regexp-quote diary-nonmarking-symbol))
+                 (insert diary-nonmarking-symbol))))
+           (todo-forward-item)))))))
 
 (defun todo-set-item-priority (&optional item cat new arg)
   "Prompt for and set ITEM's priority in CATegory.
@@ -2970,32 +2829,6 @@
          ;; When done items are shown, put cursor on first just done item.
          (when opoint (goto-char opoint)))))))
 
-(defun todo-edit-done-item-comment (&optional arg)
-  "Add a comment to this done item or edit an existing comment.
-With prefix ARG delete an existing comment."
-  (interactive "P")
-  (when (todo-done-item-p)
-    (let ((item (todo-item-string))
-         (opoint (point))
-         (end (save-excursion (todo-item-end)))
-         comment buffer-read-only)
-      (save-excursion
-       (todo-item-start)
-       (if (re-search-forward (concat " \\["
-                                      (regexp-quote todo-comment-string)
-                                      ": \\([^]]+\\)\\]") end t)
-           (if arg
-               (when (todo-y-or-n-p "Delete comment? ")
-                 (delete-region (match-beginning 0) (match-end 0)))
-             (setq comment (read-string "Edit comment: "
-                                        (cons (match-string 1) 1)))
-             (replace-match comment nil nil nil 1))
-         (setq comment (read-string "Enter a comment: "))
-         ;; If user moved point during editing, make sure it moves back.
-         (goto-char opoint)
-         (todo-item-end)
-         (insert " [" todo-comment-string ": " comment "]"))))))
-
 (defun todo-item-undone ()
   "Restore at least one done item to this category's todo section.
 Prompt for the new priority.  If there are marked items, undo all
@@ -5451,7 +5284,7 @@
        (forward-line)))))
 
 ;; 
-----------------------------------------------------------------------------
-;;; Utilities for generating item insertion commands and key bindings
+;;; Generating and applying item insertion and editing key sequences
 ;; 
-----------------------------------------------------------------------------
 
 ;; Thanks to Stefan Monnier for suggesting dynamically generating item
@@ -5462,7 +5295,7 @@
 ;; uses dynamic binding.
 
 (defconst todo-insert-item--parameters
-  '((default copy) diary nonmarking (calendar date dayname) time (here region))
+  '((default copy) (diary nonmarking) (calendar date dayname) time (here 
region))
   "List of all item insertion parameters.
 Passed by `todo-insert-item' to `todo-insert-item--next-param' to
 dynamically create item insertion commands.")
@@ -5527,25 +5360,20 @@
                      (list (car (todo-insert-item--argsleft
                                  (todo-insert-item--this-key)
                                  todo-insert-item--argsleft)))))
-        (arglist (unless (= 5 (length args))
-                   (let ((v (make-vector 5 nil)) elt)
+        (arglist (unless (= 4 (length args))
+                   (let ((v (make-vector 4 nil)) elt)
                      (while args
                        (setq elt (pop args))
-                       (cond ((eq elt 'diary)
+                       (cond ((memq elt '(diary nonmarking))
                               (aset v 0 elt))
-                             ((eq elt 'nonmarking)
+                             ((memq elt '(calendar date dayname))
                               (aset v 1 elt))
-                             ((or (eq elt 'calendar)
-                                  (eq elt 'date)
-                                  (eq elt 'dayname))
+                             ((eq elt 'time)
                               (aset v 2 elt))
-                             ((eq elt 'time)
-                              (aset v 3 elt))
-                             ((or (eq elt 'here)
-                                  (eq elt 'region))
-                              (aset v 4 elt))))
+                             ((memq elt '(copy here region))
+                              (aset v 3 elt))))
                      (append v nil)))))
-    (apply #'todo-basic-insert-item (nconc arg arglist))))
+    (apply #'todo-insert-item--basic (nconc arg arglist))))
 
 (defun todo-insert-item--next-param (last args argsleft)
   "Build item insertion command from LAST, ARGS and ARGSLEFT and call it.
@@ -5554,35 +5382,31 @@
   (cl-assert argsleft)
   (let* ((map (make-sparse-keymap))
          (prompt nil)
-         (addprompt (lambda (k name)
-                     (setq prompt (concat prompt
-                                          (format (concat
-                                                   (if (or (eq name 'default)
-                                                           (eq name 'calendar)
-                                                           (eq name 'here))
-                                                       " { " " ")
-                                                   "%s=>%s"
-                                                   (when (or (eq name 'copy)
-                                                             (eq name 'dayname)
-                                                             (eq name 'region))
-                                                     " }"))
-                                                  (propertize k 'face
-                                                              'todo-key-prompt)
-                                                  name))))))
+         (addprompt
+         (lambda (k name)
+           (setq prompt
+                 (concat prompt
+                         (format
+                          (concat
+                           (if (memq name '(default diary calendar here))
+                               " { " " ")
+                           "%s=>%s"
+                           (when (memq name '(copy nonmarking dayname region))
+                             " }"))
+                          (propertize k 'face 'todo-key-prompt)
+                          name))))))
     (setq todo-insert-item--args args)
     (setq todo-insert-item--argsleft argsleft)
     (when last
-      (cond ((eq last 'default)
-            (apply #'todo-basic-insert-item (car todo-insert-item--args))
-            (setq todo-insert-item--argsleft nil))
-           ((eq last 'copy)
-            (todo-copy-item)
-            (setq todo-insert-item--argsleft nil))
-           (t (let ((k (todo-insert-item--keyof last)))
-                (funcall addprompt k 'GO!)
-                (define-key map (todo-insert-item--keyof last)
-                  (lambda () (interactive)
-                    (todo-insert-item--apply-args)))))))
+      (if (memq last '(default copy))
+         (progn
+           (setq todo-insert-item--argsleft nil)
+           (todo-insert-item--apply-args))
+       (let ((k (todo-insert-item--keyof last)))
+         (funcall addprompt k (make-symbol (concat (symbol-name last) ":GO!")))
+         (define-key map (todo-insert-item--keyof last)
+           (lambda () (interactive)
+             (todo-insert-item--apply-args))))))
     (while todo-insert-item--argsleft
       (let ((x (car todo-insert-item--argsleft)))
        (setq todo-insert-item--newargsleft (cdr todo-insert-item--argsleft))
@@ -5594,14 +5418,6 @@
                  (lambda () (interactive)
                    (todo-insert-item--apply-args))
                (lambda () (interactive)
-                 (when (equal "k" (todo-insert-item--this-key))
-                   (unless (string-match "y" todo-insert-item--keys-so-far)
-                     (when (y-or-n-p (concat "`k' only takes effect with `y';"
-                                             " add `y'? "))
-                       (setq todo-insert-item--keys-so-far
-                             (concat todo-insert-item--keys-so-far " y"))
-                       (setq todo-insert-item--args
-                             (nconc todo-insert-item--args (list 'diary))))))
                  (setq todo-insert-item--keys-so-far
                        (concat todo-insert-item--keys-so-far " "
                                (todo-insert-item--this-key)))
@@ -5617,11 +5433,74 @@
                         (todo-insert-item--this-key)
                         todo-insert-item--argsleft)))))))))
       (setq todo-insert-item--argsleft todo-insert-item--newargsleft))
-    (when prompt (message "Enter a key (so far `%s'): %s"
+    (when prompt (message "Press a key (so far `%s'): %s"
                          todo-insert-item--keys-so-far prompt))
     (set-transient-map map)
     (setq todo-insert-item--argsleft argsleft)))
 
+(defconst todo-edit-item--param-key-alist
+  '((edit       . "e")
+    (header     . "h")
+    (multiline  . "m")
+    (diary      . "y")
+    (nonmarking . "k")
+    (date       . "d")
+    (time       . "t"))
+  "Alist of item editing parameters and their keys.")
+
+(defconst todo-edit-item--date-param-key-alist
+  '((full       . "f")
+    (calendar   . "c")
+    (today      . "a")
+    (dayname    . "n")
+    (year       . "y")
+    (month      . "m")
+    (daynum     . "d"))
+  "Alist of item date editing parameters and their keys.")
+
+(defconst todo-edit-done-item--param-key-alist
+  '((add/edit   . "c")
+    (delete     . "d"))
+  "Alist of done item comment editing parameters and their keys.")
+
+(defvar        todo-edit-item--prompt "Press a key (so far `e'): ")
+
+(defun todo-edit-item--next-key (params &optional arg)
+  (let* ((map (make-sparse-keymap))
+        (p->k (mapconcat (lambda (elt)
+                           (format "%s=>%s"
+                                   (propertize (cdr elt) 'face
+                                               'todo-key-prompt)
+                                   (concat (symbol-name (car elt))
+                                           (when (memq (car elt)
+                                                       '(add/edit delete))
+                                             " comment"))))
+                         params " "))
+        (this-key (char-to-string
+                   (read-key (concat todo-edit-item--prompt p->k))))
+        (this-param (car (rassoc this-key params))))
+    (pcase this-param
+      (`edit (todo-edit-item--text))
+      (`header (todo-edit-item--text 'include-header))
+      (`multiline (todo-edit-item--text 'multiline))
+      (`add/edit (todo-edit-item--text 'comment-edit))
+      (`delete (todo-edit-item--text 'comment-delete))
+      (`diary (todo-edit-item--diary-inclusion))
+      (`nonmarking (todo-edit-item--diary-inclusion 'nonmarking))
+      (`date (let ((todo-edit-item--prompt "Press a key (so far `e d'): "))
+              (todo-edit-item--next-key
+               todo-edit-item--date-param-key-alist arg)))
+      (`full (progn (todo-edit-item--header 'date)
+                   (when todo-always-add-time-string
+                     (todo-edit-item--header 'time))))
+      (`calendar (todo-edit-item--header 'calendar))
+      (`today (todo-edit-item--header 'today))
+      (`dayname (todo-edit-item--header 'dayname))
+      (`year (todo-edit-item--header 'year arg))
+      (`month (todo-edit-item--header 'month arg))
+      (`daynum (todo-edit-item--header 'day arg))
+      (`time (todo-edit-item--header 'time)))))
+
 ;; 
-----------------------------------------------------------------------------
 ;;; Todo minibuffer utilities
 ;; 
-----------------------------------------------------------------------------
@@ -6322,19 +6201,7 @@
     ("Fym"          todo-filter-diary-items-multifile)
     ("Fxx"          todo-filter-regexp-items)
     ("Fxm"          todo-filter-regexp-items-multifile)
-    ("ee"           todo-edit-item)
-    ("em"           todo-edit-multiline-item)
-    ("edt"          todo-edit-item-header)
-    ("edc"          todo-edit-item-date-from-calendar)
-    ("eda"          todo-edit-item-date-to-today)
-    ("edn"          todo-edit-item-date-day-name)
-    ("edy"          todo-edit-item-date-year)
-    ("edm"          todo-edit-item-date-month)
-    ("edd"          todo-edit-item-date-day)
-    ("et"           todo-edit-item-time)
-    ("eyy"          todo-edit-item-diary-inclusion)
-    ("eyk"          todo-edit-item-diary-nonmarking)
-    ("ec"           todo-edit-done-item-comment)
+    ("e"            todo-edit-item)
     ("d"            todo-item-done)
     ("i"            todo-insert-item)
     ("k"            todo-delete-item)
@@ -6452,64 +6319,74 @@
     map)
   "Todo Filtered Items mode keymap.")
 
-;; FIXME: Is it worth having a menu and if so, which commands?
-;; (easy-menu-define
-;;   todo-menu todo-mode-map "Todo Menu"
-;;   '("Todo"
-;;     ("Navigation"
-;;      ["Next Item"            todo-forward-item t]
-;;      ["Previous Item"        todo-backward-item t]
-;;      "---"
-;;      ["Next Category"        todo-forward-category t]
-;;      ["Previous Category"    todo-backward-category t]
-;;      ["Jump to Category"     todo-jump-to-category t]
-;;      "---"
-;;      ["Search Todo File"    todo-search t]
-;;      ["Clear Highlighting on Search Matches" todo-category-done t])
-;;     ("Display"
-;;      ["List Current Categories" todo-show-categories-table t]
-;;      ;; ["List Categories Alphabetically" 
todo-display-categories-alphabetically t]
-;;      ["Turn Item Highlighting on/off" todo-toggle-item-highlighting t]
-;;      ["Turn Item Numbering on/off" todo-toggle-prefix-numbers t]
-;;      ["Turn Item Time Stamp on/off" todo-toggle-item-header t]
-;;      ["View/Hide Done Items" todo-toggle-view-done-items t]
-;;      "---"
-;;      ["View Diary Items" todo-filter-diary-items t]
-;;      ["View Top Priority Items" todo-filter-top-priorities t]
-;;      ["View Multifile Top Priority Items" 
todo-filter-top-priorities-multifile t]
-;;      "---"
-;;      ["Print Category"     todo-print-buffer t])
-;;     ("Editing"
-;;      ["Insert New Item"      todo-insert-item t]
-;;      ["Insert Item Here"     todo-insert-item-here t]
-;;      ("More Insertion Commands")
-;;      ["Edit Item"            todo-edit-item t]
-;;      ["Edit Multiline Item"  todo-edit-multiline-item t]
-;;      ["Edit Item Header"     todo-edit-item-header t]
-;;      ["Edit Item Date"       todo-edit-item-date t]
-;;      ["Edit Item Time"       todo-edit-item-time t]
-;;      "---"
-;;      ["Lower Item Priority"  todo-lower-item-priority t]
-;;      ["Raise Item Priority"  todo-raise-item-priority t]
-;;      ["Set Item Priority" todo-set-item-priority t]
-;;      ["Move (Recategorize) Item" todo-move-item t]
-;;      ["Delete Item"          todo-delete-item t]
-;;      ["Undo Done Item" todo-item-undone t]
-;;      ["Mark/Unmark Item for Diary" todo-toggle-item-diary-inclusion t]
-;;      ["Mark/Unmark Items for Diary" todo-edit-item-diary-inclusion t]
-;;      ["Mark & Hide Done Item" todo-item-done t]
-;;      ["Archive Done Items" todo-archive-category-done-items t]
-;;      "---"
-;;      ["Add New Todo File" todo-add-file t]
-;;      ["Add New Category" todo-add-category t]
-;;      ["Delete Current Category" todo-delete-category t]
-;;      ["Rename Current Category" todo-rename-category t]
-;;      "---"
-;;      ["Save Todo File"      todo-save t]
-;;      )
-;;     "---"
-;;     ["Quit"                 todo-quit t]
-;;     ))
+(easy-menu-define
+  todo-menu todo-mode-map "Todo Menu"
+  '("Todo"
+    ("Navigation"
+     ["Next Item"            todo-next-item t]
+     ["Previous Item"        todo-previous-item t]
+     "---"
+     ["Next Category"        todo-forward-category t]
+     ["Previous Category"    todo-backward-category t]
+     ["Jump to Another Category"     todo-jump-to-category t]
+     "---"
+     ["Visit Another Todo File"     todo-show t]
+     ["Visit Archive" todo-find-archive t]
+     ["Visit Filtered Items File" todo-find-filtered-items-file t]
+     )
+    ("Editing"
+     ["Insert New Item"      todo-insert-item t]
+     ["Edit Item"            todo-edit-item t]
+     ["Lower Item Priority"  todo-lower-item-priority t]
+     ["Raise Item Priority"  todo-raise-item-priority t]
+     ["Set Item Priority" todo-set-item-priority t]
+     ["Mark/Unmark Item" todo-toggle-mark-item t]
+     ["Move (Recategorize) Item" todo-move-item t]
+     ["Delete Item"          todo-delete-item t]
+     ["Mark and Bury Done Item" todo-item-done t]
+     ["Undo Done Item" todo-item-undone t]
+     ["Archive Done Item" todo-archive-done-item t]
+     "---"
+     ["Add New Category" todo-add-category t]
+     ["Rename Current Category" todo-rename-category t]
+     ["Delete Current Category" todo-delete-category t]
+     ["Move Current Category" todo-move-category t]
+     ["Merge Current Category" todo-merge-category t]
+     "---"
+     ["Add New Todo File" todo-add-file t]
+     ["Rename Todo File" todo-rename-file t]
+     ["Delete Todo File" todo-delete-file t]
+     ["Edit Todo File" todo-edit-file t]
+     )
+    ("Searching and Item Filtering"
+     ["Search Todo File" todo-search t]
+     ["Clear Match Highlighting" todo-clear-matches t]
+     "---"
+     ["Set Top Priorities in File" todo-set-top-priorities-in-file t]
+     ["Set Top Priorities in Category" todo-set-top-priorities-in-category t]
+     ["Filter Top Priorities" todo-filter-top-priorities t]
+     ["Filter Multifile Top Priorities" todo-filter-top-priorities-multifile t]
+     ["Filter Diary Items" todo-filter-diary-items t]
+     ["Filter Multifile Diary Items" todo-filter-diary-items-multifile t]
+     ["Filter Regexp" todo-filter-regexp-items t]
+     ["Filter Multifile Regexp" todo-filter-regexp-items-multifile t]
+     )
+    ("Display and Printing"
+     ["Show/Hide Done Items" todo-toggle-view-done-items t]
+     ["Show/Hide Done Items Only" todo-toggle-view-done-only t]
+     ["Show/Hide Item Highlighting" todo-toggle-item-highlighting t]
+     ["Show/Hide Item Numbering" todo-toggle-prefix-numbers t]
+     ["Show/Hide Item Header" todo-toggle-item-header t]
+     "---"
+     ["Display Table of Categories" todo-show-categories-table t]
+     "---"
+     ["Print Category" todo-print-buffer t]
+     ["Print Category to File" todo-print-buffer-to-file t]
+     )
+    "---"
+    ["Save Todo File" todo-save t]
+    ["Quit Todo Mode" todo-quit t]
+    ))
 
 ;; 
-----------------------------------------------------------------------------
 ;;; Hook functions and mode definitions

=== modified file 'lisp/cedet/ChangeLog'
--- a/lisp/cedet/ChangeLog      2014-04-02 15:14:50 +0000
+++ b/lisp/cedet/ChangeLog      2014-05-04 19:37:56 +0000
@@ -1,3 +1,11 @@
+2014-05-01  Glenn Morris  <address@hidden>
+
+       * ede.el (ede-project-directories, ede-check-project-directory):
+       * semantic/ia-sb.el (semantic-ia-sb-show-doc):
+       * semantic/tag.el (semantic-tag-in-buffer-p):
+       * semantic/bovine/c.el (semantic-tag-abstract-p):
+       Doc fixes (replace `iff').
+
 2014-04-01  Glenn Morris  <address@hidden>
 
        * ede/emacs.el (ede-emacs-version): Update AC_INIT regexp.  (Bug#17160)

=== modified file 'lisp/cedet/ede.el'
--- a/lisp/cedet/ede.el 2014-03-29 02:59:51 +0000
+++ b/lisp/cedet/ede.el 2014-05-04 19:37:56 +0000
@@ -100,7 +100,7 @@
 If the value is t, EDE may search in any directory.
 
 If the value is a function, EDE calls that function with one
-argument, the directory name; the function should return t iff
+argument, the directory name; the function should return t if
 EDE should look for project files in the directory.
 
 Otherwise, the value should be a list of fully-expanded directory
@@ -704,7 +704,7 @@
   "Check if DIR should be in `ede-project-directories'.
 If it is not, try asking the user if it should be added; if so,
 add it and save `ede-project-directories' via Customize.
-Return nil iff DIR should not be in `ede-project-directories'."
+Return nil if DIR should not be in `ede-project-directories'."
   (setq dir (directory-file-name (expand-file-name dir))) ; strip trailing /
   (or (eq ede-project-directories t)
       (and (functionp ede-project-directories)

=== modified file 'lisp/cedet/semantic/bovine/c.el'
--- a/lisp/cedet/semantic/bovine/c.el   2014-01-10 07:10:37 +0000
+++ b/lisp/cedet/semantic/bovine/c.el   2014-05-01 23:55:25 +0000
@@ -1594,7 +1594,7 @@
   "Return non-nil if TAG is considered abstract.
 PARENT is tag's parent.
 In C, a method is abstract if it is `virtual', which is already
-handled.  A class is abstract iff its destructor is virtual."
+handled.  A class is abstract only if its destructor is virtual."
   (cond
    ((eq (semantic-tag-class tag) 'type)
     (require 'semantic/find)

=== modified file 'lisp/cedet/semantic/ia-sb.el'
--- a/lisp/cedet/semantic/ia-sb.el      2014-01-01 07:43:34 +0000
+++ b/lisp/cedet/semantic/ia-sb.el      2014-05-01 23:55:25 +0000
@@ -1,7 +1,6 @@
 ;;; semantic/ia-sb.el --- Speedbar analysis display interactor
 
-;;; Copyright (C) 2002-2004, 2006, 2008-2014 Free Software Foundation,
-;;; Inc.
+;;; Copyright (C) 2002-2004, 2006, 2008-2014 Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <address@hidden>
 ;; Keywords: syntax
@@ -139,7 +138,7 @@
       )))
 
 (defmethod semantic-ia-sb-show-doc ((context semantic-analyze-context))
-  "Show documentation about CONTEXT iff CONTEXT points at a complete symbol."
+  "Show documentation about CONTEXT if CONTEXT points at a complete symbol."
   (let ((sym (car (reverse (oref context prefix))))
        (doc nil))
     (when (semantic-tag-p sym)

=== modified file 'lisp/cedet/semantic/tag.el'
--- a/lisp/cedet/semantic/tag.el        2014-01-01 07:43:34 +0000
+++ b/lisp/cedet/semantic/tag.el        2014-05-01 23:55:25 +0000
@@ -172,7 +172,7 @@
       (semantic--tag-set-overlay tag (vector start end)))))
 
 (defun semantic-tag-in-buffer-p (tag)
-  "Return the buffer TAG resides in IFF tag is already in a buffer.
+  "Return the buffer TAG resides in, if tag is already in a buffer.
 If a tag is not in a buffer, return nil."
   (let ((o (semantic-tag-overlay tag)))
      ;; TAG is currently linked to a buffer, return it.

=== modified file 'lisp/emacs-lisp/cl-macs.el'
--- a/lisp/emacs-lisp/cl-macs.el        2014-04-23 01:40:35 +0000
+++ b/lisp/emacs-lisp/cl-macs.el        2014-05-04 19:37:56 +0000
@@ -2928,7 +2928,7 @@
 (defmacro cl-deftype (name arglist &rest body)
   "Define NAME as a new data type.
 The type name can then be used in `cl-typecase', `cl-check-type', etc."
-  (declare (debug cl-defmacro) (doc-string 3))
+  (declare (debug cl-defmacro) (doc-string 3) (indent 2))
   `(cl-eval-when (compile load eval)
      (put ',name 'cl-deftype-handler
           (cl-function (lambda (&cl-defs '('*) ,@arglist) ,@body)))))

=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2014-05-02 09:49:11 +0000
+++ b/lisp/gnus/ChangeLog       2014-05-04 19:37:56 +0000
@@ -1,3 +1,7 @@
+2014-05-04  Glenn Morris  <address@hidden>
+
+       * gnus-registry.el (gnus-registry-install-p): Doc fix.
+
 2014-05-02  Katsumi Yamaoka  <address@hidden>
 
        * gnus-art.el (gnus-mime-inline-part): Redisplay a button so as to show

=== modified file 'lisp/gnus/gnus-registry.el'
--- a/lisp/gnus/gnus-registry.el        2014-01-01 07:43:34 +0000
+++ b/lisp/gnus/gnus-registry.el        2014-05-01 23:55:25 +0000
@@ -1125,9 +1125,9 @@
 (add-hook 'gnus-registry-unload-hook 'gnus-registry-unload-hook)
 
 (defun gnus-registry-install-p ()
-  "If the registry is not already enabled, and `gnus-registry-install' is t,
-the registry is enabled.  If `gnus-registry-install' is `ask',
-the user is asked first.  Returns non-nil iff the registry is enabled."
+  "Return non-nil if the registry is enabled (and maybe enable it first).
+If the registry is not already enabled, then if `gnus-registry-install'
+is `ask', ask the user; or if `gnus-registry-install' is non-nil, enable it."
   (interactive)
   (unless gnus-registry-enabled
     (when (if (eq gnus-registry-install 'ask)

=== modified file 'lisp/mail/rmailsum.el'
--- a/lisp/mail/rmailsum.el     2014-03-21 23:09:02 +0000
+++ b/lisp/mail/rmailsum.el     2014-05-04 19:37:56 +0000
@@ -473,8 +473,8 @@
                (widen)
                (goto-char (point-min))
                (while (>= total msgnum)
-                 ;; Go back to the Rmail buffer so
-                 ;; so FUNCTION and rmail-get-summary can see its local vars.
+                 ;; Go back to the Rmail buffer so FUNCTION and
+                 ;; rmail-get-summary can see its local vars.
                  (with-current-buffer main-buffer
                    ;; First test whether to include this message.
                    (if (or (null function)

=== modified file 'lisp/menu-bar.el'
--- a/lisp/menu-bar.el  2014-04-02 07:07:11 +0000
+++ b/lisp/menu-bar.el  2014-05-01 23:55:25 +0000
@@ -922,7 +922,7 @@
       (selected-frame)))
 
 (defun menu-bar-positive-p (val)
-  "Return non-nil iff VAL is a positive number."
+  "Return non-nil if VAL is a positive number."
   (and (numberp val)
        (> val 0)))
 

=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el        2014-04-01 20:48:02 +0000
+++ b/lisp/minibuffer.el        2014-05-04 19:37:56 +0000
@@ -2773,7 +2773,7 @@
 
 (defcustom completion-pcm-complete-word-inserts-delimiters nil
   "Treat the SPC or - inserted by `minibuffer-complete-word' as delimiters.
-Those chars are treated as delimiters iff this variable is non-nil.
+Those chars are treated as delimiters if this variable is non-nil.
 I.e. if non-nil, M-x SPC will just insert a \"-\" in the minibuffer, whereas
 if nil, it will list all possible commands in *Completions* because none of
 the commands start with a \"-\" or a SPC."

=== modified file 'lisp/mpc.el'
--- a/lisp/mpc.el       2014-04-06 13:08:00 +0000
+++ b/lisp/mpc.el       2014-05-01 01:08:08 +0000
@@ -1811,9 +1811,14 @@
                         (char-after (posn-point posn))))
                     '(?◁ ?<))
               (- mpc-volume-step) mpc-volume-step))
-         (newvol (+ (string-to-number (cdr (assq 'volume mpc-status))) diff)))
-    (mpc-proc-cmd (list "setvol" newvol) 'mpc-status-refresh)
-    (message "Set MPD volume to %s%%" newvol)))
+         (curvol (string-to-number (cdr (assq 'volume mpc-status))))
+         (newvol (max 0 (min 100 (+ curvol diff)))))
+    (if (= newvol curvol)
+        (progn
+          (message "MPD volume already at %s%%" newvol)
+          (ding))
+      (mpc-proc-cmd (list "setvol" newvol) 'mpc-status-refresh)
+      (message "Set MPD volume to %s%%" newvol))))
 
 (defun mpc-volume-widget (vol &optional size)
   (unless size (setq size 12.5))

=== modified file 'lisp/progmodes/gdb-mi.el'
--- a/lisp/progmodes/gdb-mi.el  2014-02-10 01:34:22 +0000
+++ b/lisp/progmodes/gdb-mi.el  2014-05-01 23:55:25 +0000
@@ -1979,7 +1979,7 @@
       (string-equal match (substring str offset (+ offset match-length))))))
 
 (defun gdbmi-same-start (str offset match)
-  "Return non-nil iff STR and MATCH are equal up to the end of either strings.
+  "Return non-nil if STR and MATCH are equal up to the end of either strings.
 OFFSET is the position in STR at which the comparison takes place."
   (let* ((str-length (- (length str) offset))
         (match-length (length match))
@@ -1989,7 +1989,7 @@
                    (substring match 0 compare-length)))))
 
 (defun gdbmi-is-number (character)
-  "Return non-nil iff CHARACTER is a numerical character between 0 and 9."
+  "Return non-nil if CHARACTER is a numerical character between 0 and 9."
   (and (>= character ?0)
        (<= character ?9)))
 

=== modified file 'lisp/progmodes/js.el'
--- a/lisp/progmodes/js.el      2014-02-12 06:23:42 +0000
+++ b/lisp/progmodes/js.el      2014-05-01 23:55:25 +0000
@@ -1302,7 +1302,7 @@
     (up-list -1)))
 
 (defun js--inside-param-list-p ()
-  "Return non-nil iff point is in a function parameter list."
+  "Return non-nil if point is in a function parameter list."
   (ignore-errors
     (save-excursion
       (js--up-nearby-list)
@@ -1313,7 +1313,7 @@
                              (looking-at "function"))))))))
 
 (defun js--inside-dojo-class-list-p ()
-  "Return non-nil iff point is in a Dojo multiple-inheritance class block."
+  "Return non-nil if point is in a Dojo multiple-inheritance class block."
   (ignore-errors
     (save-excursion
       (js--up-nearby-list)
@@ -1352,7 +1352,7 @@
 (defun js--forward-destructuring-spec (&optional func)
   "Move forward over a JavaScript destructuring spec.
 If FUNC is supplied, call it with no arguments before every
-variable name in the spec.  Return true iff this was actually a
+variable name in the spec.  Return true if this was actually a
 spec.  FUNC must preserve the match data."
   (pcase (char-after)
     (?\[

=== modified file 'lisp/progmodes/prolog.el'
--- a/lisp/progmodes/prolog.el  2014-01-01 07:43:34 +0000
+++ b/lisp/progmodes/prolog.el  2014-05-01 23:55:25 +0000
@@ -3228,7 +3228,7 @@
 
 (unless (fboundp 'region-exists-p)
   (defun region-exists-p ()
-    "Non-nil iff the mark is set.  Lobotomized version for Emacsen that do not 
provide their own."
+    "Non-nil if the mark is set.  Lobotomized version for Emacsen that do not 
provide their own."
     (mark)))
 
 

=== modified file 'lisp/progmodes/sh-script.el'
--- a/lisp/progmodes/sh-script.el       2014-04-24 02:37:02 +0000
+++ b/lisp/progmodes/sh-script.el       2014-05-04 19:37:56 +0000
@@ -2361,7 +2361,7 @@
 
 ;; I commented this out because nobody calls it -- rms.
 ;;(defun sh-abbrevs (ancestor &rest list)
-;;  "Iff it isn't, define the current shell as abbrev table and fill that.
+;;  "If it isn't, define the current shell as abbrev table and fill that.
 ;;Abbrev table will inherit all abbrevs from ANCESTOR, which is either an 
abbrev
 ;;table or a list of (NAME1 EXPANSION1 ...).  In addition it will define 
abbrevs
 ;;according to the remaining arguments NAMEi EXPANSIONi ...

=== modified file 'lisp/progmodes/verilog-mode.el'
--- a/lisp/progmodes/verilog-mode.el    2014-03-26 03:18:47 +0000
+++ b/lisp/progmodes/verilog-mode.el    2014-05-04 19:37:56 +0000
@@ -3160,7 +3160,7 @@
   (setq verilog-scan-cache-tick nil))
 
 (defun verilog-scan-cache-ok-p ()
-  "Return t iff the scan cache is up to date."
+  "Return t if the scan cache is up to date."
   (or (and verilog-scan-cache-preserving
           (eq verilog-scan-cache-preserving (current-buffer))
           verilog-scan-cache-tick)

=== modified file 'lisp/textmodes/reftex-parse.el'
--- a/lisp/textmodes/reftex-parse.el    2014-04-04 20:16:24 +0000
+++ b/lisp/textmodes/reftex-parse.el    2014-05-04 19:37:56 +0000
@@ -357,7 +357,7 @@
     docstruct))
 
 (defun reftex-using-biblatex-p ()
-  "Return non-nil iff we are using biblatex rather than bibtex."
+  "Return non-nil if we are using biblatex rather than bibtex."
   (if (boundp 'TeX-active-styles)
       ;; the sophisticated AUCTeX way
       (member "biblatex" TeX-active-styles)

=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog        2014-04-01 12:41:56 +0000
+++ b/lisp/url/ChangeLog        2014-05-04 19:37:56 +0000
@@ -1,3 +1,7 @@
+2014-05-04  Glenn Morris  <address@hidden>
+
+       * url-parse.el (url-generic-parse-url): Doc fix (replace `iff').
+
 2014-04-01  Michael Albinus  <address@hidden>
 
        * url-tramp.el: New file.

=== modified file 'lisp/url/url-parse.el'
--- a/lisp/url/url-parse.el     2014-01-01 07:43:34 +0000
+++ b/lisp/url/url-parse.el     2014-05-01 23:55:25 +0000
@@ -125,7 +125,7 @@
 ATTRIBUTES is nil; this slot originally stored the attribute and
          value alists for IMAP URIs, but this feature was removed
          since it conflicts with RFC 3986.
-FULLNESS is non-nil iff the hierarchical sequence component of
+FULLNESS is non-nil if the hierarchical sequence component of
          the URL starts with two slashes, \"//\".
 
 The parser follows RFC 3986, except that it also tries to handle

=== modified file 'lisp/vc/ediff-diff.el'
--- a/lisp/vc/ediff-diff.el     2014-04-14 02:21:12 +0000
+++ b/lisp/vc/ediff-diff.el     2014-05-03 02:27:46 +0000
@@ -818,10 +818,9 @@
                                                     n &optional default)
   (let ((fine-diff-vector  (ediff-get-fine-diff-vector n buf-type))
        (face (if default
-                 'default
+                 nil
                (ediff-get-symbol-from-alist
-                buf-type ediff-fine-diff-face-alist)
-               )))
+                buf-type ediff-fine-diff-face-alist))))
     (mapc (lambda (overl)
            (ediff-set-overlay-face overl face))
          fine-diff-vector)))

=== modified file 'lisp/vc/ediff-init.el'
--- a/lisp/vc/ediff-init.el     2014-04-10 19:15:01 +0000
+++ b/lisp/vc/ediff-init.el     2014-05-03 02:27:46 +0000
@@ -807,7 +807,7 @@
 
 (defun ediff-set-overlay-face (extent face)
   (ediff-overlay-put extent 'face face)
-  (ediff-overlay-put extent 'help-echo 'ediff-region-help-echo))
+  (ediff-overlay-put extent 'help-echo (if face 'ediff-region-help-echo)))
 
 (defun ediff-region-help-echo (extent-or-window &optional overlay _point)
   (unless overlay

=== modified file 'lisp/vc/ediff-util.el'
--- a/lisp/vc/ediff-util.el     2014-04-10 19:15:01 +0000
+++ b/lisp/vc/ediff-util.el     2014-05-03 02:27:46 +0000
@@ -958,7 +958,7 @@
         (message "Auto-refining is OFF")
         (setq ediff-auto-refine 'off))
        (t ;; nix 'em
-        (ediff-set-fine-diff-properties ediff-current-difference 'default)
+        (ediff-set-fine-diff-properties ediff-current-difference t)
         (message "Refinements are HIDDEN")
         (setq ediff-auto-refine 'nix))
        ))
@@ -2973,7 +2973,7 @@
               ))
 
        ;; unhighlight fine diffs
-       (ediff-set-fine-diff-properties ediff-current-difference 'default)
+       (ediff-set-fine-diff-properties ediff-current-difference t)
        (run-hooks 'ediff-unselect-hook))))
 
 
@@ -3492,7 +3492,7 @@
 
     (if (ediff-valid-difference-p ediff-current-difference)
        (progn
-         (ediff-set-fine-diff-properties ediff-current-difference 'default)
+         (ediff-set-fine-diff-properties ediff-current-difference t)
          (ediff-unhighlight-diff)))
     (ediff-paint-background-regions 'unhighlight)
 

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-04-30 19:54:52 +0000
+++ b/src/ChangeLog     2014-05-04 19:37:56 +0000
@@ -1,3 +1,54 @@
+2014-05-04  Paul Eggert  <address@hidden>
+
+       Revert recent libpng changes (Bug#17339).
+       * Makefile.in (PNG_CFLAGS): Remove; all uses removed.
+       * image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>.
+
+2014-05-03  Paul Eggert  <address@hidden>
+
+       Handle systems without WCONTINUED consistently.  (Bug#15110, 17339)
+       * process.c (handle_child_signal): Remove WCONTINUED ifdef,
+       because WCONTINUED is always defined now.
+       * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
+
+2014-05-03  Eli Zaretskii  <address@hidden>
+
+       * buffer.c (overlay_strings): Fix the wording of the commentary.
+
+2014-05-02  Paul Eggert  <address@hidden>
+
+       Consult libpng-config more consistently (Bug#17339).
+       * Makefile.in (PNG_CFLAGS): New var.
+       (ALL_CFLAGS): Use it.
+       * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
+       CFLAGS now handles this.
+
+2014-05-01  Glenn Morris  <address@hidden>
+
+       * floatfns.c (Fisnan):
+       * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
+
+2014-05-01  Eli Zaretskii  <address@hidden>
+
+       * term.c (tty_menu_activate): A better initialization for cursor
+       coordinates.
+
+2014-05-01  Stefan Monnier  <address@hidden>
+
+       * intervals.c: Tighten assertions.
+       (create_root_interval): Make sure the interval is not empty.
+       (intervals_equal): Use booleans.
+       (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
+       (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
+       (balance_possible_root_interval): Simplify and use booleans.
+       (split_interval_right, split_interval_left): Check LENGTH, and remove
+       now redundant assertion.
+       (adjust_intervals_for_insertion): Remove now redundant assertions.
+       (delete_node, interval_deletion_adjustment)
+       (adjust_intervals_for_deletion, merge_interval_right)
+       (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
+       (reproduce_interval): Make sure the interval is not empty.
+
 2014-04-30  Paul Eggert  <address@hidden>
 
        * term.c (tty_menu_activate): Don't assume row and col are initialized.

=== modified file 'src/buffer.c'
--- a/src/buffer.c      2014-04-24 03:59:19 +0000
+++ b/src/buffer.c      2014-05-04 19:37:56 +0000
@@ -3328,17 +3328,18 @@
     }
 }
 
-/* Return the concatenation of the strings associated with overlays that
-   begin or end at POS, ignoring overlays that are specific to a window
-   other than W.  The strings are concatenated in the appropriate order:
-   shorter overlays nest inside longer ones, and higher priority inside
-   lower.  Normally all of the after-strings come first, but zero-sized
-   overlays have their after-strings ride along with the before-strings
-   because it would look strange to print them inside-out.
+/* Concatenate the strings associated with overlays that begin or end
+   at POS, ignoring overlays that are specific to windows other than W.
+   The strings are concatenated in the appropriate order: shorter
+   overlays nest inside longer ones, and higher priority inside lower.
+   Normally all of the after-strings come first, but zero-sized
+   overlays have their after-strings ride along with the
+   before-strings because it would look strange to print them
+   inside-out.
 
-   Returns the string length, and stores the contents indirectly through
-   PSTR, if that variable is non-null.  The string may be overwritten by
-   subsequent calls.  */
+   Returns the concatenated string's length, and return the pointer to
+   that string via PSTR, if that variable is non-NULL.  The storage of
+   the concatenated strings may be overwritten by subsequent calls.  */
 
 ptrdiff_t
 overlay_strings (ptrdiff_t pos, struct window *w, unsigned char **pstr)

=== modified file 'src/floatfns.c'
--- a/src/floatfns.c    2014-03-19 21:09:08 +0000
+++ b/src/floatfns.c    2014-05-01 23:55:25 +0000
@@ -1,7 +1,6 @@
 /* Primitive operations on floating point for GNU Emacs Lisp interpreter.
 
-Copyright (C) 1988, 1993-1994, 1999, 2001-2014 Free Software Foundation,
-Inc.
+Copyright (C) 1988, 1993-1994, 1999, 2001-2014 Free Software Foundation, Inc.
 
 Author: Wolfgang Rupprecht
 (according to ack.texi)
@@ -142,7 +141,7 @@
 }
 
 DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0,
-       doc: /* Return non nil iff argument X is a NaN.  */)
+       doc: /* Return non nil if argument X is a NaN.  */)
   (Lisp_Object x)
 {
   CHECK_FLOAT (x);

=== modified file 'src/intervals.c'
--- a/src/intervals.c   2014-04-19 18:13:26 +0000
+++ b/src/intervals.c   2014-05-01 15:15:46 +0000
@@ -110,13 +110,14 @@
       set_string_intervals (parent, new);
       new->position = 0;
     }
-
+  eassert (LENGTH (new) > 0);
+  
   set_interval_object (new, parent);
 
   return new;
 }
 
-/* Make the interval TARGET have exactly the properties of SOURCE */
+/* Make the interval TARGET have exactly the properties of SOURCE.  */
 
 void
 copy_properties (register INTERVAL source, register INTERVAL target)
@@ -176,10 +177,10 @@
   Lisp_Object i1_cdr, i1_val;
 
   if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1))
-    return 1;
+    return true;
 
   if (DEFAULT_INTERVAL_P (i0) || DEFAULT_INTERVAL_P (i1))
-    return 0;
+    return false;
 
   i0_cdr = i0->plist;
   i1_cdr = i1->plist;
@@ -188,31 +189,31 @@
       i0_sym = XCAR (i0_cdr);
       i0_cdr = XCDR (i0_cdr);
       if (!CONSP (i0_cdr))
-       return 0;
+       return false;
       i1_val = i1->plist;
       while (CONSP (i1_val) && !EQ (XCAR (i1_val), i0_sym))
        {
          i1_val = XCDR (i1_val);
          if (!CONSP (i1_val))
-           return 0;
+           return false;
          i1_val = XCDR (i1_val);
        }
 
       /* i0 has something i1 doesn't.  */
       if (EQ (i1_val, Qnil))
-       return 0;
+       return false;
 
       /* i0 and i1 both have sym, but it has different values in each.  */
       if (!CONSP (i1_val)
          || (i1_val = XCDR (i1_val), !CONSP (i1_val))
          || !EQ (XCAR (i1_val), XCAR (i0_cdr)))
-       return 0;
+       return false;
 
       i0_cdr = XCDR (i0_cdr);
 
       i1_cdr = XCDR (i1_cdr);
       if (!CONSP (i1_cdr))
-       return 0;
+       return false;
       i1_cdr = XCDR (i1_cdr);
     }
 
@@ -339,10 +340,8 @@
   ptrdiff_t old_total = A->total_length;
 
   eassert (old_total > 0);
-  eassert (old_total
-          > TOTAL_LENGTH (B) + TOTAL_LENGTH (A->right));
-  eassert (TOTAL_LENGTH (B)
-          > TOTAL_LENGTH (B->left) + TOTAL_LENGTH (c));
+  eassert (LENGTH (A) > 0);
+  eassert (LENGTH (B) > 0);
 
   /* Deal with any Parent of A;  make it point to B.  */
   if (! ROOT_INTERVAL_P (A))
@@ -366,9 +365,11 @@
   /* A's total length is decreased by the length of B and its left child.  */
   A->total_length -= B->total_length - TOTAL_LENGTH (c);
   eassert (TOTAL_LENGTH (A) > 0);
+  eassert (LENGTH (A) > 0);
 
   /* B must have the same total length of A.  */
   B->total_length = old_total;
+  eassert (LENGTH (B) > 0);
 
   return B;
 }
@@ -390,10 +391,8 @@
   ptrdiff_t old_total = A->total_length;
 
   eassert (old_total > 0);
-  eassert (old_total
-          > TOTAL_LENGTH (B) + TOTAL_LENGTH (A->left));
-  eassert (TOTAL_LENGTH (B)
-          > TOTAL_LENGTH (B->right) + TOTAL_LENGTH (c));
+  eassert (LENGTH (A) > 0);
+  eassert (LENGTH (B) > 0);
 
   /* Deal with any parent of A;  make it point to B.  */
   if (! ROOT_INTERVAL_P (A))
@@ -417,9 +416,11 @@
   /* A's total length is decreased by the length of B and its right child.  */
   A->total_length -= B->total_length - TOTAL_LENGTH (c);
   eassert (TOTAL_LENGTH (A) > 0);
+  eassert (LENGTH (A) > 0);
 
   /* B must have the same total length of A.  */
   B->total_length = old_total;
+  eassert (LENGTH (B) > 0);
 
   return B;
 }
@@ -432,6 +433,9 @@
 {
   register ptrdiff_t old_diff, new_diff;
 
+  eassert (LENGTH (i) > 0);
+  eassert (TOTAL_LENGTH (i) >= LENGTH (i));
+
   while (1)
     {
       old_diff = LEFT_TOTAL_LENGTH (i) - RIGHT_TOTAL_LENGTH (i);
@@ -468,16 +472,16 @@
 balance_possible_root_interval (INTERVAL interval)
 {
   Lisp_Object parent;
-  bool have_parent = 0;
-
-  if (!INTERVAL_HAS_OBJECT (interval) && !INTERVAL_HAS_PARENT (interval))
-    return interval;
+  bool have_parent = false;
 
   if (INTERVAL_HAS_OBJECT (interval))
     {
-      have_parent = 1;
+      have_parent = true;
       GET_INTERVAL_OBJECT (parent, interval);
     }
+  else if (!INTERVAL_HAS_PARENT (interval))
+    return interval;
+
   interval = balance_an_interval (interval);
 
   if (have_parent)
@@ -553,7 +557,7 @@
     {
       set_interval_right (interval, new);
       new->total_length = new_length;
-      eassert (TOTAL_LENGTH (new) >= 0);
+      eassert (LENGTH (new) > 0);
     }
   else
     {
@@ -562,7 +566,6 @@
       set_interval_parent (interval->right, new);
       set_interval_right (interval, new);
       new->total_length = new_length + new->right->total_length;
-      eassert (TOTAL_LENGTH (new) >= 0);
       balance_an_interval (new);
     }
 
@@ -598,7 +601,7 @@
     {
       set_interval_left (interval, new);
       new->total_length = new_length;
-      eassert (TOTAL_LENGTH (new) >= 0);
+      eassert (LENGTH (new) > 0);
     }
   else
     {
@@ -607,7 +610,6 @@
       set_interval_parent (new->left, new);
       set_interval_left (interval, new);
       new->total_length = new_length + new->left->total_length;
-      eassert (TOTAL_LENGTH (new) >= 0);
       balance_an_interval (new);
     }
 
@@ -791,12 +793,12 @@
     {
       if (pos < i->position)
        {
-         /* Move left. */
+         /* Move left.  */
          if (pos >= i->position - TOTAL_LENGTH (i->left))
            {
              i->left->position = i->position - TOTAL_LENGTH (i->left)
                + LEFT_TOTAL_LENGTH (i->left);
-             i = i->left;              /* Move to the left child */
+             i = i->left;              /* Move to the left child.  */
            }
          else if (NULL_PARENT (i))
            error ("Point before start of properties");
@@ -806,12 +808,12 @@
        }
       else if (pos >= INTERVAL_LAST_POS (i))
        {
-         /* Move right. */
+         /* Move right.  */
          if (pos < INTERVAL_LAST_POS (i) + TOTAL_LENGTH (i->right))
            {
              i->right->position = INTERVAL_LAST_POS (i)
                + LEFT_TOTAL_LENGTH (i->right);
-             i = i->right;             /* Move to the right child */
+             i = i->right;             /* Move to the right child.  */
            }
          else if (NULL_PARENT (i))
            error ("Point %"pD"d after end of properties", pos);
@@ -958,7 +960,6 @@
       for (temp = prev ? prev : i; temp; temp = INTERVAL_PARENT_OR_NULL (temp))
        {
          temp->total_length += length;
-         eassert (TOTAL_LENGTH (temp) >= 0);
          temp = balance_possible_root_interval (temp);
        }
 
@@ -1014,7 +1015,6 @@
       for (temp = i; temp; temp = INTERVAL_PARENT_OR_NULL (temp))
        {
          temp->total_length += length;
-         eassert (TOTAL_LENGTH (temp) >= 0);
          temp = balance_possible_root_interval (temp);
        }
     }
@@ -1216,9 +1216,10 @@
       this = this->left;
       this->total_length += migrate_amt;
     }
-  eassert (TOTAL_LENGTH (this) >= 0);
   set_interval_left (this, migrate);
   set_interval_parent (migrate, this);
+  eassert (LENGTH (this) > 0);
+  eassert (LENGTH (i->right) > 0);
 
   return i->right;
 }
@@ -1298,7 +1299,7 @@
                                                         relative_position,
                                                         amount);
       tree->total_length -= subtract;
-      eassert (TOTAL_LENGTH (tree) >= 0);
+      eassert (LENGTH (tree) > 0);
       return subtract;
     }
   /* Right branch.  */
@@ -1313,7 +1314,7 @@
                                               relative_position,
                                               amount);
       tree->total_length -= subtract;
-      eassert (TOTAL_LENGTH (tree) >= 0);
+      eassert (LENGTH (tree) > 0);
       return subtract;
     }
   /* Here -- this node.  */
@@ -1328,7 +1329,7 @@
        amount = my_amount;
 
       tree->total_length -= amount;
-      eassert (TOTAL_LENGTH (tree) >= 0);
+      eassert (LENGTH (tree) >= 0);
       if (LENGTH (tree) == 0)
        delete_interval (tree);
 
@@ -1370,7 +1371,7 @@
   if (ONLY_INTERVAL_P (tree))
     {
       tree->total_length -= length;
-      eassert (TOTAL_LENGTH (tree) >= 0);
+      eassert (LENGTH (tree) > 0);
       return;
     }
 
@@ -1430,12 +1431,12 @@
       while (! NULL_LEFT_CHILD (successor))
        {
          successor->total_length += absorb;
-         eassert (TOTAL_LENGTH (successor) >= 0);
+         eassert (LENGTH (successor) > 0);
          successor = successor->left;
        }
 
       successor->total_length += absorb;
-      eassert (TOTAL_LENGTH (successor) >= 0);
+      eassert (LENGTH (successor) > 0);
       delete_interval (i);
       return successor;
     }
@@ -1457,7 +1458,7 @@
 
       successor = INTERVAL_PARENT (successor);
       successor->total_length -= absorb;
-      eassert (TOTAL_LENGTH (successor) >= 0);
+      eassert (LENGTH (successor) > 0);
     }
 
   /* This must be the rightmost or last interval and cannot
@@ -1486,12 +1487,12 @@
       while (! NULL_RIGHT_CHILD (predecessor))
        {
          predecessor->total_length += absorb;
-         eassert (TOTAL_LENGTH (predecessor) >= 0);
+         eassert (LENGTH (predecessor) > 0);
          predecessor = predecessor->right;
        }
 
       predecessor->total_length += absorb;
-      eassert (TOTAL_LENGTH (predecessor) >= 0);
+      eassert (LENGTH (predecessor) > 0);
       delete_interval (i);
       return predecessor;
     }
@@ -1513,7 +1514,7 @@
 
       predecessor = INTERVAL_PARENT (predecessor);
       predecessor->total_length -= absorb;
-      eassert (TOTAL_LENGTH (predecessor) >= 0);
+      eassert (LENGTH (predecessor) > 0);
     }
 
   /* This must be the leftmost or first interval and cannot
@@ -1528,6 +1529,8 @@
 {
   register INTERVAL target = make_interval ();
 
+  eassert (LENGTH (source) > 0);
+
   target->total_length = source->total_length;
   target->position = source->position;
 
@@ -1538,6 +1541,7 @@
   if (! NULL_RIGHT_CHILD (source))
     set_interval_right (target, reproduce_tree (source->right, target));
 
+  eassert (LENGTH (target) > 0);
   return target;
 }
 
@@ -1766,7 +1770,7 @@
 
   if (! NILP (fallback))
     return fallback;
-  /* Check for alternative properties */
+  /* Check for alternative properties.  */
   tail = Fassq (prop, Vchar_property_alias_alist);
   if (! NILP (tail))
     {
@@ -2434,7 +2438,7 @@
                                 end, end_byte);
     }
 
-  /* Rounding to char boundaries can theoretically ake this interval
+  /* Rounding to char boundaries can theoretically make this interval
      spurious.  If so, delete one child, and copy its property list
      to this interval.  */
   if (LEFT_TOTAL_LENGTH (i) + RIGHT_TOTAL_LENGTH (i) >= TOTAL_LENGTH (i))

=== modified file 'src/process.c'
--- a/src/process.c     2014-04-30 19:54:52 +0000
+++ b/src/process.c     2014-05-04 19:37:56 +0000
@@ -6226,11 +6226,7 @@
       int status;
 
       if (p->alive
-#ifndef WCONTINUED
-          && child_status_changed (p->pid, &status, WUNTRACED))
-#else
-          && child_status_changed (p->pid, &status, WUNTRACED | WCONTINUED))
-#endif
+         && child_status_changed (p->pid, &status, WUNTRACED | WCONTINUED))
        {
          /* Change the status of the process that was found.  */
          p->tick = ++process_tick;

=== modified file 'src/profiler.c'
--- a/src/profiler.c    2014-04-05 19:30:36 +0000
+++ b/src/profiler.c    2014-05-04 19:37:56 +0000
@@ -384,7 +384,7 @@
 DEFUN ("profiler-cpu-running-p",
        Fprofiler_cpu_running_p, Sprofiler_cpu_running_p,
        0, 0, 0,
-       doc: /* Return non-nil iff cpu profiler is running.  */)
+       doc: /* Return non-nil if cpu profiler is running.  */)
   (void)
 {
   return profiler_cpu_running ? Qt : Qnil;

=== modified file 'src/syswait.h'
--- a/src/syswait.h     2014-01-16 06:24:06 +0000
+++ b/src/syswait.h     2014-05-03 20:13:10 +0000
@@ -29,6 +29,10 @@
 #include <sys/wait.h>
 #endif  /* !HAVE_SYS_WAIT_H */
 
+#ifndef WCONTINUED
+#define WCONTINUED 8
+#endif
+
 #ifndef WCOREDUMP              /* not POSIX */
 #define WCOREDUMP(status) ((status) & 0x80)
 #endif

=== modified file 'src/term.c'
--- a/src/term.c        2014-04-30 19:54:52 +0000
+++ b/src/term.c        2014-05-04 19:37:56 +0000
@@ -3267,7 +3267,10 @@
 
   /* Turn off the cursor.  Otherwise it shows through the menu
      panes, which is ugly.  */
+  col = cursorX (tty);
+  row = cursorY (tty);
   tty_hide_cursor (tty);
+
   if (buffers_num_deleted)
     menu->text[0][7] = ' ';
   onepane = menu->count == 1 && menu->submenu[0];
@@ -3405,8 +3408,6 @@
          col = cursorX (tty);
          row = cursorY (tty);
        }
-      else
-       row = -1;
 
       /* Display the help-echo message for the currently-selected menu
         item.  */
@@ -3418,8 +3419,7 @@
          /* Move the cursor to the beginning of the current menu
             item, so that screen readers and other accessibility aids
             know where the active region is.  */
-         if (0 <= row)
-           cursor_to (sf, row, col);
+         cursor_to (sf, row, col);
          tty_hide_cursor (tty);
          fflush (tty->output);
          prev_menu_help_message = menu_help_message;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]