diff options
| author | Paul Eggert | 2014-05-04 12:37:56 -0700 |
|---|---|---|
| committer | Paul Eggert | 2014-05-04 12:37:56 -0700 |
| commit | 3e9fa60a5c99568817a12a1011b0e61cce5d3a67 (patch) | |
| tree | 831a801351db662f324d0709bf1fee718eda63e9 | |
| parent | bbdcf64f499636ba9567e8fed8f209e06380352c (diff) | |
| parent | 61febcb6e32860575316b8a539a2e9f13f70e3c2 (diff) | |
| download | emacs-3e9fa60a5c99568817a12a1011b0e61cce5d3a67.tar.gz emacs-3e9fa60a5c99568817a12a1011b0e61cce5d3a67.zip | |
Merge from emacs-24; up to 2014-05-04T21:18:30Z!eggert@cs.ucla.edu
46 files changed, 1245 insertions, 980 deletions
| @@ -1,3 +1,15 @@ | |||
| 1 | 2014-05-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Require ImageMagick >= 6.3.5, due to PixelSetMagickColor (Bug#17339). | ||
| 4 | * configure.ac (IMAGEMAGICK_MODULE): Bump prereq from 6.2.8 to 6.3.5. | ||
| 5 | A more-complicated fix would be to remove uses of PixelSetMagickColor, | ||
| 6 | introduced in ImageMagick 6.3.5 (Sept. 2007). | ||
| 7 | |||
| 8 | 2014-05-04 Glenn Morris <rgm@gnu.org> | ||
| 9 | |||
| 10 | * configure.ac (LIBPNG): Consult libpng-config for the precise | ||
| 11 | form of "-lpng" to use. (Bug#17339) | ||
| 12 | |||
| 1 | 2014-05-03 Glenn Morris <rgm@gnu.org> | 13 | 2014-05-03 Glenn Morris <rgm@gnu.org> |
| 2 | 14 | ||
| 3 | * autogen.sh: If all else fails, try using pkg-config to find pkg.m4. | 15 | * autogen.sh: If all else fails, try using pkg-config to find pkg.m4. |
diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index 50183f75561..a2e8a9e7da3 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt | |||
| @@ -5,6 +5,11 @@ Instructions to create pretest or release tarballs. -*- coding: utf-8 -*- | |||
| 5 | 5 | ||
| 6 | Steps to take before starting on the first pretest in any release sequence: | 6 | Steps to take before starting on the first pretest in any release sequence: |
| 7 | 7 | ||
| 8 | 0. The release branch (e.g. emacs-24) should already have been made | ||
| 9 | and you should use it for all that follows. Diffs from this | ||
| 10 | branch should be going to the emacs-diffs mailing list (see | ||
| 11 | admin/notes/bzr section on bzr-email plugin). | ||
| 12 | |||
| 8 | 1. Decide on versions of automake and autoconf, and ensure you will | 13 | 1. Decide on versions of automake and autoconf, and ensure you will |
| 9 | have them available for the duration of the release process. | 14 | have them available for the duration of the release process. |
| 10 | 15 | ||
| @@ -14,17 +19,15 @@ Steps to take before starting on the first pretest in any release sequence: | |||
| 14 | when preparing the first pretest for a major Emacs release.) | 19 | when preparing the first pretest for a major Emacs release.) |
| 15 | Commit cus-edit.el if changed. | 20 | Commit cus-edit.el if changed. |
| 16 | 21 | ||
| 22 | 3. Remove any old pretests from ftp://alpha.gnu.org/gnu/emacs/pretest. | ||
| 23 | You can use `gnupload --delete' (see below for more gnupload details). | ||
| 17 | 24 | ||
| 18 | General steps (for each step, check for possible errors): | 25 | General steps (for each step, check for possible errors): |
| 19 | 26 | ||
| 20 | 1. `bzr update' (for a bound branch), or `bzr pull'. | 27 | 1. `bzr update' (for a bound branch), or `bzr pull'. |
| 21 | bzr status # check for locally modified files | 28 | bzr status # check for locally modified files |
| 22 | 29 | ||
| 23 | 2. Bootstrap to make 100% sure all elc files are up-to-date, and to | 30 | 2. Regenerate the etc/AUTHORS file: |
| 24 | make sure that the later tagged version will bootstrap, should it be | ||
| 25 | necessary to check it out. | ||
| 26 | |||
| 27 | 3. Regenerate the etc/AUTHORS file: | ||
| 28 | M-: (require 'authors) RET | 31 | M-: (require 'authors) RET |
| 29 | M-x authors RET | 32 | M-x authors RET |
| 30 | 33 | ||
| @@ -39,7 +42,7 @@ General steps (for each step, check for possible errors): | |||
| 39 | authors-ambiguous-files or authors-aliases, and repeat. | 42 | authors-ambiguous-files or authors-aliases, and repeat. |
| 40 | Commit any fixes to ChangeLogs or authors.el. | 43 | Commit any fixes to ChangeLogs or authors.el. |
| 41 | 44 | ||
| 42 | 4. Set the version number (M-x load-file RET admin/admin.el RET, then | 45 | 3. Set the version number (M-x load-file RET admin/admin.el RET, then |
| 43 | M-x set-version RET). For a release, add released ChangeLog | 46 | M-x set-version RET). For a release, add released ChangeLog |
| 44 | entries (M-x add-release-logs RET). | 47 | entries (M-x add-release-logs RET). |
| 45 | 48 | ||
| @@ -54,31 +57,37 @@ General steps (for each step, check for possible errors): | |||
| 54 | emacs-XX.Y-rc1.tar. If all goes well in the following week, you | 57 | emacs-XX.Y-rc1.tar. If all goes well in the following week, you |
| 55 | can simply rename the file and use it for the actual release. | 58 | can simply rename the file and use it for the actual release. |
| 56 | 59 | ||
| 57 | 5. autoreconf -i -I m4 --force | 60 | 4. autoreconf -i -I m4 --force |
| 58 | make bootstrap | 61 | make bootstrap |
| 59 | 62 | ||
| 60 | make -C etc/refcards | 63 | make -C etc/refcards |
| 61 | make -C etc/refcards clean | 64 | make -C etc/refcards clean |
| 62 | 65 | ||
| 63 | 6. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. | 66 | 5. Copy lisp/loaddefs.el to lisp/ldefs-boot.el. |
| 64 | 67 | ||
| 65 | Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed | 68 | Commit etc/AUTHORS, lisp/ldefs-boot.el, and the files changed |
| 66 | by M-x set-version. | 69 | by M-x set-version. Use a commit log message that bzrmerge.el |
| 70 | will ignore (eg "Bump version..."). | ||
| 67 | For a release, also commit the ChangeLog files in all directories. | 71 | For a release, also commit the ChangeLog files in all directories. |
| 68 | 72 | ||
| 69 | 7. ./make-dist --snapshot --no-compress | 73 | If someone else made a commit between step 1 and now, |
| 74 | you need to repeat from step 4 onwards. (You can commit the files | ||
| 75 | from step 2 and 3 earlier to reduce the chance of this.) | ||
| 76 | |||
| 77 | 6. ./make-dist --snapshot --no-compress | ||
| 70 | 78 | ||
| 71 | Check the contents of the new tar with | 79 | Check the contents of the new tar with admin/diff-tar-files |
| 72 | admin/diff-tar-files against an older tar file. Some old pretest | 80 | against the previous release (if this is the first pretest) or the |
| 73 | tarballs may be found at <ftp://alpha.gnu.org/gnu/emacs/pretest>; | 81 | previous pretest. If you did not make the previous pretest |
| 74 | old release tarballs are at <ftp://ftp.gnu.org/pub/gnu/emacs/>. | 82 | yourself, find it at <ftp://alpha.gnu.org/gnu/emacs/pretest>. |
| 83 | Releases are of course at <ftp://ftp.gnu.org/pub/gnu/emacs/>. | ||
| 75 | 84 | ||
| 76 | If this is the first pretest of a major release, just comparing | 85 | If this is the first pretest of a major release, just comparing |
| 77 | with the previous release may overlook many new files. You can try | 86 | with the previous release may overlook many new files. You can try |
| 78 | something like `find . | sort' in a clean bzr tree, and compare the | 87 | something like `find . | sort' in a clean bzr tree, and compare the |
| 79 | results against the new tar contents. | 88 | results against the new tar contents. |
| 80 | 89 | ||
| 81 | 8. tar -xf emacs-NEW.tar; cd emacs-NEW | 90 | 7. tar -xf emacs-NEW.tar; cd emacs-NEW |
| 82 | ./configure --prefix=/tmp/emacs && make && make install | 91 | ./configure --prefix=/tmp/emacs && make && make install |
| 83 | Use `script' or M-x compile to save the compilation log in | 92 | Use `script' or M-x compile to save the compilation log in |
| 84 | compile-NEW.log and compare it against an old one. The easiest way | 93 | compile-NEW.log and compare it against an old one. The easiest way |
| @@ -87,25 +96,21 @@ General steps (for each step, check for possible errors): | |||
| 87 | M-x ediff. Especially check that Info files aren't built, and that | 96 | M-x ediff. Especially check that Info files aren't built, and that |
| 88 | no autotools (autoconf etc) run. | 97 | no autotools (autoconf etc) run. |
| 89 | 98 | ||
| 90 | 9. cd EMACS_ROOT_DIR && bzr tag TAG | 99 | 8. cd EMACS_ROOT_DIR && bzr tag TAG |
| 91 | TAG is emacs-XX.Y.ZZ for a pretest, emacs-XX.Y for a release. | 100 | TAG is emacs-XX.Y.ZZ for a pretest, emacs-XX.Y for a release. |
| 92 | 101 | ||
| 93 | Shortly before the release, cut the version branch also, and open | 102 | 9. Decide what compression schemes to offer. |
| 94 | a Savannah support request asking for commits to the new branch to | ||
| 95 | be sent to the emacs-diffs mailing list (by default, the list | ||
| 96 | normally only gets commits to the trunk). | ||
| 97 | |||
| 98 | 10. Decide what compression schemes to offer. | ||
| 99 | For a release, at least gz and xz: | 103 | For a release, at least gz and xz: |
| 100 | gzip --best -c emacs-NEW.tar > emacs-NEW.tar.gz | 104 | gzip --best -c emacs-NEW.tar > emacs-NEW.tar.gz |
| 101 | xz -c emacs-NEW.tar > emacs-NEW.tar.xz | 105 | xz -c emacs-NEW.tar > emacs-NEW.tar.xz |
| 106 | For pretests, just xz is probably fine (saves bandwidth). | ||
| 102 | 107 | ||
| 103 | Now you should upload the files to the GNU ftp server. In order to | 108 | Now you should upload the files to the GNU ftp server. In order to |
| 104 | do that, you must be registered as an Emacs maintainer and have your | 109 | do that, you must be registered as an Emacs maintainer and have your |
| 105 | GPG key acknowledged by the ftp people. For instructions, see | 110 | GPG key acknowledged by the ftp people. For instructions, see |
| 106 | http://www.gnu.org/prep/maintain/html_node/Automated-Upload-Registration.html | 111 | http://www.gnu.org/prep/maintain/html_node/Automated-Upload-Registration.html |
| 107 | The simplest method is to use the gnulib <http://www.gnu.org/s/gnulib/> | 112 | The simplest method to upload is to use the gnulib |
| 108 | script "build-aux/gnupload" to upload each FILE, like this: | 113 | <http://www.gnu.org/s/gnulib/> script "build-aux/gnupload": |
| 109 | 114 | ||
| 110 | For a pretest: | 115 | For a pretest: |
| 111 | gnupload [--user your@gpg.key.email] --to alpha.gnu.org:emacs/pretest \ | 116 | gnupload [--user your@gpg.key.email] --to alpha.gnu.org:emacs/pretest \ |
| @@ -136,19 +141,21 @@ General steps (for each step, check for possible errors): | |||
| 136 | For a pretest, place the files in /incoming/alpha instead, so that | 141 | For a pretest, place the files in /incoming/alpha instead, so that |
| 137 | they appear on ftp://alpha.gnu.org/. | 142 | they appear on ftp://alpha.gnu.org/. |
| 138 | 143 | ||
| 139 | 11. After five minutes, verify that the files are visible at | 144 | 10. After five minutes, verify that the files are visible at |
| 140 | ftp://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, or | 145 | ftp://alpha.gnu.org/gnu/emacs/pretest/ for a pretest, or |
| 141 | ftp://ftp.gnu.org/gnu/emacs/ for a release. | 146 | ftp://ftp.gnu.org/gnu/emacs/ for a release. |
| 142 | 147 | ||
| 143 | Download them and check the signatures. Check they build. | 148 | Download them and check the signatures. Check they build. |
| 144 | 149 | ||
| 145 | 12. For a pretest, announce it on emacs-devel and info-gnu-emacs@gnu.org. | 150 | 11. Send an announcement to: emacs-devel, and bcc: info-gnu-emacs@gnu.org. |
| 146 | Probably should also include the platform-testers list: | 151 | For a pretest, also bcc: platform-testers@gnu.org. |
| 147 | https://lists.gnu.org/mailman/listinfo/platform-testers | 152 | (The reason for using bcc: is to make it less likely that people |
| 148 | For a release, also announce it on info-gnu@gnu.org. (Probably | 153 | will followup on the wrong list.) |
| 149 | bcc the info- addresses to make it less likely that people will | 154 | See the info-gnu-emacs mailing list archives for the form |
| 150 | followup on those lists.) | 155 | of past announcements. The first pretest announcement, and the |
| 151 | 156 | release announcement, should have more detail. | |
| 152 | 13. For a release, update the Emacs homepage in the web repository. | 157 | |
| 153 | Also add the new NEWS file as NEWS.xx.y. | 158 | 12. For a release, update the Emacs homepage in the web repository. |
| 154 | Maybe regenerate the html manuals, update the FAQ, etc, etc. | 159 | Also update history.html, and add the new NEWS file as NEWS.xx.y. |
| 160 | Regenerate the html manuals (use make-manuals from admin.el). | ||
| 161 | If there are new manuals, add appropriate index pages. | ||
diff --git a/configure.ac b/configure.ac index 7545e14e15d..47bb458a767 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -2175,11 +2175,9 @@ fi | |||
| 2175 | HAVE_IMAGEMAGICK=no | 2175 | HAVE_IMAGEMAGICK=no |
| 2176 | if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then | 2176 | if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then |
| 2177 | if test "${with_imagemagick}" != "no"; then | 2177 | if test "${with_imagemagick}" != "no"; then |
| 2178 | ## 6.2.8 is the earliest version known to work, but earlier versions | 2178 | ## 6.3.5 is the earliest version known to work; see Bug#17339. |
| 2179 | ## might work - let us know if you find one. | ||
| 2180 | ## 6.0.7 does not work. See bug#7955. | ||
| 2181 | ## 6.8.2 makes Emacs crash; see Bug#13867. | 2179 | ## 6.8.2 makes Emacs crash; see Bug#13867. |
| 2182 | IMAGEMAGICK_MODULE="Wand >= 6.2.8 Wand != 6.8.2" | 2180 | IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2" |
| 2183 | EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE]) | 2181 | EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE]) |
| 2184 | AC_SUBST(IMAGEMAGICK_CFLAGS) | 2182 | AC_SUBST(IMAGEMAGICK_CFLAGS) |
| 2185 | AC_SUBST(IMAGEMAGICK_LIBS) | 2183 | AC_SUBST(IMAGEMAGICK_LIBS) |
| @@ -3051,8 +3049,15 @@ elif test "${HAVE_X11}" = "yes" || test "${HAVE_W32}" = "yes"; then | |||
| 3051 | fi | 3049 | fi |
| 3052 | 3050 | ||
| 3053 | if test "${HAVE_PNG}" = "yes"; then | 3051 | if test "${HAVE_PNG}" = "yes"; then |
| 3054 | AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library (-lpng).]) | 3052 | AC_DEFINE(HAVE_PNG, 1, [Define to 1 if you have the png library.]) |
| 3055 | LIBPNG="-lpng -lz -lm" | 3053 | |
| 3054 | dnl Some systems, eg NetBSD 6, only provide eg "libpng16", not "libpng". | ||
| 3055 | lpng=`libpng-config --libs 2> /dev/null` | ||
| 3056 | case $lpng in | ||
| 3057 | -l*) : ;; | ||
| 3058 | *) lpng="-lpng" ;; | ||
| 3059 | esac | ||
| 3060 | LIBPNG="$lpng -lz -lm" | ||
| 3056 | 3061 | ||
| 3057 | AC_CHECK_DECL(png_longjmp, | 3062 | AC_CHECK_DECL(png_longjmp, |
| 3058 | [], | 3063 | [], |
| @@ -4908,7 +4913,7 @@ echo " Does Emacs use -lXpm? ${HAVE_XPM}" | |||
| 4908 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" | 4913 | echo " Does Emacs use -ljpeg? ${HAVE_JPEG}" |
| 4909 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" | 4914 | echo " Does Emacs use -ltiff? ${HAVE_TIFF}" |
| 4910 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" | 4915 | echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" |
| 4911 | echo " Does Emacs use -lpng? ${HAVE_PNG}" | 4916 | echo " Does Emacs use a png library? ${HAVE_PNG} $LIBPNG" |
| 4912 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" | 4917 | echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" |
| 4913 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" | 4918 | echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" |
| 4914 | 4919 | ||
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 46eee3c31a9..7bcd720203f 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2014-05-04 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * trouble.texi (Lossage, DEL Does Not Delete, Stuck Recursive) | ||
| 4 | (Screen Garbled, Text Garbled, After a Crash, Emergency Escape) | ||
| 5 | (Bug Criteria, Understanding Bug Reporting, Checklist, Service): | ||
| 6 | Improve indexing. | ||
| 7 | |||
| 1 | 2014-05-04 Leo Liu <sdl.web@gmail.com> | 8 | 2014-05-04 Leo Liu <sdl.web@gmail.com> |
| 2 | 9 | ||
| 3 | * cal-xtra.texi (Non-Gregorian Diary): Document new features for | 10 | * cal-xtra.texi (Non-Gregorian Diary): Document new features for |
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index bf7c6175dcb..f0cbbcc5721 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi | |||
| @@ -135,6 +135,7 @@ facility. | |||
| 135 | 135 | ||
| 136 | @node Lossage | 136 | @node Lossage |
| 137 | @section Dealing with Emacs Trouble | 137 | @section Dealing with Emacs Trouble |
| 138 | @cindex troubleshooting Emacs | ||
| 138 | 139 | ||
| 139 | This section describes how to recognize and deal with situations in | 140 | This section describes how to recognize and deal with situations in |
| 140 | which Emacs does not work as you expect, such as keyboard code mixups, | 141 | which Emacs does not work as you expect, such as keyboard code mixups, |
| @@ -158,6 +159,7 @@ Emacs. | |||
| 158 | @subsection If @key{DEL} Fails to Delete | 159 | @subsection If @key{DEL} Fails to Delete |
| 159 | @cindex @key{DEL} vs @key{BACKSPACE} | 160 | @cindex @key{DEL} vs @key{BACKSPACE} |
| 160 | @cindex @key{BACKSPACE} vs @key{DEL} | 161 | @cindex @key{BACKSPACE} vs @key{DEL} |
| 162 | @cindex @key{DEL} does not delete | ||
| 161 | 163 | ||
| 162 | Every keyboard has a large key, usually labeled @key{BACKSPACE}, | 164 | Every keyboard has a large key, usually labeled @key{BACKSPACE}, |
| 163 | which is ordinarily used to erase the last character that you typed. | 165 | which is ordinarily used to erase the last character that you typed. |
| @@ -212,6 +214,8 @@ Customization}. | |||
| 212 | 214 | ||
| 213 | @node Stuck Recursive | 215 | @node Stuck Recursive |
| 214 | @subsection Recursive Editing Levels | 216 | @subsection Recursive Editing Levels |
| 217 | @cindex stuck in recursive editing | ||
| 218 | @cindex recursive editing, cannot exit | ||
| 215 | 219 | ||
| 216 | Recursive editing levels are important and useful features of Emacs, but | 220 | Recursive editing levels are important and useful features of Emacs, but |
| 217 | they can seem like malfunctions if you do not understand them. | 221 | they can seem like malfunctions if you do not understand them. |
| @@ -225,6 +229,9 @@ top-level}. @xref{Recursive Edit}. | |||
| 225 | 229 | ||
| 226 | @node Screen Garbled | 230 | @node Screen Garbled |
| 227 | @subsection Garbage on the Screen | 231 | @subsection Garbage on the Screen |
| 232 | @cindex garbled display | ||
| 233 | @cindex display, incorrect | ||
| 234 | @cindex screen display, wrong | ||
| 228 | 235 | ||
| 229 | If the text on a text terminal looks wrong, the first thing to do is | 236 | If the text on a text terminal looks wrong, the first thing to do is |
| 230 | see whether it is wrong in the buffer. Type @kbd{C-l} to redisplay | 237 | see whether it is wrong in the buffer. Type @kbd{C-l} to redisplay |
| @@ -242,6 +249,8 @@ bug in Emacs that appears for certain terminal types. | |||
| 242 | 249 | ||
| 243 | @node Text Garbled | 250 | @node Text Garbled |
| 244 | @subsection Garbage in the Text | 251 | @subsection Garbage in the Text |
| 252 | @cindex garbled text | ||
| 253 | @cindex buffer text garbled | ||
| 245 | 254 | ||
| 246 | If @kbd{C-l} shows that the text is wrong, first type @kbd{C-h l} to | 255 | If @kbd{C-l} shows that the text is wrong, first type @kbd{C-h l} to |
| 247 | see what commands you typed to produce the observed results. Then try | 256 | see what commands you typed to produce the observed results. Then try |
| @@ -348,6 +357,7 @@ enable them by running the shell command @samp{ulimit -c unlimited} | |||
| 348 | 357 | ||
| 349 | @node After a Crash | 358 | @node After a Crash |
| 350 | @subsection Recovery After a Crash | 359 | @subsection Recovery After a Crash |
| 360 | @cindex recovering crashed session | ||
| 351 | 361 | ||
| 352 | If Emacs or the computer crashes, you can recover the files you were | 362 | If Emacs or the computer crashes, you can recover the files you were |
| 353 | editing at the time of the crash from their auto-save files. To do | 363 | editing at the time of the crash from their auto-save files. To do |
| @@ -394,6 +404,7 @@ not make a backup of its old contents. | |||
| 394 | 404 | ||
| 395 | @node Emergency Escape | 405 | @node Emergency Escape |
| 396 | @subsection Emergency Escape | 406 | @subsection Emergency Escape |
| 407 | @cindex emergency escape | ||
| 397 | 408 | ||
| 398 | On text terminals, the @dfn{emergency escape} feature suspends Emacs | 409 | On text terminals, the @dfn{emergency escape} feature suspends Emacs |
| 399 | immediately if you type @kbd{C-g} a second time before Emacs can | 410 | immediately if you type @kbd{C-g} a second time before Emacs can |
| @@ -528,6 +539,8 @@ not feel obliged to read this list before reporting a bug. | |||
| 528 | 539 | ||
| 529 | @node Bug Criteria | 540 | @node Bug Criteria |
| 530 | @subsection When Is There a Bug | 541 | @subsection When Is There a Bug |
| 542 | @cindex bug criteria | ||
| 543 | @cindex what constitutes an Emacs bug | ||
| 531 | 544 | ||
| 532 | If Emacs accesses an invalid memory location (``segmentation | 545 | If Emacs accesses an invalid memory location (``segmentation |
| 533 | fault''), or exits with an operating system error message that | 546 | fault''), or exits with an operating system error message that |
| @@ -580,6 +593,8 @@ with the manual, one of them must be wrong; that is a bug. | |||
| 580 | 593 | ||
| 581 | @node Understanding Bug Reporting | 594 | @node Understanding Bug Reporting |
| 582 | @subsection Understanding Bug Reporting | 595 | @subsection Understanding Bug Reporting |
| 596 | @cindex bug reporting | ||
| 597 | @cindex report an Emacs bug, how to | ||
| 583 | 598 | ||
| 584 | @findex emacs-version | 599 | @findex emacs-version |
| 585 | When you decide that there is a bug, it is important to report it | 600 | When you decide that there is a bug, it is important to report it |
| @@ -636,8 +651,8 @@ separate bug report for each. | |||
| 636 | 651 | ||
| 637 | @node Checklist | 652 | @node Checklist |
| 638 | @subsection Checklist for Bug Reports | 653 | @subsection Checklist for Bug Reports |
| 639 | 654 | @cindex checklist before reporting a bug | |
| 640 | @cindex reporting bugs | 655 | @cindex bug reporting, checklist |
| 641 | 656 | ||
| 642 | Before reporting a bug, first try to see if the problem has already | 657 | Before reporting a bug, first try to see if the problem has already |
| 643 | been reported (@pxref{Known Problems}). | 658 | been reported (@pxref{Known Problems}). |
| @@ -1192,6 +1207,9 @@ file in the Emacs distribution. | |||
| 1192 | 1207 | ||
| 1193 | @node Service | 1208 | @node Service |
| 1194 | @section How To Get Help with GNU Emacs | 1209 | @section How To Get Help with GNU Emacs |
| 1210 | @cindex help in using Emacs | ||
| 1211 | @cindex help-gnu-emacs mailing list | ||
| 1212 | @cindex gnu.emacs.help newsgroup | ||
| 1195 | 1213 | ||
| 1196 | If you need help installing, using or changing GNU Emacs, there are two | 1214 | If you need help installing, using or changing GNU Emacs, there are two |
| 1197 | ways to find it: | 1215 | ways to find it: |
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 318b92fbe7e..cdaa6b4fb34 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2014-05-04 Stephen Berman <stephen.berman@gmx.net> | ||
| 2 | |||
| 3 | * todo-mode.texi: Update, improve exposition, add cross | ||
| 4 | references, fix typos. | ||
| 5 | (Inserting New Items, Editing Item Headers and Text): Rewrite to | ||
| 6 | document new user interface. | ||
| 7 | |||
| 8 | 2014-05-04 Glenn Morris <rgm@gnu.org> | ||
| 9 | |||
| 10 | * autotype.texi (Skeleton Language): | ||
| 11 | * message.texi (Header Commands): Replace `iff'. | ||
| 12 | |||
| 1 | 2014-05-02 Paul Eggert <eggert@cs.ucla.edu> | 13 | 2014-05-02 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 14 | ||
| 3 | * vhdl-mode.texi: Add "@documentencoding UTF-8", | 15 | * vhdl-mode.texi: Add "@documentencoding UTF-8", |
diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index ae3fa0e5870..e01a6c2f5c5 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi | |||
| @@ -241,10 +241,10 @@ put at these places. Point is left at first @code{_} where nothing is wrapped. | |||
| 241 | Indent line according to major mode. When following element is @code{_}, and | 241 | Indent line according to major mode. When following element is @code{_}, and |
| 242 | there is a interregion that will be wrapped here, indent that interregion. | 242 | there is a interregion that will be wrapped here, indent that interregion. |
| 243 | @item @code{&} | 243 | @item @code{&} |
| 244 | Logical and. Iff preceding element moved point, i.e., usually inserted | 244 | Logical and. If preceding element moved point, i.e., usually inserted |
| 245 | something, do following element. | 245 | something, do following element. |
| 246 | @item @code{|} | 246 | @item @code{|} |
| 247 | Logical xor. Iff preceding element didn't move point, i.e., usually inserted | 247 | Logical xor. If preceding element didn't move point, i.e., usually inserted |
| 248 | nothing, do following element. | 248 | nothing, do following element. |
| 249 | @item @code{-@var{number}} | 249 | @item @code{-@var{number}} |
| 250 | Delete preceding number characters. Depends on value of | 250 | Delete preceding number characters. Depends on value of |
diff --git a/doc/misc/message.texi b/doc/misc/message.texi index 6d5a00ba819..14ba46c70f5 100644 --- a/doc/misc/message.texi +++ b/doc/misc/message.texi | |||
| @@ -748,9 +748,8 @@ by the @code{message-cross-post-note-function} variable. | |||
| 748 | @item C-c C-f t | 748 | @item C-c C-f t |
| 749 | @kindex C-c C-f t | 749 | @kindex C-c C-f t |
| 750 | @findex message-reduce-to-to-cc | 750 | @findex message-reduce-to-to-cc |
| 751 | Replace contents of @samp{To} header with contents of @samp{Cc} or | 751 | Replace contents of @samp{To} header with contents of @samp{Cc} |
| 752 | @samp{Bcc} header. (Iff @samp{Cc} header is not present, @samp{Bcc} | 752 | header (or the @samp{Bcc} header, if there is no @samp{Cc} header). |
| 753 | header will be used instead.) | ||
| 754 | 753 | ||
| 755 | @item C-c C-f w | 754 | @item C-c C-f w |
| 756 | @kindex C-c C-f w | 755 | @kindex C-c C-f w |
diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi index f9ccd034fe6..b72fb3c88cf 100644 --- a/doc/misc/semantic.texi +++ b/doc/misc/semantic.texi | |||
| @@ -611,7 +611,7 @@ Emacs Lisp. It is an LALR parser suitable for complex languages. | |||
| 611 | @c LocalWords: deffn deffnx defun defvar destructor's dfn diff dir | 611 | @c LocalWords: deffn deffnx defun defvar destructor's dfn diff dir |
| 612 | @c LocalWords: doc docstring EDE EIEIO elisp emacsman emph enum | 612 | @c LocalWords: doc docstring EDE EIEIO elisp emacsman emph enum |
| 613 | @c LocalWords: eq Exp EXPANDFULL expression fn foo func funcall | 613 | @c LocalWords: eq Exp EXPANDFULL expression fn foo func funcall |
| 614 | @c LocalWords: ia ids iff ifinfo imenu imenus init int isearch itemx java kbd | 614 | @c LocalWords: ia ids ifinfo imenu imenus init int isearch itemx java kbd |
| 615 | @c LocalWords: keymap keywordtable lang languagemode lexer lexing Ludlam | 615 | @c LocalWords: keymap keywordtable lang languagemode lexer lexing Ludlam |
| 616 | @c LocalWords: menubar metaparent metaparents min minibuffer Misc mode's | 616 | @c LocalWords: menubar metaparent metaparents min minibuffer Misc mode's |
| 617 | @c LocalWords: multitable NAvigaTOR noindent nomedian nonterm noselect | 617 | @c LocalWords: multitable NAvigaTOR noindent nomedian nonterm noselect |
diff --git a/doc/misc/todo-mode.texi b/doc/misc/todo-mode.texi index 5a903f7dee4..3ff205865ae 100644 --- a/doc/misc/todo-mode.texi +++ b/doc/misc/todo-mode.texi | |||
| @@ -188,13 +188,15 @@ diary, date and time stamps, whether it is done or still to do. | |||
| 188 | @node Todo Items as Diary Entries, , Levels of Organization, Overview | 188 | @node Todo Items as Diary Entries, , Levels of Organization, Overview |
| 189 | @section Todo Items as Diary Entries | 189 | @section Todo Items as Diary Entries |
| 190 | 190 | ||
| 191 | Each todo item is also a potential diary item: if you include a todo | 191 | You can have todo items show up in the Emacs Fancy Diary display by |
| 192 | file in the Emacs diary file (@pxref{Fancy Diary Display,,, emacs}), the | 192 | including the todo file in your diary file (@pxref{Fancy Diary |
| 193 | Fancy Diary display will show those todo items that are not marked with | 193 | Display,,, emacs}). This effectively augments the Emacs diary with |
| 194 | @code{todo-nondiary-marker}. This effectively augments the Emacs diary | 194 | categorized diary entries. All items in an included todo file will |
| 195 | with categorized diary entries. For the various options available for | 195 | appear in the Fancy Diary display except for those that are marked |
| 196 | making a todo item a diary entry, see @ref{Inserting New Items} and | 196 | with @code{todo-nondiary-marker}. You can add or omit this marking |
| 197 | @ref{Editing Item Headers and Text}. | 197 | upon creating a new todo item, or you can do so by editing an existing |
| 198 | item, see @ref{Inserting New Items} and @ref{Editing Item Headers and | ||
| 199 | Text} for details. | ||
| 198 | 200 | ||
| 199 | To ensure the proper display of todo items in the Fancy Diary display, | 201 | To ensure the proper display of todo items in the Fancy Diary display, |
| 200 | they must have the format of diary entries, i.e., they have to begin | 202 | they must have the format of diary entries, i.e., they have to begin |
| @@ -245,20 +247,16 @@ default todo file. | |||
| 245 | 247 | ||
| 246 | If you want to enter Todo mode and go directly to a specific category | 248 | If you want to enter Todo mode and go directly to a specific category |
| 247 | instead the first or current category in the current or default todo | 249 | instead the first or current category in the current or default todo |
| 248 | file, use the command @code{todo-jump-to-category}; @ref{Navigation}, for | 250 | file, use the command @code{todo-jump-to-category}; @ref{Navigation}, |
| 249 | details. You can also enter Todo mode by invoking a todo item insertion | 251 | for details. You can also enter Todo mode by invoking the command |
| 250 | command; @ref{Inserting New Items}, for details. | 252 | @code{todo-insert-item}; @ref{Inserting New Items}, for details. |
| 251 | 253 | ||
| 252 | The most convenient way to use these commands to enter Todo mode is to | 254 | The most convenient way to use these commands to enter Todo mode is to |
| 253 | define global key bindings for them in your init file. Good choices are | 255 | define global key bindings for them in your init file. Good choices |
| 254 | for @code{todo-show} and @code{todo-jump-to-category} are @kbd{C-c t} | 256 | are @kbd{C-c t} for @code{todo-show}, @kbd{C-c j} for |
| 255 | and @kbd{C-c j}, since these commands are bound to @kbd{t} and @kbd{j}, | 257 | @code{todo-jump-to-category} and @kbd{C-c i} for |
| 256 | respectively, in Todo mode. For invoking item insertion from outside of | 258 | @code{todo-insert-item}, since these commands are bound to @kbd{t}, |
| 257 | Todo mode, it is useful to bind @code{todo-insertion-map}, which is the | 259 | @kbd{j} and @kbd{i}, respectively, in Todo mode. |
| 258 | key map containing the bindings of all Todo item insertion commands, to | ||
| 259 | @kbd{C-c i}, since it is bound to @kbd{i} in Todo mode; to complete the | ||
| 260 | invocation, supply the rest of the key sequence (@pxref{Inserting New | ||
| 261 | Items}). | ||
| 262 | 260 | ||
| 263 | You can also visit a Todo file via @code{find-file} or Dired, like any | 261 | You can also visit a Todo file via @code{find-file} or Dired, like any |
| 264 | other file, and since Emacs recognizes it, the buffer will automatically | 262 | other file, and since Emacs recognizes it, the buffer will automatically |
| @@ -297,12 +295,12 @@ for the shift key for capitalization and the raw prefix argument | |||
| 297 | number key. | 295 | number key. |
| 298 | 296 | ||
| 299 | The predefined key bindings in Todo are more or less mnemonic. As a | 297 | The predefined key bindings in Todo are more or less mnemonic. As a |
| 300 | rule, key sequences beginning with @kbd{C} are bound to commands | 298 | rule, key sequences beginning with @kbd{C} (capital `C', not the |
| 301 | applying to categories, sequences beginning with @kbd{F} apply to | 299 | control key) are bound to commands applying to categories, sequences |
| 302 | (non-archive) file-level commands, and those beginning with @kbd{A} | 300 | beginning with @kbd{F} apply to (non-archive) file-level commands, and |
| 303 | apply to archives (a special type of Todo file; @ref{Todo Archive | 301 | those beginning with @kbd{A} apply to archives (a special type of Todo |
| 304 | Mode}). Todo commands applying to items, which constitute the majority, | 302 | file; @ref{Todo Archive Mode}). Todo commands applying to items, |
| 305 | are bound to lower case key sequences. | 303 | which constitute the majority, are bound to lower case key sequences. |
| 306 | 304 | ||
| 307 | @node Navigation, Editing, Key Binding Conventions, Top | 305 | @node Navigation, Editing, Key Binding Conventions, Top |
| 308 | @chapter Navigation | 306 | @chapter Navigation |
| @@ -315,8 +313,8 @@ commands are likely to be used frequently and repetitively, it is | |||
| 315 | convenient for their key bindings to be single lower case keys, even for | 313 | convenient for their key bindings to be single lower case keys, even for |
| 316 | navigation commands applying to categories and files. | 314 | navigation commands applying to categories and files. |
| 317 | 315 | ||
| 318 | Two of the navigation commands were already mentioned in the section on | 316 | Two of the navigation commands were already mentioned in @ref{Todo |
| 319 | Todo mode entry points: | 317 | Mode Entry Points}: |
| 320 | 318 | ||
| 321 | @table @kbd | 319 | @table @kbd |
| 322 | 320 | ||
| @@ -397,11 +395,17 @@ sections below. | |||
| 397 | 395 | ||
| 398 | Editing in Todo mode means making structural or textual changes at one | 396 | Editing in Todo mode means making structural or textual changes at one |
| 399 | of the levels of organization (file, category, or item). Structural | 397 | of the levels of organization (file, category, or item). Structural |
| 400 | editing includes adding, relocating and removing, textual editing includes | 398 | editing includes adding, relocating and removing units of information |
| 401 | renaming files or categories and changing an item's content or date, or | 399 | at a level; textual editing includes renaming files or categories and |
| 402 | adding certain kinds of marks or tags to items. To save changes you | 400 | changing an item's content or date/time stamp, or adding certain kinds |
| 403 | make to the current todo file, type @kbd{s} (@code{todo-save}). Changes | 401 | of marks or tags to items. Todo mode provides commands, detailed in |
| 404 | are also saved on quitting Todo mode with @kbd{q}. | 402 | the following sections, which enable you to quickly and safely make |
| 403 | changes to your todo lists, without having to worry about preserving | ||
| 404 | the file format. | ||
| 405 | |||
| 406 | To save changes you make to the current todo file, | ||
| 407 | type @kbd{s} (@code{todo-save}). Changes are also saved on quitting | ||
| 408 | Todo mode with @kbd{q}. | ||
| 405 | 409 | ||
| 406 | @menu | 410 | @menu |
| 407 | * File Editing:: | 411 | * File Editing:: |
| @@ -417,12 +421,12 @@ There are four file-level editing commands: | |||
| 417 | @table @kbd | 421 | @table @kbd |
| 418 | 422 | ||
| 419 | @item F a | 423 | @item F a |
| 420 | Add a new todo file (@code{todo-add-file}). This command prompts for a | 424 | Add a new todo file (@code{todo-add-file}). This command prompts for |
| 421 | name and creates the file in @code{todo-directory}, adding the | 425 | a name and creates the file in @code{todo-directory}, adding the |
| 422 | @samp{.todo} extension (so you should not include the extension in the | 426 | @samp{.todo} extension (so you should not include the extension in the |
| 423 | name you enter). The command also prompts for the file's first category and, if | 427 | name you enter). The command also prompts for the file's first |
| 424 | option @code{todo-add-item-if-new-category} is enabled (the default), | 428 | category and, if option @code{todo-add-item-if-new-category} is |
| 425 | for that category's first item. | 429 | enabled (the default), for that category's first item. |
| 426 | 430 | ||
| 427 | @item F r | 431 | @item F r |
| 428 | Rename the current todo file (@code{todo-rename-file}). If called with | 432 | Rename the current todo file (@code{todo-rename-file}). If called with |
| @@ -430,15 +434,15 @@ a prefix argument, prompt for a todo file and rename it. If the todo | |||
| 430 | file has an archive (@pxref{Todo Archive Mode}) or there are | 434 | file has an archive (@pxref{Todo Archive Mode}) or there are |
| 431 | corresponding filtered items files (@pxref{Todo Filtered Items Mode}), | 435 | corresponding filtered items files (@pxref{Todo Filtered Items Mode}), |
| 432 | this command renames these accordingly. If there are live buffers | 436 | this command renames these accordingly. If there are live buffers |
| 433 | visiting any of these files, the command also rename them accordingly. | 437 | visiting any of these files, the command also renames them accordingly. |
| 434 | 438 | ||
| 435 | @item F k | 439 | @item F k |
| 436 | Delete the current todo file (@code{todo-delete-file}).@footnote{The key | 440 | Delete the current todo file (@code{todo-delete-file}).@footnote{The key |
| 437 | binding of this command is mnemonic for ``kill'' to parallel the binding | 441 | binding of this command is mnemonic for ``kill'' to parallel the binding |
| 438 | @kbd{k} for item deletion, since @kbd{d} is bound to another item | 442 | @kbd{k} for item deletion, since @kbd{d} is bound to another item |
| 439 | editing command (@pxref{Done Items}).} If the todo file has an archive | 443 | editing command (@pxref{Done Items}).} If the todo file has an archive |
| 440 | (@pxref{Todo Archive Mode}), prompt whether to delete that as well. | 444 | (@pxref{Todo Archive Mode}), prompt for whether to delete that as well. |
| 441 | This command also kill the buffers visiting the deleted files. | 445 | This command also kills the buffers visiting the deleted files. |
| 442 | 446 | ||
| 443 | @item F e | 447 | @item F e |
| 444 | This command (@code{todo-edit-file}) changes the buffer's major mode to | 448 | This command (@code{todo-edit-file}) changes the buffer's major mode to |
| @@ -458,20 +462,21 @@ text that occurs in different categories throughout the file. The other | |||
| 458 | use case is to recover from a mistake, such as accidentally deleting an | 462 | use case is to recover from a mistake, such as accidentally deleting an |
| 459 | item, since this cannot be undone in Todo mode. | 463 | item, since this cannot be undone in Todo mode. |
| 460 | 464 | ||
| 461 | Using @kbd{C-x C-q} to quit Todo Edit mode provides a measure of safety, | 465 | Using @kbd{C-x C-q} to quit Todo Edit mode provides a measure of |
| 462 | since it runs a file format check, signaling an error if the format has | 466 | safety, since it runs a file format check, signaling an error if the |
| 463 | become invalid. However, this check cannot tell if the number of items | 467 | format has become invalid. However, this check cannot tell if the |
| 464 | changed, which could result in the file containing inconsistent | 468 | number of items or categories changed, which could result in the file |
| 465 | information (see the cautionary note in @ref{Reordering Categories}, for | 469 | containing inconsistent information (see the cautionary note in |
| 466 | more details). For this reason @kbd{F e} should be used with caution. | 470 | @ref{Reordering Categories}, for more details). Invoking @kbd{F e} |
| 471 | displays a warning to this effect. | ||
| 467 | @end table | 472 | @end table |
| 468 | 473 | ||
| 469 | @node Category Editing, Item Editing, File Editing, Editing | 474 | @node Category Editing, Item Editing, File Editing, Editing |
| 470 | @section Category Editing | 475 | @section Category Editing |
| 471 | 476 | ||
| 472 | The following commands are available for editing at the category level | 477 | The following commands are available for editing specifically at the |
| 473 | (for additional category-editing commands, which are extensions of item | 478 | category level (for two other category-editing commands, which are |
| 474 | commands, @pxref{Editing Item Headers and Text}): | 479 | extensions of item commands, @pxref{Editing Item Headers and Text}): |
| 475 | 480 | ||
| 476 | @table @kbd | 481 | @table @kbd |
| 477 | 482 | ||
| @@ -519,8 +524,10 @@ category in that file. | |||
| 519 | @node Item Editing, , Category Editing, Editing | 524 | @node Item Editing, , Category Editing, Editing |
| 520 | @section Item Editing | 525 | @section Item Editing |
| 521 | 526 | ||
| 522 | Todo mode provides a wide variety of commands for adding and textually | 527 | Todo mode provides commands for adding new items as well as textually |
| 523 | changing items, as well as for deleting and relocating items. | 528 | changing, deleting and relocating existing items. The commands and |
| 529 | associated options for adding and editing items, in particular, offer | ||
| 530 | you a lot of flexibility to fine-tune these operations to your needs. | ||
| 524 | 531 | ||
| 525 | @menu | 532 | @menu |
| 526 | * Inserting New Items:: | 533 | * Inserting New Items:: |
| @@ -531,282 +538,388 @@ changing items, as well as for deleting and relocating items. | |||
| 531 | @node Inserting New Items, Editing Item Headers and Text, , Item Editing | 538 | @node Inserting New Items, Editing Item Headers and Text, , Item Editing |
| 532 | @subsection Inserting New Items | 539 | @subsection Inserting New Items |
| 533 | 540 | ||
| 534 | There are many commands for adding new todo items. The command names | 541 | To add a new todo item to a category, type @kbd{i}, which is bound to |
| 535 | contain the word ``insert'' instead of ``add'' and their key bindings are | 542 | the command @code{todo-insert-item}. |
| 536 | sequences beginning with @kbd{i}. The motivation for this terminology is | ||
| 537 | that speaking of adding an item to a category suggests appending it to | ||
| 538 | the top or bottom, whereas you can insert an item into the category | ||
| 539 | anywhere, giving each new item any priority in the list. | ||
| 540 | 543 | ||
| 541 | @table @kbd | 544 | @table @kbd |
| 542 | 545 | ||
| 543 | @item i i | 546 | @item i |
| 544 | This is the basic command for inserting new items into a category | 547 | This command is the entry point for inserting new items into a |
| 545 | (@code{todo-insert-item}). Called without a prefix argument, it prompts | 548 | category (@code{todo-insert-item}). It prompts for additional keys |
| 546 | for the text of the item and its priority (a number between 1 and one | 549 | until reaching a complete key sequence, which specifies the insertion |
| 547 | more than the number of items already in the category), both of which | 550 | parameters you wish to apply (see below). It then prompts for the |
| 548 | you enter in the minibuffer, and inserts the item into the current | 551 | text of the item, which you enter in the minibuffer.@footnote{There |
| 549 | category of the current todo file at the position in the list | 552 | are two insertion parameters that override prompting for and manually |
| 550 | corresponding to the priority you chose. Called with one prefix | 553 | entering the new item's text, see below.} Called with one prefix |
| 551 | argument, it also prompts for a category, and called with two prefix | 554 | argument, it also prompts for a category, and called with two prefix |
| 552 | arguments, it prompts for both a file and a category from that file, and | 555 | arguments, it prompts for both a file and a category from that file, |
| 553 | inserts the item accordingly. Category name completion works as with | 556 | and inserts the item accordingly; category name completion works as |
| 554 | the navigation command @kbd{j}. | 557 | with the navigation command @kbd{j}. Finally, it inserts the item |
| 558 | into the current or selected category of the current or selected todo | ||
| 559 | file at the position in the list corresponding to the priority you | ||
| 560 | choose, which also depends on the insertion parameters. | ||
| 555 | @end table | 561 | @end table |
| 556 | 562 | ||
| 557 | Each invocation of @kbd{i i} adds a header string to the item, which | 563 | @noindent |
| 564 | The name of this command reflects the fact that you can insert a new | ||
| 565 | item into the category at any position, giving each new item any | ||
| 566 | priority in the list, whereas speaking of adding an item to a category | ||
| 567 | suggests appending it to the top or bottom. | ||
| 568 | |||
| 569 | In addition to its file and category, each newly inserted todo item | ||
| 570 | has a priority in the category and begins with a header string, which | ||
| 558 | includes at least the current date in the same format used by | 571 | includes at least the current date in the same format used by |
| 559 | @code{diary-insert-entry} (@pxref{Date Formats,,, emacs}). You can | 572 | @code{diary-insert-entry} (@pxref{Date Formats,,, emacs}). You can |
| 560 | control what other information is included in the header by customizing | 573 | specify the priority and the content of the header string in two ways. |
| 561 | the following options: | 574 | First, you can set the following item insertion options, which apply |
| 575 | on every invocation of @code{todo-insert-item}. | ||
| 562 | 576 | ||
| 563 | @itemize @bullet | 577 | @itemize @bullet |
| 564 | 578 | ||
| 565 | @item | 579 | @item |
| 580 | @code{todo-default-priority} is for automatically assigning a new item | ||
| 581 | the highest or lowest priority in the category, if you do not | ||
| 582 | explicitly assign it a priority on invoking @code{todo-insert-item}. | ||
| 583 | By default, such new items are given highest priority, i.e., inserted | ||
| 584 | at the top of the list. | ||
| 585 | |||
| 586 | @item | ||
| 566 | @code{todo-always-add-time-string} is for including or omitting the | 587 | @code{todo-always-add-time-string} is for including or omitting the |
| 567 | current time. The time string is omitted by default. | 588 | current time in the new item's header. By default, this time string |
| 589 | is omitted. | ||
| 568 | 590 | ||
| 569 | @item | 591 | @item |
| 570 | @code{todo-include-in-diary} is for specifying whether the item appears | 592 | @code{todo-include-in-diary} is for specifying whether the item |
| 571 | in the Fancy Diary display by adding or omitting | 593 | appears in the Fancy Diary display (when the todo file is included in |
| 572 | @code{todo-nondiary-marker}. By default, new todo items are marked for | 594 | the Emacs diary file) by adding or omitting |
| 573 | exclusion from the diary. | 595 | @code{todo-nondiary-marker}. By default, new todo items are so |
| 596 | marked, thus excluded from the diary. | ||
| 574 | 597 | ||
| 575 | @item | 598 | @item |
| 576 | @code{todo-diary-nonmarking} is for adding or omitting | 599 | @code{todo-diary-nonmarking} is for adding or omitting |
| 577 | @code{diary-nonmarking-symbol} to items displayed in the diary, to | 600 | @code{diary-nonmarking-symbol} to items displayed in the diary, to |
| 578 | control whether they are marked in the calendar (@pxref{Format of Diary | 601 | control whether they are marked in the calendar (@pxref{Format of |
| 579 | File,,, emacs}). By default, todo items that are diary entries are | 602 | Diary File,,, emacs}). By default, todo items that are diary entries |
| 580 | marked in the calendar. | 603 | lack this symbol, thus are marked in the calendar. |
| 581 | @end itemize | 604 | @end itemize |
| 582 | 605 | ||
| 583 | Instead of always adding the same header information to a new item, you | 606 | Beside setting these options, for more flexibility you can also pass |
| 584 | can use more specific insertion commands that let you decide what to | 607 | certain parameters on each invocation of @code{todo-insert-item}. |
| 585 | include in the item header each time you insert a new item. And instead | 608 | These parameters concern not only the new item's priority and header, |
| 586 | of always being prompted to choose the new item's priority, you can | 609 | but also its textual content. You pass these parameters by typing a |
| 587 | invoke a command to insert it at the position (hence with the priority) | 610 | sequence of one or more keys after the initial @kbd{i}. |
| 588 | of the item at point. Finally, instead of always typing the text of the | 611 | |
| 589 | new item in the minibuffer, you can invoke a command that makes the | 612 | Here is a list of the item insertion parameters together with their |
| 590 | selected region in an Emacs buffer automatically become the new item's | 613 | mnemonically associated keys@footnote{The non-mnemonic choice of |
| 591 | text. The following paragraphs discuss how to invoke these commands by | 614 | @kbd{i} for the parameter @samp{default} is motivated by the |
| 592 | typing certain key sequences. | 615 | convenience of repeating the @kbd{i} used to invoke |
| 593 | 616 | @code{todo-insert-item}.} and descriptions of their effect in | |
| 594 | There are eight parameters of item insertion in Todo mode, six | 617 | @code{todo-insert-item}: |
| 595 | concerning the item header, and one each concerning its priority and its | ||
| 596 | text. Each unique combination of these parameters produces a different | ||
| 597 | insertion command. The command @kbd{i i} realizes one of these | ||
| 598 | combinations. For the commands that realize the remaining combinations | ||
| 599 | it is convenient to associate each parameter with a mnemonically chosen | ||
| 600 | key. Then by typing certain sequences of these keys, you complete the | ||
| 601 | insertion command invocation that realizes the specified combination. | ||
| 602 | As with @kbd{i i}, the effect of many of these commands also depends on | ||
| 603 | the values of the item insertion options mentioned above (see the | ||
| 604 | examples below). | ||
| 605 | |||
| 606 | Here is a list of the parameters and their associated keys, in the order | ||
| 607 | in which you must type them when building a key sequence (this order | ||
| 608 | roughly reflects the order in which the corresponding parts of the item | ||
| 609 | occur in a category listing): | ||
| 610 | 618 | ||
| 611 | @enumerate | 619 | @enumerate |
| 612 | 620 | ||
| 613 | @item | 621 | @item |
| 614 | @kbd{y} for diary (non)inclusion; | 622 | @samp{default} (@kbd{i}): Prompt for the new item's priority |
| 623 | (a number between 1 and one more than the number of items already in | ||
| 624 | the category) and add a header string conforming to the values of the | ||
| 625 | above options. | ||
| 626 | |||
| 627 | @samp{copy} (@kbd{p}): Make an exact copy of the item at point, | ||
| 628 | including its header string, and prompt for its priority. (This is | ||
| 629 | useful for quickly making a new todo item whose text or header you | ||
| 630 | want to differ only partly from that of an existing item: after | ||
| 631 | inserting the copy, you can quickly edit it as needed by using | ||
| 632 | operations described in the next section.) | ||
| 633 | |||
| 615 | @item | 634 | @item |
| 616 | @kbd{k} for adding or omitting `diary-nonmarking-symbol'; | 635 | @samp{diary} (@kbd{y}): Override the option |
| 636 | @code{todo-include-in-diary}; that is, add @code{todo-nondiary-marker} | ||
| 637 | if the option is non-nil, omit this marker if the option is nil. | ||
| 638 | |||
| 639 | @samp{nonmarking} (@kbd{k}): Override the option | ||
| 640 | @code{todo-diary-nonmarking}; that is, add | ||
| 641 | @code{diary-nonmarking-symbol} if the option is non-nil, omit this | ||
| 642 | symbol if the option is nil. Since this symbol only applies to diary | ||
| 643 | items, the new item is automatically marked as such, i.e., lacks | ||
| 644 | @code{todo-nondiary-marker}. | ||
| 645 | |||
| 617 | @item | 646 | @item |
| 618 | @kbd{c} for adding the date header by clicking a date in the Emacs | 647 | @samp{calendar} (@kbd{c}): Pop up the Emacs calendar and click a date |
| 619 | calendar, or@* | 648 | in it to use that date in the new todo item's header. |
| 620 | @kbd{d} for interactively entering the date header as a string of year, | 649 | |
| 621 | month and day number components in the minibuffer, or@* | 650 | @samp{date} (@kbd{d}): Prompt for entering in the minibuffer |
| 622 | @kbd{n} for interactively entering the date header as a weekday name in | 651 | the year, month (with completion) and day number components of the |
| 623 | the minibuffer; | 652 | header. |
| 653 | |||
| 654 | @samp{dayname} (@kbd{n}): Prompt for entering in the minibuffer | ||
| 655 | a weekday name as the date header instead of a year-month-day string. | ||
| 656 | |||
| 624 | @item | 657 | @item |
| 625 | @kbd{t} for adding a time string to the header in the minibuffer | 658 | @samp{time} (@kbd{t}): Prompt for entering a time string in |
| 626 | (including the empty string, which amounts to omitting the time); | 659 | the minibuffer instead of automatically inserting the current time; |
| 660 | however, typing @key{RET} at the prompt enters the current time if | ||
| 661 | @code{todo-always-add-time-string} is non-nil, otherwise it enters the | ||
| 662 | empty string (i.e., no time string). | ||
| 663 | |||
| 627 | @item | 664 | @item |
| 628 | @kbd{h} for inserting the new item in the position of the item at point | 665 | @samp{here} (@kbd{h}): Insert the new item in the position of |
| 629 | (``here''), or@* | 666 | the item at point, pushing that and all lower items in the category |
| 630 | @kbd{r} to use the text of the selected region as the item's text. | 667 | down, i.e., lowering their priority, by one. |
| 668 | |||
| 669 | @samp{region} (@kbd{r}): Use the text of the selected region as the | ||
| 670 | text of the new item, and insert this in accordance with the item | ||
| 671 | insertion options and other parameters passed. If the option | ||
| 672 | `todo-use-only-highlighted-region' is non-nil, then use the region | ||
| 673 | only when it is highlighted; otherwise, use the region regardless of | ||
| 674 | highlighting. | ||
| 631 | @end enumerate | 675 | @end enumerate |
| 632 | 676 | ||
| 633 | Each insertion command key sequence begins (disregarding prefix | 677 | Note that the parameters are divided into five numbered groups; within |
| 634 | arguments) with @kbd{i}, followed by one or more of these eight keys, in | 678 | a group, the parameters are mutually exclusive. Hence, to build a |
| 635 | the order listed. But as you can see in the above table, since some of | 679 | complete insertion operation, you select at most one parameter from at |
| 636 | the insertion parameters are mutually exclusive, they occupy only five | 680 | least one of these groups, by typing the corresponding key. If you |
| 637 | positions, so the complete (unprefixed) sequences are maximally six keys | 681 | want to apply more than one parameter, you must type the corresponding |
| 638 | long. Shorter sequences are also possible, since a parameter may be | 682 | keys in the order of the numbered groups, subject to the following |
| 639 | omitted. But since the order in any key sequence is fixed, if the last | 683 | constraints. |
| 640 | key in the sequence could be followed by another insertion key, i.e., if | 684 | |
| 641 | the last key is not @kbd{h} or @kbd{r}, it has to be doubled to complete | 685 | The keys of groups 2-4 are continuation keys, that is, each can be |
| 642 | the sequence, otherwise it would be interpreted as a prefix sequence | 686 | followed by a key from a following group. If you want to finish the |
| 643 | (this is why the binding for the basic item insertion command is @kbd{i | 687 | sequence with a continuation key, you must double the final key. For |
| 644 | i} and not @kbd{i}). | 688 | example, @kbd{i y} is not a complete key sequence; rather, you must |
| 645 | 689 | type @kbd{i y y}. | |
| 646 | Here are some examples of item insertion command key sequences: | 690 | |
| 691 | By contrast, the keys of groups 1 and 5 are final keys; for example, | ||
| 692 | @kbd{i i} and @kbd{i h} are complete sequences. The reason for making | ||
| 693 | two separate groups of the final keys is that the parameters | ||
| 694 | @samp{default} and @samp{copy} cannot be combined with any other | ||
| 695 | parameters, while @samp{here} and @samp{region} can be combined with | ||
| 696 | any of the parameters from groups 2-4. | ||
| 697 | |||
| 698 | To aid you in building item insertion key sequences, when you type an | ||
| 699 | insertion key, this displays a prompt in the echo area showing pairs | ||
| 700 | of the remaining possible keys and their associated parameters, | ||
| 701 | grouped and ordered in accordance with the above list. The initial | ||
| 702 | prompt, after typing @kbd{i} to invoke @code{todo-insert-item}, looks | ||
| 703 | like this: | ||
| 704 | |||
| 705 | @example | ||
| 706 | 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 @} | ||
| 707 | @end example | ||
| 708 | |||
| 709 | @noindent If you now type @kbd{y}, the prompt changes to this: | ||
| 710 | |||
| 711 | @example | ||
| 712 | Press a key (so far `i y'): y=>diary:GO! @{ c=>calendar d=>date n=>dayname @} t=>time @{ h=>here r=>region @} | ||
| 713 | @end example | ||
| 714 | |||
| 715 | @noindent Notice that the pair @samp{k=>nonmarking} is now absent, since it | ||
| 716 | belongs to the same group as the selected pair @samp{y=>diary}, hence | ||
| 717 | is no longer available for this sequence. Since @kbd{y} is a | ||
| 718 | continuation key, it is still available, but now the string ":GO!" is | ||
| 719 | appended to the pair to remind you that pressing this key again will | ||
| 720 | complete the sequence. | ||
| 721 | |||
| 722 | |||
| 723 | |||
| 724 | @c Here are some examples of item insertion command key sequences: | ||
| 725 | |||
| 726 | @c @itemize @bullet | ||
| 727 | |||
| 728 | @c @item | ||
| 729 | @c @kbd{i h} inserts a new item at the position of the item at point (pushing | ||
| 730 | @c the latter down) with a header containing the current date and, | ||
| 731 | @c depending on the values of the mentioned options, possibly the current | ||
| 732 | @c time and diary-related markings. | ||
| 733 | @c @item | ||
| 734 | @c @kbd{i y h} does the same as the preceding command, except that | ||
| 735 | @c @code{todo-nondiary-marker} is added if @code{todo-include-in-diary} is | ||
| 736 | @c non-nil and omitted if that option is nil; that is, the diary key @kbd{y} | ||
| 737 | @c overrides the setting of this option. | ||
| 738 | @c @item | ||
| 739 | @c @kbd{i y t h} does the same as the preceding command, except that it | ||
| 740 | @c prompts for a time string instead of automatically inserting the | ||
| 741 | @c current time; however, typing @key{RET} at the prompt returns the | ||
| 742 | @c current time if @code{todo-always-add-time-string} is non-nil, otherwise | ||
| 743 | @c the empty string (i.e., no time string). | ||
| 744 | @c @item | ||
| 745 | @c @kbd{i y t t} does the same as the preceding command, except that it | ||
| 746 | @c prompts for the item's priority and inserts it accordingly. | ||
| 747 | @c @end itemize | ||
| 748 | |||
| 749 | |||
| 750 | An alternative to the key sequence @kbd{i c c} for choosing the item's | ||
| 751 | date from the calendar is also available: when point is already on a | ||
| 752 | date in the calendar, typing @kbd{i t} | ||
| 753 | (@code{todo-insert-item-from-calendar}) prompts for a new item and its | ||
| 754 | priority and inserts it in the current category. This command, like | ||
| 755 | @code{todo-insert-item}, also accepts one or two prefix arguments for | ||
| 756 | choosing the category via minibuffer completion. Note, however, that | ||
| 757 | the key sequence @kbd{i t} is not defined in Todo mode but in the | ||
| 758 | Calendar mode keymap. It is a convenient shortcut if you happen to be | ||
| 759 | using the calendar when you decide to make a new todo item. (Contrast | ||
| 760 | this with passing the @samp{calendar} parameter, which pops open the | ||
| 761 | calendar after you have entered the item's text, and then you can | ||
| 762 | choose a date from the calendar.) | ||
| 647 | 763 | ||
| 648 | @itemize @bullet | ||
| 649 | 764 | ||
| 650 | @item | 765 | @node Editing Item Headers and Text, Relocating and Removing Items, Inserting New Items, Item Editing |
| 651 | @kbd{i h} inserts a new item at the position of the item at point (pushing | 766 | @subsection Editing Item Headers and Text |
| 652 | the latter down) with a header containing the current date and, | ||
| 653 | depending on the values of the mentioned options, possibly the current | ||
| 654 | time and diary-related markings. | ||
| 655 | @item | ||
| 656 | @kbd{i y h} does the same as the preceding command, except that | ||
| 657 | @code{todo-nondiary-marker} is added if @code{todo-include-in-diary} is | ||
| 658 | non-nil and omitted if that option is nil; that is, the diary key @kbd{y} | ||
| 659 | overrides the setting of this option. | ||
| 660 | @item | ||
| 661 | @kbd{i y t h} does the same as the preceding command, except that it | ||
| 662 | prompts for a time string instead of automatically inserting the | ||
| 663 | current time; however, typing @key{RET} at the prompt returns the | ||
| 664 | current time if @code{todo-always-add-time-string} is non-nil, otherwise | ||
| 665 | the empty string (i.e., no time string). | ||
| 666 | @item | ||
| 667 | @kbd{i y t t} does the same as the preceding command, except that it | ||
| 668 | prompts for the item's priority and inserts it accordingly. | ||
| 669 | @end itemize | ||
| 670 | 767 | ||
| 671 | Note that the commands whose key sequences include @kbd{y}, @kbd{k} or @kbd{t} | 768 | To make changes to an existing item's content or header, type @kbd{e}, |
| 672 | reverse the effect of the options @code{todo-include-in-diary}, | 769 | which is bound to the command @code{todo-edit-item}. |
| 673 | @code{todo-diary-nonmarking} and @code{todo-always-add-time-string}, | ||
| 674 | respectively, thus temporarily overriding their values. | ||
| 675 | |||
| 676 | The names of the item insertion commands correspond to their key | ||
| 677 | bindings, e.g., @kbd{i h} is bound to @code{todo-insert-item-here}, @kbd{i y h} to | ||
| 678 | @code{todo-insert-item-diary-here}, etc. But since there are so many | ||
| 679 | combinations, instead of trying to memorize either the names or the key | ||
| 680 | sequences, you can, as usual, just type an initial part of a key | ||
| 681 | sequence (minimally @kbd{i}), followed by @kbd{C-h} to see the valid | ||
| 682 | completions. | ||
| 683 | |||
| 684 | An alternative to using the key @kbd{c} for choosing the item's date | ||
| 685 | from the calendar is also available: if point is on a date in the | ||
| 686 | calendar, typing @kbd{i t} (@code{todo-insert-item-from-calendar}) will | ||
| 687 | prompt for a new item and its priority and insert it in the current | ||
| 688 | category. Like @kbd{i i} and the other item insertion commands, this | ||
| 689 | also accepts one or two prefix arguments for choosing the category via | ||
| 690 | minibuffer completion. Note, however, that the key sequence @kbd{i t} | ||
| 691 | is not defined in Todo mode but in the Calendar mode keymap. It is a | ||
| 692 | convenient shortcut if you happen to be using the calendar when you | ||
| 693 | decide to make a new todo item. (Contrast this with a command like | ||
| 694 | @kbd{i c c}, which pops open the calendar after you have entered the | ||
| 695 | item's text, and then you can choose a date from the calendar.) | ||
| 696 | |||
| 697 | There is one more item insertion command, which does not derive from the | ||
| 698 | item insertion parameters: | ||
| 699 | 770 | ||
| 700 | @table @kbd | 771 | @table @kbd |
| 701 | 772 | ||
| 702 | @item i p | 773 | @item e |
| 703 | This command (@code{todo-copy-item}) makes a complete copy of the item | 774 | This command is the entry point for textually editing existing items |
| 704 | at point, including its header, prompts for its priority in the current | 775 | in a category (@code{todo-edit-item}). It prompts for additional keys |
| 705 | category and inserts it accordingly. | 776 | until reaching a complete key sequence, which specifies the editing |
| 777 | parameters you wish to apply (see below), and then executes the | ||
| 778 | editing operation accordingly. | ||
| 706 | @end table | 779 | @end table |
| 707 | 780 | ||
| 708 | @noindent | 781 | Here is a list of the item editing parameters together with their |
| 709 | This command is useful for quickly adding a todo item whose text or | 782 | mnemonically associated keys and descriptions of their effect in |
| 710 | header you want to differ only partly from that of an existing item: | 783 | @code{todo-edit-item}. The list is divided into three groups, for |
| 711 | after inserting the copy, you can quickly edit it as needed by using | 784 | reasons explained below. |
| 712 | commands described in the next section. | ||
| 713 | 785 | ||
| 714 | @node Editing Item Headers and Text, Relocating and Removing Items, Inserting New Items, Item Editing | 786 | @enumerate 1 |
| 715 | @subsection Editing Item Headers and Text | ||
| 716 | |||
| 717 | There are a number of commands for editing an existing item's text or | ||
| 718 | header; these commands are bound to key sequences with @kbd{e}. | ||
| 719 | 787 | ||
| 720 | There are two commands for editing an item's text (and manually editing | 788 | @item |
| 721 | its header), one appropriate for short items and simple edits and one | 789 | @samp{edit} (@kbd{e}): Edit the text of the current item in the |
| 722 | better suited for more complex changes or for editing lengthy items: | 790 | minibuffer; the item's header is omitted. |
| 723 | 791 | ||
| 724 | @table @kbd | 792 | @samp{header} (@kbd{h}): Edit the text and header of the current item |
| 793 | in the minibuffer. | ||
| 725 | 794 | ||
| 726 | @item e e | 795 | @samp{multiline} (@kbd{m}): Edit the text of the current item in a |
| 727 | Edit the text of the current item in the minibuffer | 796 | special buffer in Todo Edit mode. After editing, type @kbd{C-x C-q} |
| 728 | (@code{todo-edit-item}). If called with a prefix argument (@kbd{C-u e | 797 | to return to Todo mode.@footnote{This runs a format check to ensure |
| 729 | e}), the item's header is also included in the minibuffer and so can be | 798 | the item is well-formed. However, unlike the command @kbd{F e} |
| 730 | edited manually. | ||
| 731 | |||
| 732 | @item e m | ||
| 733 | Edit the text of the current item in a special buffer in Todo Edit mode | ||
| 734 | (@code{todo-edit-multiline-item}). When you have finished editing, type | ||
| 735 | @kbd{C-x C-q} to return to Todo mode; this runs a format check to ensure | ||
| 736 | the item is well-formed.@footnote{Unlike the command @kbd{F e} | ||
| 737 | (@pxref{File Editing}), @kbd{e m} does not expose you to the risk of | 799 | (@pxref{File Editing}), @kbd{e m} does not expose you to the risk of |
| 738 | putting the file in an inconsistent state, since it puts only the | 800 | putting the file in an inconsistent state, since it puts only the |
| 739 | current item in Todo Edit mode.} | 801 | current item in Todo Edit mode.} |
| 740 | @end table | ||
| 741 | 802 | ||
| 742 | A number of commands are available for interactively editing all or part | 803 | @samp{diary} (@kbd{y}): Change the current item's diary inclusion |
| 743 | of the item header, permitting quick edits and helping avoid formatting | 804 | status by adding @code{todo-nondiary-marker} if the item lacks this, |
| 744 | errors. | 805 | or by removing it if present. |
| 745 | 806 | ||
| 746 | The following three commands are for editing any or all of the year, | 807 | @samp{nonmarking} (@kbd{k}): Change the current item's calendar |
| 747 | month and day components of a date header: | 808 | marking status by adding @code{diary-nonmarking-symbol} if the item |
| 809 | lacks this, or by removing it if present. Since this symbol only | ||
| 810 | applies to diary items, the item is automatically marked as such, | ||
| 811 | i.e., if @code{todo-nondiary-marker} is present, it is removed. | ||
| 748 | 812 | ||
| 749 | @table @kbd | 813 | @samp{date} (@kbd{d}): Prompt for a final key from the second group |
| 814 | of item editing parameters to edit the current item's date string. | ||
| 815 | |||
| 816 | @samp{time} (@kbd{t}): Edit the current item's time string, if | ||
| 817 | present; otherwise, add one. Typing @key{RET} at the prompt enters | ||
| 818 | the current time if @code{todo-always-add-time-string} is non-nil, | ||
| 819 | otherwise it enters the empty string (i.e., no time string). | ||
| 820 | @end enumerate | ||
| 750 | 821 | ||
| 751 | @item e d t | 822 | @noindent |
| 752 | Successively prompt for changes to the date's year, month and | 823 | Editing the text of a lengthy item in the minibuffer can be |
| 753 | day number, and if the option @code{todo-always-add-time-string} is | 824 | inconvenient; therefore, if you type `e e' or `e h' on an item whose |
| 754 | non-nil, also for editing the time string (see also @kbd{e t} below). | 825 | text contains more than one logical line, the effect is the same as if |
| 826 | you had typed `e m', that is, you switch a special buffer in Todo Edit | ||
| 827 | mode. | ||
| 755 | 828 | ||
| 756 | @item e d a | 829 | When you pass any of the parameters of the preceding group, except for |
| 757 | Change the date to today's date. | 830 | the @samp{date} parameter, this completes the item editing invocation |
| 831 | begun by typing @kbd{e}. Pressing @kbd{d} to pass the @samp{date} | ||
| 832 | parameter, however, prompts you with the following parameters and | ||
| 833 | their associated keys, and pressing any of these completes the | ||
| 834 | invocation. | ||
| 758 | 835 | ||
| 759 | @item e d c | 836 | @enumerate 2 |
| 760 | This command pops up the Emacs calendar, and after you type @key{RET} on | 837 | |
| 761 | a date in the calendar makes that date the item's date. | 838 | @item |
| 762 | @end table | 839 | @samp{full} (@kbd{f}): Successively prompt for editing the year, month |
| 840 | (with completion) and day number parts of the current item's date | ||
| 841 | string, and, if the option @code{todo-always-add-time-string} is | ||
| 842 | non-nil, also for editing its time string. | ||
| 843 | |||
| 844 | @samp{calendar} (@kbd{c}): This pops up the Emacs calendar, and after | ||
| 845 | you type @key{RET} on a date in the calendar makes that date the | ||
| 846 | item's date. | ||
| 847 | |||
| 848 | @samp{today} (@kbd{a}): Make the item's date today's date. | ||
| 849 | |||
| 850 | @samp{dayname} (@kbd{n}): Prompt for a weekday name (with completion) | ||
| 851 | and make it the item's date header. Note that this replaces an | ||
| 852 | existing date string, it does not add the day name to the date string. | ||
| 853 | |||
| 854 | @samp{year} (@kbd{y}): Edit just the year component of the current | ||
| 855 | item's date string. | ||
| 856 | |||
| 857 | @samp{month} (@kbd{m}): Edit just the month component of the current | ||
| 858 | item's date string (with completion). | ||
| 859 | |||
| 860 | @samp{daynum} (@kbd{d}): Edit just the day number component of the | ||
| 861 | current item's date string. | ||
| 862 | @end enumerate | ||
| 763 | 863 | ||
| 764 | @noindent | 864 | @noindent |
| 765 | You can also use these commands on items whose date header consists of a | 865 | With the latter three parameters you can add a positive or negative |
| 766 | weekday name, which then changes to a header with year, month and day | 866 | numeric prefix argument to the invocation: this increments or |
| 767 | components. | 867 | decrements the selected date component by the given number and |
| 868 | automatically adjusts the other date components if necessary. For | ||
| 869 | example, if the item's date string is ``January 1, 2013'', then typing | ||
| 870 | @kbd{- 3 e d d} results in ``December 29, 2012''. | ||
| 871 | |||
| 872 | The first two groups of parameters apply only to todo items that are | ||
| 873 | not marked as done (@pxref{Done Items}); the two parameters of the | ||
| 874 | third group, in contrast, apply only to done todo items. You cannot | ||
| 875 | edit the text of such items, but you can edit or delete the comment | ||
| 876 | you may have added on marking the item as done (@pxref{Done Items, | ||
| 877 | @code{todo-item-done}},), or retroactively add a comment, by passing | ||
| 878 | either of these parameters. | ||
| 879 | |||
| 880 | @enumerate 3 | ||
| 768 | 881 | ||
| 769 | Each of the following three commands, in contrast to the preceding | 882 | @item |
| 770 | three, changes only a single date component and has no effect on a date | 883 | @samp{add/edit comment} (@kbd{c}): Edit the current done item's |
| 771 | header consisting of a weekday name: | 884 | comment, if it has one; otherwise, prompt for and add a comment. |
| 772 | 885 | ||
| 773 | @table @kbd | 886 | @samp{delete comment} (@kbd{d}): Delete the current done item's |
| 774 | @item e d y | 887 | comment, if it has one. |
| 775 | @itemx e d m | 888 | @end enumerate |
| 776 | @itemx e d d | ||
| 777 | Prompt for changing just the year, month or day number, respectively; if | ||
| 778 | invoked with a positive or negative numeric prefix argument, directly | ||
| 779 | increment or decrement the date component accordingly and automatically | ||
| 780 | adjust the other date component if necessary. For example, if the date | ||
| 781 | string is ``January 1, 2013'', typing @kbd{- 3 e d d} results in | ||
| 782 | ``December 29, 2012''. | ||
| 783 | @end table | ||
| 784 | 889 | ||
| 785 | @table @kbd | 890 | The command @code{todo-edit-item} is sensitive to the distinction |
| 786 | @item e d n | 891 | between not done and done todo items. If you type @kbd{e} when point |
| 787 | Prompt for a weekday name and make it the item's date header. Note that | 892 | is on a done item, this displays the following prompt in the echo |
| 788 | this replaces an existing date string, it does not add the day name to | 893 | area: |
| 789 | the date string. | ||
| 790 | |||
| 791 | @item e t | ||
| 792 | Edit just the item's time string. A time string can be added both to a | ||
| 793 | date string and to a weekday name. If you type @key{RET} at the | ||
| 794 | prompt, this omits a time string from the header, or deletes an existing | ||
| 795 | time string. | ||
| 796 | |||
| 797 | @item e y y | ||
| 798 | Change the item's diary inclusion status by adding or removing | ||
| 799 | @code{todo-nondiary-marker}. | ||
| 800 | 894 | ||
| 801 | @item e y k | 895 | @example |
| 802 | Change the item's diary marking status by adding or removing | 896 | Press a key (so far `e'): c=>add/edit comment d=>delete comment |
| 803 | @code{diary-nonmarking-symbol} (this command has an effect only if the | 897 | @end example |
| 804 | item is not marked for exclusion from the diary). | ||
| 805 | @end table | ||
| 806 | 898 | ||
| 807 | @noindent | 899 | @noindent |
| 808 | Parallel to the latter two item-level commands are the | 900 | Only by typing @kbd{c} or @kbd{d} in response to this prompt can you |
| 809 | following category-level commands: | 901 | complete the invocation. In contrast, if you type @kbd{e} when point |
| 902 | is on a non-done todo item, this displays the following prompt in the | ||
| 903 | echo area, and you can continue or complete the invocation only by | ||
| 904 | typing one of the listed keys: | ||
| 905 | |||
| 906 | @example | ||
| 907 | Press a key (so far `e'): e=>edit h=>header m=>multiline y=>diary k=>nonmarking d=>date t=>time | ||
| 908 | @end example | ||
| 909 | |||
| 910 | As noted above, passing the @samp{date} parameter does not complete | ||
| 911 | the invocation of @code{todo-edit-item}; rather, it displays the | ||
| 912 | following prompt, and typing any of these keys does complete the | ||
| 913 | invocation: | ||
| 914 | |||
| 915 | @example | ||
| 916 | Press a key (so far `e d'): f=>full c=>calendar a=>today n=>dayname y=>year m=>month d=>daynum | ||
| 917 | @end example | ||
| 918 | |||
| 919 | In addition to the item-level invocations `e y', to change the current | ||
| 920 | item's diary inclusion status, and `e k', to change the current item's | ||
| 921 | calendar marking status, Todo mode also has two related category-level | ||
| 922 | commands: | ||
| 810 | 923 | ||
| 811 | @table @kbd | 924 | @table @kbd |
| 812 | 925 | ||
| @@ -818,6 +931,21 @@ a prefix argument, these markings are removed from all items in the | |||
| 818 | category. | 931 | category. |
| 819 | @end table | 932 | @end table |
| 820 | 933 | ||
| 934 | @noindent | ||
| 935 | Like `e k', `C e k' automatically removes @code{todo-nondiary-marker} | ||
| 936 | from all items it is present on, since only diary items can bear | ||
| 937 | @code{diary-nonmarking-symbol}. | ||
| 938 | |||
| 939 | Since categories often contain a mix of items marked for diary | ||
| 940 | inclusion and exclusion, and of the former, a mix of those to be | ||
| 941 | marked and those not to be marked in the calendar, it is more useful | ||
| 942 | for these category-level commands, unlike the item-level commands, not | ||
| 943 | to be toggles, but to have the same effect on all items in the | ||
| 944 | category, and take a prefix argument to reverse the effect. (If you | ||
| 945 | really want to toggle the diary-inclusion and calendar-marking status | ||
| 946 | of all items in the category, you can do this by marking all the items | ||
| 947 | and then invoking `e y' or `e k', @pxref{Marked Items}). | ||
| 948 | |||
| 821 | @node Relocating and Removing Items, , Editing Item Headers and Text, Item Editing | 949 | @node Relocating and Removing Items, , Editing Item Headers and Text, Item Editing |
| 822 | @subsection Relocating and Removing Items | 950 | @subsection Relocating and Removing Items |
| 823 | 951 | ||
| @@ -849,10 +977,11 @@ Lower the current item's priority by one, exchanging its position in the list | |||
| 849 | with that of the item directly below it (@code{todo-lower-item-priority}). | 977 | with that of the item directly below it (@code{todo-lower-item-priority}). |
| 850 | 978 | ||
| 851 | @item # | 979 | @item # |
| 852 | Prompt for a number and relocate the item to the corresponding position | 980 | Prompt for a number and relocate the item to the corresponding |
| 853 | in the list (@code{todo-set-item-priority}). For example, entering | 981 | position in the list (@code{todo-set-item-priority}). For example, |
| 854 | @kbd{3} at the prompt makes the item the third in the category, i.e., | 982 | entering @kbd{3} at the prompt makes the item the third in the |
| 855 | gives it third highest priority. You can also pass the desired priority | 983 | category, i.e., gives it third highest priority; all lower priority |
| 984 | items are pushed down by one. You can also pass the desired priority | ||
| 856 | as a numeric prefix argument, e.g., @kbd{3 #} gives the item third | 985 | as a numeric prefix argument, e.g., @kbd{3 #} gives the item third |
| 857 | highest priority without prompting. (Prefix arguments have no effect | 986 | highest priority without prompting. (Prefix arguments have no effect |
| 858 | with @kbd{r} or @kbd{l}.) | 987 | with @kbd{r} or @kbd{l}.) |
| @@ -877,7 +1006,8 @@ enter is new, then you are asked whether to add the category to the | |||
| 877 | file, and if you affirm, the item is moved to the new category. | 1006 | file, and if you affirm, the item is moved to the new category. |
| 878 | @end table | 1007 | @end table |
| 879 | 1008 | ||
| 880 | You delete an item, thereby permanently removing it: | 1009 | You can delete an item, thereby permanently (and, as far as Todo mode |
| 1010 | is concerned, irrevocably) removing it from the todo file: | ||
| 881 | 1011 | ||
| 882 | @table @kbd | 1012 | @table @kbd |
| 883 | 1013 | ||
| @@ -918,6 +1048,7 @@ Archive Mode}). | |||
| 918 | 1048 | ||
| 919 | @table @kbd | 1049 | @table @kbd |
| 920 | 1050 | ||
| 1051 | @anchor{todo-item-done} | ||
| 921 | @item d | 1052 | @item d |
| 922 | This command (@code{todo-item-done}) removes the todo item at point from | 1053 | This command (@code{todo-item-done}) removes the todo item at point from |
| 923 | the todo list, appends to the original header a header consisting of | 1054 | the todo list, appends to the original header a header consisting of |
| @@ -954,23 +1085,30 @@ this is visible, hide it again and display only the todo items section | |||
| 954 | (@code{todo-toggle-view-done-only}). | 1085 | (@code{todo-toggle-view-done-only}). |
| 955 | @end table | 1086 | @end table |
| 956 | 1087 | ||
| 957 | Three editing commands for done items are available: | 1088 | Since done items are meant to be a record of your finished todo items, |
| 1089 | you cannot apply to them the same kinds of editing operations | ||
| 1090 | available to unfinished todo items. However, as explained in | ||
| 1091 | @ref{Editing Item Headers and Text} and repeated below for | ||
| 1092 | convenience, you can edit or delete a done item's comment, or | ||
| 1093 | retroactively add a comment. You can also relocate a done item, and | ||
| 1094 | you can revert its done status, making it an unfinished item again. | ||
| 958 | 1095 | ||
| 959 | @table @kbd | 1096 | @table @kbd |
| 960 | 1097 | ||
| 961 | @item e c | 1098 | @item e c |
| 962 | If you type this command (@code{todo-edit-done-item-comment}) when point is | 1099 | Edit the current done item's comment, if it has one; otherwise, prompt |
| 963 | on a done item that has a comment, you can edit the text of the | 1100 | for and add a comment. |
| 964 | comment. If you invoke it with a prefix argument (@kbd{C-u e c}), the | 1101 | |
| 965 | comment is deleted on confirmation. If the done item does not have a | 1102 | @item e d |
| 966 | comment, this command allows you to add one. | 1103 | Delete the current done item's comment, if it has one. |
| 967 | 1104 | ||
| 968 | @item m | 1105 | @item m |
| 969 | Move the done item at point to the top of the done items section of | 1106 | Move the done item at point to the top of the done items section of |
| 970 | another category (@code{todo-move-item}). This is useful in case, after | 1107 | another category (@code{todo-move-item}). This is useful in case, |
| 971 | having relocated an item to its category's done items section, you | 1108 | after having finished a todo item and relocated it to its category's |
| 972 | create a category that is better suited to the content of the done item | 1109 | done items section, you create a category that is better suited to the |
| 973 | than its current category, so you can recategorize the done item. | 1110 | content of the done item than its current category; in other words, |
| 1111 | you can retroactively recategorize the done item. | ||
| 974 | 1112 | ||
| 975 | @item u | 1113 | @item u |
| 976 | If you decide the done item at point is not done after all, this command | 1114 | If you decide the done item at point is not done after all, this command |
| @@ -1156,18 +1294,34 @@ You can also use the last two commands to mark or unmark all done items in | |||
| 1156 | the category, but only when only the done items section is being | 1294 | the category, but only when only the done items section is being |
| 1157 | displayed, i.e., after invoking @kbd{C V} or @kbd{V}. | 1295 | displayed, i.e., after invoking @kbd{C V} or @kbd{V}. |
| 1158 | 1296 | ||
| 1159 | The following commands operate on marked items: @kbd{k} (deleting), @kbd{m} | 1297 | The following commands operate on marked items: |
| 1160 | (moving to another category), @kbd{d} (moving to the done items section; | ||
| 1161 | note that @kbd{C-u d} adds the same comment to all marked items), @kbd{A d} | ||
| 1162 | (archiving), @kbd{u} (both in Todo mode for undoing a done item and in | ||
| 1163 | Todo Archive mode for unarchiving an item), as well as the commands for | ||
| 1164 | editing the item header (those beginning with the prefix @kbd{e d} as well | ||
| 1165 | as @kbd{e t}, @kbd{e y y} and @kbd{e y k}). The item insertion, textual editing and | ||
| 1166 | priority changing commands do not operate on marked items. | ||
| 1167 | 1298 | ||
| 1168 | If you use @kbd{m}, @kbd{d}, @kbd{A d} or @kbd{u} on multiple noncontiguous marked | 1299 | @itemize @bullet |
| 1169 | items, the relocated items retain their relative order but are now | 1300 | |
| 1170 | listed consecutively en bloc. | 1301 | @item |
| 1302 | @kbd{k} (deleting) | ||
| 1303 | @item | ||
| 1304 | @kbd{m} (moving to another category) | ||
| 1305 | @item | ||
| 1306 | @kbd{d} (moving to the done items section; note that @kbd{C-u d} adds | ||
| 1307 | the same comment to all marked items) | ||
| 1308 | @item | ||
| 1309 | @kbd{A d} (archiving) | ||
| 1310 | @item | ||
| 1311 | @kbd{u} (both in Todo mode for undoing a done item and in Todo Archive | ||
| 1312 | mode for unarchiving an item) | ||
| 1313 | @item | ||
| 1314 | the commands for editing the item header (those beginning with the | ||
| 1315 | prefix @kbd{e d} as well as @kbd{e t}, @kbd{e y} and @kbd{e k}) | ||
| 1316 | @end itemize | ||
| 1317 | |||
| 1318 | @noindent | ||
| 1319 | The item insertion, textual editing and priority changing commands do | ||
| 1320 | not operate on marked items. | ||
| 1321 | |||
| 1322 | If you use @kbd{m}, @kbd{d}, @kbd{A d} or @kbd{u} on multiple | ||
| 1323 | noncontiguous marked items, the relocated items retain their relative | ||
| 1324 | order but are now listed consecutively en bloc. | ||
| 1171 | 1325 | ||
| 1172 | You can mark both todo and done items, but note that only @kbd{m} can apply | 1326 | You can mark both todo and done items, but note that only @kbd{m} can apply |
| 1173 | to both; other commands only affect either marked todo or marked done | 1327 | to both; other commands only affect either marked todo or marked done |
| @@ -1177,9 +1331,9 @@ has no effect and informs you of your erroneous attempt. | |||
| 1177 | @node Todo Categories Mode, Searching for Items, Marked Items, Top | 1331 | @node Todo Categories Mode, Searching for Items, Marked Items, Top |
| 1178 | @chapter Todo Categories Mode | 1332 | @chapter Todo Categories Mode |
| 1179 | 1333 | ||
| 1180 | It can be helpful to have a compact overview of the categories in a todo | 1334 | It can be helpful to have a compact overview of the categories in a |
| 1181 | file and the types of items it contains; Todo provides a tabular view | 1335 | todo file and the types of items it contains; the Todo package |
| 1182 | of this information. | 1336 | provides a tabular view of this information. |
| 1183 | 1337 | ||
| 1184 | @table @kbd | 1338 | @table @kbd |
| 1185 | 1339 | ||
| @@ -1251,7 +1405,7 @@ the archive category instead of the empty todo category. You can | |||
| 1251 | recognize such categories by their items counts in the table---all | 1405 | recognize such categories by their items counts in the table---all |
| 1252 | columns but the archived one have counts of zero---and in addition, | 1406 | columns but the archived one have counts of zero---and in addition, |
| 1253 | their lines in the table are also distinguished from the others by a | 1407 | their lines in the table are also distinguished from the others by a |
| 1254 | different face. | 1408 | different face (@pxref{Faces}). |
| 1255 | 1409 | ||
| 1256 | You can navigate around the table: | 1410 | You can navigate around the table: |
| 1257 | 1411 | ||
| @@ -1313,14 +1467,15 @@ or archive file after reordering, in subsequent sessions as well. | |||
| 1313 | It is important to be aware that renumbering the categories does not | 1467 | It is important to be aware that renumbering the categories does not |
| 1314 | change the textual order of the categories in the file. This is | 1468 | change the textual order of the categories in the file. This is |
| 1315 | significant if you should invoke @kbd{F e} to edit the entire file | 1469 | significant if you should invoke @kbd{F e} to edit the entire file |
| 1316 | manually and in so doing alter the number of items in a category: this | 1470 | manually and in so doing alter the number of categories or the number |
| 1317 | will make the item count shown in the table of categories of this file | 1471 | of items in a category: this will make the information shown in the |
| 1318 | inconsistent with the actual number. You can repair this inconsistency | 1472 | table of categories of this file inconsistent with its actual state. |
| 1319 | by invoking the command @code{todo-repair-categories-sexp} (which lacks | 1473 | You can repair this inconsistency by invoking the command |
| 1320 | a key binding, since it is meant to be a rarely needed rescue | 1474 | @code{todo-repair-categories-sexp} (which lacks a key binding, since |
| 1321 | operation). But this will revert any renumbering of the categories you | 1475 | it is meant to be a rarely needed rescue operation). But this will |
| 1322 | have made, so you will have to renumber them again. This is the reason | 1476 | revert any renumbering of the categories you have made, so you will |
| 1323 | why you should exercise caution when using @kbd{F e}. | 1477 | have to renumber them again. This is one reason why you should |
| 1478 | exercise caution when using @kbd{F e}. | ||
| 1324 | @end quotation | 1479 | @end quotation |
| 1325 | 1480 | ||
| 1326 | @node Searching for Items, Todo Filtered Items Mode, Todo Categories Mode, Top | 1481 | @node Searching for Items, Todo Filtered Items Mode, Todo Categories Mode, Top |
| @@ -1525,7 +1680,8 @@ use the values of @code{todo-top-priorities-overrides} or | |||
| 1525 | 1680 | ||
| 1526 | Aside from explicitly invoking an item filtering command to display a | 1681 | Aside from explicitly invoking an item filtering command to display a |
| 1527 | saved list of items filtered by a given method from given todo files, | 1682 | saved list of items filtered by a given method from given todo files, |
| 1528 | there are two other ways to visit a saved file of filtered items: | 1683 | there are two other ways to visit a saved file of filtered items. You |
| 1684 | can invoke a command similar to `find-file': | ||
| 1529 | 1685 | ||
| 1530 | @table @kbd | 1686 | @table @kbd |
| 1531 | @item F f | 1687 | @item F f |
| @@ -1533,15 +1689,13 @@ Visit a saved file of filtered items, which you choose via minibuffer | |||
| 1533 | completion (@code{todo-find-filtered-items-file}). | 1689 | completion (@code{todo-find-filtered-items-file}). |
| 1534 | @end table | 1690 | @end table |
| 1535 | 1691 | ||
| 1536 | @itemize @bullet | 1692 | @noindent |
| 1537 | @item | 1693 | Alternatively, as with tables of categories, by customizing |
| 1538 | As with tables of categories, by customizing @code{todo-show-first} you | 1694 | @code{todo-show-first} you can have the first invocation of |
| 1539 | can have the first invocation of @code{todo-show} for a given todo file | 1695 | @code{todo-show} for a given todo file display the corresponding saved |
| 1540 | display the corresponding saved file of filtered items. If there is | 1696 | file of filtered items. If there is no saved filtered items list for |
| 1541 | no saved filtered items list for the file, @code{todo-show} simply | 1697 | the file, @code{todo-show} simply defaults to visiting the file and |
| 1542 | defaults to visiting the file and displaying its first category, as | 1698 | displaying its first category, as usual. |
| 1543 | usual. | ||
| 1544 | @end itemize | ||
| 1545 | 1699 | ||
| 1546 | The command @kbd{F k} (@pxref{File Editing}) is also available in Todo | 1700 | The command @kbd{F k} (@pxref{File Editing}) is also available in Todo |
| 1547 | Filtered Items mode. It deletes the current filtered items file. | 1701 | Filtered Items mode. It deletes the current filtered items file. |
| @@ -1560,20 +1714,23 @@ You can change the appearance of Todo mode buffers in a variety of ways. | |||
| 1560 | @node Faces, Item Prefix, , Todo Display Features | 1714 | @node Faces, Item Prefix, , Todo Display Features |
| 1561 | @section Faces | 1715 | @section Faces |
| 1562 | 1716 | ||
| 1563 | Each of the Todo modes uses faces to distinguish various aspects of the | 1717 | Each of the Todo modes uses faces to distinguish various aspects of |
| 1564 | display, both structural and informational. For example, the faces for | 1718 | the display, both structural and informational. For example, the |
| 1565 | the date and time strings of todo item headers by default inherit the | 1719 | faces for the date and time strings of todo item headers |
| 1566 | attributes of the corresponding faces used by the Emacs diary; but when | 1720 | (@code{todo-date} and @code{todo-time}, respectively) by default |
| 1567 | the date and time of a Todo diary item (i.e., an item lacking | 1721 | inherit the attributes of the corresponding faces used by the Emacs |
| 1568 | @code{todo-nondiary-marker}) is earlier than the current date and time, | 1722 | diary; but when the date and time of a Todo diary item (i.e., an item |
| 1569 | they are displayed in a different face. In this way, you can readily | 1723 | lacking @code{todo-nondiary-marker}) is earlier than the current date |
| 1570 | recognize diary items that have ``expired'' and act accordingly (e.g., | 1724 | and time, they are displayed in a different face |
| 1571 | by tagging them as done or by updating the deadlines). | 1725 | (@code{todo-diary-expired}). In this way, you can readily recognize |
| 1572 | 1726 | diary items that have ``expired'' and act accordingly (e.g., by | |
| 1573 | Another example of an informational face is the face used to distinguish | 1727 | tagging them as done or by updating the deadlines). |
| 1574 | top priority items. A third case is the face used in Todo Categories | 1728 | |
| 1575 | mode to mark rows of the table containing categories with only archived | 1729 | Another example of an informational face is the face used to |
| 1576 | items. | 1730 | distinguish top priority items (@code{todo-top-priority}). A third |
| 1731 | case is the face used in Todo Categories mode to mark rows of the | ||
| 1732 | table containing categories with only archived items | ||
| 1733 | (@code{todo-archived-only}). | ||
| 1577 | 1734 | ||
| 1578 | The @code{todo-faces} customization group contains a complete list of | 1735 | The @code{todo-faces} customization group contains a complete list of |
| 1579 | Todo mode faces and brief descriptions of their use. | 1736 | Todo mode faces and brief descriptions of their use. |
| @@ -1607,15 +1764,16 @@ temporarily hide the item numbering: | |||
| 1607 | @itemx N | 1764 | @itemx N |
| 1608 | Toggle between displaying item numbering and displaying the | 1765 | Toggle between displaying item numbering and displaying the |
| 1609 | @code{todo-prefix} string in the current Todo file (todo, archive, or | 1766 | @code{todo-prefix} string in the current Todo file (todo, archive, or |
| 1610 | saved virtual category of filtered items. This command also works in | 1767 | saved virtual category of filtered items). (This command also works in |
| 1611 | buffers of filtered items that have not yet been written to a file.) | 1768 | buffers of filtered items that have not yet been written to a file.) |
| 1612 | @end table | 1769 | @end table |
| 1613 | 1770 | ||
| 1614 | In the todo items section of each Todo mode category, the item prefix | 1771 | In the todo items section of each Todo mode category, the item prefix |
| 1615 | (whether a priority number or a fixed string) of the top priority items | 1772 | (whether a priority number or a fixed string) of the top priority |
| 1616 | (determined as specified in @pxref{Filtering Items}) is displayed in a | 1773 | items (determined as specified in @pxref{Filtering Items}) is |
| 1617 | different face from the prefix of the other items, so you see at a | 1774 | displayed in a face (@code{todo-top-priority}) different from the face |
| 1618 | glance how many items in the category are top priorities. | 1775 | of the prefix of non-top-priority items, so you see at a glance how |
| 1776 | many items in the category are top priorities. | ||
| 1619 | 1777 | ||
| 1620 | @node Other Display Commands and Options, , Item Prefix, Todo Display Features | 1778 | @node Other Display Commands and Options, , Item Prefix, Todo Display Features |
| 1621 | @section Other Display Commands and Options | 1779 | @section Other Display Commands and Options |
| @@ -1635,11 +1793,12 @@ category-file) tag is not hidden. | |||
| 1635 | 1793 | ||
| 1636 | @item F H | 1794 | @item F H |
| 1637 | @itemx H | 1795 | @itemx H |
| 1638 | Highlight the current item if unhighlighted, or remove its highlighting. | 1796 | Highlight the current item (with the face @code{hl-line}) if |
| 1639 | When item highlighting is enabled, it follows navigation by @kbd{n} or | 1797 | unhighlighted, or remove its highlighting. When item highlighting is |
| 1640 | @kbd{p}. If you want to have current item highlighting by default, | 1798 | enabled, it follows navigation by @kbd{n} or @kbd{p}. If you want to |
| 1641 | enable the option @code{todo-highlight-item}. @kbd{F H} or @kbd{H} will | 1799 | have current item highlighting by default, enable the option |
| 1642 | still toggle it. | 1800 | @code{todo-highlight-item}. @kbd{F H} or @kbd{H} will still toggle |
| 1801 | it. | ||
| 1643 | @end table | 1802 | @end table |
| 1644 | 1803 | ||
| 1645 | There are two options which affect the display of items whose content is | 1804 | There are two options which affect the display of items whose content is |
| @@ -1675,7 +1834,7 @@ By default, the todo and done items sections of a todo category are | |||
| 1675 | visually separated by a line as wide as the window the buffer is | 1834 | visually separated by a line as wide as the window the buffer is |
| 1676 | displayed in. You can change the appearance and width of the separator | 1835 | displayed in. You can change the appearance and width of the separator |
| 1677 | by customizing @code{todo-done-separator-string}; you can also change the | 1836 | by customizing @code{todo-done-separator-string}; you can also change the |
| 1678 | face of the separator string. | 1837 | face of the separator string (@code{todo-done-sep}). |
| 1679 | 1838 | ||
| 1680 | There are also several options for changing the appearance in Todo | 1839 | There are also several options for changing the appearance in Todo |
| 1681 | Categories mode and Todo Filtered Items mode, beyond those mentioned | 1840 | Categories mode and Todo Filtered Items mode, beyond those mentioned |
| @@ -1750,7 +1909,7 @@ do so later by invoking the command @code{todo-convert-legacy-files} | |||
| 1750 | (there is no key binding for it, since it shouldn't be necessary to use | 1909 | (there is no key binding for it, since it shouldn't be necessary to use |
| 1751 | it often). (A delicate part of the conversion concerns the customizable | 1910 | it often). (A delicate part of the conversion concerns the customizable |
| 1752 | format of item date/time headers in the old-style; see the documentation | 1911 | format of item date/time headers in the old-style; see the documentation |
| 1753 | string of @code{todo-todo-mode-date-time-regexp} for details.) | 1912 | string of @code{todo-legacy-date-time-regexp} for details.) |
| 1754 | 1913 | ||
| 1755 | @node GNU Free Documentation License, , Legacy Todo Mode Files, Top | 1914 | @node GNU Free Documentation License, , Legacy Todo Mode Files, Top |
| 1756 | @appendix GNU Free Documentation License | 1915 | @appendix GNU Free Documentation License |
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 94ba8f4a9c2..b16f881c4de 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-05-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Handle systems without WCONTINUED consistently. (Bug#15110, 17339) | ||
| 4 | * emacsclient.c (WCONTINUED): Move to ../src/syswait.h. | ||
| 5 | |||
| 1 | 2014-04-30 Glenn Morris <rgm@gnu.org> | 6 | 2014-04-30 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * Makefile.in ($(DESTDIR)${archlibdir}): | 8 | * Makefile.in ($(DESTDIR)${archlibdir}): |
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index bd0aa121836..a1177f54576 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c | |||
| @@ -65,10 +65,6 @@ char *w32_getenv (char *); | |||
| 65 | # define CLOSE_SOCKET close | 65 | # define CLOSE_SOCKET close |
| 66 | # define INITIALIZE() | 66 | # define INITIALIZE() |
| 67 | 67 | ||
| 68 | # ifndef WCONTINUED | ||
| 69 | # define WCONTINUED 8 | ||
| 70 | # endif | ||
| 71 | |||
| 72 | #define egetenv(VAR) getenv(VAR) | 68 | #define egetenv(VAR) getenv(VAR) |
| 73 | 69 | ||
| 74 | #endif /* !WINDOWSNT */ | 70 | #endif /* !WINDOWSNT */ |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 051d0e669b4..c0032864b66 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,97 @@ | |||
| 1 | 2014-05-04 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * mail/rmailsum.el (rmail-new-summary-1): Fix a typo in a comment. | ||
| 4 | |||
| 5 | 2014-05-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 6 | |||
| 7 | * vc/ediff-diff.el (ediff-set-fine-diff-properties-in-one-buffer): | ||
| 8 | Use nil rather than `default' for the "default" appearance (bug#17388). | ||
| 9 | * vc/ediff-util.el (ediff-inferior-compare-regions) | ||
| 10 | (ediff-toggle-autorefine, ediff-unselect-difference): Don't use | ||
| 11 | a misleading `default' value when it's really a boolean. | ||
| 12 | * vc/ediff-init.el (ediff-set-overlay-face): Don't set help-echo if the | ||
| 13 | overlay is not visible. | ||
| 14 | |||
| 15 | 2014-05-04 Stephen Berman <stephen.berman@gmx.net> | ||
| 16 | |||
| 17 | * calendar/todo-mode.el (todo-edit-file): Use display-warning. | ||
| 18 | (todo-menu): Uncomment and update. | ||
| 19 | |||
| 20 | 2014-05-04 Stephen Berman <stephen.berman@gmx.net> | ||
| 21 | |||
| 22 | * calendar/todo-mode.el: Reimplement item editing to have the same | ||
| 23 | basic user interface as item insertion, and make small UI and | ||
| 24 | larger internal improvements to the latter. | ||
| 25 | (todo-insert-item): Add reference to the Todo mode user manual to | ||
| 26 | the documentation string. | ||
| 27 | (todo-insert-item--basic): Rename from todo-basic-insert-item and | ||
| 28 | adjust all callers. Change signature to combine diary and | ||
| 29 | nonmarking arguments. Incorporate functionality of deleted item | ||
| 30 | copying command and add error checking. Remove detailed | ||
| 31 | descriptions of the arguments from the documentation string, since | ||
| 32 | this is treated in the Todo mode user manual. | ||
| 33 | (todo-copy-item, todo-edit-multiline-item) | ||
| 34 | (todo-edit-done-item-comment, todo-edit-item-header) | ||
| 35 | (todo-edit-item-time, todo-edit-item-date-from-calendar) | ||
| 36 | (todo-edit-item-date-to-today, todo-edit-item-date-day-name) | ||
| 37 | (todo-edit-item-date-year, todo-edit-item-date-month) | ||
| 38 | (todo-edit-item-date-day, todo-edit-item-diary-nonmarking): | ||
| 39 | Remove. | ||
| 40 | (todo-edit-item): Reimplement as wrapper command for | ||
| 41 | todo-edit-item--next-key and make it distinguish done and not done | ||
| 42 | todo items. | ||
| 43 | (todo-edit-item--text): New function, replacing old command | ||
| 44 | todo-edit-item and incorporating deleted commands | ||
| 45 | todo-edit-multiline-item and todo-edit-done-item-comment. | ||
| 46 | (todo-edit-item--header): Rename from todo-basic-edit-item-header. | ||
| 47 | Use only numeric value of prefix argument. Remove detailed | ||
| 48 | descriptions of the arguments from the documentation string, since | ||
| 49 | this is treated in the Todo mode user manual. | ||
| 50 | (todo-edit-item--diary-inclusion): New function, replacing old | ||
| 51 | command todo-edit-item-diary-inclusion and incorporating and fixing | ||
| 52 | functionality of deleted command todo-edit-item-diary-nonmarking, | ||
| 53 | making sure to remove todo-nondiary-marker when adding | ||
| 54 | diary-nonmarking-symbol. | ||
| 55 | (todo-edit-category-diary-inclusion): Make sure to delete | ||
| 56 | diary-nonmarking-symbol when adding todo-nondiary-marker. | ||
| 57 | (todo-edit-category-diary-nonmarking): Fix indentation. | ||
| 58 | (todo-insert-item--parameters): Group diary and nonmarking | ||
| 59 | parameters together. | ||
| 60 | (todo-insert-item--apply-args): Adjust to signature of | ||
| 61 | todo-insert-item--basic and incorporate copy parameter. | ||
| 62 | Make small code improvements. | ||
| 63 | (todo-insert-item--next-param): Improve prompt and adjust it to | ||
| 64 | new parameter grouping. Remove obsolete code. | ||
| 65 | (todo-edit-item--param-key-alist) | ||
| 66 | (todo-edit-item--date-param-key-alist) | ||
| 67 | (todo-edit-done-item--param-key-alist): New defconsts. | ||
| 68 | (todo-edit-item--prompt): New variable. | ||
| 69 | (todo-edit-item--next-key): New function. | ||
| 70 | (todo-key-bindings-t): Bind "e" to todo-edit-item. Remove | ||
| 71 | bindings of deleted commands. | ||
| 72 | |||
| 73 | 2014-05-04 Leo Liu <sdl.web@gmail.com> | ||
| 74 | |||
| 75 | * emacs-lisp/cl-macs.el (cl-deftype): Fix indentation. | ||
| 76 | |||
| 77 | 2014-05-04 Glenn Morris <rgm@gnu.org> | ||
| 78 | |||
| 79 | * allout-widgets.el (allout-widgets-tally) | ||
| 80 | (allout-decorate-item-guides): | ||
| 81 | * menu-bar.el (menu-bar-positive-p): | ||
| 82 | * minibuffer.el (completion-pcm-complete-word-inserts-delimiters): | ||
| 83 | * progmodes/gdb-mi.el (gdbmi-same-start, gdbmi-is-number): | ||
| 84 | * progmodes/js.el (js--inside-param-list-p) | ||
| 85 | (js--inside-dojo-class-list-p, js--forward-destructuring-spec): | ||
| 86 | * progmodes/prolog.el (region-exists-p): | ||
| 87 | * progmodes/verilog-mode.el (verilog-scan-cache-ok-p): | ||
| 88 | * textmodes/reftex-parse.el (reftex-using-biblatex-p): | ||
| 89 | Doc fixes (replace `iff'). | ||
| 90 | |||
| 91 | 2014-05-04 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 92 | |||
| 93 | * mpc.el (mpc-volume-mouse-set): Don't burp at the boundaries. | ||
| 94 | |||
| 1 | 2014-05-04 Leo Liu <sdl.web@gmail.com> | 95 | 2014-05-04 Leo Liu <sdl.web@gmail.com> |
| 2 | 96 | ||
| 3 | Support Chinese diary entries in calendar and diary. (Bug#17393) | 97 | Support Chinese diary entries in calendar and diary. (Bug#17393) |
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 65517607980..66ec0c333a7 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el | |||
| @@ -266,7 +266,7 @@ decreases as obsolete widgets are garbage collected." | |||
| 266 | (defvar allout-widgets-tally nil | 266 | (defvar allout-widgets-tally nil |
| 267 | "Hash-table of existing allout widgets, for debugging. | 267 | "Hash-table of existing allout widgets, for debugging. |
| 268 | 268 | ||
| 269 | Table is maintained iff `allout-widgets-maintain-tally' is non-nil. | 269 | Table is maintained only if `allout-widgets-maintain-tally' is non-nil. |
| 270 | 270 | ||
| 271 | The table contents will be out of sync if any widgets are created | 271 | The table contents will be out of sync if any widgets are created |
| 272 | or deleted while this variable is nil.") | 272 | or deleted while this variable is nil.") |
| @@ -1852,7 +1852,7 @@ In their absence, the current guide column flags are used. | |||
| 1852 | 1852 | ||
| 1853 | Optional PARENT-WIDGET is the widget for the item's parent item. | 1853 | Optional PARENT-WIDGET is the widget for the item's parent item. |
| 1854 | 1854 | ||
| 1855 | Optional HAS-SUCCESSOR is true iff the item is followed by a sibling. | 1855 | Optional HAS-SUCCESSOR is true if the item is followed by a sibling. |
| 1856 | 1856 | ||
| 1857 | We also hide the header-prefix string. | 1857 | We also hide the header-prefix string. |
| 1858 | 1858 | ||
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 09cca201c3c..ddc3a4843c9 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el | |||
| @@ -787,7 +787,7 @@ corresponding todo file, displaying the corresponding category." | |||
| 787 | (kill-buffer) | 787 | (kill-buffer) |
| 788 | (keyboard-quit))))) | 788 | (keyboard-quit))))) |
| 789 | (save-excursion (todo-category-select)) | 789 | (save-excursion (todo-category-select)) |
| 790 | (when add-item (todo-basic-insert-item))) | 790 | (when add-item (todo-insert-item--basic))) |
| 791 | (setq todo-show-first show-first) | 791 | (setq todo-show-first show-first) |
| 792 | (add-to-list 'todo-visited file))))) | 792 | (add-to-list 'todo-visited file))))) |
| 793 | 793 | ||
| @@ -947,7 +947,7 @@ Categories mode." | |||
| 947 | (todo-category-number category) | 947 | (todo-category-number category) |
| 948 | (todo-category-select) | 948 | (todo-category-select) |
| 949 | (goto-char (point-min)) | 949 | (goto-char (point-min)) |
| 950 | (when add-item (todo-basic-insert-item)))))) | 950 | (when add-item (todo-insert-item--basic)))))) |
| 951 | 951 | ||
| 952 | (defun todo-next-item (&optional count) | 952 | (defun todo-next-item (&optional count) |
| 953 | "Move point down to the beginning of the next item. | 953 | "Move point down to the beginning of the next item. |
| @@ -1216,9 +1216,19 @@ this command should be used with caution." | |||
| 1216 | (widen) | 1216 | (widen) |
| 1217 | (todo-edit-mode) | 1217 | (todo-edit-mode) |
| 1218 | (remove-overlays) | 1218 | (remove-overlays) |
| 1219 | (message "%s" (substitute-command-keys | 1219 | (display-warning 'todo (format "\ |
| 1220 | (concat "Type \\[todo-edit-quit] to check file format " | 1220 | |
| 1221 | "validity and return to Todo mode.\n")))) | 1221 | Type %s to return to Todo mode. |
| 1222 | |||
| 1223 | This also runs a file format check and signals an error if | ||
| 1224 | the format has become invalid. However, this check cannot | ||
| 1225 | tell if the number of items or categories changed, which | ||
| 1226 | could result in the file containing inconsistent information. | ||
| 1227 | You can repair this inconsistency by invoking the command | ||
| 1228 | `todo-repair-categories-sexp', but this will revert any | ||
| 1229 | renumbering of the categories you have made, so you will | ||
| 1230 | have to renumber them again (see `(todo-mode) Reordering | ||
| 1231 | Categories')." (substitute-command-keys "\\[todo-edit-quit]")))) | ||
| 1222 | 1232 | ||
| 1223 | (defun todo-add-category (&optional file cat) | 1233 | (defun todo-add-category (&optional file cat) |
| 1224 | "Add a new category to a todo file. | 1234 | "Add a new category to a todo file. |
| @@ -1267,7 +1277,7 @@ return the new category number." | |||
| 1267 | (setq todo-category-number num) | 1277 | (setq todo-category-number num) |
| 1268 | (todo-category-select) | 1278 | (todo-category-select) |
| 1269 | (when todo-add-item-if-new-category | 1279 | (when todo-add-item-if-new-category |
| 1270 | (todo-basic-insert-item))) | 1280 | (todo-insert-item--basic))) |
| 1271 | num)))) | 1281 | num)))) |
| 1272 | 1282 | ||
| 1273 | (defun todo-rename-category () | 1283 | (defun todo-rename-category () |
| @@ -1752,7 +1762,8 @@ marking of the next N items." | |||
| 1752 | (defvar todo-insert-item--parameters) | 1762 | (defvar todo-insert-item--parameters) |
| 1753 | 1763 | ||
| 1754 | (defun todo-insert-item (&optional arg) | 1764 | (defun todo-insert-item (&optional arg) |
| 1755 | "Insert a new todo item into a category. | 1765 | "Choose an item insertion operation and carry it out. |
| 1766 | This inserts a new todo item into a category. | ||
| 1756 | 1767 | ||
| 1757 | With no prefix argument ARG, add the item to the current | 1768 | With no prefix argument ARG, add the item to the current |
| 1758 | category; with one prefix argument (`C-u'), prompt for a category | 1769 | category; with one prefix argument (`C-u'), prompt for a category |
| @@ -1766,117 +1777,31 @@ There are a number of item insertion parameters which can be | |||
| 1766 | combined by entering specific keys to produce different insertion | 1777 | combined by entering specific keys to produce different insertion |
| 1767 | commands. After entering each key, a message shows which have | 1778 | commands. After entering each key, a message shows which have |
| 1768 | already been entered and which remain available. See | 1779 | already been entered and which remain available. See |
| 1769 | `todo-basic-insert-item' for details of the parameters and their | 1780 | `(todo-mode) Inserting New Items' for details of the parameters, |
| 1770 | effects." | 1781 | their associated keys and their effects." |
| 1771 | (interactive "P") | 1782 | (interactive "P") |
| 1772 | (setq todo-insert-item--keys-so-far "i") | 1783 | (setq todo-insert-item--keys-so-far "i") |
| 1773 | (todo-insert-item--next-param nil (list arg) todo-insert-item--parameters)) | 1784 | (todo-insert-item--next-param nil (list arg) todo-insert-item--parameters)) |
| 1774 | 1785 | ||
| 1775 | (defun todo-basic-insert-item (&optional arg diary nonmarking date-type time | 1786 | (defun todo-insert-item--basic (&optional arg diary-type date-type time where) |
| 1776 | region-or-here) | 1787 | "Function implementing the core of `todo-insert-item'." |
| 1777 | "Insert a new todo item into a category. | ||
| 1778 | This is the function from which the generated Todo mode item | ||
| 1779 | insertion commands derive. | ||
| 1780 | |||
| 1781 | The generated commands have mnemonic key bindings based on the | ||
| 1782 | arguments' values and their order in the command's argument list, | ||
| 1783 | as follows: (1) for DIARY `d', (2) for NONMARKING `k', (3) for | ||
| 1784 | DATE-TYPE either `c' for calendar or `d' for date or `n' for | ||
| 1785 | weekday name, (4) for TIME `t', (5) for REGION-OR-HERE either `r' | ||
| 1786 | for region or `h' for here. Sequences of these keys are appended | ||
| 1787 | to the insertion prefix key `i'. Keys that allow a following | ||
| 1788 | key (i.e., any but `r' or `h') must be doubled when used finally. | ||
| 1789 | For example, the command bound to the key sequence `i y h' will | ||
| 1790 | insert a new item with today's date, marked according to the | ||
| 1791 | DIARY argument described below, and with priority according to | ||
| 1792 | the HERE argument; `i y y' does the same except that the priority | ||
| 1793 | is not given by HERE but by prompting. | ||
| 1794 | |||
| 1795 | In command invocations, ARG is passed as a prefix argument as | ||
| 1796 | follows. With no prefix argument, add the item to the current | ||
| 1797 | category; with one prefix argument (`C-u'), prompt for a category | ||
| 1798 | from the current todo file; with two prefix arguments (`C-u C-u'), | ||
| 1799 | first prompt for a todo file, then a category in that file. If | ||
| 1800 | a non-existing category is entered, ask whether to add it to the | ||
| 1801 | todo file; if answered affirmatively, add the category and | ||
| 1802 | insert the item there. | ||
| 1803 | |||
| 1804 | The remaining arguments are set or left nil by the generated item | ||
| 1805 | insertion commands; their meanings are described in the follows | ||
| 1806 | paragraphs. | ||
| 1807 | |||
| 1808 | When argument DIARY is non-nil, this overrides the intent of the | ||
| 1809 | user option `todo-include-in-diary' for this item: if | ||
| 1810 | `todo-include-in-diary' is nil, include the item in the Fancy | ||
| 1811 | Diary display, and if it is non-nil, exclude the item from the | ||
| 1812 | Fancy Diary display. When DIARY is nil, `todo-include-in-diary' | ||
| 1813 | has its intended effect. | ||
| 1814 | |||
| 1815 | When the item is included in the Fancy Diary display and the | ||
| 1816 | argument NONMARKING is non-nil, this overrides the intent of the | ||
| 1817 | user option `todo-diary-nonmarking' for this item: if | ||
| 1818 | `todo-diary-nonmarking' is nil, append `diary-nonmarking-symbol' | ||
| 1819 | to the item, and if it is non-nil, omit `diary-nonmarking-symbol'. | ||
| 1820 | |||
| 1821 | The argument DATE-TYPE determines the content of the item's | ||
| 1822 | mandatory date header string and how it is added: | ||
| 1823 | - If DATE-TYPE is the symbol `calendar', the Calendar pops up and | ||
| 1824 | when the user puts the cursor on a date and hits RET, that | ||
| 1825 | date, in the format set by `calendar-date-display-form', | ||
| 1826 | becomes the date in the header. | ||
| 1827 | - If DATE-TYPE is a string matching the regexp | ||
| 1828 | `todo-date-pattern', that string becomes the date in the | ||
| 1829 | header. This case is for the command | ||
| 1830 | `todo-insert-item-from-calendar' which is called from the | ||
| 1831 | Calendar. | ||
| 1832 | - If DATE-TYPE is the symbol `date', the header contains the date | ||
| 1833 | in the format set by `calendar-date-display-form', with year, | ||
| 1834 | month and day individually prompted for (month with tab | ||
| 1835 | completion). | ||
| 1836 | - If DATE-TYPE is the symbol `dayname' the header contains a | ||
| 1837 | weekday name instead of a date, prompted for with tab | ||
| 1838 | completion. | ||
| 1839 | - If DATE-TYPE has any other value (including nil or none) the | ||
| 1840 | header contains the current date (in the format set by | ||
| 1841 | `calendar-date-display-form'). | ||
| 1842 | |||
| 1843 | With non-nil argument TIME prompt for a time string, which must | ||
| 1844 | match `diary-time-regexp'. Typing `<return>' at the prompt | ||
| 1845 | returns the current time, if the user option | ||
| 1846 | `todo-always-add-time-string' is non-nil, otherwise the empty | ||
| 1847 | string (i.e., no time string). If TIME is absent or nil, add or | ||
| 1848 | omit the current time string according as | ||
| 1849 | `todo-always-add-time-string' is non-nil or nil, respectively. | ||
| 1850 | |||
| 1851 | The argument REGION-OR-HERE determines the source and location of | ||
| 1852 | the new item: | ||
| 1853 | - If the REGION-OR-HERE is the symbol `here', prompt for the text of | ||
| 1854 | the new item and, if the command was invoked with point in the todo | ||
| 1855 | items section of the current category, give the new item the | ||
| 1856 | priority of the item at point, lowering the latter's priority and | ||
| 1857 | the priority of the remaining items. If point is in the done items | ||
| 1858 | section of the category, insert the new item as the first todo item | ||
| 1859 | in the category. Likewise, if the command with `here' is invoked | ||
| 1860 | outside of the current category, jump to the chosen category and | ||
| 1861 | insert the new item as the first item in the category. | ||
| 1862 | - If REGION-OR-HERE is the symbol `region', use the region of the | ||
| 1863 | current buffer as the text of the new item, depending on the | ||
| 1864 | value of user option `todo-use-only-highlighted-region': if | ||
| 1865 | this is non-nil, then use the region only when it is | ||
| 1866 | highlighted; otherwise, use the region regardless of | ||
| 1867 | highlighting. An error is signalled if there is no region in | ||
| 1868 | the current buffer. Prompt for the item's priority in the | ||
| 1869 | category (an integer between 1 and one more than the number of | ||
| 1870 | items in the category), and insert the item accordingly. | ||
| 1871 | - If REGION-OR-HERE has any other value (in particular, nil or | ||
| 1872 | none), prompt for the text and the item's priority, and insert | ||
| 1873 | the item accordingly." | ||
| 1874 | ;; If invoked outside of Todo mode and there is not yet any Todo | 1788 | ;; If invoked outside of Todo mode and there is not yet any Todo |
| 1875 | ;; file, initialize one. | 1789 | ;; file, initialize one. |
| 1876 | (if (null (funcall todo-files-function)) | 1790 | (if (null (funcall todo-files-function)) |
| 1877 | (todo-show) | 1791 | (todo-show) |
| 1878 | (let ((region (eq region-or-here 'region)) | 1792 | (let ((copy (eq where 'copy)) |
| 1879 | (here (eq region-or-here 'here))) | 1793 | (region (eq where 'region)) |
| 1794 | (here (eq where 'here)) | ||
| 1795 | diary-item) | ||
| 1796 | (when copy | ||
| 1797 | (cond | ||
| 1798 | ((not (eq major-mode 'todo-mode)) | ||
| 1799 | (user-error "You must be in Todo mode to copy a todo item")) | ||
| 1800 | ((todo-done-item-p) | ||
| 1801 | (user-error "You cannot copy a done item as a new todo item")) | ||
| 1802 | ((looking-at "^$") | ||
| 1803 | (user-error "Point must be on a todo item to copy it"))) | ||
| 1804 | (setq diary-item (todo-diary-item-p))) | ||
| 1880 | (when region | 1805 | (when region |
| 1881 | (let (use-empty-active-region) | 1806 | (let (use-empty-active-region) |
| 1882 | (unless (and todo-use-only-highlighted-region (use-region-p)) | 1807 | (unless (and todo-use-only-highlighted-region (use-region-p)) |
| @@ -1899,10 +1824,10 @@ the new item: | |||
| 1899 | todo-default-todo-file)))))) | 1824 | todo-default-todo-file)))))) |
| 1900 | (cat (car cat+file)) | 1825 | (cat (car cat+file)) |
| 1901 | (file (cdr cat+file)) | 1826 | (file (cdr cat+file)) |
| 1902 | (new-item (if region | 1827 | (new-item (cond (copy (todo-item-string)) |
| 1903 | (buffer-substring-no-properties | 1828 | (region (buffer-substring-no-properties |
| 1904 | (region-beginning) (region-end)) | 1829 | (region-beginning) (region-end))) |
| 1905 | (read-from-minibuffer "Todo item: "))) | 1830 | (t (read-from-minibuffer "Todo item: ")))) |
| 1906 | (date-string (cond | 1831 | (date-string (cond |
| 1907 | ((eq date-type 'date) | 1832 | ((eq date-type 'date) |
| 1908 | (todo-read-date)) | 1833 | (todo-read-date)) |
| @@ -1941,22 +1866,26 @@ the new item: | |||
| 1941 | (let ((buffer-read-only nil) | 1866 | (let ((buffer-read-only nil) |
| 1942 | (called-from-outside (not (and todo-mm (equal cat ocat)))) | 1867 | (called-from-outside (not (and todo-mm (equal cat ocat)))) |
| 1943 | done-only item-added) | 1868 | done-only item-added) |
| 1944 | (setq new-item | 1869 | (unless copy |
| 1945 | ;; Add date, time and diary marking as required. | 1870 | (setq new-item |
| 1946 | (concat (if (not (and diary (not todo-include-in-diary))) | 1871 | ;; Add date, time and diary marking as required. |
| 1947 | todo-nondiary-start | 1872 | (concat (if (not (and diary-type |
| 1948 | (when (and nonmarking (not todo-diary-nonmarking)) | 1873 | (not todo-include-in-diary))) |
| 1949 | diary-nonmarking-symbol)) | 1874 | todo-nondiary-start |
| 1950 | date-string (when (and time-string ; Can be empty. | 1875 | (when (and (eq diary-type 'nonmarking) |
| 1951 | (not (zerop (length | 1876 | (not todo-diary-nonmarking)) |
| 1952 | time-string)))) | 1877 | diary-nonmarking-symbol)) |
| 1953 | (concat " " time-string)) | 1878 | date-string (when (and time-string ; Can be empty. |
| 1954 | (when (not (and diary (not todo-include-in-diary))) | 1879 | (not (zerop (length |
| 1955 | todo-nondiary-end) | 1880 | time-string)))) |
| 1956 | " " new-item)) | 1881 | (concat " " time-string)) |
| 1957 | ;; Indent newlines inserted by C-q C-j if nonspace char follows. | 1882 | (when (not (and diary-type |
| 1958 | (setq new-item (replace-regexp-in-string "\\(\n\\)[^[:blank:]]" | 1883 | (not todo-include-in-diary))) |
| 1959 | "\n\t" new-item nil nil 1)) | 1884 | todo-nondiary-end) |
| 1885 | " " new-item)) | ||
| 1886 | ;; Indent newlines inserted by C-q C-j if nonspace char follows. | ||
| 1887 | (setq new-item (replace-regexp-in-string "\\(\n\\)[^[:blank:]]" | ||
| 1888 | "\n\t" new-item nil nil 1))) | ||
| 1960 | (unwind-protect | 1889 | (unwind-protect |
| 1961 | (progn | 1890 | (progn |
| 1962 | ;; Make sure the correct category is selected. There | 1891 | ;; Make sure the correct category is selected. There |
| @@ -2010,7 +1939,8 @@ the new item: | |||
| 2010 | ;; items are displayed in the window. | 1939 | ;; items are displayed in the window. |
| 2011 | (when item-added (recenter))) | 1940 | (when item-added (recenter))) |
| 2012 | (todo-update-count 'todo 1) | 1941 | (todo-update-count 'todo 1) |
| 2013 | (if (or diary todo-include-in-diary) (todo-update-count 'diary 1)) | 1942 | (when (or diary-item diary-type todo-include-in-diary) |
| 1943 | (todo-update-count 'diary 1)) | ||
| 2014 | (todo-update-categories-sexp)))))) | 1944 | (todo-update-categories-sexp)))))) |
| 2015 | 1945 | ||
| 2016 | (defun todo-set-date-from-calendar () | 1946 | (defun todo-set-date-from-calendar () |
| @@ -2054,21 +1984,10 @@ prompt for a todo file and then for a category in it." | |||
| 2054 | (setq todo-date-from-calendar | 1984 | (setq todo-date-from-calendar |
| 2055 | (calendar-date-string (calendar-cursor-to-date t) t t)) | 1985 | (calendar-date-string (calendar-cursor-to-date t) t t)) |
| 2056 | (calendar-exit) | 1986 | (calendar-exit) |
| 2057 | (todo-basic-insert-item arg nil nil todo-date-from-calendar)) | 1987 | (todo-insert-item--basic arg nil nil todo-date-from-calendar)) |
| 2058 | 1988 | ||
| 2059 | (define-key calendar-mode-map "it" 'todo-insert-item-from-calendar) | 1989 | (define-key calendar-mode-map "it" 'todo-insert-item-from-calendar) |
| 2060 | 1990 | ||
| 2061 | (defun todo-copy-item () | ||
| 2062 | "Copy item at point and insert the copy as a new item." | ||
| 2063 | (interactive) | ||
| 2064 | (unless (or (todo-done-item-p) (looking-at "^$")) | ||
| 2065 | (let ((copy (todo-item-string)) | ||
| 2066 | (diary-item (todo-diary-item-p))) | ||
| 2067 | (todo-set-item-priority copy (todo-current-category) t) | ||
| 2068 | (todo-update-count 'todo 1) | ||
| 2069 | (when diary-item (todo-update-count 'diary 1)) | ||
| 2070 | (todo-update-categories-sexp)))) | ||
| 2071 | |||
| 2072 | (defun todo-delete-item () | 1991 | (defun todo-delete-item () |
| 2073 | "Delete at least one item in this category. | 1992 | "Delete at least one item in this category. |
| 2074 | If there are marked items, delete all of these; otherwise, delete | 1993 | If there are marked items, delete all of these; otherwise, delete |
| @@ -2115,64 +2034,91 @@ the item at point." | |||
| 2115 | (todo-prefix-overlays))) | 2034 | (todo-prefix-overlays))) |
| 2116 | (if ov (delete-overlay ov))))) | 2035 | (if ov (delete-overlay ov))))) |
| 2117 | 2036 | ||
| 2118 | (defun todo-edit-item (&optional arg) | 2037 | (defvar todo-edit-item--param-key-alist) |
| 2119 | "Edit the todo item at point. | 2038 | (defvar todo-edit-done-item--param-key-alist) |
| 2120 | With non-nil prefix argument ARG, include the item's date/time | ||
| 2121 | header, making it also editable; otherwise, include only the item | ||
| 2122 | content. | ||
| 2123 | 2039 | ||
| 2124 | If the item consists of only one logical line, edit it in the | 2040 | (defun todo-edit-item (&optional arg) |
| 2125 | minibuffer; otherwise, edit it in Todo Edit mode." | 2041 | "Choose an editing operation for the current item and carry it out." |
| 2126 | (interactive "P") | 2042 | (interactive "P") |
| 2127 | (when (todo-item-string) | 2043 | (cond ((todo-done-item-p) |
| 2128 | (let* ((opoint (point)) | 2044 | (todo-edit-item--next-key todo-edit-done-item--param-key-alist)) |
| 2129 | (start (todo-item-start)) | 2045 | ((todo-item-string) |
| 2130 | (item-beg (progn | 2046 | (todo-edit-item--next-key todo-edit-item--param-key-alist arg)))) |
| 2131 | (re-search-forward | 2047 | |
| 2132 | (concat todo-date-string-start todo-date-pattern | 2048 | (defun todo-edit-item--text (&optional arg) |
| 2133 | "\\( " diary-time-regexp "\\)?" | 2049 | "Function providing the text editing facilities of `todo-edit-item'." |
| 2134 | (regexp-quote todo-nondiary-end) "?") | 2050 | (let* ((opoint (point)) |
| 2135 | (line-end-position) t) | 2051 | (start (todo-item-start)) |
| 2136 | (1+ (- (point) start)))) | 2052 | (end (save-excursion (todo-item-end))) |
| 2137 | (header (substring (todo-item-string) 0 item-beg)) | 2053 | (item-beg (progn |
| 2138 | (item (if arg (todo-item-string) | 2054 | (re-search-forward |
| 2139 | (substring (todo-item-string) item-beg))) | 2055 | (concat todo-date-string-start todo-date-pattern |
| 2140 | (multiline (> (length (split-string item "\n")) 1)) | 2056 | "\\( " diary-time-regexp "\\)?" |
| 2141 | (buffer-read-only nil)) | 2057 | (regexp-quote todo-nondiary-end) "?") |
| 2142 | (if multiline | 2058 | (line-end-position) t) |
| 2143 | (todo-edit-multiline-item) | 2059 | (1+ (- (point) start)))) |
| 2144 | (let ((new (concat (if arg "" header) | 2060 | (include-header (eq arg 'include-header)) |
| 2145 | (read-string "Edit: " (if arg | 2061 | (comment-edit (eq arg 'comment-edit)) |
| 2146 | (cons item item-beg) | 2062 | (comment-delete (eq arg 'comment-delete)) |
| 2147 | (cons item 0)))))) | 2063 | (header-string (substring (todo-item-string) 0 item-beg)) |
| 2148 | (when arg | 2064 | (item (if (or include-header comment-edit comment-delete) |
| 2149 | (while (not (string-match (concat todo-date-string-start | 2065 | (todo-item-string) |
| 2150 | todo-date-pattern) new)) | 2066 | (substring (todo-item-string) item-beg))) |
| 2151 | (setq new (read-from-minibuffer | 2067 | (multiline (> (length (split-string item "\n")) 1)) |
| 2152 | "Item must start with a date: " new)))) | 2068 | (comment (save-excursion |
| 2153 | ;; Ensure lines following hard newlines are indented. | 2069 | (todo-item-start) |
| 2154 | (setq new (replace-regexp-in-string "\\(\n\\)[^[:blank:]]" | 2070 | (re-search-forward |
| 2155 | "\n\t" new nil nil 1)) | 2071 | (concat " \\[" (regexp-quote todo-comment-string) |
| 2156 | ;; If user moved point during editing, make sure it moves back. | 2072 | ": \\([^]]+\\)\\]") end t))) |
| 2157 | (goto-char opoint) | 2073 | (prompt (if comment "Edit comment: " "Enter a comment: ")) |
| 2158 | (todo-remove-item) | 2074 | (buffer-read-only nil)) |
| 2159 | (todo-insert-with-overlays new) | 2075 | (cond |
| 2160 | (move-to-column item-beg)))))) | 2076 | ((or comment-edit comment-delete) |
| 2161 | 2077 | (save-excursion | |
| 2162 | (defun todo-edit-multiline-item () | 2078 | (todo-item-start) |
| 2163 | "Edit current todo item in Todo Edit mode. | 2079 | (if (re-search-forward (concat " \\[" (regexp-quote todo-comment-string) |
| 2164 | Use of newlines invokes `todo-indent' to insure compliance with | 2080 | ": \\([^]]+\\)\\]") end t) |
| 2165 | the format of Diary entries." | 2081 | (if comment-delete |
| 2166 | (interactive) | 2082 | (when (todo-y-or-n-p "Delete comment? ") |
| 2167 | (when (todo-item-string) | 2083 | (delete-region (match-beginning 0) (match-end 0))) |
| 2168 | (let ((buf todo-edit-buffer)) | 2084 | (replace-match (read-string prompt (cons (match-string 1) 1)) |
| 2169 | (set-window-buffer (selected-window) | 2085 | nil nil nil 1)) |
| 2170 | (set-buffer (make-indirect-buffer (buffer-name) buf))) | 2086 | (if comment-delete |
| 2171 | (narrow-to-region (todo-item-start) (todo-item-end)) | 2087 | (user-error "There is no comment to delete") |
| 2172 | (todo-edit-mode) | 2088 | (insert " [" todo-comment-string ": " |
| 2173 | (message "%s" (substitute-command-keys | 2089 | (prog1 (read-string prompt) |
| 2174 | (concat "Type \\[todo-edit-quit] " | 2090 | ;; If user moved point during editing, |
| 2175 | "to return to Todo mode.\n")))))) | 2091 | ;; make sure it moves back. |
| 2092 | (goto-char opoint) | ||
| 2093 | (todo-item-end)) | ||
| 2094 | "]"))))) | ||
| 2095 | ((or multiline (eq arg 'multiline)) | ||
| 2096 | (let ((buf todo-edit-buffer)) | ||
| 2097 | (set-window-buffer (selected-window) | ||
| 2098 | (set-buffer (make-indirect-buffer (buffer-name) buf))) | ||
| 2099 | (narrow-to-region (todo-item-start) (todo-item-end)) | ||
| 2100 | (todo-edit-mode) | ||
| 2101 | (message "%s" (substitute-command-keys | ||
| 2102 | (concat "Type \\[todo-edit-quit] " | ||
| 2103 | "to return to Todo mode.\n"))))) | ||
| 2104 | (t | ||
| 2105 | (let ((new (concat (if include-header "" header-string) | ||
| 2106 | (read-string "Edit: " (if include-header | ||
| 2107 | (cons item item-beg) | ||
| 2108 | (cons item 0)))))) | ||
| 2109 | (when include-header | ||
| 2110 | (while (not (string-match (concat todo-date-string-start | ||
| 2111 | todo-date-pattern) new)) | ||
| 2112 | (setq new (read-from-minibuffer | ||
| 2113 | "Item must start with a date: " new)))) | ||
| 2114 | ;; Ensure lines following hard newlines are indented. | ||
| 2115 | (setq new (replace-regexp-in-string "\\(\n\\)[^[:blank:]]" | ||
| 2116 | "\n\t" new nil nil 1)) | ||
| 2117 | ;; If user moved point during editing, make sure it moves back. | ||
| 2118 | (goto-char opoint) | ||
| 2119 | (todo-remove-item) | ||
| 2120 | (todo-insert-with-overlays new) | ||
| 2121 | (move-to-column item-beg)))))) | ||
| 2176 | 2122 | ||
| 2177 | (defun todo-edit-quit () | 2123 | (defun todo-edit-quit () |
| 2178 | "Return from Todo Edit mode to Todo mode. | 2124 | "Return from Todo Edit mode to Todo mode. |
| @@ -2225,35 +2171,15 @@ made in the number or names of categories." | |||
| 2225 | (todo-category-select) | 2171 | (todo-category-select) |
| 2226 | (goto-char (point-min)))))) | 2172 | (goto-char (point-min)))))) |
| 2227 | 2173 | ||
| 2228 | (defun todo-basic-edit-item-header (what &optional inc) | 2174 | (defun todo-edit-item--header (what &optional inc) |
| 2229 | "Function underlying commands to edit item date/time header. | 2175 | "Function providing header editing facilities of `todo-edit-item'." |
| 2230 | |||
| 2231 | The argument WHAT (passed by invoking commands) specifies what | ||
| 2232 | part of the header to edit; possible values are these symbols: | ||
| 2233 | `date', to edit the year, month, and day of the date string; | ||
| 2234 | `time', to edit just the time string; `calendar', to select the | ||
| 2235 | date from the Calendar; `today', to set the date to today's date; | ||
| 2236 | `dayname', to set the date string to the name of a day or to | ||
| 2237 | change the day name; and `year', `month' or `day', to edit only | ||
| 2238 | these respective parts of the date string (`day' is the number of | ||
| 2239 | the given day of the month, and `month' is either the name of the | ||
| 2240 | given month or its number, depending on the value of | ||
| 2241 | `calendar-date-display-form'). | ||
| 2242 | |||
| 2243 | The optional argument INC is a positive or negative integer | ||
| 2244 | \(passed by invoking commands as a numerical prefix argument) | ||
| 2245 | that in conjunction with the WHAT values `year', `month' or | ||
| 2246 | `day', increments or decrements the specified date string | ||
| 2247 | component by the specified number of suitable units, i.e., years, | ||
| 2248 | months, or days, with automatic adjustment of the other date | ||
| 2249 | string components as necessary. | ||
| 2250 | |||
| 2251 | If there are marked items, apply the same edit to all of these; | ||
| 2252 | otherwise, edit just the item at point." | ||
| 2253 | (let* ((cat (todo-current-category)) | 2176 | (let* ((cat (todo-current-category)) |
| 2254 | (marked (assoc cat todo-categories-with-marks)) | 2177 | (marked (assoc cat todo-categories-with-marks)) |
| 2255 | (first t) | 2178 | (first t) |
| 2256 | (todo-date-from-calendar t) | 2179 | (todo-date-from-calendar t) |
| 2180 | ;; INC must be an integer, but users could pass it via | ||
| 2181 | ;; `todo-edit-item' as e.g. `-' or `C-u'. | ||
| 2182 | (inc (prefix-numeric-value inc)) | ||
| 2257 | (buffer-read-only nil) | 2183 | (buffer-read-only nil) |
| 2258 | ndate ntime year monthname month day | 2184 | ndate ntime year monthname month day |
| 2259 | dayname) ; Needed by calendar-date-display-form. | 2185 | dayname) ; Needed by calendar-date-display-form. |
| @@ -2372,7 +2298,8 @@ otherwise, edit just the item at point." | |||
| 2372 | ((or (string= omonth "*") (string= omonthname "*")) | 2298 | ((or (string= omonth "*") (string= omonthname "*")) |
| 2373 | (setq dd (+ dd inc)) | 2299 | (setq dd (+ dd inc)) |
| 2374 | (if (> dd 31) | 2300 | (if (> dd 31) |
| 2375 | (user-error "A month cannot have more than 31 days") | 2301 | (user-error |
| 2302 | "A month cannot have more than 31 days") | ||
| 2376 | (number-to-string dd))) | 2303 | (number-to-string dd))) |
| 2377 | ;; Increment or decrement day by INC, | 2304 | ;; Increment or decrement day by INC, |
| 2378 | ;; adjusting month and year if necessary | 2305 | ;; adjusting month and year if necessary |
| @@ -2414,65 +2341,8 @@ otherwise, edit just the item at point." | |||
| 2414 | (todo-forward-item) | 2341 | (todo-forward-item) |
| 2415 | (goto-char (point-max)))))))) | 2342 | (goto-char (point-max)))))))) |
| 2416 | 2343 | ||
| 2417 | (defun todo-edit-item-header () | 2344 | (defun todo-edit-item--diary-inclusion (&optional nonmarking) |
| 2418 | "Interactively edit at least the date of item's date/time header. | 2345 | "Function providing diary marking facilities of `todo-edit-item'." |
| 2419 | If user option `todo-always-add-time-string' is non-nil, also | ||
| 2420 | edit item's time string." | ||
| 2421 | (interactive) | ||
| 2422 | (todo-basic-edit-item-header 'date) | ||
| 2423 | (when todo-always-add-time-string | ||
| 2424 | (todo-edit-item-time))) | ||
| 2425 | |||
| 2426 | (defun todo-edit-item-time () | ||
| 2427 | "Interactively edit the time string of item's date/time header." | ||
| 2428 | (interactive) | ||
| 2429 | (todo-basic-edit-item-header 'time)) | ||
| 2430 | |||
| 2431 | (defun todo-edit-item-date-from-calendar () | ||
| 2432 | "Interactively edit item's date using the Calendar." | ||
| 2433 | (interactive) | ||
| 2434 | (todo-basic-edit-item-header 'calendar)) | ||
| 2435 | |||
| 2436 | (defun todo-edit-item-date-to-today () | ||
| 2437 | "Set item's date to today's date." | ||
| 2438 | (interactive) | ||
| 2439 | (todo-basic-edit-item-header 'today)) | ||
| 2440 | |||
| 2441 | (defun todo-edit-item-date-day-name () | ||
| 2442 | "Replace item's date with the name of a day of the week." | ||
| 2443 | (interactive) | ||
| 2444 | (todo-basic-edit-item-header 'dayname)) | ||
| 2445 | |||
| 2446 | (defun todo-edit-item-date-year (&optional inc) | ||
| 2447 | "Interactively edit the year of item's date string. | ||
| 2448 | With prefix argument INC a positive or negative integer, | ||
| 2449 | increment or decrement the year by INC." | ||
| 2450 | (interactive "p") | ||
| 2451 | (todo-basic-edit-item-header 'year inc)) | ||
| 2452 | |||
| 2453 | (defun todo-edit-item-date-month (&optional inc) | ||
| 2454 | "Interactively edit the month of item's date string. | ||
| 2455 | With prefix argument INC a positive or negative integer, | ||
| 2456 | increment or decrement the month by INC." | ||
| 2457 | (interactive "p") | ||
| 2458 | (todo-basic-edit-item-header 'month inc)) | ||
| 2459 | |||
| 2460 | (defun todo-edit-item-date-day (&optional inc) | ||
| 2461 | "Interactively edit the day of the month of item's date string. | ||
| 2462 | With prefix argument INC a positive or negative integer, | ||
| 2463 | increment or decrement the day by INC." | ||
| 2464 | (interactive "p") | ||
| 2465 | (todo-basic-edit-item-header 'day inc)) | ||
| 2466 | |||
| 2467 | (defun todo-edit-item-diary-inclusion () | ||
| 2468 | "Change diary status of one or more todo items in this category. | ||
| 2469 | That is, insert `todo-nondiary-marker' if the candidate items | ||
| 2470 | lack this marking; otherwise, remove it. | ||
| 2471 | |||
| 2472 | If there are marked todo items, change the diary status of all | ||
| 2473 | and only these, otherwise change the diary status of the item at | ||
| 2474 | point." | ||
| 2475 | (interactive) | ||
| 2476 | (let ((buffer-read-only) | 2346 | (let ((buffer-read-only) |
| 2477 | (marked (assoc (todo-current-category) | 2347 | (marked (assoc (todo-current-category) |
| 2478 | todo-categories-with-marks))) | 2348 | todo-categories-with-marks))) |
| @@ -2488,17 +2358,30 @@ point." | |||
| 2488 | (end (save-excursion | 2358 | (end (save-excursion |
| 2489 | (or (todo-time-string-matcher lim) | 2359 | (or (todo-time-string-matcher lim) |
| 2490 | (todo-date-string-matcher lim))))) | 2360 | (todo-date-string-matcher lim))))) |
| 2491 | (if (looking-at (regexp-quote todo-nondiary-start)) | 2361 | (if nonmarking |
| 2492 | (progn | 2362 | (if (looking-at (regexp-quote diary-nonmarking-symbol)) |
| 2493 | (replace-match "") | 2363 | (replace-match "") |
| 2494 | (search-forward todo-nondiary-end (1+ end) t) | 2364 | (when (looking-at (regexp-quote todo-nondiary-start)) |
| 2495 | (replace-match "") | 2365 | (save-excursion |
| 2496 | (todo-update-count 'diary 1)) | 2366 | (replace-match "") |
| 2497 | (when end | 2367 | (search-forward todo-nondiary-end (1+ end) t) |
| 2498 | (insert todo-nondiary-start) | 2368 | (replace-match "") |
| 2499 | (goto-char (1+ end)) | 2369 | (todo-update-count 'diary 1))) |
| 2500 | (insert todo-nondiary-end) | 2370 | (insert diary-nonmarking-symbol)) |
| 2501 | (todo-update-count 'diary -1))))) | 2371 | (if (looking-at (regexp-quote todo-nondiary-start)) |
| 2372 | (progn | ||
| 2373 | (replace-match "") | ||
| 2374 | (search-forward todo-nondiary-end (1+ end) t) | ||
| 2375 | (replace-match "") | ||
| 2376 | (todo-update-count 'diary 1)) | ||
| 2377 | (when end | ||
| 2378 | (when (looking-at (regexp-quote diary-nonmarking-symbol)) | ||
| 2379 | (replace-match "") | ||
| 2380 | (setq end (1- end))) ; Since we deleted nonmarking symbol. | ||
| 2381 | (insert todo-nondiary-start) | ||
| 2382 | (goto-char (1+ end)) | ||
| 2383 | (insert todo-nondiary-end) | ||
| 2384 | (todo-update-count 'diary -1)))))) | ||
| 2502 | (unless marked (throw 'stop nil)) | 2385 | (unless marked (throw 'stop nil)) |
| 2503 | (todo-forward-item))))) | 2386 | (todo-forward-item))))) |
| 2504 | (todo-update-categories-sexp))) | 2387 | (todo-update-categories-sexp))) |
| @@ -2524,6 +2407,9 @@ items." | |||
| 2524 | (todo-date-string-matcher lim))))) | 2407 | (todo-date-string-matcher lim))))) |
| 2525 | (if arg | 2408 | (if arg |
| 2526 | (unless (looking-at (regexp-quote todo-nondiary-start)) | 2409 | (unless (looking-at (regexp-quote todo-nondiary-start)) |
| 2410 | (when (looking-at (regexp-quote diary-nonmarking-symbol)) | ||
| 2411 | (replace-match "") | ||
| 2412 | (setq end (1- end))) ; Since we deleted nonmarking symbol. | ||
| 2527 | (insert todo-nondiary-start) | 2413 | (insert todo-nondiary-start) |
| 2528 | (goto-char (1+ end)) | 2414 | (goto-char (1+ end)) |
| 2529 | (insert todo-nondiary-end)) | 2415 | (insert todo-nondiary-end)) |
| @@ -2538,33 +2424,6 @@ items." | |||
| 2538 | (- todo-count diary-count)))) | 2424 | (- todo-count diary-count)))) |
| 2539 | (todo-update-categories-sexp))))) | 2425 | (todo-update-categories-sexp))))) |
| 2540 | 2426 | ||
| 2541 | (defun todo-edit-item-diary-nonmarking () | ||
| 2542 | "Change non-marking of one or more diary items in this category. | ||
| 2543 | That is, insert `diary-nonmarking-symbol' if the candidate items | ||
| 2544 | lack this marking; otherwise, remove it. | ||
| 2545 | |||
| 2546 | If there are marked todo items, change the non-marking status of | ||
| 2547 | all and only these, otherwise change the non-marking status of | ||
| 2548 | the item at point." | ||
| 2549 | (interactive) | ||
| 2550 | (let ((buffer-read-only) | ||
| 2551 | (marked (assoc (todo-current-category) | ||
| 2552 | todo-categories-with-marks))) | ||
| 2553 | (catch 'stop | ||
| 2554 | (save-excursion | ||
| 2555 | (when marked (goto-char (point-min))) | ||
| 2556 | (while (not (eobp)) | ||
| 2557 | (if (todo-done-item-p) | ||
| 2558 | (throw 'stop (message "Done items cannot be edited")) | ||
| 2559 | (unless (and marked (not (todo-marked-item-p))) | ||
| 2560 | (todo-item-start) | ||
| 2561 | (unless (looking-at (regexp-quote todo-nondiary-start)) | ||
| 2562 | (if (looking-at (regexp-quote diary-nonmarking-symbol)) | ||
| 2563 | (replace-match "") | ||
| 2564 | (insert diary-nonmarking-symbol)))) | ||
| 2565 | (unless marked (throw 'stop nil)) | ||
| 2566 | (todo-forward-item))))))) | ||
| 2567 | |||
| 2568 | (defun todo-edit-category-diary-nonmarking (arg) | 2427 | (defun todo-edit-category-diary-nonmarking (arg) |
| 2569 | "Add `diary-nonmarking-symbol' to all diary items in this category. | 2428 | "Add `diary-nonmarking-symbol' to all diary items in this category. |
| 2570 | With prefix ARG, remove `diary-nonmarking-symbol' from all diary | 2429 | With prefix ARG, remove `diary-nonmarking-symbol' from all diary |
| @@ -2574,16 +2433,16 @@ items in this category." | |||
| 2574 | (goto-char (point-min)) | 2433 | (goto-char (point-min)) |
| 2575 | (let (buffer-read-only) | 2434 | (let (buffer-read-only) |
| 2576 | (catch 'stop | 2435 | (catch 'stop |
| 2577 | (while (not (eobp)) | 2436 | (while (not (eobp)) |
| 2578 | (if (todo-done-item-p) ; We've gone too far. | 2437 | (if (todo-done-item-p) ; We've gone too far. |
| 2579 | (throw 'stop nil) | 2438 | (throw 'stop nil) |
| 2580 | (unless (looking-at (regexp-quote todo-nondiary-start)) | 2439 | (unless (looking-at (regexp-quote todo-nondiary-start)) |
| 2581 | (if arg | 2440 | (if arg |
| 2582 | (when (looking-at (regexp-quote diary-nonmarking-symbol)) | 2441 | (when (looking-at (regexp-quote diary-nonmarking-symbol)) |
| 2583 | (replace-match "")) | 2442 | (replace-match "")) |
| 2584 | (unless (looking-at (regexp-quote diary-nonmarking-symbol)) | 2443 | (unless (looking-at (regexp-quote diary-nonmarking-symbol)) |
| 2585 | (insert diary-nonmarking-symbol)))) | 2444 | (insert diary-nonmarking-symbol)))) |
| 2586 | (todo-forward-item))))))) | 2445 | (todo-forward-item))))))) |
| 2587 | 2446 | ||
| 2588 | (defun todo-set-item-priority (&optional item cat new arg) | 2447 | (defun todo-set-item-priority (&optional item cat new arg) |
| 2589 | "Prompt for and set ITEM's priority in CATegory. | 2448 | "Prompt for and set ITEM's priority in CATegory. |
| @@ -2970,32 +2829,6 @@ visible." | |||
| 2970 | ;; When done items are shown, put cursor on first just done item. | 2829 | ;; When done items are shown, put cursor on first just done item. |
| 2971 | (when opoint (goto-char opoint))))))) | 2830 | (when opoint (goto-char opoint))))))) |
| 2972 | 2831 | ||
| 2973 | (defun todo-edit-done-item-comment (&optional arg) | ||
| 2974 | "Add a comment to this done item or edit an existing comment. | ||
| 2975 | With prefix ARG delete an existing comment." | ||
| 2976 | (interactive "P") | ||
| 2977 | (when (todo-done-item-p) | ||
| 2978 | (let ((item (todo-item-string)) | ||
| 2979 | (opoint (point)) | ||
| 2980 | (end (save-excursion (todo-item-end))) | ||
| 2981 | comment buffer-read-only) | ||
| 2982 | (save-excursion | ||
| 2983 | (todo-item-start) | ||
| 2984 | (if (re-search-forward (concat " \\[" | ||
| 2985 | (regexp-quote todo-comment-string) | ||
| 2986 | ": \\([^]]+\\)\\]") end t) | ||
| 2987 | (if arg | ||
| 2988 | (when (todo-y-or-n-p "Delete comment? ") | ||
| 2989 | (delete-region (match-beginning 0) (match-end 0))) | ||
| 2990 | (setq comment (read-string "Edit comment: " | ||
| 2991 | (cons (match-string 1) 1))) | ||
| 2992 | (replace-match comment nil nil nil 1)) | ||
| 2993 | (setq comment (read-string "Enter a comment: ")) | ||
| 2994 | ;; If user moved point during editing, make sure it moves back. | ||
| 2995 | (goto-char opoint) | ||
| 2996 | (todo-item-end) | ||
| 2997 | (insert " [" todo-comment-string ": " comment "]")))))) | ||
| 2998 | |||
| 2999 | (defun todo-item-undone () | 2832 | (defun todo-item-undone () |
| 3000 | "Restore at least one done item to this category's todo section. | 2833 | "Restore at least one done item to this category's todo section. |
| 3001 | Prompt for the new priority. If there are marked items, undo all | 2834 | Prompt for the new priority. If there are marked items, undo all |
| @@ -5451,7 +5284,7 @@ of each other." | |||
| 5451 | (forward-line))))) | 5284 | (forward-line))))) |
| 5452 | 5285 | ||
| 5453 | ;; ----------------------------------------------------------------------------- | 5286 | ;; ----------------------------------------------------------------------------- |
| 5454 | ;;; Utilities for generating item insertion commands and key bindings | 5287 | ;;; Generating and applying item insertion and editing key sequences |
| 5455 | ;; ----------------------------------------------------------------------------- | 5288 | ;; ----------------------------------------------------------------------------- |
| 5456 | 5289 | ||
| 5457 | ;; Thanks to Stefan Monnier for suggesting dynamically generating item | 5290 | ;; Thanks to Stefan Monnier for suggesting dynamically generating item |
| @@ -5462,7 +5295,7 @@ of each other." | |||
| 5462 | ;; uses dynamic binding. | 5295 | ;; uses dynamic binding. |
| 5463 | 5296 | ||
| 5464 | (defconst todo-insert-item--parameters | 5297 | (defconst todo-insert-item--parameters |
| 5465 | '((default copy) diary nonmarking (calendar date dayname) time (here region)) | 5298 | '((default copy) (diary nonmarking) (calendar date dayname) time (here region)) |
| 5466 | "List of all item insertion parameters. | 5299 | "List of all item insertion parameters. |
| 5467 | Passed by `todo-insert-item' to `todo-insert-item--next-param' to | 5300 | Passed by `todo-insert-item' to `todo-insert-item--next-param' to |
| 5468 | dynamically create item insertion commands.") | 5301 | dynamically create item insertion commands.") |
| @@ -5527,25 +5360,20 @@ occupied by `nil'." | |||
| 5527 | (list (car (todo-insert-item--argsleft | 5360 | (list (car (todo-insert-item--argsleft |
| 5528 | (todo-insert-item--this-key) | 5361 | (todo-insert-item--this-key) |
| 5529 | todo-insert-item--argsleft))))) | 5362 | todo-insert-item--argsleft))))) |
| 5530 | (arglist (unless (= 5 (length args)) | 5363 | (arglist (unless (= 4 (length args)) |
| 5531 | (let ((v (make-vector 5 nil)) elt) | 5364 | (let ((v (make-vector 4 nil)) elt) |
| 5532 | (while args | 5365 | (while args |
| 5533 | (setq elt (pop args)) | 5366 | (setq elt (pop args)) |
| 5534 | (cond ((eq elt 'diary) | 5367 | (cond ((memq elt '(diary nonmarking)) |
| 5535 | (aset v 0 elt)) | 5368 | (aset v 0 elt)) |
| 5536 | ((eq elt 'nonmarking) | 5369 | ((memq elt '(calendar date dayname)) |
| 5537 | (aset v 1 elt)) | 5370 | (aset v 1 elt)) |
| 5538 | ((or (eq elt 'calendar) | ||
| 5539 | (eq elt 'date) | ||
| 5540 | (eq elt 'dayname)) | ||
| 5541 | (aset v 2 elt)) | ||
| 5542 | ((eq elt 'time) | 5371 | ((eq elt 'time) |
| 5543 | (aset v 3 elt)) | 5372 | (aset v 2 elt)) |
| 5544 | ((or (eq elt 'here) | 5373 | ((memq elt '(copy here region)) |
| 5545 | (eq elt 'region)) | 5374 | (aset v 3 elt)))) |
| 5546 | (aset v 4 elt)))) | ||
| 5547 | (append v nil))))) | 5375 | (append v nil))))) |
| 5548 | (apply #'todo-basic-insert-item (nconc arg arglist)))) | 5376 | (apply #'todo-insert-item--basic (nconc arg arglist)))) |
| 5549 | 5377 | ||
| 5550 | (defun todo-insert-item--next-param (last args argsleft) | 5378 | (defun todo-insert-item--next-param (last args argsleft) |
| 5551 | "Build item insertion command from LAST, ARGS and ARGSLEFT and call it. | 5379 | "Build item insertion command from LAST, ARGS and ARGSLEFT and call it. |
| @@ -5554,35 +5382,31 @@ already entered and those still available." | |||
| 5554 | (cl-assert argsleft) | 5382 | (cl-assert argsleft) |
| 5555 | (let* ((map (make-sparse-keymap)) | 5383 | (let* ((map (make-sparse-keymap)) |
| 5556 | (prompt nil) | 5384 | (prompt nil) |
| 5557 | (addprompt (lambda (k name) | 5385 | (addprompt |
| 5558 | (setq prompt (concat prompt | 5386 | (lambda (k name) |
| 5559 | (format (concat | 5387 | (setq prompt |
| 5560 | (if (or (eq name 'default) | 5388 | (concat prompt |
| 5561 | (eq name 'calendar) | 5389 | (format |
| 5562 | (eq name 'here)) | 5390 | (concat |
| 5563 | " { " " ") | 5391 | (if (memq name '(default diary calendar here)) |
| 5564 | "%s=>%s" | 5392 | " { " " ") |
| 5565 | (when (or (eq name 'copy) | 5393 | "%s=>%s" |
| 5566 | (eq name 'dayname) | 5394 | (when (memq name '(copy nonmarking dayname region)) |
| 5567 | (eq name 'region)) | 5395 | " }")) |
| 5568 | " }")) | 5396 | (propertize k 'face 'todo-key-prompt) |
| 5569 | (propertize k 'face | 5397 | name)))))) |
| 5570 | 'todo-key-prompt) | ||
| 5571 | name)))))) | ||
| 5572 | (setq todo-insert-item--args args) | 5398 | (setq todo-insert-item--args args) |
| 5573 | (setq todo-insert-item--argsleft argsleft) | 5399 | (setq todo-insert-item--argsleft argsleft) |
| 5574 | (when last | 5400 | (when last |
| 5575 | (cond ((eq last 'default) | 5401 | (if (memq last '(default copy)) |
| 5576 | (apply #'todo-basic-insert-item (car todo-insert-item--args)) | 5402 | (progn |
| 5577 | (setq todo-insert-item--argsleft nil)) | 5403 | (setq todo-insert-item--argsleft nil) |
| 5578 | ((eq last 'copy) | 5404 | (todo-insert-item--apply-args)) |
| 5579 | (todo-copy-item) | 5405 | (let ((k (todo-insert-item--keyof last))) |
| 5580 | (setq todo-insert-item--argsleft nil)) | 5406 | (funcall addprompt k (make-symbol (concat (symbol-name last) ":GO!"))) |
| 5581 | (t (let ((k (todo-insert-item--keyof last))) | 5407 | (define-key map (todo-insert-item--keyof last) |
| 5582 | (funcall addprompt k 'GO!) | 5408 | (lambda () (interactive) |
| 5583 | (define-key map (todo-insert-item--keyof last) | 5409 | (todo-insert-item--apply-args)))))) |
| 5584 | (lambda () (interactive) | ||
| 5585 | (todo-insert-item--apply-args))))))) | ||
| 5586 | (while todo-insert-item--argsleft | 5410 | (while todo-insert-item--argsleft |
| 5587 | (let ((x (car todo-insert-item--argsleft))) | 5411 | (let ((x (car todo-insert-item--argsleft))) |
| 5588 | (setq todo-insert-item--newargsleft (cdr todo-insert-item--argsleft)) | 5412 | (setq todo-insert-item--newargsleft (cdr todo-insert-item--argsleft)) |
| @@ -5594,14 +5418,6 @@ already entered and those still available." | |||
| 5594 | (lambda () (interactive) | 5418 | (lambda () (interactive) |
| 5595 | (todo-insert-item--apply-args)) | 5419 | (todo-insert-item--apply-args)) |
| 5596 | (lambda () (interactive) | 5420 | (lambda () (interactive) |
| 5597 | (when (equal "k" (todo-insert-item--this-key)) | ||
| 5598 | (unless (string-match "y" todo-insert-item--keys-so-far) | ||
| 5599 | (when (y-or-n-p (concat "`k' only takes effect with `y';" | ||
| 5600 | " add `y'? ")) | ||
| 5601 | (setq todo-insert-item--keys-so-far | ||
| 5602 | (concat todo-insert-item--keys-so-far " y")) | ||
| 5603 | (setq todo-insert-item--args | ||
| 5604 | (nconc todo-insert-item--args (list 'diary)))))) | ||
| 5605 | (setq todo-insert-item--keys-so-far | 5421 | (setq todo-insert-item--keys-so-far |
| 5606 | (concat todo-insert-item--keys-so-far " " | 5422 | (concat todo-insert-item--keys-so-far " " |
| 5607 | (todo-insert-item--this-key))) | 5423 | (todo-insert-item--this-key))) |
| @@ -5617,11 +5433,74 @@ already entered and those still available." | |||
| 5617 | (todo-insert-item--this-key) | 5433 | (todo-insert-item--this-key) |
| 5618 | todo-insert-item--argsleft))))))))) | 5434 | todo-insert-item--argsleft))))))))) |
| 5619 | (setq todo-insert-item--argsleft todo-insert-item--newargsleft)) | 5435 | (setq todo-insert-item--argsleft todo-insert-item--newargsleft)) |
| 5620 | (when prompt (message "Enter a key (so far `%s'): %s" | 5436 | (when prompt (message "Press a key (so far `%s'): %s" |
| 5621 | todo-insert-item--keys-so-far prompt)) | 5437 | todo-insert-item--keys-so-far prompt)) |
| 5622 | (set-transient-map map) | 5438 | (set-transient-map map) |
| 5623 | (setq todo-insert-item--argsleft argsleft))) | 5439 | (setq todo-insert-item--argsleft argsleft))) |
| 5624 | 5440 | ||
| 5441 | (defconst todo-edit-item--param-key-alist | ||
| 5442 | '((edit . "e") | ||
| 5443 | (header . "h") | ||
| 5444 | (multiline . "m") | ||
| 5445 | (diary . "y") | ||
| 5446 | (nonmarking . "k") | ||
| 5447 | (date . "d") | ||
| 5448 | (time . "t")) | ||
| 5449 | "Alist of item editing parameters and their keys.") | ||
| 5450 | |||
| 5451 | (defconst todo-edit-item--date-param-key-alist | ||
| 5452 | '((full . "f") | ||
| 5453 | (calendar . "c") | ||
| 5454 | (today . "a") | ||
| 5455 | (dayname . "n") | ||
| 5456 | (year . "y") | ||
| 5457 | (month . "m") | ||
| 5458 | (daynum . "d")) | ||
| 5459 | "Alist of item date editing parameters and their keys.") | ||
| 5460 | |||
| 5461 | (defconst todo-edit-done-item--param-key-alist | ||
| 5462 | '((add/edit . "c") | ||
| 5463 | (delete . "d")) | ||
| 5464 | "Alist of done item comment editing parameters and their keys.") | ||
| 5465 | |||
| 5466 | (defvar todo-edit-item--prompt "Press a key (so far `e'): ") | ||
| 5467 | |||
| 5468 | (defun todo-edit-item--next-key (params &optional arg) | ||
| 5469 | (let* ((map (make-sparse-keymap)) | ||
| 5470 | (p->k (mapconcat (lambda (elt) | ||
| 5471 | (format "%s=>%s" | ||
| 5472 | (propertize (cdr elt) 'face | ||
| 5473 | 'todo-key-prompt) | ||
| 5474 | (concat (symbol-name (car elt)) | ||
| 5475 | (when (memq (car elt) | ||
| 5476 | '(add/edit delete)) | ||
| 5477 | " comment")))) | ||
| 5478 | params " ")) | ||
| 5479 | (this-key (char-to-string | ||
| 5480 | (read-key (concat todo-edit-item--prompt p->k)))) | ||
| 5481 | (this-param (car (rassoc this-key params)))) | ||
| 5482 | (pcase this-param | ||
| 5483 | (`edit (todo-edit-item--text)) | ||
| 5484 | (`header (todo-edit-item--text 'include-header)) | ||
| 5485 | (`multiline (todo-edit-item--text 'multiline)) | ||
| 5486 | (`add/edit (todo-edit-item--text 'comment-edit)) | ||
| 5487 | (`delete (todo-edit-item--text 'comment-delete)) | ||
| 5488 | (`diary (todo-edit-item--diary-inclusion)) | ||
| 5489 | (`nonmarking (todo-edit-item--diary-inclusion 'nonmarking)) | ||
| 5490 | (`date (let ((todo-edit-item--prompt "Press a key (so far `e d'): ")) | ||
| 5491 | (todo-edit-item--next-key | ||
| 5492 | todo-edit-item--date-param-key-alist arg))) | ||
| 5493 | (`full (progn (todo-edit-item--header 'date) | ||
| 5494 | (when todo-always-add-time-string | ||
| 5495 | (todo-edit-item--header 'time)))) | ||
| 5496 | (`calendar (todo-edit-item--header 'calendar)) | ||
| 5497 | (`today (todo-edit-item--header 'today)) | ||
| 5498 | (`dayname (todo-edit-item--header 'dayname)) | ||
| 5499 | (`year (todo-edit-item--header 'year arg)) | ||
| 5500 | (`month (todo-edit-item--header 'month arg)) | ||
| 5501 | (`daynum (todo-edit-item--header 'day arg)) | ||
| 5502 | (`time (todo-edit-item--header 'time))))) | ||
| 5503 | |||
| 5625 | ;; ----------------------------------------------------------------------------- | 5504 | ;; ----------------------------------------------------------------------------- |
| 5626 | ;;; Todo minibuffer utilities | 5505 | ;;; Todo minibuffer utilities |
| 5627 | ;; ----------------------------------------------------------------------------- | 5506 | ;; ----------------------------------------------------------------------------- |
| @@ -6322,19 +6201,7 @@ Filtered Items mode following todo (not done) items." | |||
| 6322 | ("Fym" todo-filter-diary-items-multifile) | 6201 | ("Fym" todo-filter-diary-items-multifile) |
| 6323 | ("Fxx" todo-filter-regexp-items) | 6202 | ("Fxx" todo-filter-regexp-items) |
| 6324 | ("Fxm" todo-filter-regexp-items-multifile) | 6203 | ("Fxm" todo-filter-regexp-items-multifile) |
| 6325 | ("ee" todo-edit-item) | 6204 | ("e" todo-edit-item) |
| 6326 | ("em" todo-edit-multiline-item) | ||
| 6327 | ("edt" todo-edit-item-header) | ||
| 6328 | ("edc" todo-edit-item-date-from-calendar) | ||
| 6329 | ("eda" todo-edit-item-date-to-today) | ||
| 6330 | ("edn" todo-edit-item-date-day-name) | ||
| 6331 | ("edy" todo-edit-item-date-year) | ||
| 6332 | ("edm" todo-edit-item-date-month) | ||
| 6333 | ("edd" todo-edit-item-date-day) | ||
| 6334 | ("et" todo-edit-item-time) | ||
| 6335 | ("eyy" todo-edit-item-diary-inclusion) | ||
| 6336 | ("eyk" todo-edit-item-diary-nonmarking) | ||
| 6337 | ("ec" todo-edit-done-item-comment) | ||
| 6338 | ("d" todo-item-done) | 6205 | ("d" todo-item-done) |
| 6339 | ("i" todo-insert-item) | 6206 | ("i" todo-insert-item) |
| 6340 | ("k" todo-delete-item) | 6207 | ("k" todo-delete-item) |
| @@ -6452,64 +6319,74 @@ Filtered Items mode following todo (not done) items." | |||
| 6452 | map) | 6319 | map) |
| 6453 | "Todo Filtered Items mode keymap.") | 6320 | "Todo Filtered Items mode keymap.") |
| 6454 | 6321 | ||
| 6455 | ;; FIXME: Is it worth having a menu and if so, which commands? | 6322 | (easy-menu-define |
| 6456 | ;; (easy-menu-define | 6323 | todo-menu todo-mode-map "Todo Menu" |
| 6457 | ;; todo-menu todo-mode-map "Todo Menu" | 6324 | '("Todo" |
| 6458 | ;; '("Todo" | 6325 | ("Navigation" |
| 6459 | ;; ("Navigation" | 6326 | ["Next Item" todo-next-item t] |
| 6460 | ;; ["Next Item" todo-forward-item t] | 6327 | ["Previous Item" todo-previous-item t] |
| 6461 | ;; ["Previous Item" todo-backward-item t] | 6328 | "---" |
| 6462 | ;; "---" | 6329 | ["Next Category" todo-forward-category t] |
| 6463 | ;; ["Next Category" todo-forward-category t] | 6330 | ["Previous Category" todo-backward-category t] |
| 6464 | ;; ["Previous Category" todo-backward-category t] | 6331 | ["Jump to Another Category" todo-jump-to-category t] |
| 6465 | ;; ["Jump to Category" todo-jump-to-category t] | 6332 | "---" |
| 6466 | ;; "---" | 6333 | ["Visit Another Todo File" todo-show t] |
| 6467 | ;; ["Search Todo File" todo-search t] | 6334 | ["Visit Archive" todo-find-archive t] |
| 6468 | ;; ["Clear Highlighting on Search Matches" todo-category-done t]) | 6335 | ["Visit Filtered Items File" todo-find-filtered-items-file t] |
| 6469 | ;; ("Display" | 6336 | ) |
| 6470 | ;; ["List Current Categories" todo-show-categories-table t] | 6337 | ("Editing" |
| 6471 | ;; ;; ["List Categories Alphabetically" todo-display-categories-alphabetically t] | 6338 | ["Insert New Item" todo-insert-item t] |
| 6472 | ;; ["Turn Item Highlighting on/off" todo-toggle-item-highlighting t] | 6339 | ["Edit Item" todo-edit-item t] |
| 6473 | ;; ["Turn Item Numbering on/off" todo-toggle-prefix-numbers t] | 6340 | ["Lower Item Priority" todo-lower-item-priority t] |
| 6474 | ;; ["Turn Item Time Stamp on/off" todo-toggle-item-header t] | 6341 | ["Raise Item Priority" todo-raise-item-priority t] |
| 6475 | ;; ["View/Hide Done Items" todo-toggle-view-done-items t] | 6342 | ["Set Item Priority" todo-set-item-priority t] |
| 6476 | ;; "---" | 6343 | ["Mark/Unmark Item" todo-toggle-mark-item t] |
| 6477 | ;; ["View Diary Items" todo-filter-diary-items t] | 6344 | ["Move (Recategorize) Item" todo-move-item t] |
| 6478 | ;; ["View Top Priority Items" todo-filter-top-priorities t] | 6345 | ["Delete Item" todo-delete-item t] |
| 6479 | ;; ["View Multifile Top Priority Items" todo-filter-top-priorities-multifile t] | 6346 | ["Mark and Bury Done Item" todo-item-done t] |
| 6480 | ;; "---" | 6347 | ["Undo Done Item" todo-item-undone t] |
| 6481 | ;; ["Print Category" todo-print-buffer t]) | 6348 | ["Archive Done Item" todo-archive-done-item t] |
| 6482 | ;; ("Editing" | 6349 | "---" |
| 6483 | ;; ["Insert New Item" todo-insert-item t] | 6350 | ["Add New Category" todo-add-category t] |
| 6484 | ;; ["Insert Item Here" todo-insert-item-here t] | 6351 | ["Rename Current Category" todo-rename-category t] |
| 6485 | ;; ("More Insertion Commands") | 6352 | ["Delete Current Category" todo-delete-category t] |
| 6486 | ;; ["Edit Item" todo-edit-item t] | 6353 | ["Move Current Category" todo-move-category t] |
| 6487 | ;; ["Edit Multiline Item" todo-edit-multiline-item t] | 6354 | ["Merge Current Category" todo-merge-category t] |
| 6488 | ;; ["Edit Item Header" todo-edit-item-header t] | 6355 | "---" |
| 6489 | ;; ["Edit Item Date" todo-edit-item-date t] | 6356 | ["Add New Todo File" todo-add-file t] |
| 6490 | ;; ["Edit Item Time" todo-edit-item-time t] | 6357 | ["Rename Todo File" todo-rename-file t] |
| 6491 | ;; "---" | 6358 | ["Delete Todo File" todo-delete-file t] |
| 6492 | ;; ["Lower Item Priority" todo-lower-item-priority t] | 6359 | ["Edit Todo File" todo-edit-file t] |
| 6493 | ;; ["Raise Item Priority" todo-raise-item-priority t] | 6360 | ) |
| 6494 | ;; ["Set Item Priority" todo-set-item-priority t] | 6361 | ("Searching and Item Filtering" |
| 6495 | ;; ["Move (Recategorize) Item" todo-move-item t] | 6362 | ["Search Todo File" todo-search t] |
| 6496 | ;; ["Delete Item" todo-delete-item t] | 6363 | ["Clear Match Highlighting" todo-clear-matches t] |
| 6497 | ;; ["Undo Done Item" todo-item-undone t] | 6364 | "---" |
| 6498 | ;; ["Mark/Unmark Item for Diary" todo-toggle-item-diary-inclusion t] | 6365 | ["Set Top Priorities in File" todo-set-top-priorities-in-file t] |
| 6499 | ;; ["Mark/Unmark Items for Diary" todo-edit-item-diary-inclusion t] | 6366 | ["Set Top Priorities in Category" todo-set-top-priorities-in-category t] |
| 6500 | ;; ["Mark & Hide Done Item" todo-item-done t] | 6367 | ["Filter Top Priorities" todo-filter-top-priorities t] |
| 6501 | ;; ["Archive Done Items" todo-archive-category-done-items t] | 6368 | ["Filter Multifile Top Priorities" todo-filter-top-priorities-multifile t] |
| 6502 | ;; "---" | 6369 | ["Filter Diary Items" todo-filter-diary-items t] |
| 6503 | ;; ["Add New Todo File" todo-add-file t] | 6370 | ["Filter Multifile Diary Items" todo-filter-diary-items-multifile t] |
| 6504 | ;; ["Add New Category" todo-add-category t] | 6371 | ["Filter Regexp" todo-filter-regexp-items t] |
| 6505 | ;; ["Delete Current Category" todo-delete-category t] | 6372 | ["Filter Multifile Regexp" todo-filter-regexp-items-multifile t] |
| 6506 | ;; ["Rename Current Category" todo-rename-category t] | 6373 | ) |
| 6507 | ;; "---" | 6374 | ("Display and Printing" |
| 6508 | ;; ["Save Todo File" todo-save t] | 6375 | ["Show/Hide Done Items" todo-toggle-view-done-items t] |
| 6509 | ;; ) | 6376 | ["Show/Hide Done Items Only" todo-toggle-view-done-only t] |
| 6510 | ;; "---" | 6377 | ["Show/Hide Item Highlighting" todo-toggle-item-highlighting t] |
| 6511 | ;; ["Quit" todo-quit t] | 6378 | ["Show/Hide Item Numbering" todo-toggle-prefix-numbers t] |
| 6512 | ;; )) | 6379 | ["Show/Hide Item Header" todo-toggle-item-header t] |
| 6380 | "---" | ||
| 6381 | ["Display Table of Categories" todo-show-categories-table t] | ||
| 6382 | "---" | ||
| 6383 | ["Print Category" todo-print-buffer t] | ||
| 6384 | ["Print Category to File" todo-print-buffer-to-file t] | ||
| 6385 | ) | ||
| 6386 | "---" | ||
| 6387 | ["Save Todo File" todo-save t] | ||
| 6388 | ["Quit Todo Mode" todo-quit t] | ||
| 6389 | )) | ||
| 6513 | 6390 | ||
| 6514 | ;; ----------------------------------------------------------------------------- | 6391 | ;; ----------------------------------------------------------------------------- |
| 6515 | ;;; Hook functions and mode definitions | 6392 | ;;; Hook functions and mode definitions |
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 5433485825b..56f186fe588 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2014-05-01 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * ede.el (ede-project-directories, ede-check-project-directory): | ||
| 4 | * semantic/ia-sb.el (semantic-ia-sb-show-doc): | ||
| 5 | * semantic/tag.el (semantic-tag-in-buffer-p): | ||
| 6 | * semantic/bovine/c.el (semantic-tag-abstract-p): | ||
| 7 | Doc fixes (replace `iff'). | ||
| 8 | |||
| 1 | 2014-04-01 Glenn Morris <rgm@gnu.org> | 9 | 2014-04-01 Glenn Morris <rgm@gnu.org> |
| 2 | 10 | ||
| 3 | * ede/emacs.el (ede-emacs-version): Update AC_INIT regexp. (Bug#17160) | 11 | * ede/emacs.el (ede-emacs-version): Update AC_INIT regexp. (Bug#17160) |
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el index 998df78735a..a9a53d776e2 100644 --- a/lisp/cedet/ede.el +++ b/lisp/cedet/ede.el | |||
| @@ -100,7 +100,7 @@ target willing to take the file. 'never means never perform the check." | |||
| 100 | If the value is t, EDE may search in any directory. | 100 | If the value is t, EDE may search in any directory. |
| 101 | 101 | ||
| 102 | If the value is a function, EDE calls that function with one | 102 | If the value is a function, EDE calls that function with one |
| 103 | argument, the directory name; the function should return t iff | 103 | argument, the directory name; the function should return t if |
| 104 | EDE should look for project files in the directory. | 104 | EDE should look for project files in the directory. |
| 105 | 105 | ||
| 106 | Otherwise, the value should be a list of fully-expanded directory | 106 | Otherwise, the value should be a list of fully-expanded directory |
| @@ -704,7 +704,7 @@ Otherwise, create a new project for DIR." | |||
| 704 | "Check if DIR should be in `ede-project-directories'. | 704 | "Check if DIR should be in `ede-project-directories'. |
| 705 | If it is not, try asking the user if it should be added; if so, | 705 | If it is not, try asking the user if it should be added; if so, |
| 706 | add it and save `ede-project-directories' via Customize. | 706 | add it and save `ede-project-directories' via Customize. |
| 707 | Return nil iff DIR should not be in `ede-project-directories'." | 707 | Return nil if DIR should not be in `ede-project-directories'." |
| 708 | (setq dir (directory-file-name (expand-file-name dir))) ; strip trailing / | 708 | (setq dir (directory-file-name (expand-file-name dir))) ; strip trailing / |
| 709 | (or (eq ede-project-directories t) | 709 | (or (eq ede-project-directories t) |
| 710 | (and (functionp ede-project-directories) | 710 | (and (functionp ede-project-directories) |
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el index e4f239b14a9..e9715cc1bb0 100644 --- a/lisp/cedet/semantic/bovine/c.el +++ b/lisp/cedet/semantic/bovine/c.el | |||
| @@ -1594,7 +1594,7 @@ Optional PARENT and COLOR as specified with | |||
| 1594 | "Return non-nil if TAG is considered abstract. | 1594 | "Return non-nil if TAG is considered abstract. |
| 1595 | PARENT is tag's parent. | 1595 | PARENT is tag's parent. |
| 1596 | In C, a method is abstract if it is `virtual', which is already | 1596 | In C, a method is abstract if it is `virtual', which is already |
| 1597 | handled. A class is abstract iff its destructor is virtual." | 1597 | handled. A class is abstract only if its destructor is virtual." |
| 1598 | (cond | 1598 | (cond |
| 1599 | ((eq (semantic-tag-class tag) 'type) | 1599 | ((eq (semantic-tag-class tag) 'type) |
| 1600 | (require 'semantic/find) | 1600 | (require 'semantic/find) |
diff --git a/lisp/cedet/semantic/ia-sb.el b/lisp/cedet/semantic/ia-sb.el index f77760c4452..006e8e8259f 100644 --- a/lisp/cedet/semantic/ia-sb.el +++ b/lisp/cedet/semantic/ia-sb.el | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | ;;; semantic/ia-sb.el --- Speedbar analysis display interactor | 1 | ;;; semantic/ia-sb.el --- Speedbar analysis display interactor |
| 2 | 2 | ||
| 3 | ;;; Copyright (C) 2002-2004, 2006, 2008-2014 Free Software Foundation, | 3 | ;;; Copyright (C) 2002-2004, 2006, 2008-2014 Free Software Foundation, Inc. |
| 4 | ;;; Inc. | ||
| 5 | 4 | ||
| 6 | ;; Author: Eric M. Ludlam <zappo@gnu.org> | 5 | ;; Author: Eric M. Ludlam <zappo@gnu.org> |
| 7 | ;; Keywords: syntax | 6 | ;; Keywords: syntax |
| @@ -139,7 +138,7 @@ DIRECTORY is the current directory, which is ignored, and ZERO is 0." | |||
| 139 | ))) | 138 | ))) |
| 140 | 139 | ||
| 141 | (defmethod semantic-ia-sb-show-doc ((context semantic-analyze-context)) | 140 | (defmethod semantic-ia-sb-show-doc ((context semantic-analyze-context)) |
| 142 | "Show documentation about CONTEXT iff CONTEXT points at a complete symbol." | 141 | "Show documentation about CONTEXT if CONTEXT points at a complete symbol." |
| 143 | (let ((sym (car (reverse (oref context prefix)))) | 142 | (let ((sym (car (reverse (oref context prefix)))) |
| 144 | (doc nil)) | 143 | (doc nil)) |
| 145 | (when (semantic-tag-p sym) | 144 | (when (semantic-tag-p sym) |
diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el index 97fa607f9ae..31354846ec0 100644 --- a/lisp/cedet/semantic/tag.el +++ b/lisp/cedet/semantic/tag.el | |||
| @@ -172,7 +172,7 @@ That function is for internal use only." | |||
| 172 | (semantic--tag-set-overlay tag (vector start end))))) | 172 | (semantic--tag-set-overlay tag (vector start end))))) |
| 173 | 173 | ||
| 174 | (defun semantic-tag-in-buffer-p (tag) | 174 | (defun semantic-tag-in-buffer-p (tag) |
| 175 | "Return the buffer TAG resides in IFF tag is already in a buffer. | 175 | "Return the buffer TAG resides in, if tag is already in a buffer. |
| 176 | If a tag is not in a buffer, return nil." | 176 | If a tag is not in a buffer, return nil." |
| 177 | (let ((o (semantic-tag-overlay tag))) | 177 | (let ((o (semantic-tag-overlay tag))) |
| 178 | ;; TAG is currently linked to a buffer, return it. | 178 | ;; TAG is currently linked to a buffer, return it. |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 58c3638b58b..14e4d2da0c8 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -2928,7 +2928,7 @@ The function's arguments should be treated as immutable. | |||
| 2928 | (defmacro cl-deftype (name arglist &rest body) | 2928 | (defmacro cl-deftype (name arglist &rest body) |
| 2929 | "Define NAME as a new data type. | 2929 | "Define NAME as a new data type. |
| 2930 | The type name can then be used in `cl-typecase', `cl-check-type', etc." | 2930 | The type name can then be used in `cl-typecase', `cl-check-type', etc." |
| 2931 | (declare (debug cl-defmacro) (doc-string 3)) | 2931 | (declare (debug cl-defmacro) (doc-string 3) (indent 2)) |
| 2932 | `(cl-eval-when (compile load eval) | 2932 | `(cl-eval-when (compile load eval) |
| 2933 | (put ',name 'cl-deftype-handler | 2933 | (put ',name 'cl-deftype-handler |
| 2934 | (cl-function (lambda (&cl-defs '('*) ,@arglist) ,@body))))) | 2934 | (cl-function (lambda (&cl-defs '('*) ,@arglist) ,@body))))) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5158fa4c6e6..759a49a91f7 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-05-04 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * gnus-registry.el (gnus-registry-install-p): Doc fix. | ||
| 4 | |||
| 1 | 2014-05-02 Katsumi Yamaoka <yamaoka@jpl.org> | 5 | 2014-05-02 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 6 | ||
| 3 | * gnus-art.el (gnus-mime-inline-part): Redisplay a button so as to show | 7 | * gnus-art.el (gnus-mime-inline-part): Redisplay a button so as to show |
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 5989b8885bc..f3b81f77b50 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el | |||
| @@ -1125,9 +1125,9 @@ only the last one's marks are returned." | |||
| 1125 | (add-hook 'gnus-registry-unload-hook 'gnus-registry-unload-hook) | 1125 | (add-hook 'gnus-registry-unload-hook 'gnus-registry-unload-hook) |
| 1126 | 1126 | ||
| 1127 | (defun gnus-registry-install-p () | 1127 | (defun gnus-registry-install-p () |
| 1128 | "If the registry is not already enabled, and `gnus-registry-install' is t, | 1128 | "Return non-nil if the registry is enabled (and maybe enable it first). |
| 1129 | the registry is enabled. If `gnus-registry-install' is `ask', | 1129 | If the registry is not already enabled, then if `gnus-registry-install' |
| 1130 | the user is asked first. Returns non-nil iff the registry is enabled." | 1130 | is `ask', ask the user; or if `gnus-registry-install' is non-nil, enable it." |
| 1131 | (interactive) | 1131 | (interactive) |
| 1132 | (unless gnus-registry-enabled | 1132 | (unless gnus-registry-enabled |
| 1133 | (when (if (eq gnus-registry-install 'ask) | 1133 | (when (if (eq gnus-registry-install 'ask) |
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 2243cf29a87..af08d0f3d3a 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el | |||
| @@ -473,8 +473,8 @@ message." | |||
| 473 | (widen) | 473 | (widen) |
| 474 | (goto-char (point-min)) | 474 | (goto-char (point-min)) |
| 475 | (while (>= total msgnum) | 475 | (while (>= total msgnum) |
| 476 | ;; Go back to the Rmail buffer so | 476 | ;; Go back to the Rmail buffer so FUNCTION and |
| 477 | ;; so FUNCTION and rmail-get-summary can see its local vars. | 477 | ;; rmail-get-summary can see its local vars. |
| 478 | (with-current-buffer main-buffer | 478 | (with-current-buffer main-buffer |
| 479 | ;; First test whether to include this message. | 479 | ;; First test whether to include this message. |
| 480 | (if (or (null function) | 480 | (if (or (null function) |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 84df6922749..436d8f611a8 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -922,7 +922,7 @@ by \"Save Options\" in Custom buffers.") | |||
| 922 | (selected-frame))) | 922 | (selected-frame))) |
| 923 | 923 | ||
| 924 | (defun menu-bar-positive-p (val) | 924 | (defun menu-bar-positive-p (val) |
| 925 | "Return non-nil iff VAL is a positive number." | 925 | "Return non-nil if VAL is a positive number." |
| 926 | (and (numberp val) | 926 | (and (numberp val) |
| 927 | (> val 0))) | 927 | (> val 0))) |
| 928 | 928 | ||
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 8e84a2fd307..cec0eb21b38 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -2773,7 +2773,7 @@ expression (not containing character ranges like `a-z')." | |||
| 2773 | 2773 | ||
| 2774 | (defcustom completion-pcm-complete-word-inserts-delimiters nil | 2774 | (defcustom completion-pcm-complete-word-inserts-delimiters nil |
| 2775 | "Treat the SPC or - inserted by `minibuffer-complete-word' as delimiters. | 2775 | "Treat the SPC or - inserted by `minibuffer-complete-word' as delimiters. |
| 2776 | Those chars are treated as delimiters iff this variable is non-nil. | 2776 | Those chars are treated as delimiters if this variable is non-nil. |
| 2777 | I.e. if non-nil, M-x SPC will just insert a \"-\" in the minibuffer, whereas | 2777 | I.e. if non-nil, M-x SPC will just insert a \"-\" in the minibuffer, whereas |
| 2778 | if nil, it will list all possible commands in *Completions* because none of | 2778 | if nil, it will list all possible commands in *Completions* because none of |
| 2779 | the commands start with a \"-\" or a SPC." | 2779 | the commands start with a \"-\" or a SPC." |
diff --git a/lisp/mpc.el b/lisp/mpc.el index d89231e81b9..d569610a615 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el | |||
| @@ -1811,9 +1811,14 @@ A value of t means the main playlist.") | |||
| 1811 | (char-after (posn-point posn)))) | 1811 | (char-after (posn-point posn)))) |
| 1812 | '(?◁ ?<)) | 1812 | '(?◁ ?<)) |
| 1813 | (- mpc-volume-step) mpc-volume-step)) | 1813 | (- mpc-volume-step) mpc-volume-step)) |
| 1814 | (newvol (+ (string-to-number (cdr (assq 'volume mpc-status))) diff))) | 1814 | (curvol (string-to-number (cdr (assq 'volume mpc-status)))) |
| 1815 | (mpc-proc-cmd (list "setvol" newvol) 'mpc-status-refresh) | 1815 | (newvol (max 0 (min 100 (+ curvol diff))))) |
| 1816 | (message "Set MPD volume to %s%%" newvol))) | 1816 | (if (= newvol curvol) |
| 1817 | (progn | ||
| 1818 | (message "MPD volume already at %s%%" newvol) | ||
| 1819 | (ding)) | ||
| 1820 | (mpc-proc-cmd (list "setvol" newvol) 'mpc-status-refresh) | ||
| 1821 | (message "Set MPD volume to %s%%" newvol)))) | ||
| 1817 | 1822 | ||
| 1818 | (defun mpc-volume-widget (vol &optional size) | 1823 | (defun mpc-volume-widget (vol &optional size) |
| 1819 | (unless size (setq size 12.5)) | 1824 | (unless size (setq size 12.5)) |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 7f8c483ee5c..0c81a8506c0 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1979,7 +1979,7 @@ OFFSET is the position in STR at which the comparison takes place." | |||
| 1979 | (string-equal match (substring str offset (+ offset match-length)))))) | 1979 | (string-equal match (substring str offset (+ offset match-length)))))) |
| 1980 | 1980 | ||
| 1981 | (defun gdbmi-same-start (str offset match) | 1981 | (defun gdbmi-same-start (str offset match) |
| 1982 | "Return non-nil iff STR and MATCH are equal up to the end of either strings. | 1982 | "Return non-nil if STR and MATCH are equal up to the end of either strings. |
| 1983 | OFFSET is the position in STR at which the comparison takes place." | 1983 | OFFSET is the position in STR at which the comparison takes place." |
| 1984 | (let* ((str-length (- (length str) offset)) | 1984 | (let* ((str-length (- (length str) offset)) |
| 1985 | (match-length (length match)) | 1985 | (match-length (length match)) |
| @@ -1989,7 +1989,7 @@ OFFSET is the position in STR at which the comparison takes place." | |||
| 1989 | (substring match 0 compare-length))))) | 1989 | (substring match 0 compare-length))))) |
| 1990 | 1990 | ||
| 1991 | (defun gdbmi-is-number (character) | 1991 | (defun gdbmi-is-number (character) |
| 1992 | "Return non-nil iff CHARACTER is a numerical character between 0 and 9." | 1992 | "Return non-nil if CHARACTER is a numerical character between 0 and 9." |
| 1993 | (and (>= character ?0) | 1993 | (and (>= character ?0) |
| 1994 | (<= character ?9))) | 1994 | (<= character ?9))) |
| 1995 | 1995 | ||
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index cc9ee8fe67b..5be1373213e 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el | |||
| @@ -1302,7 +1302,7 @@ LIMIT defaults to point." | |||
| 1302 | (up-list -1))) | 1302 | (up-list -1))) |
| 1303 | 1303 | ||
| 1304 | (defun js--inside-param-list-p () | 1304 | (defun js--inside-param-list-p () |
| 1305 | "Return non-nil iff point is in a function parameter list." | 1305 | "Return non-nil if point is in a function parameter list." |
| 1306 | (ignore-errors | 1306 | (ignore-errors |
| 1307 | (save-excursion | 1307 | (save-excursion |
| 1308 | (js--up-nearby-list) | 1308 | (js--up-nearby-list) |
| @@ -1313,7 +1313,7 @@ LIMIT defaults to point." | |||
| 1313 | (looking-at "function")))))))) | 1313 | (looking-at "function")))))))) |
| 1314 | 1314 | ||
| 1315 | (defun js--inside-dojo-class-list-p () | 1315 | (defun js--inside-dojo-class-list-p () |
| 1316 | "Return non-nil iff point is in a Dojo multiple-inheritance class block." | 1316 | "Return non-nil if point is in a Dojo multiple-inheritance class block." |
| 1317 | (ignore-errors | 1317 | (ignore-errors |
| 1318 | (save-excursion | 1318 | (save-excursion |
| 1319 | (js--up-nearby-list) | 1319 | (js--up-nearby-list) |
| @@ -1352,7 +1352,7 @@ REGEXPS, but only if FRAMEWORK is in `js-enabled-frameworks'." | |||
| 1352 | (defun js--forward-destructuring-spec (&optional func) | 1352 | (defun js--forward-destructuring-spec (&optional func) |
| 1353 | "Move forward over a JavaScript destructuring spec. | 1353 | "Move forward over a JavaScript destructuring spec. |
| 1354 | If FUNC is supplied, call it with no arguments before every | 1354 | If FUNC is supplied, call it with no arguments before every |
| 1355 | variable name in the spec. Return true iff this was actually a | 1355 | variable name in the spec. Return true if this was actually a |
| 1356 | spec. FUNC must preserve the match data." | 1356 | spec. FUNC must preserve the match data." |
| 1357 | (pcase (char-after) | 1357 | (pcase (char-after) |
| 1358 | (?\[ | 1358 | (?\[ |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index d82eea05e1c..bcac59a3ade 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -3228,7 +3228,7 @@ PREFIX is the prefix of the search regexp." | |||
| 3228 | 3228 | ||
| 3229 | (unless (fboundp 'region-exists-p) | 3229 | (unless (fboundp 'region-exists-p) |
| 3230 | (defun region-exists-p () | 3230 | (defun region-exists-p () |
| 3231 | "Non-nil iff the mark is set. Lobotomized version for Emacsen that do not provide their own." | 3231 | "Non-nil if the mark is set. Lobotomized version for Emacsen that do not provide their own." |
| 3232 | (mark))) | 3232 | (mark))) |
| 3233 | 3233 | ||
| 3234 | 3234 | ||
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index e8a4d925065..3ff4f57b887 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -2361,7 +2361,7 @@ the value thus obtained, and the result is used instead." | |||
| 2361 | 2361 | ||
| 2362 | ;; I commented this out because nobody calls it -- rms. | 2362 | ;; I commented this out because nobody calls it -- rms. |
| 2363 | ;;(defun sh-abbrevs (ancestor &rest list) | 2363 | ;;(defun sh-abbrevs (ancestor &rest list) |
| 2364 | ;; "Iff it isn't, define the current shell as abbrev table and fill that. | 2364 | ;; "If it isn't, define the current shell as abbrev table and fill that. |
| 2365 | ;;Abbrev table will inherit all abbrevs from ANCESTOR, which is either an abbrev | 2365 | ;;Abbrev table will inherit all abbrevs from ANCESTOR, which is either an abbrev |
| 2366 | ;;table or a list of (NAME1 EXPANSION1 ...). In addition it will define abbrevs | 2366 | ;;table or a list of (NAME1 EXPANSION1 ...). In addition it will define abbrevs |
| 2367 | ;;according to the remaining arguments NAMEi EXPANSIONi ... | 2367 | ;;according to the remaining arguments NAMEi EXPANSIONi ... |
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index b07e2ba5203..d0f8897ed65 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el | |||
| @@ -3160,7 +3160,7 @@ and `verilog-scan'.") | |||
| 3160 | (setq verilog-scan-cache-tick nil)) | 3160 | (setq verilog-scan-cache-tick nil)) |
| 3161 | 3161 | ||
| 3162 | (defun verilog-scan-cache-ok-p () | 3162 | (defun verilog-scan-cache-ok-p () |
| 3163 | "Return t iff the scan cache is up to date." | 3163 | "Return t if the scan cache is up to date." |
| 3164 | (or (and verilog-scan-cache-preserving | 3164 | (or (and verilog-scan-cache-preserving |
| 3165 | (eq verilog-scan-cache-preserving (current-buffer)) | 3165 | (eq verilog-scan-cache-preserving (current-buffer)) |
| 3166 | verilog-scan-cache-tick) | 3166 | verilog-scan-cache-tick) |
diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index 25bce076cbc..5b0433475b6 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el | |||
| @@ -357,7 +357,7 @@ of master file." | |||
| 357 | docstruct)) | 357 | docstruct)) |
| 358 | 358 | ||
| 359 | (defun reftex-using-biblatex-p () | 359 | (defun reftex-using-biblatex-p () |
| 360 | "Return non-nil iff we are using biblatex rather than bibtex." | 360 | "Return non-nil if we are using biblatex rather than bibtex." |
| 361 | (if (boundp 'TeX-active-styles) | 361 | (if (boundp 'TeX-active-styles) |
| 362 | ;; the sophisticated AUCTeX way | 362 | ;; the sophisticated AUCTeX way |
| 363 | (member "biblatex" TeX-active-styles) | 363 | (member "biblatex" TeX-active-styles) |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 486c6649c00..f3426656038 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-05-04 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * url-parse.el (url-generic-parse-url): Doc fix (replace `iff'). | ||
| 4 | |||
| 1 | 2014-04-01 Michael Albinus <michael.albinus@gmx.de> | 5 | 2014-04-01 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 6 | ||
| 3 | * url-tramp.el: New file. | 7 | * url-tramp.el: New file. |
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el index 50de84f5167..0a811297986 100644 --- a/lisp/url/url-parse.el +++ b/lisp/url/url-parse.el | |||
| @@ -125,7 +125,7 @@ TARGET is the fragment identifier component (used to refer to a | |||
| 125 | ATTRIBUTES is nil; this slot originally stored the attribute and | 125 | ATTRIBUTES is nil; this slot originally stored the attribute and |
| 126 | value alists for IMAP URIs, but this feature was removed | 126 | value alists for IMAP URIs, but this feature was removed |
| 127 | since it conflicts with RFC 3986. | 127 | since it conflicts with RFC 3986. |
| 128 | FULLNESS is non-nil iff the hierarchical sequence component of | 128 | FULLNESS is non-nil if the hierarchical sequence component of |
| 129 | the URL starts with two slashes, \"//\". | 129 | the URL starts with two slashes, \"//\". |
| 130 | 130 | ||
| 131 | The parser follows RFC 3986, except that it also tries to handle | 131 | The parser follows RFC 3986, except that it also tries to handle |
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el index ed248fbf835..d21b4cc6d0b 100644 --- a/lisp/vc/ediff-diff.el +++ b/lisp/vc/ediff-diff.el | |||
| @@ -818,10 +818,9 @@ one optional arguments, diff-number to refine.") | |||
| 818 | n &optional default) | 818 | n &optional default) |
| 819 | (let ((fine-diff-vector (ediff-get-fine-diff-vector n buf-type)) | 819 | (let ((fine-diff-vector (ediff-get-fine-diff-vector n buf-type)) |
| 820 | (face (if default | 820 | (face (if default |
| 821 | 'default | 821 | nil |
| 822 | (ediff-get-symbol-from-alist | 822 | (ediff-get-symbol-from-alist |
| 823 | buf-type ediff-fine-diff-face-alist) | 823 | buf-type ediff-fine-diff-face-alist)))) |
| 824 | ))) | ||
| 825 | (mapc (lambda (overl) | 824 | (mapc (lambda (overl) |
| 826 | (ediff-set-overlay-face overl face)) | 825 | (ediff-set-overlay-face overl face)) |
| 827 | fine-diff-vector))) | 826 | fine-diff-vector))) |
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el index f3781c53885..dd0d76485bf 100644 --- a/lisp/vc/ediff-init.el +++ b/lisp/vc/ediff-init.el | |||
| @@ -807,7 +807,7 @@ TYPE-OF-EMACS is either 'xemacs or 'emacs." | |||
| 807 | 807 | ||
| 808 | (defun ediff-set-overlay-face (extent face) | 808 | (defun ediff-set-overlay-face (extent face) |
| 809 | (ediff-overlay-put extent 'face face) | 809 | (ediff-overlay-put extent 'face face) |
| 810 | (ediff-overlay-put extent 'help-echo 'ediff-region-help-echo)) | 810 | (ediff-overlay-put extent 'help-echo (if face 'ediff-region-help-echo))) |
| 811 | 811 | ||
| 812 | (defun ediff-region-help-echo (extent-or-window &optional overlay _point) | 812 | (defun ediff-region-help-echo (extent-or-window &optional overlay _point) |
| 813 | (unless overlay | 813 | (unless overlay |
diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 649ef884059..dbf52479527 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el | |||
| @@ -958,7 +958,7 @@ On a dumb terminal, switches between ASCII highlighting and no highlighting." | |||
| 958 | (message "Auto-refining is OFF") | 958 | (message "Auto-refining is OFF") |
| 959 | (setq ediff-auto-refine 'off)) | 959 | (setq ediff-auto-refine 'off)) |
| 960 | (t ;; nix 'em | 960 | (t ;; nix 'em |
| 961 | (ediff-set-fine-diff-properties ediff-current-difference 'default) | 961 | (ediff-set-fine-diff-properties ediff-current-difference t) |
| 962 | (message "Refinements are HIDDEN") | 962 | (message "Refinements are HIDDEN") |
| 963 | (setq ediff-auto-refine 'nix)) | 963 | (setq ediff-auto-refine 'nix)) |
| 964 | )) | 964 | )) |
| @@ -2973,7 +2973,7 @@ Hit \\[ediff-recenter] to reset the windows afterward." | |||
| 2973 | )) | 2973 | )) |
| 2974 | 2974 | ||
| 2975 | ;; unhighlight fine diffs | 2975 | ;; unhighlight fine diffs |
| 2976 | (ediff-set-fine-diff-properties ediff-current-difference 'default) | 2976 | (ediff-set-fine-diff-properties ediff-current-difference t) |
| 2977 | (run-hooks 'ediff-unselect-hook)))) | 2977 | (run-hooks 'ediff-unselect-hook)))) |
| 2978 | 2978 | ||
| 2979 | 2979 | ||
| @@ -3492,7 +3492,7 @@ Ediff Control Panel to restore highlighting." | |||
| 3492 | 3492 | ||
| 3493 | (if (ediff-valid-difference-p ediff-current-difference) | 3493 | (if (ediff-valid-difference-p ediff-current-difference) |
| 3494 | (progn | 3494 | (progn |
| 3495 | (ediff-set-fine-diff-properties ediff-current-difference 'default) | 3495 | (ediff-set-fine-diff-properties ediff-current-difference t) |
| 3496 | (ediff-unhighlight-diff))) | 3496 | (ediff-unhighlight-diff))) |
| 3497 | (ediff-paint-background-regions 'unhighlight) | 3497 | (ediff-paint-background-regions 'unhighlight) |
| 3498 | 3498 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 152bcad9470..e06163c32ce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,54 @@ | |||
| 1 | 2014-05-04 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Revert recent libpng changes (Bug#17339). | ||
| 4 | * Makefile.in (PNG_CFLAGS): Remove; all uses removed. | ||
| 5 | * image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>. | ||
| 6 | |||
| 7 | 2014-05-03 Paul Eggert <eggert@cs.ucla.edu> | ||
| 8 | |||
| 9 | Handle systems without WCONTINUED consistently. (Bug#15110, 17339) | ||
| 10 | * process.c (handle_child_signal): Remove WCONTINUED ifdef, | ||
| 11 | because WCONTINUED is always defined now. | ||
| 12 | * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c. | ||
| 13 | |||
| 14 | 2014-05-03 Eli Zaretskii <eliz@gnu.org> | ||
| 15 | |||
| 16 | * buffer.c (overlay_strings): Fix the wording of the commentary. | ||
| 17 | |||
| 18 | 2014-05-02 Paul Eggert <eggert@cs.ucla.edu> | ||
| 19 | |||
| 20 | Consult libpng-config more consistently (Bug#17339). | ||
| 21 | * Makefile.in (PNG_CFLAGS): New var. | ||
| 22 | (ALL_CFLAGS): Use it. | ||
| 23 | * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as | ||
| 24 | CFLAGS now handles this. | ||
| 25 | |||
| 26 | 2014-05-01 Glenn Morris <rgm@gnu.org> | ||
| 27 | |||
| 28 | * floatfns.c (Fisnan): | ||
| 29 | * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff'). | ||
| 30 | |||
| 31 | 2014-05-01 Eli Zaretskii <eliz@gnu.org> | ||
| 32 | |||
| 33 | * term.c (tty_menu_activate): A better initialization for cursor | ||
| 34 | coordinates. | ||
| 35 | |||
| 36 | 2014-05-01 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 37 | |||
| 38 | * intervals.c: Tighten assertions. | ||
| 39 | (create_root_interval): Make sure the interval is not empty. | ||
| 40 | (intervals_equal): Use booleans. | ||
| 41 | (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH. | ||
| 42 | (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs. | ||
| 43 | (balance_possible_root_interval): Simplify and use booleans. | ||
| 44 | (split_interval_right, split_interval_left): Check LENGTH, and remove | ||
| 45 | now redundant assertion. | ||
| 46 | (adjust_intervals_for_insertion): Remove now redundant assertions. | ||
| 47 | (delete_node, interval_deletion_adjustment) | ||
| 48 | (adjust_intervals_for_deletion, merge_interval_right) | ||
| 49 | (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH. | ||
| 50 | (reproduce_interval): Make sure the interval is not empty. | ||
| 51 | |||
| 1 | 2014-04-30 Paul Eggert <eggert@cs.ucla.edu> | 52 | 2014-04-30 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 53 | ||
| 3 | * term.c (tty_menu_activate): Don't assume row and col are initialized. | 54 | * term.c (tty_menu_activate): Don't assume row and col are initialized. |
diff --git a/src/buffer.c b/src/buffer.c index e6968e88d01..a1142479d04 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -3328,17 +3328,18 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, | |||
| 3328 | } | 3328 | } |
| 3329 | } | 3329 | } |
| 3330 | 3330 | ||
| 3331 | /* Return the concatenation of the strings associated with overlays that | 3331 | /* Concatenate the strings associated with overlays that begin or end |
| 3332 | begin or end at POS, ignoring overlays that are specific to a window | 3332 | at POS, ignoring overlays that are specific to windows other than W. |
| 3333 | other than W. The strings are concatenated in the appropriate order: | 3333 | The strings are concatenated in the appropriate order: shorter |
| 3334 | shorter overlays nest inside longer ones, and higher priority inside | 3334 | overlays nest inside longer ones, and higher priority inside lower. |
| 3335 | lower. Normally all of the after-strings come first, but zero-sized | 3335 | Normally all of the after-strings come first, but zero-sized |
| 3336 | overlays have their after-strings ride along with the before-strings | 3336 | overlays have their after-strings ride along with the |
| 3337 | because it would look strange to print them inside-out. | 3337 | before-strings because it would look strange to print them |
| 3338 | 3338 | inside-out. | |
| 3339 | Returns the string length, and stores the contents indirectly through | 3339 | |
| 3340 | PSTR, if that variable is non-null. The string may be overwritten by | 3340 | Returns the concatenated string's length, and return the pointer to |
| 3341 | subsequent calls. */ | 3341 | that string via PSTR, if that variable is non-NULL. The storage of |
| 3342 | the concatenated strings may be overwritten by subsequent calls. */ | ||
| 3342 | 3343 | ||
| 3343 | ptrdiff_t | 3344 | ptrdiff_t |
| 3344 | overlay_strings (ptrdiff_t pos, struct window *w, unsigned char **pstr) | 3345 | overlay_strings (ptrdiff_t pos, struct window *w, unsigned char **pstr) |
diff --git a/src/floatfns.c b/src/floatfns.c index ac0447ce6d6..75106a661b7 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | /* Primitive operations on floating point for GNU Emacs Lisp interpreter. | 1 | /* Primitive operations on floating point for GNU Emacs Lisp interpreter. |
| 2 | 2 | ||
| 3 | Copyright (C) 1988, 1993-1994, 1999, 2001-2014 Free Software Foundation, | 3 | Copyright (C) 1988, 1993-1994, 1999, 2001-2014 Free Software Foundation, Inc. |
| 4 | Inc. | ||
| 5 | 4 | ||
| 6 | Author: Wolfgang Rupprecht | 5 | Author: Wolfgang Rupprecht |
| 7 | (according to ack.texi) | 6 | (according to ack.texi) |
| @@ -142,7 +141,7 @@ DEFUN ("tan", Ftan, Stan, 1, 1, 0, | |||
| 142 | } | 141 | } |
| 143 | 142 | ||
| 144 | DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0, | 143 | DEFUN ("isnan", Fisnan, Sisnan, 1, 1, 0, |
| 145 | doc: /* Return non nil iff argument X is a NaN. */) | 144 | doc: /* Return non nil if argument X is a NaN. */) |
| 146 | (Lisp_Object x) | 145 | (Lisp_Object x) |
| 147 | { | 146 | { |
| 148 | CHECK_FLOAT (x); | 147 | CHECK_FLOAT (x); |
diff --git a/src/intervals.c b/src/intervals.c index 8544ed94b79..842e0c20c42 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -110,13 +110,14 @@ create_root_interval (Lisp_Object parent) | |||
| 110 | set_string_intervals (parent, new); | 110 | set_string_intervals (parent, new); |
| 111 | new->position = 0; | 111 | new->position = 0; |
| 112 | } | 112 | } |
| 113 | 113 | eassert (LENGTH (new) > 0); | |
| 114 | |||
| 114 | set_interval_object (new, parent); | 115 | set_interval_object (new, parent); |
| 115 | 116 | ||
| 116 | return new; | 117 | return new; |
| 117 | } | 118 | } |
| 118 | 119 | ||
| 119 | /* Make the interval TARGET have exactly the properties of SOURCE */ | 120 | /* Make the interval TARGET have exactly the properties of SOURCE. */ |
| 120 | 121 | ||
| 121 | void | 122 | void |
| 122 | copy_properties (register INTERVAL source, register INTERVAL target) | 123 | copy_properties (register INTERVAL source, register INTERVAL target) |
| @@ -176,10 +177,10 @@ intervals_equal (INTERVAL i0, INTERVAL i1) | |||
| 176 | Lisp_Object i1_cdr, i1_val; | 177 | Lisp_Object i1_cdr, i1_val; |
| 177 | 178 | ||
| 178 | if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1)) | 179 | if (DEFAULT_INTERVAL_P (i0) && DEFAULT_INTERVAL_P (i1)) |
| 179 | return 1; | 180 | return true; |
| 180 | 181 | ||
| 181 | if (DEFAULT_INTERVAL_P (i0) || DEFAULT_INTERVAL_P (i1)) | 182 | if (DEFAULT_INTERVAL_P (i0) || DEFAULT_INTERVAL_P (i1)) |
| 182 | return 0; | 183 | return false; |
| 183 | 184 | ||
| 184 | i0_cdr = i0->plist; | 185 | i0_cdr = i0->plist; |
| 185 | i1_cdr = i1->plist; | 186 | i1_cdr = i1->plist; |
| @@ -188,31 +189,31 @@ intervals_equal (INTERVAL i0, INTERVAL i1) | |||
| 188 | i0_sym = XCAR (i0_cdr); | 189 | i0_sym = XCAR (i0_cdr); |
| 189 | i0_cdr = XCDR (i0_cdr); | 190 | i0_cdr = XCDR (i0_cdr); |
| 190 | if (!CONSP (i0_cdr)) | 191 | if (!CONSP (i0_cdr)) |
| 191 | return 0; | 192 | return false; |
| 192 | i1_val = i1->plist; | 193 | i1_val = i1->plist; |
| 193 | while (CONSP (i1_val) && !EQ (XCAR (i1_val), i0_sym)) | 194 | while (CONSP (i1_val) && !EQ (XCAR (i1_val), i0_sym)) |
| 194 | { | 195 | { |
| 195 | i1_val = XCDR (i1_val); | 196 | i1_val = XCDR (i1_val); |
| 196 | if (!CONSP (i1_val)) | 197 | if (!CONSP (i1_val)) |
| 197 | return 0; | 198 | return false; |
| 198 | i1_val = XCDR (i1_val); | 199 | i1_val = XCDR (i1_val); |
| 199 | } | 200 | } |
| 200 | 201 | ||
| 201 | /* i0 has something i1 doesn't. */ | 202 | /* i0 has something i1 doesn't. */ |
| 202 | if (EQ (i1_val, Qnil)) | 203 | if (EQ (i1_val, Qnil)) |
| 203 | return 0; | 204 | return false; |
| 204 | 205 | ||
| 205 | /* i0 and i1 both have sym, but it has different values in each. */ | 206 | /* i0 and i1 both have sym, but it has different values in each. */ |
| 206 | if (!CONSP (i1_val) | 207 | if (!CONSP (i1_val) |
| 207 | || (i1_val = XCDR (i1_val), !CONSP (i1_val)) | 208 | || (i1_val = XCDR (i1_val), !CONSP (i1_val)) |
| 208 | || !EQ (XCAR (i1_val), XCAR (i0_cdr))) | 209 | || !EQ (XCAR (i1_val), XCAR (i0_cdr))) |
| 209 | return 0; | 210 | return false; |
| 210 | 211 | ||
| 211 | i0_cdr = XCDR (i0_cdr); | 212 | i0_cdr = XCDR (i0_cdr); |
| 212 | 213 | ||
| 213 | i1_cdr = XCDR (i1_cdr); | 214 | i1_cdr = XCDR (i1_cdr); |
| 214 | if (!CONSP (i1_cdr)) | 215 | if (!CONSP (i1_cdr)) |
| 215 | return 0; | 216 | return false; |
| 216 | i1_cdr = XCDR (i1_cdr); | 217 | i1_cdr = XCDR (i1_cdr); |
| 217 | } | 218 | } |
| 218 | 219 | ||
| @@ -339,10 +340,8 @@ rotate_right (INTERVAL A) | |||
| 339 | ptrdiff_t old_total = A->total_length; | 340 | ptrdiff_t old_total = A->total_length; |
| 340 | 341 | ||
| 341 | eassert (old_total > 0); | 342 | eassert (old_total > 0); |
| 342 | eassert (old_total | 343 | eassert (LENGTH (A) > 0); |
| 343 | > TOTAL_LENGTH (B) + TOTAL_LENGTH (A->right)); | 344 | eassert (LENGTH (B) > 0); |
| 344 | eassert (TOTAL_LENGTH (B) | ||
| 345 | > TOTAL_LENGTH (B->left) + TOTAL_LENGTH (c)); | ||
| 346 | 345 | ||
| 347 | /* Deal with any Parent of A; make it point to B. */ | 346 | /* Deal with any Parent of A; make it point to B. */ |
| 348 | if (! ROOT_INTERVAL_P (A)) | 347 | if (! ROOT_INTERVAL_P (A)) |
| @@ -366,9 +365,11 @@ rotate_right (INTERVAL A) | |||
| 366 | /* A's total length is decreased by the length of B and its left child. */ | 365 | /* A's total length is decreased by the length of B and its left child. */ |
| 367 | A->total_length -= B->total_length - TOTAL_LENGTH (c); | 366 | A->total_length -= B->total_length - TOTAL_LENGTH (c); |
| 368 | eassert (TOTAL_LENGTH (A) > 0); | 367 | eassert (TOTAL_LENGTH (A) > 0); |
| 368 | eassert (LENGTH (A) > 0); | ||
| 369 | 369 | ||
| 370 | /* B must have the same total length of A. */ | 370 | /* B must have the same total length of A. */ |
| 371 | B->total_length = old_total; | 371 | B->total_length = old_total; |
| 372 | eassert (LENGTH (B) > 0); | ||
| 372 | 373 | ||
| 373 | return B; | 374 | return B; |
| 374 | } | 375 | } |
| @@ -390,10 +391,8 @@ rotate_left (INTERVAL A) | |||
| 390 | ptrdiff_t old_total = A->total_length; | 391 | ptrdiff_t old_total = A->total_length; |
| 391 | 392 | ||
| 392 | eassert (old_total > 0); | 393 | eassert (old_total > 0); |
| 393 | eassert (old_total | 394 | eassert (LENGTH (A) > 0); |
| 394 | > TOTAL_LENGTH (B) + TOTAL_LENGTH (A->left)); | 395 | eassert (LENGTH (B) > 0); |
| 395 | eassert (TOTAL_LENGTH (B) | ||
| 396 | > TOTAL_LENGTH (B->right) + TOTAL_LENGTH (c)); | ||
| 397 | 396 | ||
| 398 | /* Deal with any parent of A; make it point to B. */ | 397 | /* Deal with any parent of A; make it point to B. */ |
| 399 | if (! ROOT_INTERVAL_P (A)) | 398 | if (! ROOT_INTERVAL_P (A)) |
| @@ -417,9 +416,11 @@ rotate_left (INTERVAL A) | |||
| 417 | /* A's total length is decreased by the length of B and its right child. */ | 416 | /* A's total length is decreased by the length of B and its right child. */ |
| 418 | A->total_length -= B->total_length - TOTAL_LENGTH (c); | 417 | A->total_length -= B->total_length - TOTAL_LENGTH (c); |
| 419 | eassert (TOTAL_LENGTH (A) > 0); | 418 | eassert (TOTAL_LENGTH (A) > 0); |
| 419 | eassert (LENGTH (A) > 0); | ||
| 420 | 420 | ||
| 421 | /* B must have the same total length of A. */ | 421 | /* B must have the same total length of A. */ |
| 422 | B->total_length = old_total; | 422 | B->total_length = old_total; |
| 423 | eassert (LENGTH (B) > 0); | ||
| 423 | 424 | ||
| 424 | return B; | 425 | return B; |
| 425 | } | 426 | } |
| @@ -432,6 +433,9 @@ balance_an_interval (INTERVAL i) | |||
| 432 | { | 433 | { |
| 433 | register ptrdiff_t old_diff, new_diff; | 434 | register ptrdiff_t old_diff, new_diff; |
| 434 | 435 | ||
| 436 | eassert (LENGTH (i) > 0); | ||
| 437 | eassert (TOTAL_LENGTH (i) >= LENGTH (i)); | ||
| 438 | |||
| 435 | while (1) | 439 | while (1) |
| 436 | { | 440 | { |
| 437 | old_diff = LEFT_TOTAL_LENGTH (i) - RIGHT_TOTAL_LENGTH (i); | 441 | old_diff = LEFT_TOTAL_LENGTH (i) - RIGHT_TOTAL_LENGTH (i); |
| @@ -468,16 +472,16 @@ static INTERVAL | |||
| 468 | balance_possible_root_interval (INTERVAL interval) | 472 | balance_possible_root_interval (INTERVAL interval) |
| 469 | { | 473 | { |
| 470 | Lisp_Object parent; | 474 | Lisp_Object parent; |
| 471 | bool have_parent = 0; | 475 | bool have_parent = false; |
| 472 | |||
| 473 | if (!INTERVAL_HAS_OBJECT (interval) && !INTERVAL_HAS_PARENT (interval)) | ||
| 474 | return interval; | ||
| 475 | 476 | ||
| 476 | if (INTERVAL_HAS_OBJECT (interval)) | 477 | if (INTERVAL_HAS_OBJECT (interval)) |
| 477 | { | 478 | { |
| 478 | have_parent = 1; | 479 | have_parent = true; |
| 479 | GET_INTERVAL_OBJECT (parent, interval); | 480 | GET_INTERVAL_OBJECT (parent, interval); |
| 480 | } | 481 | } |
| 482 | else if (!INTERVAL_HAS_PARENT (interval)) | ||
| 483 | return interval; | ||
| 484 | |||
| 481 | interval = balance_an_interval (interval); | 485 | interval = balance_an_interval (interval); |
| 482 | 486 | ||
| 483 | if (have_parent) | 487 | if (have_parent) |
| @@ -553,7 +557,7 @@ split_interval_right (INTERVAL interval, ptrdiff_t offset) | |||
| 553 | { | 557 | { |
| 554 | set_interval_right (interval, new); | 558 | set_interval_right (interval, new); |
| 555 | new->total_length = new_length; | 559 | new->total_length = new_length; |
| 556 | eassert (TOTAL_LENGTH (new) >= 0); | 560 | eassert (LENGTH (new) > 0); |
| 557 | } | 561 | } |
| 558 | else | 562 | else |
| 559 | { | 563 | { |
| @@ -562,7 +566,6 @@ split_interval_right (INTERVAL interval, ptrdiff_t offset) | |||
| 562 | set_interval_parent (interval->right, new); | 566 | set_interval_parent (interval->right, new); |
| 563 | set_interval_right (interval, new); | 567 | set_interval_right (interval, new); |
| 564 | new->total_length = new_length + new->right->total_length; | 568 | new->total_length = new_length + new->right->total_length; |
| 565 | eassert (TOTAL_LENGTH (new) >= 0); | ||
| 566 | balance_an_interval (new); | 569 | balance_an_interval (new); |
| 567 | } | 570 | } |
| 568 | 571 | ||
| @@ -598,7 +601,7 @@ split_interval_left (INTERVAL interval, ptrdiff_t offset) | |||
| 598 | { | 601 | { |
| 599 | set_interval_left (interval, new); | 602 | set_interval_left (interval, new); |
| 600 | new->total_length = new_length; | 603 | new->total_length = new_length; |
| 601 | eassert (TOTAL_LENGTH (new) >= 0); | 604 | eassert (LENGTH (new) > 0); |
| 602 | } | 605 | } |
| 603 | else | 606 | else |
| 604 | { | 607 | { |
| @@ -607,7 +610,6 @@ split_interval_left (INTERVAL interval, ptrdiff_t offset) | |||
| 607 | set_interval_parent (new->left, new); | 610 | set_interval_parent (new->left, new); |
| 608 | set_interval_left (interval, new); | 611 | set_interval_left (interval, new); |
| 609 | new->total_length = new_length + new->left->total_length; | 612 | new->total_length = new_length + new->left->total_length; |
| 610 | eassert (TOTAL_LENGTH (new) >= 0); | ||
| 611 | balance_an_interval (new); | 613 | balance_an_interval (new); |
| 612 | } | 614 | } |
| 613 | 615 | ||
| @@ -791,12 +793,12 @@ update_interval (register INTERVAL i, ptrdiff_t pos) | |||
| 791 | { | 793 | { |
| 792 | if (pos < i->position) | 794 | if (pos < i->position) |
| 793 | { | 795 | { |
| 794 | /* Move left. */ | 796 | /* Move left. */ |
| 795 | if (pos >= i->position - TOTAL_LENGTH (i->left)) | 797 | if (pos >= i->position - TOTAL_LENGTH (i->left)) |
| 796 | { | 798 | { |
| 797 | i->left->position = i->position - TOTAL_LENGTH (i->left) | 799 | i->left->position = i->position - TOTAL_LENGTH (i->left) |
| 798 | + LEFT_TOTAL_LENGTH (i->left); | 800 | + LEFT_TOTAL_LENGTH (i->left); |
| 799 | i = i->left; /* Move to the left child */ | 801 | i = i->left; /* Move to the left child. */ |
| 800 | } | 802 | } |
| 801 | else if (NULL_PARENT (i)) | 803 | else if (NULL_PARENT (i)) |
| 802 | error ("Point before start of properties"); | 804 | error ("Point before start of properties"); |
| @@ -806,12 +808,12 @@ update_interval (register INTERVAL i, ptrdiff_t pos) | |||
| 806 | } | 808 | } |
| 807 | else if (pos >= INTERVAL_LAST_POS (i)) | 809 | else if (pos >= INTERVAL_LAST_POS (i)) |
| 808 | { | 810 | { |
| 809 | /* Move right. */ | 811 | /* Move right. */ |
| 810 | if (pos < INTERVAL_LAST_POS (i) + TOTAL_LENGTH (i->right)) | 812 | if (pos < INTERVAL_LAST_POS (i) + TOTAL_LENGTH (i->right)) |
| 811 | { | 813 | { |
| 812 | i->right->position = INTERVAL_LAST_POS (i) | 814 | i->right->position = INTERVAL_LAST_POS (i) |
| 813 | + LEFT_TOTAL_LENGTH (i->right); | 815 | + LEFT_TOTAL_LENGTH (i->right); |
| 814 | i = i->right; /* Move to the right child */ | 816 | i = i->right; /* Move to the right child. */ |
| 815 | } | 817 | } |
| 816 | else if (NULL_PARENT (i)) | 818 | else if (NULL_PARENT (i)) |
| 817 | error ("Point %"pD"d after end of properties", pos); | 819 | error ("Point %"pD"d after end of properties", pos); |
| @@ -958,7 +960,6 @@ adjust_intervals_for_insertion (INTERVAL tree, | |||
| 958 | for (temp = prev ? prev : i; temp; temp = INTERVAL_PARENT_OR_NULL (temp)) | 960 | for (temp = prev ? prev : i; temp; temp = INTERVAL_PARENT_OR_NULL (temp)) |
| 959 | { | 961 | { |
| 960 | temp->total_length += length; | 962 | temp->total_length += length; |
| 961 | eassert (TOTAL_LENGTH (temp) >= 0); | ||
| 962 | temp = balance_possible_root_interval (temp); | 963 | temp = balance_possible_root_interval (temp); |
| 963 | } | 964 | } |
| 964 | 965 | ||
| @@ -1014,7 +1015,6 @@ adjust_intervals_for_insertion (INTERVAL tree, | |||
| 1014 | for (temp = i; temp; temp = INTERVAL_PARENT_OR_NULL (temp)) | 1015 | for (temp = i; temp; temp = INTERVAL_PARENT_OR_NULL (temp)) |
| 1015 | { | 1016 | { |
| 1016 | temp->total_length += length; | 1017 | temp->total_length += length; |
| 1017 | eassert (TOTAL_LENGTH (temp) >= 0); | ||
| 1018 | temp = balance_possible_root_interval (temp); | 1018 | temp = balance_possible_root_interval (temp); |
| 1019 | } | 1019 | } |
| 1020 | } | 1020 | } |
| @@ -1216,9 +1216,10 @@ delete_node (register INTERVAL i) | |||
| 1216 | this = this->left; | 1216 | this = this->left; |
| 1217 | this->total_length += migrate_amt; | 1217 | this->total_length += migrate_amt; |
| 1218 | } | 1218 | } |
| 1219 | eassert (TOTAL_LENGTH (this) >= 0); | ||
| 1220 | set_interval_left (this, migrate); | 1219 | set_interval_left (this, migrate); |
| 1221 | set_interval_parent (migrate, this); | 1220 | set_interval_parent (migrate, this); |
| 1221 | eassert (LENGTH (this) > 0); | ||
| 1222 | eassert (LENGTH (i->right) > 0); | ||
| 1222 | 1223 | ||
| 1223 | return i->right; | 1224 | return i->right; |
| 1224 | } | 1225 | } |
| @@ -1298,7 +1299,7 @@ interval_deletion_adjustment (register INTERVAL tree, register ptrdiff_t from, | |||
| 1298 | relative_position, | 1299 | relative_position, |
| 1299 | amount); | 1300 | amount); |
| 1300 | tree->total_length -= subtract; | 1301 | tree->total_length -= subtract; |
| 1301 | eassert (TOTAL_LENGTH (tree) >= 0); | 1302 | eassert (LENGTH (tree) > 0); |
| 1302 | return subtract; | 1303 | return subtract; |
| 1303 | } | 1304 | } |
| 1304 | /* Right branch. */ | 1305 | /* Right branch. */ |
| @@ -1313,7 +1314,7 @@ interval_deletion_adjustment (register INTERVAL tree, register ptrdiff_t from, | |||
| 1313 | relative_position, | 1314 | relative_position, |
| 1314 | amount); | 1315 | amount); |
| 1315 | tree->total_length -= subtract; | 1316 | tree->total_length -= subtract; |
| 1316 | eassert (TOTAL_LENGTH (tree) >= 0); | 1317 | eassert (LENGTH (tree) > 0); |
| 1317 | return subtract; | 1318 | return subtract; |
| 1318 | } | 1319 | } |
| 1319 | /* Here -- this node. */ | 1320 | /* Here -- this node. */ |
| @@ -1328,7 +1329,7 @@ interval_deletion_adjustment (register INTERVAL tree, register ptrdiff_t from, | |||
| 1328 | amount = my_amount; | 1329 | amount = my_amount; |
| 1329 | 1330 | ||
| 1330 | tree->total_length -= amount; | 1331 | tree->total_length -= amount; |
| 1331 | eassert (TOTAL_LENGTH (tree) >= 0); | 1332 | eassert (LENGTH (tree) >= 0); |
| 1332 | if (LENGTH (tree) == 0) | 1333 | if (LENGTH (tree) == 0) |
| 1333 | delete_interval (tree); | 1334 | delete_interval (tree); |
| 1334 | 1335 | ||
| @@ -1370,7 +1371,7 @@ adjust_intervals_for_deletion (struct buffer *buffer, | |||
| 1370 | if (ONLY_INTERVAL_P (tree)) | 1371 | if (ONLY_INTERVAL_P (tree)) |
| 1371 | { | 1372 | { |
| 1372 | tree->total_length -= length; | 1373 | tree->total_length -= length; |
| 1373 | eassert (TOTAL_LENGTH (tree) >= 0); | 1374 | eassert (LENGTH (tree) > 0); |
| 1374 | return; | 1375 | return; |
| 1375 | } | 1376 | } |
| 1376 | 1377 | ||
| @@ -1430,12 +1431,12 @@ merge_interval_right (register INTERVAL i) | |||
| 1430 | while (! NULL_LEFT_CHILD (successor)) | 1431 | while (! NULL_LEFT_CHILD (successor)) |
| 1431 | { | 1432 | { |
| 1432 | successor->total_length += absorb; | 1433 | successor->total_length += absorb; |
| 1433 | eassert (TOTAL_LENGTH (successor) >= 0); | 1434 | eassert (LENGTH (successor) > 0); |
| 1434 | successor = successor->left; | 1435 | successor = successor->left; |
| 1435 | } | 1436 | } |
| 1436 | 1437 | ||
| 1437 | successor->total_length += absorb; | 1438 | successor->total_length += absorb; |
| 1438 | eassert (TOTAL_LENGTH (successor) >= 0); | 1439 | eassert (LENGTH (successor) > 0); |
| 1439 | delete_interval (i); | 1440 | delete_interval (i); |
| 1440 | return successor; | 1441 | return successor; |
| 1441 | } | 1442 | } |
| @@ -1457,7 +1458,7 @@ merge_interval_right (register INTERVAL i) | |||
| 1457 | 1458 | ||
| 1458 | successor = INTERVAL_PARENT (successor); | 1459 | successor = INTERVAL_PARENT (successor); |
| 1459 | successor->total_length -= absorb; | 1460 | successor->total_length -= absorb; |
| 1460 | eassert (TOTAL_LENGTH (successor) >= 0); | 1461 | eassert (LENGTH (successor) > 0); |
| 1461 | } | 1462 | } |
| 1462 | 1463 | ||
| 1463 | /* This must be the rightmost or last interval and cannot | 1464 | /* This must be the rightmost or last interval and cannot |
| @@ -1486,12 +1487,12 @@ merge_interval_left (register INTERVAL i) | |||
| 1486 | while (! NULL_RIGHT_CHILD (predecessor)) | 1487 | while (! NULL_RIGHT_CHILD (predecessor)) |
| 1487 | { | 1488 | { |
| 1488 | predecessor->total_length += absorb; | 1489 | predecessor->total_length += absorb; |
| 1489 | eassert (TOTAL_LENGTH (predecessor) >= 0); | 1490 | eassert (LENGTH (predecessor) > 0); |
| 1490 | predecessor = predecessor->right; | 1491 | predecessor = predecessor->right; |
| 1491 | } | 1492 | } |
| 1492 | 1493 | ||
| 1493 | predecessor->total_length += absorb; | 1494 | predecessor->total_length += absorb; |
| 1494 | eassert (TOTAL_LENGTH (predecessor) >= 0); | 1495 | eassert (LENGTH (predecessor) > 0); |
| 1495 | delete_interval (i); | 1496 | delete_interval (i); |
| 1496 | return predecessor; | 1497 | return predecessor; |
| 1497 | } | 1498 | } |
| @@ -1513,7 +1514,7 @@ merge_interval_left (register INTERVAL i) | |||
| 1513 | 1514 | ||
| 1514 | predecessor = INTERVAL_PARENT (predecessor); | 1515 | predecessor = INTERVAL_PARENT (predecessor); |
| 1515 | predecessor->total_length -= absorb; | 1516 | predecessor->total_length -= absorb; |
| 1516 | eassert (TOTAL_LENGTH (predecessor) >= 0); | 1517 | eassert (LENGTH (predecessor) > 0); |
| 1517 | } | 1518 | } |
| 1518 | 1519 | ||
| 1519 | /* This must be the leftmost or first interval and cannot | 1520 | /* This must be the leftmost or first interval and cannot |
| @@ -1528,6 +1529,8 @@ reproduce_interval (INTERVAL source) | |||
| 1528 | { | 1529 | { |
| 1529 | register INTERVAL target = make_interval (); | 1530 | register INTERVAL target = make_interval (); |
| 1530 | 1531 | ||
| 1532 | eassert (LENGTH (source) > 0); | ||
| 1533 | |||
| 1531 | target->total_length = source->total_length; | 1534 | target->total_length = source->total_length; |
| 1532 | target->position = source->position; | 1535 | target->position = source->position; |
| 1533 | 1536 | ||
| @@ -1538,6 +1541,7 @@ reproduce_interval (INTERVAL source) | |||
| 1538 | if (! NULL_RIGHT_CHILD (source)) | 1541 | if (! NULL_RIGHT_CHILD (source)) |
| 1539 | set_interval_right (target, reproduce_tree (source->right, target)); | 1542 | set_interval_right (target, reproduce_tree (source->right, target)); |
| 1540 | 1543 | ||
| 1544 | eassert (LENGTH (target) > 0); | ||
| 1541 | return target; | 1545 | return target; |
| 1542 | } | 1546 | } |
| 1543 | 1547 | ||
| @@ -1766,7 +1770,7 @@ lookup_char_property (Lisp_Object plist, Lisp_Object prop, bool textprop) | |||
| 1766 | 1770 | ||
| 1767 | if (! NILP (fallback)) | 1771 | if (! NILP (fallback)) |
| 1768 | return fallback; | 1772 | return fallback; |
| 1769 | /* Check for alternative properties */ | 1773 | /* Check for alternative properties. */ |
| 1770 | tail = Fassq (prop, Vchar_property_alias_alist); | 1774 | tail = Fassq (prop, Vchar_property_alias_alist); |
| 1771 | if (! NILP (tail)) | 1775 | if (! NILP (tail)) |
| 1772 | { | 1776 | { |
| @@ -2434,7 +2438,7 @@ set_intervals_multibyte_1 (INTERVAL i, bool multi_flag, | |||
| 2434 | end, end_byte); | 2438 | end, end_byte); |
| 2435 | } | 2439 | } |
| 2436 | 2440 | ||
| 2437 | /* Rounding to char boundaries can theoretically ake this interval | 2441 | /* Rounding to char boundaries can theoretically make this interval |
| 2438 | spurious. If so, delete one child, and copy its property list | 2442 | spurious. If so, delete one child, and copy its property list |
| 2439 | to this interval. */ | 2443 | to this interval. */ |
| 2440 | if (LEFT_TOTAL_LENGTH (i) + RIGHT_TOTAL_LENGTH (i) >= TOTAL_LENGTH (i)) | 2444 | if (LEFT_TOTAL_LENGTH (i) + RIGHT_TOTAL_LENGTH (i) >= TOTAL_LENGTH (i)) |
diff --git a/src/process.c b/src/process.c index 655f083fc33..fdb0501f9ec 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -6226,11 +6226,7 @@ handle_child_signal (int sig) | |||
| 6226 | int status; | 6226 | int status; |
| 6227 | 6227 | ||
| 6228 | if (p->alive | 6228 | if (p->alive |
| 6229 | #ifndef WCONTINUED | 6229 | && child_status_changed (p->pid, &status, WUNTRACED | WCONTINUED)) |
| 6230 | && child_status_changed (p->pid, &status, WUNTRACED)) | ||
| 6231 | #else | ||
| 6232 | && child_status_changed (p->pid, &status, WUNTRACED | WCONTINUED)) | ||
| 6233 | #endif | ||
| 6234 | { | 6230 | { |
| 6235 | /* Change the status of the process that was found. */ | 6231 | /* Change the status of the process that was found. */ |
| 6236 | p->tick = ++process_tick; | 6232 | p->tick = ++process_tick; |
diff --git a/src/profiler.c b/src/profiler.c index ff97fe88b7b..919aabc92af 100644 --- a/src/profiler.c +++ b/src/profiler.c | |||
| @@ -384,7 +384,7 @@ Return non-nil if the profiler was running. */) | |||
| 384 | DEFUN ("profiler-cpu-running-p", | 384 | DEFUN ("profiler-cpu-running-p", |
| 385 | Fprofiler_cpu_running_p, Sprofiler_cpu_running_p, | 385 | Fprofiler_cpu_running_p, Sprofiler_cpu_running_p, |
| 386 | 0, 0, 0, | 386 | 0, 0, 0, |
| 387 | doc: /* Return non-nil iff cpu profiler is running. */) | 387 | doc: /* Return non-nil if cpu profiler is running. */) |
| 388 | (void) | 388 | (void) |
| 389 | { | 389 | { |
| 390 | return profiler_cpu_running ? Qt : Qnil; | 390 | return profiler_cpu_running ? Qt : Qnil; |
diff --git a/src/syswait.h b/src/syswait.h index db197b82fb7..9c8cbd51f00 100644 --- a/src/syswait.h +++ b/src/syswait.h | |||
| @@ -29,6 +29,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | #include <sys/wait.h> | 29 | #include <sys/wait.h> |
| 30 | #endif /* !HAVE_SYS_WAIT_H */ | 30 | #endif /* !HAVE_SYS_WAIT_H */ |
| 31 | 31 | ||
| 32 | #ifndef WCONTINUED | ||
| 33 | #define WCONTINUED 8 | ||
| 34 | #endif | ||
| 35 | |||
| 32 | #ifndef WCOREDUMP /* not POSIX */ | 36 | #ifndef WCOREDUMP /* not POSIX */ |
| 33 | #define WCOREDUMP(status) ((status) & 0x80) | 37 | #define WCOREDUMP(status) ((status) & 0x80) |
| 34 | #endif | 38 | #endif |
diff --git a/src/term.c b/src/term.c index c636b8cac8b..8ea3e42dae6 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3267,7 +3267,10 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, | |||
| 3267 | 3267 | ||
| 3268 | /* Turn off the cursor. Otherwise it shows through the menu | 3268 | /* Turn off the cursor. Otherwise it shows through the menu |
| 3269 | panes, which is ugly. */ | 3269 | panes, which is ugly. */ |
| 3270 | col = cursorX (tty); | ||
| 3271 | row = cursorY (tty); | ||
| 3270 | tty_hide_cursor (tty); | 3272 | tty_hide_cursor (tty); |
| 3273 | |||
| 3271 | if (buffers_num_deleted) | 3274 | if (buffers_num_deleted) |
| 3272 | menu->text[0][7] = ' '; | 3275 | menu->text[0][7] = ' '; |
| 3273 | onepane = menu->count == 1 && menu->submenu[0]; | 3276 | onepane = menu->count == 1 && menu->submenu[0]; |
| @@ -3405,8 +3408,6 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, | |||
| 3405 | col = cursorX (tty); | 3408 | col = cursorX (tty); |
| 3406 | row = cursorY (tty); | 3409 | row = cursorY (tty); |
| 3407 | } | 3410 | } |
| 3408 | else | ||
| 3409 | row = -1; | ||
| 3410 | 3411 | ||
| 3411 | /* Display the help-echo message for the currently-selected menu | 3412 | /* Display the help-echo message for the currently-selected menu |
| 3412 | item. */ | 3413 | item. */ |
| @@ -3418,8 +3419,7 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, | |||
| 3418 | /* Move the cursor to the beginning of the current menu | 3419 | /* Move the cursor to the beginning of the current menu |
| 3419 | item, so that screen readers and other accessibility aids | 3420 | item, so that screen readers and other accessibility aids |
| 3420 | know where the active region is. */ | 3421 | know where the active region is. */ |
| 3421 | if (0 <= row) | 3422 | cursor_to (sf, row, col); |
| 3422 | cursor_to (sf, row, col); | ||
| 3423 | tty_hide_cursor (tty); | 3423 | tty_hide_cursor (tty); |
| 3424 | fflush (tty->output); | 3424 | fflush (tty->output); |
| 3425 | prev_menu_help_message = menu_help_message; | 3425 | prev_menu_help_message = menu_help_message; |